akanjs 3.1.2-rc.3 → 3.2.0-rc.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/ARCHITECTURE.md +196 -0
- package/CHANGELOG.md +413 -0
- package/README.ko.md +20 -6
- package/README.md +19 -6
- package/base/akanError.ts +78 -0
- package/base/index.ts +1 -0
- package/client/makePageProto.tsx +9 -1
- package/client/nativeBoot.ts +1 -0
- package/client/nativeHost.ts +32 -6
- package/client/route/RouteHead.ts +23 -0
- package/client/router.ts +8 -0
- package/client/rscNavigation.ts +8 -0
- package/common/abortSignals.ts +44 -0
- package/common/akanGraph.ts +25 -2
- package/common/appHosts.ts +7 -0
- package/common/frameworkMap.ts +60 -0
- package/common/hasErrKey.ts +8 -0
- package/common/index.ts +16 -0
- package/common/tunnelWire.ts +3 -2
- package/common/types.ts +7 -0
- package/common/websocketContract.ts +15 -0
- package/constant/invalidInputError.ts +8 -2
- package/constant/types.ts +9 -1
- package/dictionary/trans.ts +8 -4
- package/document/dataLoader.ts +20 -5
- package/document/filterMeta.ts +14 -2
- package/document/noDocumentError.ts +12 -3
- package/document/queryEvaluator.ts +42 -2
- package/fetch/client/fetchClient.ts +73 -24
- package/fetch/client/httpClient.ts +53 -18
- package/fetch/client/inflightQueries.ts +54 -0
- package/fetch/client/remoteError.ts +3 -0
- package/fetch/client/wsClient.ts +56 -2
- package/package.json +11 -1
- package/server/akanApp.ts +47 -13
- package/server/akanOption.ts +14 -0
- package/server/akanServer.ts +6 -1
- package/server/artifact/builderRpc.ts +14 -0
- package/server/artifact/index.ts +1 -0
- package/server/artifact/ipcTypes.ts +25 -3
- package/server/artifact/modulePreloadPlan.ts +32 -0
- package/server/artifact/routesManifestStore.ts +3 -0
- package/server/devtools/README.md +25 -0
- package/server/devtools/devtoolsRouter.ts +58 -32
- package/server/devtools/studio/studioActions.ts +78 -0
- package/server/devtools/studio/studioDocument.tsx +192 -28
- package/server/devtools/studio/studioFramework.tsx +129 -0
- package/server/devtools/studio/studioFrameworkLayout.ts +91 -0
- package/server/devtools/studio/studioLayout.ts +96 -19
- package/server/devtools/studio/studioRoute.ts +25 -11
- package/server/devtools/studio/studioRuntime.ts +61 -3
- package/server/devtools/studio/studioRuntimeGraph.ts +127 -0
- package/server/devtools/studio/studioStyle.ts +37 -1
- package/server/fallbackHead.tsx +26 -0
- package/server/flightModulePreloads.ts +54 -0
- package/server/flightRowReader.ts +137 -0
- package/server/imageOptimizer.ts +1 -1
- package/server/imageOptimizerError.ts +5 -6
- package/server/index.ts +1 -0
- package/server/logging/logTailClient.ts +7 -2
- package/server/mcp/McpAuth.ts +2 -4
- package/server/mcp/McpDispatcher.ts +19 -3
- package/server/mcp/McpExecutionContext.ts +5 -3
- package/server/migration/migrationError.ts +4 -4
- package/server/ops/statusAccess.ts +9 -0
- package/server/resolver/database.resolver.ts +4 -2
- package/server/resolver/signal.resolver.ts +3 -0
- package/server/routeElementComposer.tsx +33 -17
- package/server/routeState.ts +3 -0
- package/server/routing/apiRouter.ts +4 -0
- package/server/routing/appWsData.ts +8 -0
- package/server/routing/hostAllowlist.ts +23 -6
- package/server/routing/recencyList.ts +62 -0
- package/server/routing/roomReplay.ts +102 -27
- package/server/routing/soloAppRoutes.ts +11 -0
- package/server/routing/wsCredentialExpiry.ts +32 -0
- package/server/rscClient.tsx +65 -6
- package/server/rscClientFetch.ts +46 -9
- package/server/rscClientPatch.ts +5 -29
- package/server/rscHttp.ts +10 -43
- package/server/rscPrefetchCache.ts +216 -0
- package/server/rscWorker.tsx +61 -31
- package/server/rscWorkerHost.ts +15 -3
- package/server/sessionRefresh.ts +125 -0
- package/server/ssrFromRscRenderer.tsx +37 -39
- package/server/ssrTypes.ts +3 -0
- package/server/tunnel/TunnelHttpStream.ts +4 -1
- package/server/tunnel/TunnelWebsocketStream.ts +3 -1
- package/server/vendor/akanjs-store-agent.ts +1 -0
- package/server/webRouter.ts +49 -13
- package/service/ipcTypes.ts +4 -2
- package/service/liveSyncHub.ts +89 -52
- package/service/predefinedAdaptor/database.adaptor.ts +34 -10
- package/service/predefinedAdaptor/solidPubsub.adaptor.ts +8 -0
- package/service/predefinedAdaptor/sql/SqlDocumentStore.ts +17 -7
- package/service/predefinedAdaptor/sql/driver/bunSqlite.ts +29 -18
- package/service/predefinedAdaptor/sql/types.ts +1 -0
- package/service/predefinedAdaptor/websocket.adaptor.ts +82 -16
- package/service/serve.ts +1 -0
- package/signal/SignalFailure.ts +14 -5
- package/signal/endpointIdempotency.ts +1 -1
- package/signal/endpointInfo.ts +6 -4
- package/signal/exception.ts +17 -12
- package/signal/signalContext.ts +1 -1
- package/signal/sliceInfo.ts +4 -3
- package/store/SliceRequest.ts +6 -3
- package/store/action.ts +108 -93
- package/store/agent/index.ts +0 -2
- package/store/agentic/index.ts +2 -0
- package/store/deprecatedAgent.ts +42 -0
- package/store/index.ts +1 -1
- package/store/storeInstance.ts +108 -41
- package/test/testServer.ts +1 -0
- package/types/base/akanError.d.ts +23 -0
- package/types/base/index.d.ts +1 -0
- package/types/client/makePageProto.d.ts +9231 -102
- package/types/client/nativeBoot.d.ts +1 -0
- package/types/client/route/RouteHead.d.ts +8 -1
- package/types/client/router.d.ts +5 -0
- package/types/client/rscNavigation.d.ts +4 -0
- package/types/common/abortSignals.d.ts +9 -0
- package/types/common/akanGraph.d.ts +20 -2
- package/types/common/appHosts.d.ts +1 -0
- package/types/common/frameworkMap.d.ts +52 -0
- package/types/common/hasErrKey.d.ts +3 -0
- package/types/common/index.d.ts +5 -2
- package/types/common/tunnelWire.d.ts +3 -2
- package/types/common/types.d.ts +7 -0
- package/types/common/websocketContract.d.ts +5 -0
- package/types/constant/invalidInputError.d.ts +2 -1
- package/types/constant/types.d.ts +2 -1
- package/types/dictionary/base.dictionary.d.ts +1 -1
- package/types/dictionary/dictionary.d.ts +8 -8
- package/types/dictionary/trans.d.ts +3 -0
- package/types/document/dataLoader.d.ts +4 -2
- package/types/document/filterMeta.d.ts +3 -2
- package/types/document/noDocumentError.d.ts +4 -2
- package/types/document/queryEvaluator.d.ts +7 -0
- package/types/fetch/client/httpClient.d.ts +2 -0
- package/types/fetch/client/inflightQueries.d.ts +6 -0
- package/types/fetch/client/remoteError.d.ts +2 -0
- package/types/fetch/client/wsClient.d.ts +12 -0
- package/types/server/akanOption.d.ts +8 -0
- package/types/server/artifact/builderRpc.d.ts +3 -1
- package/types/server/artifact/index.d.ts +1 -0
- package/types/server/artifact/ipcTypes.d.ts +18 -2
- package/types/server/artifact/modulePreloadPlan.d.ts +15 -0
- package/types/server/artifact/routesManifestStore.d.ts +3 -0
- package/types/server/devtools/devtoolsRouter.d.ts +4 -1
- package/types/server/devtools/studio/studioActions.d.ts +16 -0
- package/types/server/devtools/studio/studioDocument.d.ts +6 -3
- package/types/server/devtools/studio/studioFramework.d.ts +8 -0
- package/types/server/devtools/studio/studioFrameworkLayout.d.ts +27 -0
- package/types/server/devtools/studio/studioLayout.d.ts +18 -4
- package/types/server/devtools/studio/studioRoute.d.ts +6 -2
- package/types/server/devtools/studio/studioRuntimeGraph.d.ts +24 -0
- package/types/server/devtools/studio/studioStyle.d.ts +1 -1
- package/types/server/fallbackHead.d.ts +10 -0
- package/types/server/flightModulePreloads.d.ts +7 -0
- package/types/server/flightRowReader.d.ts +3 -0
- package/types/server/imageOptimizerError.d.ts +3 -3
- package/types/server/index.d.ts +1 -0
- package/types/server/logging/logTailClient.d.ts +2 -1
- package/types/server/logging/rotatingLogWriter.d.ts +1 -1
- package/types/server/mcp/McpDispatcher.d.ts +3 -2
- package/types/server/mcp/McpExecutionContext.d.ts +3 -2
- package/types/server/migration/migrationError.d.ts +2 -2
- package/types/server/ops/statusAccess.d.ts +3 -0
- package/types/server/routeElementComposer.d.ts +5 -1
- package/types/server/routeState.d.ts +2 -0
- package/types/server/routing/appWsData.d.ts +1 -0
- package/types/server/routing/hostAllowlist.d.ts +11 -3
- package/types/server/routing/recencyList.d.ts +11 -0
- package/types/server/routing/roomReplay.d.ts +3 -1
- package/types/server/routing/soloAppRoutes.d.ts +3 -0
- package/types/server/routing/wsCredentialExpiry.d.ts +5 -0
- package/types/server/rscClientFetch.d.ts +3 -0
- package/types/server/rscPrefetchCache.d.ts +30 -0
- package/types/server/rscWorkerHost.d.ts +2 -0
- package/types/server/sessionRefresh.d.ts +11 -0
- package/types/server/ssrFromRscRenderer.d.ts +1 -1
- package/types/server/ssrTypes.d.ts +3 -0
- package/types/server/vendor/akanjs-store-agent.d.ts +1 -0
- package/types/server/webRouter.d.ts +4 -3
- package/types/service/ipcTypes.d.ts +8 -3
- package/types/service/liveSyncHub.d.ts +7 -4
- package/types/service/predefinedAdaptor/solidPubsub.adaptor.d.ts +1 -0
- package/types/service/predefinedAdaptor/sql/SqlDocumentStore.d.ts +2 -0
- package/types/service/predefinedAdaptor/sql/driver/bunSqlite.d.ts +9 -3
- package/types/service/predefinedAdaptor/sql/types.d.ts +1 -0
- package/types/service/predefinedAdaptor/websocket.adaptor.d.ts +3 -1
- package/types/service/serve.d.ts +1 -0
- package/types/signal/SignalFailure.d.ts +6 -0
- package/types/signal/endpointInfo.d.ts +5 -5
- package/types/signal/exception.d.ts +5 -5
- package/types/signal/sliceInfo.d.ts +4 -4
- package/types/store/SliceRequest.d.ts +5 -2
- package/types/store/agent/index.d.ts +0 -1
- package/types/store/agentic/index.d.ts +1 -0
- package/types/store/deprecatedAgent.d.ts +41 -0
- package/types/store/index.d.ts +1 -1
- package/types/ui/Agent/Chat.d.ts +1 -1
- package/types/ui/Agent/Dock.d.ts +1 -1
- package/types/ui/Agent/Zone.d.ts +1 -1
- package/types/ui/Agent/agentSessionOf.d.ts +1 -1
- package/types/ui/Link/Anchor.d.ts +5 -2
- package/types/ui/Link/prefetchIntent.d.ts +25 -0
- package/types/ui/recipe/badgeRecipe.d.ts +2 -2
- package/types/ui/recipe/buttonRecipe.d.ts +2 -2
- package/ui/Agent/Chat.tsx +1 -1
- package/ui/Agent/Dock.tsx +2 -7
- package/ui/Agent/Zone.tsx +1 -1
- package/ui/Agent/agentSessionOf.ts +2 -3
- package/ui/Link/Anchor.tsx +7 -0
- package/ui/Link/index.tsx +1 -1
- package/ui/Link/prefetchIntent.ts +79 -0
- package/ui/System/Client.tsx +2 -0
- package/ui/fontCss.ts +27 -2
- package/vendor/@akanjs/native/CHANGELOG.md +21 -0
- package/vendor/use-agentic/CHANGELOG.md +19 -0
- package/webkit/McpAppAgent.ts +2 -1
package/ARCHITECTURE.md
ADDED
|
@@ -0,0 +1,196 @@
|
|
|
1
|
+
# Akan.js Architecture
|
|
2
|
+
|
|
3
|
+
How the `akanjs` package is laid out, which process runs what, and how a request travels through them.
|
|
4
|
+
|
|
5
|
+
The sections above the generated marker are kept by hand. A test checks that every class they name in backticks still
|
|
6
|
+
exists, so rename a class here when you rename it in the code. The facet layers and the message tables below the marker
|
|
7
|
+
are generated from the source by `bun run akan sync-architecture`, and the same test fails when they are stale. Akan
|
|
8
|
+
Studio's Framework view (`/_akan/studio?view=framework` under `akan start`) draws the same map, linked to the source.
|
|
9
|
+
|
|
10
|
+
## Processes
|
|
11
|
+
|
|
12
|
+
| Process | Runs | Started by | Owns |
|
|
13
|
+
| --- | --- | --- | --- |
|
|
14
|
+
| Dev host | `AkanAppHost` | `akan start` | file watching, the builder, restarting the gateway after a server change, relaying the builder's messages |
|
|
15
|
+
| Builder | `IncrementalBuilder` | `IncrementalBuilderHost`, in the dev host | bundles and CSS, route builds on demand, the Akan Graph and this map for Studio |
|
|
16
|
+
| Gateway | `AkanApp` | the dev host (`apps/<app>/main.ts`), or the container of a deployment with several replicas or a batch replica | the public port, proxying to the children, pubsub and live-change fan-out between them, health, metrics and logs |
|
|
17
|
+
| Child | `AkanServer` | `AkanApp`, one per replica | dependency injection, the API, websocket rooms, page rendering |
|
|
18
|
+
| RSC worker | `RscRenderer` | `RscWorker`, in the child | rendering route modules to a Flight stream |
|
|
19
|
+
| Browser tab | — | — | hydration, and in dev the updates `HmrWsHub` pushes over its socket |
|
|
20
|
+
|
|
21
|
+
A deployment has no dev host and no builder. With several replicas or a batch replica, the container runs the gateway,
|
|
22
|
+
and the gateway runs the children. With one replica and no batch replica, the default, `AkanApp` runs solo: one
|
|
23
|
+
`AkanServer` in the container's own process, with no gateway, binding the port and answering `/_akan/app/health`
|
|
24
|
+
itself, so step 1 below does not happen.
|
|
25
|
+
|
|
26
|
+
## A request, end to end
|
|
27
|
+
|
|
28
|
+
1. The gateway `AkanApp` answers `/_akan/app/health` itself and proxies every other request and websocket upgrade to a
|
|
29
|
+
child, over a Unix socket or TCP.
|
|
30
|
+
2. The child `AkanServer` boots dependency injection through `DiLifecycle`, which resolves each module's database with
|
|
31
|
+
`DatabaseResolver`, its services with `ServiceResolver` and its signals with `SignalResolver`. It then mounts its
|
|
32
|
+
routes with `ApiRouter.buildRoutes`: endpoints under `/api`, the socket at `/api/ws`, the builtins under `/_akan`
|
|
33
|
+
(`DevtoolsRouter` among them), and the pages from `WebRouter` last, as the catch-all.
|
|
34
|
+
3. An endpoint call reaches the handler `SignalResolver` mounted for it. The handler opens a `SignalContext`, whose
|
|
35
|
+
`init()` reads the request and whose `exec()` runs the endpoint's guards, parses its arguments, and runs the signal,
|
|
36
|
+
which calls its service.
|
|
37
|
+
4. A page request goes to `WebRouter`, which asks `RscWorker` for the route. `RscWorker` sends `render` to the RSC
|
|
38
|
+
worker process, where `RscRenderer` streams the Flight payload back as `meta`, `chunk` and `end`. For a full page
|
|
39
|
+
load `SsrFromRscRenderer` turns the stream into HTML; a client-side navigation takes the Flight stream itself.
|
|
40
|
+
5. A websocket message runs the same `SignalContext` path. A publish reaches the other children through the gateway:
|
|
41
|
+
the child's `SolidPubSub` sends `pubsub.publish`, and `AkanApp` answers every subscribed child with
|
|
42
|
+
`pubsub.deliver`.
|
|
43
|
+
|
|
44
|
+
In dev, a save reaches the tabs like this: the builder rebuilds and sends `pages-updated` or `css-updated`; the dev
|
|
45
|
+
host relays it to the gateway, which passes it to the child's `BuilderRpc`; the child's `DevHmrController` then
|
|
46
|
+
broadcasts an `HmrMessage` to the tabs.
|
|
47
|
+
|
|
48
|
+
<!-- akan:framework-map:start -->
|
|
49
|
+
<!-- Generated from the framework source by `bun run akan sync-architecture`. Edit outside the markers. -->
|
|
50
|
+
<!-- Outside the markers, every backticked PascalCase name must be a framework class or channel. -->
|
|
51
|
+
|
|
52
|
+
## Facet layers
|
|
53
|
+
|
|
54
|
+
A facet loads values only from facets in lower layers. A type-only import loads nothing, so it may point anywhere.
|
|
55
|
+
|
|
56
|
+
| Layer | Facet | Loads values from | Imports only types from |
|
|
57
|
+
| --- | --- | --- | --- |
|
|
58
|
+
| 0 | `base` | — | — |
|
|
59
|
+
| 0 | `native` | — | — |
|
|
60
|
+
| 1 | `common` | `base` | — |
|
|
61
|
+
| 2 | `constant` | `base`, `common` | — |
|
|
62
|
+
| 2 | `dictionary` | `common` | `base`, `constant`, `document`, `signal` |
|
|
63
|
+
| 3 | `document` | `base`, `common`, `constant` | `service` |
|
|
64
|
+
| 3 | `fetch` | `base`, `common`, `constant` | `document`, `signal` |
|
|
65
|
+
| 4 | `client` | `base`, `common`, `constant`, `fetch` | `signal` |
|
|
66
|
+
| 4 | `service` | `base`, `common`, `constant`, `dictionary`, `document` | `signal` |
|
|
67
|
+
| 5 | `signal` | `base`, `common`, `constant`, `dictionary`, `document`, `fetch`, `service` | — |
|
|
68
|
+
| 5 | `store` | `base`, `client`, `common`, `constant`, `fetch` | `document`, `signal` |
|
|
69
|
+
| 6 | `server` | `base`, `client`, `common`, `constant`, `dictionary`, `document`, `fetch`, `service`, `signal`, `store` | — |
|
|
70
|
+
| 6 | `webkit` | `base`, `client`, `common`, `fetch`, `signal`, `store` | `ui` |
|
|
71
|
+
| 7 | `@akanjs/devkit` | `base`, `client`, `common`, `server` | `native` |
|
|
72
|
+
| 7 | `test` | `base`, `common`, `constant`, `fetch`, `server`, `service` | `signal` |
|
|
73
|
+
| 7 | `ui` | `base`, `client`, `common`, `constant`, `fetch`, `store`, `webkit` | `document`, `signal` |
|
|
74
|
+
|
|
75
|
+
## Process messages
|
|
76
|
+
|
|
77
|
+
Each channel is a union of messages told apart by `type`. A sender writes the message's `type` literal; a handler
|
|
78
|
+
branches on it or relays it. Both are named by the class or top-level function they sit in. A dash means no site
|
|
79
|
+
was recognised.
|
|
80
|
+
|
|
81
|
+
### `AkanIpcMessage`: gateway ⇄ child
|
|
82
|
+
|
|
83
|
+
Declared in [service/ipcTypes.ts](service/ipcTypes.ts).
|
|
84
|
+
|
|
85
|
+
| Message | Sent by | Handled by |
|
|
86
|
+
| --- | --- | --- |
|
|
87
|
+
| `ready` | `AkanServer` | `AkanApp` |
|
|
88
|
+
| `pubsub.publish` | `SolidPubSub` | `AkanApp` |
|
|
89
|
+
| `pubsub.deliver` | `AkanApp` | `SolidPubSub` |
|
|
90
|
+
| `pubsub.subscribe` | `SolidPubSub` | `AkanApp` |
|
|
91
|
+
| `pubsub.unsubscribe` | `SolidPubSub` | `AkanApp` |
|
|
92
|
+
| `pubsub.snapshot.request` | `AkanApp` | `SolidPubSub` |
|
|
93
|
+
| `pubsub.snapshot` | `SolidPubSub` | `AkanApp` |
|
|
94
|
+
| `live.change` | `SolidPubSub` | `AkanApp`, `SolidPubSub` |
|
|
95
|
+
| `live.models` | `SolidPubSub` | `AkanApp` |
|
|
96
|
+
| `queue.enqueued` | `SolidQueue` | `AkanApp` |
|
|
97
|
+
| `queue.wake` | `AkanApp` | `SolidQueue` |
|
|
98
|
+
| `health.ping` | `AkanApp` | `AkanServer` |
|
|
99
|
+
| `health.pong` | `AkanServer` | `AkanApp` |
|
|
100
|
+
| `ws.opened` | — | — |
|
|
101
|
+
| `ws.closed` | — | — |
|
|
102
|
+
| `metrics.report` | `AkanServer` | `AkanApp` |
|
|
103
|
+
| `log.records` | `LogForwarder` | `AkanApp` |
|
|
104
|
+
| `log.level` | `AkanApp` | `AkanServer` |
|
|
105
|
+
| `shutdown` | `AkanApp` | `AkanServer` |
|
|
106
|
+
| `file.resolve` | `NativeFile` | — |
|
|
107
|
+
| `file.resolved` | — | `NativeFile` |
|
|
108
|
+
| `secret.request` | `NativeSecret` | — |
|
|
109
|
+
| `secret.answer` | — | `NativeSecret` |
|
|
110
|
+
| `error` | — | `AkanApp` |
|
|
111
|
+
|
|
112
|
+
### `BuilderMessage`: dev host ⇄ builder, relayed to the child
|
|
113
|
+
|
|
114
|
+
Declared in [server/artifact/ipcTypes.ts](server/artifact/ipcTypes.ts).
|
|
115
|
+
|
|
116
|
+
| Message | Sent by | Handled by |
|
|
117
|
+
| --- | --- | --- |
|
|
118
|
+
| `build-route` | `BuilderRpc` | `AkanApp`, `AkanAppHost`, `IncrementalBuilder` |
|
|
119
|
+
| `build-csr` | `BuilderRpc` | `AkanApp`, `AkanAppHost`, `IncrementalBuilder` |
|
|
120
|
+
| `build-graph` | `BuilderRpc` | `AkanApp`, `AkanAppHost`, `IncrementalBuilder` |
|
|
121
|
+
| `build-route-res` | `AkanAppHost`, `IncrementalBuilder` | `AkanApp`, `AkanAppHost`, `BuilderRpc`, `IncrementalBuilderHost` |
|
|
122
|
+
| `build-csr-res` | `AkanAppHost`, `IncrementalBuilder` | `AkanApp`, `AkanAppHost`, `BuilderRpc`, `IncrementalBuilderHost` |
|
|
123
|
+
| `build-graph-res` | `AkanAppHost`, `IncrementalBuilder` | `AkanApp`, `AkanAppHost`, `BuilderRpc`, `IncrementalBuilderHost` |
|
|
124
|
+
| `builder-shutdown` | `IncrementalBuilderHost` | `IncrementalBuilder` |
|
|
125
|
+
| `builder-ready` | `IncrementalBuilder` | `AkanApp`, `BuilderRpc`, `IncrementalBuilderHost` |
|
|
126
|
+
| `backend-ready` | `AkanApp` | `AkanAppHost` |
|
|
127
|
+
| `invalidate` | `AkanAppHost`, `prepareDevWatchBatch` | `AkanApp`, `AkanAppHost`, `BuilderRpc`, `IncrementalBuilderHost` |
|
|
128
|
+
| `css-updated` | `BuildBatch`, `IncrementalBuilder` | `AkanApp`, `AkanAppHost`, `BuilderRpc`, `IncrementalBuilderHost`, `shouldRelayRecycledFrontendState` |
|
|
129
|
+
| `pages-updated` | `BuildBatch`, `IncrementalBuilder` | `AkanApp`, `AkanAppHost`, `BuilderRpc`, `IncrementalBuilderHost`, `shouldRelayRecycledFrontendState` |
|
|
130
|
+
| `csr-updated` | `BuildBatch`, `IncrementalBuilder` | `AkanApp`, `BuilderRpc`, `IncrementalBuilderHost` |
|
|
131
|
+
| `ssr-updated` | `BuildBatch`, `IncrementalBuilder` | `AkanApp`, `BuilderRpc`, `IncrementalBuilderHost` |
|
|
132
|
+
| `build-status` | `AkanApp`, `AkanAppHost`, `BuildBatch`, `IncrementalBuilder` | `AkanApp`, `AkanAppHost`, `BuildBatchRunner`, `BuilderRpc`, `IncrementalBuilderHost` |
|
|
133
|
+
| `builder-metrics` | `IncrementalBuilder` | `AkanAppHost`, `IncrementalBuilderHost` |
|
|
134
|
+
| `boot-armed` | `IncrementalBuilder` | `AkanAppHost`, `IncrementalBuilderHost` |
|
|
135
|
+
|
|
136
|
+
### `InMsg`: server → RSC worker
|
|
137
|
+
|
|
138
|
+
Declared in [server/rscWorker.tsx](server/rscWorker.tsx).
|
|
139
|
+
|
|
140
|
+
| Message | Sent by | Handled by |
|
|
141
|
+
| --- | --- | --- |
|
|
142
|
+
| `init` | `RscWorker` | `RscRenderer` |
|
|
143
|
+
| `render` | `RscWorker` | `RscRenderer` |
|
|
144
|
+
| `cancel` | `RscWorker` | `RscRenderer` |
|
|
145
|
+
| `reload` | `RscWorker` | `RscRenderer` |
|
|
146
|
+
| `updateCssAssets` | `RscWorker` | `RscRenderer` |
|
|
147
|
+
| `invalidate-cache` | `createRscWorkerInvalidateCacheMessage` | `RscRenderer` |
|
|
148
|
+
| `log-level` | `RscWorker` | `RscRenderer` |
|
|
149
|
+
| `page-prompts` | `RscWorker` | `RscRenderer` |
|
|
150
|
+
| `page-prompt.run` | `RscWorker` | `RscRenderer` |
|
|
151
|
+
| `page-prompts.visible` | `RscWorker` | `RscRenderer` |
|
|
152
|
+
| `web-manifest` | `RscWorker` | `RscRenderer` |
|
|
153
|
+
|
|
154
|
+
### `RscInMsg`: RSC worker → server
|
|
155
|
+
|
|
156
|
+
Declared in [server/rscWorkerHost.ts](server/rscWorkerHost.ts).
|
|
157
|
+
|
|
158
|
+
| Message | Sent by | Handled by |
|
|
159
|
+
| --- | --- | --- |
|
|
160
|
+
| `hello` | `RscRenderer` | `RscWorker` |
|
|
161
|
+
| `ready` | `RscRenderer` | `RscWorker` |
|
|
162
|
+
| `reloaded` | `RscRenderer` | `RscWorker` |
|
|
163
|
+
| `meta` | `RscRenderer` | `RscWorker` |
|
|
164
|
+
| `theme` | `RscRenderer` | `RscWorker` |
|
|
165
|
+
| `cache-state` | `RscRenderer` | `RscWorker` |
|
|
166
|
+
| `chunk` | `RscRenderer` | `RscWorker` |
|
|
167
|
+
| `end` | `RscRenderer` | `RscWorker` |
|
|
168
|
+
| `redirect` | `RscRenderer` | `RscWorker` |
|
|
169
|
+
| `late-redirect` | `RscRenderer` | `RscWorker` |
|
|
170
|
+
| `late-not-found` | `RscRenderer` | `RscWorker` |
|
|
171
|
+
| `not-found` | `RscRenderer` | `RscWorker` |
|
|
172
|
+
| `metrics` | `RscRenderer` | `RscWorker` |
|
|
173
|
+
| `log.records` | `LogForwarder` | `RscWorker` |
|
|
174
|
+
| `page-prompts.result` | `RscRenderer` | `RscWorker` |
|
|
175
|
+
| `page-prompt.result` | `RscRenderer` | `RscWorker` |
|
|
176
|
+
| `page-prompts.visible.result` | `RscRenderer` | `RscWorker` |
|
|
177
|
+
| `web-manifest.result` | `RscRenderer` | `RscWorker` |
|
|
178
|
+
| `error` | `RscRenderer` | `RscWorker` |
|
|
179
|
+
|
|
180
|
+
### `HmrMessage`: dev server → browser tab
|
|
181
|
+
|
|
182
|
+
Declared in [server/hmr/wsHub.ts](server/hmr/wsHub.ts).
|
|
183
|
+
|
|
184
|
+
| Message | Sent by | Handled by |
|
|
185
|
+
| --- | --- | --- |
|
|
186
|
+
| `hello` | `ApiRouter` | — |
|
|
187
|
+
| `reload` | `DevHmrController` | — |
|
|
188
|
+
| `csr-update` | `DevHmrController` | — |
|
|
189
|
+
| `ssr-update` | `SsrUpdateQueue` | — |
|
|
190
|
+
| `rsc-refresh` | `DevHmrController` | — |
|
|
191
|
+
| `css-update` | `DevHmrController` | — |
|
|
192
|
+
| `sync-navigation` | — | `isSyncNavigationMessage` |
|
|
193
|
+
| `ok` | — | — |
|
|
194
|
+
| `build-status` | `devBuildStatusToHmrMessage` | — |
|
|
195
|
+
| `error` | `WebRouter` | — |
|
|
196
|
+
<!-- akan:framework-map:end -->
|