Skip to content

Commit dc477bc

Browse files
os-zhuangclaude
andauthored
docs(spec,kernel): the dev-plugin protocol header stops lying (#4149); services-checklist accuracy pass (#4151)
The #4093-series documentation tail: the spec's dev-plugin protocol header now says plainly that the schema family is declared-but- unconsumed (pending #4149's enforce-or-remove) instead of describing the stub design ADR-0115 retired, with the generated reference doc regenerated; and services-checklist.mdx gets a ten-fix accuracy pass (scoped docs-accuracy-audit run, adversarially verified, zero repairs). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BEM82RNKyyyTNPYHK1VJJS
1 parent 41dcda3 commit dc477bc

4 files changed

Lines changed: 57 additions & 42 deletions

File tree

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
---
2+
---
3+
4+
docs(spec,kernel): #4093-series tail — the dev-plugin protocol header stops describing the retired stub design and points at #4149 (the enforce-or-remove evaluation for that declared-but-unconsumed schema family), and services-checklist.mdx gets a ten-fix accuracy pass (verified adversarially). Documentation only; releases nothing.

content/docs/kernel/services-checklist.mdx

Lines changed: 23 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ The ObjectStack protocol defines **16 kernel services** registered via the `Core
5656

5757
| # | Service Name | Criticality | Methods | Status | Provider |
5858
|:--|:-------------|:------------|:--------|:-------|:---------|
59-
| 1 | **metadata** | `core` | 7 | ⚠️ Framework | Kernel (in-memory) |
59+
| 1 | **metadata** | `core` | 8 | ⚠️ Framework | Kernel (in-memory) |
6060
| 2 | **data** | `required` | 9 | ✅ Implemented | `@objectstack/objectql` |
6161
| 3 | **analytics** | `optional` | 2 | ❌ Plugin Required | `@objectstack/service-analytics` |
6262
| 4 | **auth** | `core` || 🟡 In Development | `@objectstack/plugin-auth` |
@@ -77,7 +77,7 @@ The ObjectStack protocol defines **16 kernel services** registered via the `Core
7777
**Criticality Levels**
7878
- **required**: System cannot start without this service
7979
- **core**: Falls back to in-memory implementation with a warning if missing
80-
- **optional**: Feature disabled; API returns `501 Not Implemented` if missing
80+
- **optional**: Feature disabled; the API answers as an empty slot if missing (404, or the domain's 501)
8181
</Callout>
8282

8383
---
@@ -97,6 +97,7 @@ The ObjectStack protocol defines **16 kernel services** registered via the `Core
9797
| `getMetaItems` | `GetMetaItemsRequest → GetMetaItemsResponse` ||
9898
| `getMetaItem` | `GetMetaItemRequest → GetMetaItemResponse` ||
9999
| `saveMetaItem` | `SaveMetaItemRequest → SaveMetaItemResponse` ||
100+
| `deleteMetaItem` | `DeleteMetaItemRequest → DeleteMetaItemResponse` ||
100101
| `getMetaItemCached` | `GetMetaItemCachedRequest → GetMetaItemCachedResponse` ||
101102
| `getUiView` | `GetUiViewRequest → GetUiViewResponse` ||
102103

@@ -106,7 +107,7 @@ The metadata service is a **framework** — it works with an in-memory `SchemaRe
106107

107108
| Gap | Description | Priority |
108109
|:----|:------------|:--------:|
109-
| **DB Persistence** | Metadata is only in memory; no save-to-database path exists | P0 |
110+
| **DB Persistence** | Shipped: `MetadataPlugin` (`@objectstack/metadata`) persists to `sys_metadata`; only the kernel's in-memory fallback is non-persistent | Shipped |
110111
| **Multi-instance Sync** | No mechanism to share metadata changes across instances | P1 |
111112
| **Migration / Versioning** | No schema diff or migration tooling | P1 |
112113
| **Hot Reload** | Metadata changes require restart | P2 |
@@ -133,7 +134,7 @@ no message. Below is the former — the fallback case:
133134
},
134135
"auth": {
135136
"enabled": false, "status": "unavailable",
136-
"message": "Install an auth plugin to enable"
137+
"message": "Install a auth plugin to enable"
137138
}
138139
}
139140
}
@@ -158,7 +159,9 @@ empty. The rule is enforced by one predicate (`isServiceServeable`) shared by
158159
the service domains, the route-mount gate, and both discovery builders, so what
159160
is advertised and what is served cannot disagree. It applies to the
160161
dispatcher-owned domains: `/analytics`, `/automation`, `/notifications`, `/ai`,
161-
`/storage`, `/i18n`.
162+
`/i18n`. (`/storage` is no longer a dispatcher domain — the bridge was retired
163+
in #4087 and `service-storage` mounts `/api/v1/storage` itself — but its route
164+
advertisement is still gated on the same predicate.)
162165

163166
The `services` map still reports a registered stub as
164167
`{ enabled: true, status: "stub", handlerReady: false }` rather than collapsing
@@ -196,10 +199,9 @@ than "install a plugin".
196199
| Driver | Package | CRUD | Aggregation | Ready |
197200
|:-------|:--------|:----:|:-----------:|:-----:|
198201
| InMemory | `@objectstack/driver-memory` ||| Dev/Test |
199-
| PostgreSQL | TBD ||||
200-
| MySQL | TBD ||||
201-
| MongoDB | TBD ||||
202-
| SQLite | TBD ||||
202+
| PostgreSQL / MySQL / SQLite | `@objectstack/driver-sql` (Knex) ||||
203+
| MongoDB | `@objectstack/driver-mongodb` ||||
204+
| SQLite (WASM) | `@objectstack/driver-sqlite-wasm` ||| Browser/WebContainer |
203205

204206
---
205207

@@ -221,8 +223,9 @@ discovery reports `analytics: { enabled: false, status: "unavailable" }`.
221223
`analytics` dev stub, and the dispatcher treats a slot filled by any
222224
self-declared stub (`handlerReady: false`, ADR-0076 D12) exactly like an empty
223225
one — routes unmounted, request 404. To use analytics locally, install the real
224-
engine; `@objectstack/service-analytics` runs an InMemory strategy, so it needs
225-
no database of its own.
226+
engine; `@objectstack/service-analytics` works against the in-memory driver
227+
(via its ObjectQL strategy, or `InMemoryStrategy` injected from
228+
`@objectstack/driver-memory`), so it needs no database of its own.
226229

227230
**And it is no longer analytics-only** (#4058 step 2): every dispatcher-owned
228231
domain now gates on `handlerReady`, so a slot occupied by a self-declared `stub`
@@ -298,12 +301,14 @@ Trigger engine, event triggers from ObjectQL hooks, flow executor, scheduled tri
298301
`aiNlq`, `aiSuggest`, `aiInsights`
299302

300303
<Callout type="warn">
301-
Declared only. All three are **optional** protocol methods (`aiNlq?` …) that no
302-
service in any repo implements, so the `/ai/{nlq,suggest,insights}` routes they
303-
back are mounted by nothing. The `client.ai` namespace that called them was
304-
removed in v17 (#3718). The AI service that does exist (`service-ai`) serves a
305-
different set — chat, complete, models, conversations — through none of these
306-
methods, so this entry describes a contract with no implementer on either side.
304+
Removed. These three were **optional** protocol methods (`aiNlq?` …) that no
305+
service in any repo ever implemented — the `/ai/{nlq,suggest,insights}` routes
306+
they backed were mounted by nothing and 404ed for their whole life. In v17 the
307+
`AiProtocol` contract, its schemas, and the `client.ai.{nlq,suggest,insights}`
308+
methods that called them were deleted outright (#3718). The AI service that
309+
does exist (`service-ai`, Cloud/EE) serves a different surface — chat,
310+
complete, models, conversations, agents — and `client.ai` was rebuilt against
311+
those real routes, so this entry describes a contract that no longer exists.
307312
</Callout>
308313

309314
### 11. i18n — 3 methods
@@ -380,7 +385,7 @@ AppPlugin will:
380385
| **file-storage** | Unified upload/download/delete. Drivers: local FS, S3, MinIO. |
381386
| **search** | Full-text search. Drivers: in-memory, Elasticsearch, Meilisearch. |
382387
| **cache** | General-purpose cache. In-memory fallback; Redis via `@objectstack/service-cache`. |
383-
| **queue** | Message queue. In-memory fallback; BullMQ / Redis via `@objectstack/service-queue`. |
388+
| **queue** | Message queue. In-memory fallback; durable DB-backed adapter via `@objectstack/service-queue` (no BullMQ/Redis adapter is shipped). |
384389
| **job** | Scheduled task execution. In-memory fallback; cron-based, concurrency control. |
385390

386391
---

content/docs/references/kernel/dev-plugin.mdx

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -7,31 +7,35 @@ description: Dev Plugin protocol schemas
77

88
# Dev Mode Plugin Protocol
99

10-
Defines the schema for a development-mode plugin that automatically enables
10+
Declared configuration vocabulary for a development-mode plugin: per-service
1111

12-
all platform services for local simulation. When loaded as a `devPlugin`,
12+
dev strategies, fixture loading, developer tooling, presets.
1313

14-
the kernel bootstraps every subsystem (data, UI, API, auth, events, jobs, …)
14+
⚠️ **Declared, not implemented — pending enforce-or-remove (#4149).**
1515

16-
using in-memory or stub implementations so that developers can exercise the
16+
The shipped `@objectstack/plugin-dev` consumes its own `DevPluginOptions`
1717

18-
full stack without external dependencies.
18+
interface, NOT this schema, and none of the surfaces below (presets,
1919

20-
Design goals:
20+
fixtures, dev-tools dashboard, per-service strategies, simulated latency)
2121

22-
- Zero-config by default: `devPlugins: ['@objectstack/plugin-dev']`
22+
exist in it. Since ADR-0115 it is an **assembly** plugin: it wires the real
2323

24-
- Every service can be overridden or disabled individually
24+
platform plugins for local development and registers no stub or simulated
2525

26-
- Preset profiles (minimal / standard / full) for common scenarios
26+
services — an unfilled slot answers exactly as it does in production. The
27+
28+
`strategy: 'stub'` value in particular describes a behaviour the platform
2729

28-
Inspired by:
30+
has retired. Do not build against this file until #4149 resolves it.
2931

30-
- Spring Boot DevTools (auto-configuration)
32+
Original design goals, kept for the #4149 evaluation:
3133

32-
- Next.js Dev Server (HMR + mock APIs)
34+
- Zero-config by default: `devPlugins: ['@objectstack/plugin-dev']`
35+
36+
- Every service can be overridden or disabled individually
3337

34-
- Vite Plugin Dev Mode (instant startup)
38+
- Preset profiles (minimal / standard / full) for common scenarios
3539

3640
<Callout type="info">
3741
**Source:** `packages/spec/src/kernel/dev-plugin.zod.ts`

packages/spec/src/kernel/dev-plugin.zod.ts

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,21 +5,23 @@ import { z } from 'zod';
55
/**
66
* # Dev Mode Plugin Protocol
77
*
8-
* Defines the schema for a development-mode plugin that automatically enables
9-
* all platform services for local simulation. When loaded as a `devPlugin`,
10-
* the kernel bootstraps every subsystem (data, UI, API, auth, events, jobs, …)
11-
* using in-memory or stub implementations so that developers can exercise the
12-
* full stack without external dependencies.
8+
* Declared configuration vocabulary for a development-mode plugin: per-service
9+
* dev strategies, fixture loading, developer tooling, presets.
1310
*
14-
* Design goals:
11+
* ⚠️ **Declared, not implemented — pending enforce-or-remove (#4149).**
12+
* The shipped `@objectstack/plugin-dev` consumes its own `DevPluginOptions`
13+
* interface, NOT this schema, and none of the surfaces below (presets,
14+
* fixtures, dev-tools dashboard, per-service strategies, simulated latency)
15+
* exist in it. Since ADR-0115 it is an **assembly** plugin: it wires the real
16+
* platform plugins for local development and registers no stub or simulated
17+
* services — an unfilled slot answers exactly as it does in production. The
18+
* `strategy: 'stub'` value in particular describes a behaviour the platform
19+
* has retired. Do not build against this file until #4149 resolves it.
20+
*
21+
* Original design goals, kept for the #4149 evaluation:
1522
* - Zero-config by default: `devPlugins: ['@objectstack/plugin-dev']`
1623
* - Every service can be overridden or disabled individually
1724
* - Preset profiles (minimal / standard / full) for common scenarios
18-
*
19-
* Inspired by:
20-
* - Spring Boot DevTools (auto-configuration)
21-
* - Next.js Dev Server (HMR + mock APIs)
22-
* - Vite Plugin Dev Mode (instant startup)
2325
*/
2426

2527
// ============================================================================

0 commit comments

Comments
 (0)