feat(server): realtime notification & task status (#14934)

#### PR Dependency Tree


* **PR #14934** 👈

This tree was auto-generated by
[Charcoal](https://github.com/danerwilliams/charcoal)

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **New Features**
* Full realtime platform added: live notifications, comments, embedding
progress, and transcription task updates via realtime subscriptions.

* **Chores**
* Frontend switched from polling/GraphQL queries to realtime channels;
legacy query fields marked deprecated and client libs updated to use
realtime APIs.

[![Review Change
Stack](https://storage.googleapis.com/coderabbit_public_assets/review-stack-in-coderabbit-ui.svg)](https://app.coderabbit.ai/change-stack/toeverything/AFFiNE/pull/14934)
<!-- end of auto-generated comment: release notes by coderabbit.ai -->


#### PR Dependency Tree


* **PR #14934** 👈
  * **PR #14936**

This tree was auto-generated by
[Charcoal](https://github.com/danerwilliams/charcoal)
This commit is contained in:
DarkSky
2026-05-10 23:21:50 +08:00
committed by GitHub
parent 417d31cabe
commit 8cf00738c2
70 changed files with 2378 additions and 283 deletions
+33
View File
@@ -1,3 +1,15 @@
import type {
RealtimeConfigureInput,
RealtimeRequestInputOf,
RealtimeRequestName,
RealtimeRequestOutputOf,
RealtimeStatus,
RealtimeSubscriptionReady,
RealtimeTopicEventOf,
RealtimeTopicInputOf,
RealtimeTopicName,
} from '@affine/realtime';
import type { AvailableStorageImplementations } from '../impls';
import type {
AggregateResult,
@@ -189,4 +201,25 @@ export type WorkerManagerOps = {
'telemetry.pageview': [TelemetryEvent, { queued: boolean }];
'telemetry.flush': [void, TelemetryAck];
'telemetry.getQueueState': [void, TelemetryQueueState];
'realtime.configure': [RealtimeConfigureInput, void];
'realtime.request': [
{
[Op in RealtimeRequestName]: {
op: Op;
input: RealtimeRequestInputOf<Op>;
timeoutMs?: number;
};
}[RealtimeRequestName],
RealtimeRequestOutputOf<RealtimeRequestName>,
];
'realtime.subscribe': [
{
[Topic in RealtimeTopicName]: {
topic: Topic;
input: RealtimeTopicInputOf<Topic>;
};
}[RealtimeTopicName],
RealtimeTopicEventOf<RealtimeTopicName> | RealtimeSubscriptionReady,
];
'realtime.status': [void, RealtimeStatus];
};