Skip to content

Commit 668dd17

Browse files
os-zhuangclaude
andauthored
feat(spec)!: retire vestigial feed contracts + protocol surface (#1959) (#3186)
ADR-0052 §5 follow-up. `service-feed`'s runtime was deleted in #1955; `sys_comment` / `sys_activity` are the canonical record-collaboration / timeline backend. This removes the dead type surface that still pointed at the deleted runtime — every removed method was already unreachable (feed REST was never mounted → 404; the protocol impl was never wired with a feed service, so requireFeedService() could only throw). No behavior change. Removed: - spec: contracts/feed-service (IFeedService), api/feed-api.zod (FeedApiContracts + request/response types), data/subscription.zod, and the four feed regions of api/protocol.zod (imports, z.function stubs, type re-exports, FeedProtocol interface + mixin) — plus their tests and barrels. - metadata-protocol: the getFeedService ctor param, requireFeedService(), and the 14 feed method implementations. Constructor is now (engine, getServicesRegistry?, environmentId?). - objectql: protocol-feed.test.ts + the positional call-site updates. - client: the feed = {...} SDK accessor and its feed response type imports. Kept: data/feed.zod trimmed to FeedItemType / FeedFilterMode (live UI config for the record activity component). Regenerated api-surface.json, json-schema.manifest.json, and content/docs/references. The residual discovery/dispatcher feed capability surface is tracked as a follow-up (#3180). Claude-Session: https://claude.ai/code/session_01HtN5uPoPnFzkSJ2HcwzgtG Co-authored-by: Claude <noreply@anthropic.com>
1 parent 4174a07 commit 668dd17

36 files changed

Lines changed: 99 additions & 4413 deletions
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
---
2+
"@objectstack/spec": minor
3+
"@objectstack/metadata-protocol": minor
4+
"@objectstack/client": minor
5+
"@objectstack/objectql": patch
6+
---
7+
8+
**Breaking (npm type surface): retire the vestigial feed contracts + protocol surface (ADR-0052 §5 follow-up, #1959).**
9+
10+
The `service-feed` runtime was deleted in #1955; `sys_comment` / `sys_activity`
11+
are the canonical record-collaboration/timeline backend. This removes the dead
12+
type surface that still pointed at the deleted runtime — every removed method was
13+
already unreachable (the feed REST route was never mounted → 404; the protocol
14+
implementation was never wired with a feed service, so `requireFeedService()`
15+
could only throw). No behavior changes.
16+
17+
No authorable metadata key is removed (the `feeds:` object capability flag and
18+
the `RecordActivity` UI component config are unchanged), so `PROTOCOL_MAJOR`
19+
stays 15 and this ships as `minor` rather than a protocol major.
20+
21+
FROM → TO migration for every removed export:
22+
23+
- `@objectstack/spec/contracts``IFeedService`, `CreateFeedItemInput`,
24+
`UpdateFeedItemInput`, `ListFeedOptions`, `FeedListResult`**removed, no
25+
replacement**. Comments/activity are plain records: write `sys_comment` / read
26+
`sys_activity` via the data engine or the REST data API.
27+
- `@objectstack/spec/api``FeedApiContracts`, `FeedApiErrorCode`,
28+
`FeedProtocol`, and all feed request/response schemas + types (`GetFeed*`,
29+
`CreateFeedItem*`, `UpdateFeedItem*`, `DeleteFeedItem*`, `AddReaction*`,
30+
`RemoveReaction*`, `PinFeedItem*`, `UnpinFeedItem*`, `StarFeedItem*`,
31+
`UnstarFeedItem*`, `SearchFeed*`, `GetChangelog*`, `ChangelogEntry`,
32+
`SubscribeRequest/Response`, `FeedUnsubscribeRequest`, `UnsubscribeResponse`,
33+
`FeedPathParams`, `FeedItemPathParams`, `FeedListFilterType`) → **removed**. Use
34+
the data API against `sys_comment` / `sys_activity` (`/api/v1/data/sys_comment/…`);
35+
reactions and threaded replies are fields on `sys_comment`.
36+
- `@objectstack/spec/data``FeedItemSchema`/`FeedItem`, `FeedActorSchema`/`FeedActor`,
37+
`MentionSchema`/`Mention`, `ReactionSchema`/`Reaction`,
38+
`FieldChangeEntrySchema`/`FieldChangeEntry`, `FeedVisibility`,
39+
`RecordSubscriptionSchema`/`RecordSubscription`, `SubscriptionEventType`, and the
40+
`data`-namespace `NotificationChannel`**removed**. `FeedItemType` and
41+
`FeedFilterMode` are **kept** (live UI activity-timeline config). For notification
42+
channels use `NotificationChannelSchema` from `@objectstack/spec/system`.
43+
- `@objectstack/client``client.feed.*` (`list` / `create` / `update` / `delete` /
44+
`addReaction` / `removeReaction` / `pin` / `unpin` / `star` / `unstar` / `search` /
45+
`getChangelog` / `subscribe` / `unsubscribe`) and the re-exported feed response
46+
types → **removed**. One-line fix: use `client.data.*` on `sys_comment` /
47+
`sys_activity`, e.g. `client.data.create('sys_comment', { object, record_id, body })`
48+
and `client.data.find('sys_activity', { filters: [['record_id', '=', id]] })`.
49+
- `@objectstack/metadata-protocol``ObjectStackProtocolImplementation` no longer
50+
implements the 14 feed methods; its constructor
51+
`(engine, getServicesRegistry?, getFeedService?, environmentId?)` becomes
52+
`(engine, getServicesRegistry?, environmentId?)`. One-line fix: delete the third
53+
argument.

0 commit comments

Comments
 (0)