akanjs 3.2.0-rc.9 → 3.2.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 +41 -38
- package/CHANGELOG.md +0 -680
- package/CONTRIBUTING.md +3 -0
- package/base/base.ts +2 -1
- package/client/clientRuntime.ts +1 -0
- package/client/cn.ts +2 -2
- package/client/csrTypes.ts +2 -0
- package/client/frameConfig.ts +1 -0
- package/client/index.ts +249 -26
- package/client/locale.ts +1 -0
- package/client/makePageProto.tsx +12 -85
- package/client/nativeThemeColor.ts +51 -0
- package/client/route/PageDefinition.ts +11 -3
- package/client/route/RouteDefinition.ts +24 -7
- package/client/route/RouteGuards.ts +2 -1
- package/client/route/RouteHead.ts +4 -1
- package/client/route/routeArgs.ts +8 -0
- package/client/router.ts +17 -2
- package/client/rscNavigation.ts +1 -0
- package/client/viewportMeta.ts +86 -6
- package/common/CodeTranscript.ts +1 -1
- package/common/Logger.ts +4 -2
- package/common/PipelinePlanSchema.ts +2 -2
- package/common/clientAddress.ts +14 -0
- package/common/err.ts +122 -0
- package/common/eventStream.ts +71 -19
- package/common/facetBarrel.ts +38 -0
- package/common/index.ts +7 -0
- package/common/isGuardRefusal.ts +14 -0
- package/common/loggedFailure.ts +11 -0
- package/common/mcpExposure.ts +17 -4
- package/common/pipelinePlan.ts +1 -1
- package/common/routeConvention.ts +3 -1
- package/common/types.ts +18 -1
- package/constant/constantRegistry.ts +4 -8
- package/constant/crystalize.ts +1 -2
- package/constant/getDefault.ts +1 -1
- package/constant/immerify.ts +1 -1
- package/constant/index.ts +78 -21
- package/constant/purify.ts +4 -9
- package/constant/serialize.ts +4 -2
- package/constant/types.ts +1 -0
- package/constant/via.ts +1 -2
- package/dictionary/agent.dictionary.ts +12 -0
- package/dictionary/base.dictionary.ts +11 -0
- package/dictionary/locale.ts +1 -1
- package/dictionary/trans.ts +14 -97
- package/document/dataLoader.ts +39 -19
- package/document/databaseRegistry.ts +2 -1
- package/document/documentSchema.ts +1 -0
- package/document/filterMeta.ts +4 -1
- package/document/into.ts +2 -1
- package/document/loaderInfo.ts +2 -1
- package/document/noDocumentError.ts +4 -1
- package/document/queryEvaluator.ts +1 -1
- package/document/types.ts +1 -1
- package/fetch/client/fetchClient.ts +83 -269
- package/fetch/client/fetchClientTypes.ts +49 -0
- package/fetch/client/httpClient.ts +3 -2
- package/fetch/client/remoteError.ts +4 -20
- package/fetch/client/requestScope.ts +41 -0
- package/fetch/client/signalCatalog.ts +131 -0
- package/fetch/client/wsClient.ts +82 -6
- package/fetch/requestStorage.ts +1 -0
- package/package.json +1 -1
- package/server/agentHooks.ts +16 -0
- package/server/akanApp.ts +110 -1272
- package/server/akanOption.ts +30 -3
- package/server/akanServer.ts +179 -674
- package/server/artifact/builderRpc.ts +14 -6
- package/server/artifact/routeSeedIndexStore.ts +4 -2
- package/server/assetHeaders.ts +6 -0
- package/server/console.ts +6 -4
- package/server/decorators.ts +2 -2
- package/server/di/diLifecycle.ts +24 -35
- package/server/di/predefinedAdaptor.ts +24 -1
- package/server/di/resolveHierarchy.ts +19 -6
- package/server/di/stageFailedError.ts +10 -0
- package/server/di/utils.ts +8 -3
- package/server/ed25519Key.ts +31 -15
- package/server/flightRowReader.ts +106 -20
- package/server/gateway/childSupervisor.ts +328 -0
- package/server/gateway/devHostChannel.ts +47 -0
- package/server/gateway/gatewayChildren.ts +161 -0
- package/server/gateway/gatewayConfig.ts +182 -0
- package/server/gateway/gatewayHttpProxy.ts +231 -0
- package/server/gateway/gatewayLogging.ts +111 -0
- package/server/gateway/gatewayRooms.ts +141 -0
- package/server/gateway/gatewayStatus.ts +122 -0
- package/server/gateway/gatewayStatusPage.ts +54 -0
- package/server/gateway/gatewayWebSocketRelay.ts +149 -0
- package/server/gateway/listeningPort.ts +13 -0
- package/server/hmr/devHmrController.ts +10 -1
- package/server/htmlResultCache.ts +234 -0
- package/server/imageOptimizer.ts +4 -1
- package/server/index.ts +281 -17
- package/server/lifecycle/parentChannel.ts +79 -0
- package/server/lifecycle/shutdownManager.ts +6 -3
- package/server/lifecycle/startGuard.ts +90 -0
- package/server/logging/hubFileSink.ts +1 -0
- package/server/logging/logControlSocket.ts +42 -3
- package/server/logging/logHub.ts +0 -0
- package/server/logging/logStdoutWriter.ts +3 -1
- package/server/logging/logStreamRoute.ts +28 -11
- package/server/logging/serverLogging.ts +74 -0
- package/server/machine/machineToken.ts +10 -3
- package/server/mcp/AgentTools.ts +149 -0
- package/server/mcp/AgentToolsAccount.ts +26 -0
- package/server/mcp/McpApps.ts +32 -2
- package/server/mcp/McpDispatcher.ts +44 -30
- package/server/mcp/McpPages.ts +34 -12
- package/server/mcp/McpRateLimiter.ts +14 -0
- package/server/mcp/McpRouter.ts +4 -2
- package/server/mcp/McpUiSession.ts +2 -1
- package/server/mcp/index.ts +1 -0
- package/server/migration/migrationCommand.ts +31 -2
- package/server/migration/migrationRunner.ts +36 -1
- package/server/nativeFile.ts +39 -12
- package/server/nativeSecret.ts +12 -3
- package/server/oauth/OAuthClientIdMetadata.ts +2 -2
- package/server/ops/migrateJobs.ts +2 -2
- package/server/ops/opsCommand.ts +1 -1
- package/server/ops/opsRoute.ts +5 -1
- package/server/ops/opsToken.ts +3 -1
- package/server/remote/RemoteFetch.ts +161 -0
- package/server/remote/RemoteMcp.ts +242 -0
- package/server/remote/RemoteOAuth.ts +270 -0
- package/server/remote/RemoteSource.ts +214 -0
- package/server/remote/index.ts +17 -0
- package/server/remote/remoteError.ts +19 -0
- package/server/resolver/CascadeRunner.ts +20 -8
- package/server/resolver/database.resolver.ts +10 -417
- package/server/resolver/databaseModelInstance.ts +209 -0
- package/server/resolver/invalidSignal.ts +7 -0
- package/server/resolver/livePause.ts +34 -0
- package/server/resolver/modelFacade.ts +136 -0
- package/server/resolver/modelLoaders.ts +84 -0
- package/server/resolver/modelSchema.ts +52 -0
- package/server/resolver/roomAdmission.ts +68 -0
- package/server/resolver/signal.resolver.ts +45 -111
- package/server/resolver/sliceCrud.ts +63 -0
- package/server/resolver/timedQuery.ts +16 -0
- package/server/resolver/websocketOf.ts +2 -1
- package/server/routeElementComposer.tsx +45 -6
- package/server/routeTreeBuilder.ts +23 -9
- package/server/routing/apiRouter.ts +53 -28
- package/server/routing/builtinRoutes.ts +194 -0
- package/server/routing/localRooms.ts +34 -0
- package/server/routing/roomReplay.ts +2 -2
- package/server/routing/serverLimits.ts +4 -1
- package/server/routing/serverListener.ts +194 -0
- package/server/rscClient.tsx +121 -204
- package/server/rscClientCache.ts +165 -0
- package/server/rscClientChunks.ts +126 -8
- package/server/rscClientFetch.ts +3 -1
- package/server/rscClientPatch.ts +78 -15
- package/server/rscDocumentHead.tsx +177 -0
- package/server/rscFlightRenderer.ts +83 -0
- package/server/rscFlightStream.ts +259 -0
- package/server/rscHostReloads.ts +238 -0
- package/server/rscHostRenderStream.ts +297 -0
- package/server/rscHostRequests.ts +158 -0
- package/server/rscHttp.ts +18 -6
- package/server/rscNavigationState.ts +24 -1
- package/server/rscPagePrompts.ts +65 -14
- package/server/rscPrefetchCache.ts +5 -1
- package/server/rscRenderControl.ts +33 -0
- package/server/rscRenderFallbacks.ts +299 -0
- package/server/rscRenderHandler.ts +439 -0
- package/server/rscRenderStats.ts +49 -0
- package/server/rscResultCaches.ts +74 -0
- package/server/rscRouteDocument.tsx +316 -0
- package/server/rscSegmentOutletReference.ts +5 -1
- package/server/rscStaticApp.tsx +73 -0
- package/server/rscWorker.tsx +112 -1341
- package/server/rscWorkerHost.ts +175 -803
- package/server/rscWorkerProcess.ts +155 -0
- package/server/rscWorkerRecycler.ts +128 -0
- package/server/serverConfig.ts +128 -0
- package/server/serverMetrics.ts +52 -0
- package/server/sitemap.ts +1 -0
- package/server/ssrFromRscRenderer.tsx +20 -20
- package/server/ssrStaticApp.tsx +243 -0
- package/server/webArtifact.ts +86 -0
- package/server/webAssetRoutes.ts +84 -0
- package/server/webCsrSurface.ts +172 -0
- package/server/webDocumentRoute.ts +180 -0
- package/server/webRouteContext.ts +232 -0
- package/server/webRouter.ts +129 -1165
- package/server/webRscRoute.ts +155 -0
- package/server/webSiteFiles.ts +139 -0
- package/server/webStaticApp.ts +62 -0
- package/server/wellKnownRoutes.ts +73 -0
- package/service/agent.service.ts +14 -2
- package/service/agentAccounts.ts +19 -0
- package/service/agentLoop/agentLoop.ts +550 -0
- package/service/agentLoop/agentLoopTypes.ts +220 -0
- package/service/agentLoop/deltaStream.ts +40 -0
- package/service/agentLoop/loopAnswer.ts +67 -0
- package/service/agentLoop/loopAsk.ts +44 -0
- package/service/agentLoop/loopCompaction.ts +146 -0
- package/service/agentLoop/loopRemotes.ts +181 -0
- package/service/agentLoop/loopRequest.ts +120 -0
- package/service/agentLoop/loopStored.ts +24 -0
- package/service/agentLoop/loopToolOutput.ts +54 -0
- package/service/agentLoop/loopToolkits.ts +155 -0
- package/service/agentLoop/loopTranscript.ts +138 -0
- package/{signal → service}/agentMeter.ts +2 -1
- package/{signal → service}/agentRelayPolicy.ts +43 -8
- package/service/endpointCacheKeys.ts +14 -2
- package/service/index.ts +6 -0
- package/service/injectInfo.ts +2 -1
- package/service/ipcTypes.ts +8 -2
- package/service/liveRoomLimit.ts +68 -0
- package/service/liveRoomLimitError.ts +16 -0
- package/service/liveSyncHub.ts +24 -2
- package/service/predefinedAdaptor/agentTools.adaptor.ts +34 -0
- package/service/predefinedAdaptor/anthropicLlm.ts +33 -14
- package/service/predefinedAdaptor/compress.adaptor.ts +2 -2
- package/service/predefinedAdaptor/database.adaptor.ts +62 -19
- package/service/predefinedAdaptor/index.ts +1 -0
- package/service/predefinedAdaptor/llm.adaptor.ts +24 -1
- package/service/predefinedAdaptor/openaiDialect.ts +72 -23
- package/service/predefinedAdaptor/openaiLlm.ts +1 -1
- package/service/predefinedAdaptor/role.adaptor.ts +2 -0
- package/service/predefinedAdaptor/solidPubsub.adaptor.ts +35 -2
- package/service/predefinedAdaptor/solidQueue.adaptor.ts +2 -2
- package/service/predefinedAdaptor/solidSqlite.ts +6 -3
- package/service/predefinedAdaptor/sql/DocumentHydrator.ts +95 -0
- package/service/predefinedAdaptor/sql/DocumentRowCodec.ts +192 -0
- package/service/predefinedAdaptor/sql/DocumentWriter.ts +298 -0
- package/service/predefinedAdaptor/sql/QueryScope.ts +70 -0
- package/service/predefinedAdaptor/sql/QueryWriter.ts +200 -0
- package/service/predefinedAdaptor/sql/SqlDocumentStore.ts +127 -1069
- package/service/predefinedAdaptor/sql/SqlTableSchema.ts +357 -0
- package/service/predefinedAdaptor/sql/StoredRows.ts +95 -0
- package/service/predefinedAdaptor/sql/TransactionScope.ts +14 -7
- package/service/predefinedAdaptor/sql/dialect/postgres.ts +1 -1
- package/service/predefinedAdaptor/sql/dialect/sqlite.ts +1 -1
- package/service/predefinedAdaptor/sql/driver/bunSqlite.ts +20 -9
- package/service/predefinedAdaptor/sql/driver/postgres.ts +1 -1
- package/service/predefinedAdaptor/sql/types.ts +28 -4
- package/service/predefinedAdaptor/sseData.ts +88 -0
- package/service/predefinedAdaptor/storage.adaptor.ts +2 -1
- package/service/predefinedAdaptor/websocket.adaptor.ts +74 -44
- package/service/serviceRegistry.ts +1 -0
- package/signal/SignalFailure.ts +35 -0
- package/signal/agent.signal.ts +15 -9
- package/signal/agentTurnStream.ts +23 -9
- package/signal/byIdRead.ts +18 -0
- package/signal/carriedClientIps.ts +1 -0
- package/signal/endpointCache.ts +61 -6
- package/signal/endpointErrorContract.ts +1 -1
- package/signal/endpointRateLimit.ts +84 -3
- package/signal/index.ts +322 -32
- package/signal/mcp/McpDocument.ts +8 -1
- package/signal/mcp/mcpProtocol.ts +6 -1
- package/signal/mcp/pagePrompt.ts +15 -0
- package/signal/middleware.ts +10 -3
- package/signal/openapi/openapi.ts +10 -1
- package/signal/resolveFieldContext.ts +34 -0
- package/signal/serializer/fetch.serializer.ts +22 -15
- package/signal/signalContext.ts +15 -42
- package/signal/slice.ts +22 -19
- package/signal/trace.ts +44 -5
- package/signal/types.ts +46 -8
- package/store/action.ts +32 -1057
- package/store/actionErrorMessage.ts +20 -0
- package/store/actionOption.ts +22 -0
- package/store/baseSt.ts +1 -0
- package/store/formFieldSetters.ts +229 -0
- package/store/index.ts +125 -17
- package/store/modelActionContext.ts +65 -0
- package/store/modelOpenActions.ts +158 -0
- package/store/modelWriteActions.ts +240 -0
- package/store/modelWriteGuard.ts +3 -12
- package/store/openSeq.ts +34 -0
- package/store/sliceListActions.ts +370 -0
- package/store/sliceLiveActions.ts +140 -0
- package/store/stateBuilder.ts +2 -0
- package/store/storeInstance.ts +4 -18
- package/store/storeRegistry.ts +1 -1
- package/test/conformance.ts +25 -5
- package/types/base/base.d.ts +2 -1
- package/types/client/clientRuntime.d.ts +1 -0
- package/types/client/cn.d.ts +2 -2
- package/types/client/csrTypes.d.ts +2 -0
- package/types/client/frameConfig.d.ts +1 -0
- package/types/client/index.d.ts +25 -26
- package/types/client/locale.d.ts +1 -0
- package/types/client/makePageProto.d.ts +5 -13
- package/types/client/nativeThemeColor.d.ts +6 -0
- package/types/client/route/PageDefinition.d.ts +5 -2
- package/types/client/route/RouteDefinition.d.ts +2 -2
- package/types/client/route/routeArgs.d.ts +7 -0
- package/types/client/router.d.ts +3 -1
- package/types/client/rscNavigation.d.ts +1 -0
- package/types/client/viewportMeta.d.ts +5 -2
- package/types/common/CodeTranscript.d.ts +1 -1
- package/types/common/clientAddress.d.ts +5 -0
- package/types/common/err.d.ts +48 -0
- package/types/common/eventStream.d.ts +5 -1
- package/types/common/facetBarrel.d.ts +4 -0
- package/types/common/index.d.ts +6 -3
- package/types/common/isGuardRefusal.d.ts +3 -0
- package/types/common/loggedFailure.d.ts +2 -0
- package/types/common/mcpExposure.d.ts +9 -2
- package/types/common/routeConvention.d.ts +2 -0
- package/types/common/types.d.ts +18 -1
- package/types/constant/constantRegistry.d.ts +3 -1
- package/types/constant/crystalize.d.ts +1 -1
- package/types/constant/getDefault.d.ts +1 -1
- package/types/constant/immerify.d.ts +1 -1
- package/types/constant/index.d.ts +21 -21
- package/types/constant/purify.d.ts +2 -1
- package/types/constant/serialize.d.ts +1 -1
- package/types/constant/types.d.ts +1 -0
- package/types/dictionary/agent.dictionary.d.ts +1 -1
- package/types/dictionary/base.dictionary.d.ts +1 -1
- package/types/dictionary/dictionary.d.ts +9 -9
- package/types/dictionary/locale.d.ts +1 -1
- package/types/dictionary/trans.d.ts +3 -26
- package/types/document/dataLoader.d.ts +5 -0
- package/types/document/databaseRegistry.d.ts +2 -1
- package/types/document/documentSchema.d.ts +1 -0
- package/types/document/filterMeta.d.ts +4 -1
- package/types/document/into.d.ts +1 -1
- package/types/document/loaderInfo.d.ts +2 -1
- package/types/document/noDocumentError.d.ts +8 -1
- package/types/document/queryEvaluator.d.ts +1 -1
- package/types/document/types.d.ts +1 -1
- package/types/fetch/client/fetchClient.d.ts +6 -36
- package/types/fetch/client/fetchClientTypes.d.ts +40 -0
- package/types/fetch/client/httpClient.d.ts +2 -0
- package/types/fetch/client/remoteError.d.ts +0 -4
- package/types/fetch/client/requestScope.d.ts +11 -0
- package/types/fetch/client/signalCatalog.d.ts +25 -0
- package/types/fetch/client/wsClient.d.ts +2 -0
- package/types/fetch/requestStorage.d.ts +1 -0
- package/types/server/agentHooks.d.ts +4 -0
- package/types/server/akanApp.d.ts +2 -20
- package/types/server/akanOption.d.ts +16 -2
- package/types/server/akanServer.d.ts +2 -2
- package/types/server/assetHeaders.d.ts +1 -0
- package/types/server/console.d.ts +4 -3
- package/types/server/di/predefinedAdaptor.d.ts +1 -0
- package/types/server/di/stageFailedError.d.ts +5 -0
- package/types/server/ed25519Key.d.ts +1 -0
- package/types/server/flightRowReader.d.ts +8 -2
- package/types/server/gateway/childSupervisor.d.ts +35 -0
- package/types/server/gateway/devHostChannel.d.ts +14 -0
- package/types/server/gateway/gatewayChildren.d.ts +50 -0
- package/types/server/gateway/gatewayConfig.d.ts +82 -0
- package/types/server/gateway/gatewayHttpProxy.d.ts +22 -0
- package/types/server/gateway/gatewayLogging.d.ts +16 -0
- package/types/server/gateway/gatewayRooms.d.ts +25 -0
- package/types/server/gateway/gatewayStatus.d.ts +63 -0
- package/types/server/gateway/gatewayStatusPage.d.ts +9 -0
- package/types/server/gateway/gatewayWebSocketRelay.d.ts +17 -0
- package/types/server/gateway/listeningPort.d.ts +5 -0
- package/types/server/htmlResultCache.d.ts +51 -0
- package/types/server/index.d.ts +19 -17
- package/types/server/lifecycle/parentChannel.d.ts +13 -0
- package/types/server/lifecycle/startGuard.d.ts +10 -0
- package/types/server/logging/logHub.d.ts +5 -1
- package/types/server/logging/logStreamRoute.d.ts +2 -0
- package/types/server/logging/rotatingLogWriter.d.ts +1 -1
- package/types/server/logging/serverLogging.d.ts +12 -0
- package/types/server/mcp/AgentTools.d.ts +31 -0
- package/types/server/mcp/AgentToolsAccount.d.ts +7 -0
- package/types/server/mcp/McpApps.d.ts +6 -2
- package/types/server/mcp/McpDispatcher.d.ts +10 -1
- package/types/server/mcp/McpPages.d.ts +2 -1
- package/types/server/mcp/McpRateLimiter.d.ts +3 -0
- package/types/server/mcp/index.d.ts +1 -0
- package/types/server/migration/migrationCommand.d.ts +1 -1
- package/types/server/migration/migrationRunner.d.ts +9 -1
- package/types/server/remote/RemoteFetch.d.ts +42 -0
- package/types/server/remote/RemoteMcp.d.ts +52 -0
- package/types/server/remote/RemoteOAuth.d.ts +58 -0
- package/types/server/remote/RemoteSource.d.ts +51 -0
- package/types/server/remote/index.d.ts +5 -0
- package/types/server/remote/remoteError.d.ts +12 -0
- package/types/server/remote.d.ts +1 -0
- package/types/server/resolver/CascadeRunner.d.ts +2 -2
- package/types/server/resolver/database.resolver.d.ts +2 -2
- package/types/server/resolver/databaseModelInstance.d.ts +4 -0
- package/types/server/resolver/invalidSignal.d.ts +2 -0
- package/types/server/resolver/livePause.d.ts +5 -0
- package/types/server/resolver/modelFacade.d.ts +5 -0
- package/types/server/resolver/modelLoaders.d.ts +15 -0
- package/types/server/resolver/modelSchema.d.ts +6 -0
- package/types/server/resolver/roomAdmission.d.ts +7 -0
- package/types/server/resolver/signal.resolver.d.ts +1 -1
- package/types/server/resolver/sliceCrud.d.ts +8 -0
- package/types/server/resolver/timedQuery.d.ts +8 -0
- package/types/server/routeElementComposer.d.ts +21 -5
- package/types/server/routing/builtinRoutes.d.ts +24 -0
- package/types/server/routing/localRooms.d.ts +14 -0
- package/types/server/routing/roomReplay.d.ts +2 -2
- package/types/server/routing/serverListener.d.ts +31 -0
- package/types/server/rscClientCache.d.ts +34 -0
- package/types/server/rscClientChunks.d.ts +3 -1
- package/types/server/rscClientPatch.d.ts +12 -1
- package/types/server/rscDocumentHead.d.ts +33 -0
- package/types/server/rscFlightRenderer.d.ts +14 -0
- package/types/server/rscFlightStream.d.ts +53 -0
- package/types/server/rscHostReloads.d.ts +54 -0
- package/types/server/rscHostRenderStream.d.ts +53 -0
- package/types/server/rscHostRequests.d.ts +29 -0
- package/types/server/rscHttp.d.ts +4 -2
- package/types/server/rscNavigationState.d.ts +5 -1
- package/types/server/rscPagePrompts.d.ts +13 -0
- package/types/server/rscRenderControl.d.ts +12 -0
- package/types/server/rscRenderFallbacks.d.ts +41 -0
- package/types/server/rscRenderHandler.d.ts +29 -0
- package/types/server/rscRenderStats.d.ts +32 -0
- package/types/server/rscResultCaches.d.ts +18 -0
- package/types/server/rscRouteDocument.d.ts +52 -0
- package/types/server/rscStaticApp.d.ts +28 -0
- package/types/server/rscWorker.d.ts +1 -3
- package/types/server/rscWorkerHost.d.ts +10 -70
- package/types/server/rscWorkerProcess.d.ts +31 -0
- package/types/server/rscWorkerRecycler.d.ts +22 -0
- package/types/server/serverConfig.d.ts +30 -0
- package/types/server/serverMetrics.d.ts +11 -0
- package/types/server/sitemap.d.ts +1 -0
- package/types/server/ssrFromRscRenderer.d.ts +2 -2
- package/types/server/ssrStaticApp.d.ts +20 -0
- package/types/server/webArtifact.d.ts +7 -0
- package/types/server/webAssetRoutes.d.ts +11 -0
- package/types/server/webCsrSurface.d.ts +18 -0
- package/types/server/webDocumentRoute.d.ts +19 -0
- package/types/server/webRouteContext.d.ts +45 -0
- package/types/server/webRouter.d.ts +3 -28
- package/types/server/webRscRoute.d.ts +24 -0
- package/types/server/webSiteFiles.d.ts +12 -0
- package/types/server/webStaticApp.d.ts +8 -0
- package/types/server/wellKnownRoutes.d.ts +5 -0
- package/types/service/agent.service.d.ts +3 -0
- package/types/service/agentAccounts.d.ts +8 -0
- package/types/service/agentLoop/agentLoop.d.ts +33 -0
- package/types/service/agentLoop/agentLoopTypes.d.ts +235 -0
- package/types/service/agentLoop/deltaStream.d.ts +3 -0
- package/types/service/agentLoop/loopAnswer.d.ts +13 -0
- package/types/service/agentLoop/loopAsk.d.ts +12 -0
- package/types/service/agentLoop/loopCompaction.d.ts +12 -0
- package/types/service/agentLoop/loopRemotes.d.ts +40 -0
- package/types/service/agentLoop/loopRequest.d.ts +9 -0
- package/types/service/agentLoop/loopStored.d.ts +6 -0
- package/types/service/agentLoop/loopToolOutput.d.ts +8 -0
- package/types/service/agentLoop/loopToolkits.d.ts +17 -0
- package/types/service/agentLoop/loopTranscript.d.ts +13 -0
- package/types/{signal → service}/agentMeter.d.ts +1 -1
- package/types/{signal → service}/agentRelayPolicy.d.ts +18 -3
- package/types/service/index.d.ts +6 -0
- package/types/service/injectInfo.d.ts +2 -1
- package/types/service/ipcTypes.d.ts +10 -0
- package/types/service/liveRoomLimit.d.ts +26 -0
- package/types/service/liveRoomLimitError.d.ts +9 -0
- package/types/service/predefinedAdaptor/agentTools.adaptor.d.ts +31 -0
- package/types/service/predefinedAdaptor/anthropicLlm.d.ts +2 -2
- package/types/service/predefinedAdaptor/database.adaptor.d.ts +9 -7
- package/types/service/predefinedAdaptor/index.d.ts +1 -0
- package/types/service/predefinedAdaptor/llm.adaptor.d.ts +12 -0
- package/types/service/predefinedAdaptor/openaiDialect.d.ts +3 -2
- package/types/service/predefinedAdaptor/role.adaptor.d.ts +2 -0
- package/types/service/predefinedAdaptor/solidPubsub.adaptor.d.ts +3 -0
- package/types/service/predefinedAdaptor/solidSqlite.d.ts +1 -1
- package/types/service/predefinedAdaptor/sql/DocumentHydrator.d.ts +11 -0
- package/types/service/predefinedAdaptor/sql/DocumentRowCodec.d.ts +26 -0
- package/types/service/predefinedAdaptor/sql/DocumentWriter.d.ts +25 -0
- package/types/service/predefinedAdaptor/sql/QueryScope.d.ts +16 -0
- package/types/service/predefinedAdaptor/sql/QueryWriter.d.ts +20 -0
- package/types/service/predefinedAdaptor/sql/SqlDocumentStore.d.ts +5 -28
- package/types/service/predefinedAdaptor/sql/SqlTableSchema.d.ts +22 -0
- package/types/service/predefinedAdaptor/sql/StoredRows.d.ts +27 -0
- package/types/service/predefinedAdaptor/sql/TransactionScope.d.ts +3 -1
- package/types/service/predefinedAdaptor/sql/driver/bunSqlite.d.ts +3 -15
- package/types/service/predefinedAdaptor/sql/driver/postgres.d.ts +0 -8
- package/types/service/predefinedAdaptor/sql/types.d.ts +27 -4
- package/types/service/predefinedAdaptor/sseData.d.ts +13 -0
- package/types/service/predefinedAdaptor/websocket.adaptor.d.ts +7 -3
- package/types/service/serviceRegistry.d.ts +1 -0
- package/types/signal/SignalFailure.d.ts +4 -0
- package/types/signal/agentTurnStream.d.ts +3 -0
- package/types/signal/byIdRead.d.ts +7 -0
- package/types/signal/carriedClientIps.d.ts +4 -0
- package/types/signal/endpointRateLimit.d.ts +12 -0
- package/types/signal/index.d.ts +32 -32
- package/types/signal/mcp/McpDocument.d.ts +2 -0
- package/types/signal/mcp/mcpProtocol.d.ts +5 -0
- package/types/signal/mcp/pagePrompt.d.ts +13 -0
- package/types/signal/resolveFieldContext.d.ts +15 -0
- package/types/signal/serializer/fetch.serializer.d.ts +3 -1
- package/types/signal/signalContext.d.ts +2 -14
- package/types/signal/slice.d.ts +15 -13
- package/types/signal/trace.d.ts +12 -1
- package/types/signal/types.d.ts +38 -7
- package/types/store/action.d.ts +4 -27
- package/types/store/actionErrorMessage.d.ts +1 -0
- package/types/store/actionOption.d.ts +24 -0
- package/types/store/baseSt.d.ts +1 -0
- package/types/store/formFieldSetters.d.ts +80 -0
- package/types/store/index.d.ts +17 -16
- package/types/store/modelActionContext.d.ts +189 -0
- package/types/store/modelOpenActions.d.ts +12 -0
- package/types/store/modelWriteActions.d.ts +16 -0
- package/types/store/modelWriteGuard.d.ts +2 -5
- package/types/store/openSeq.d.ts +17 -0
- package/types/store/sliceListActions.d.ts +295 -0
- package/types/store/sliceLiveActions.d.ts +6 -0
- package/types/store/stateBuilder.d.ts +2 -0
- package/types/test/conformance.d.ts +3 -1
- package/types/ui/Agent/Chat.d.ts +5 -2
- package/types/ui/Agent/ChatHeader.d.ts +13 -0
- package/types/ui/Agent/ChatPendingCards.d.ts +23 -0
- package/types/ui/Agent/ToolRow.d.ts +13 -0
- package/types/ui/Field/Choice.d.ts +2 -1
- package/types/ui/Field/index.d.ts +1 -1
- package/types/ui/Reference/origin.d.ts +1 -0
- package/types/ui/UiOverride/UiOverride.d.ts +2 -0
- package/types/ui/index.d.ts +2 -1
- package/types/ui/overlayLayer.d.ts +8 -2
- package/types/ui/recipe/badgeRecipe.d.ts +3 -3
- package/types/ui/recipe/buttonRecipe.d.ts +3 -3
- package/types/ui/recipe/inputRecipe.d.ts +1 -1
- package/types/vendor/@akanjs/native/packages/cli/src/lib/project.d.ts +4 -0
- package/types/vendor/@akanjs/native/packages/desktop/src/relaunch.d.ts +1 -0
- package/types/vendor/@akanjs/native/plugins/appearance/src/index.d.ts +9 -0
- package/types/vendor/@akanjs/native/plugins/external-view/src/index.d.ts +22 -13
- package/types/vendor/@akanjs/native/plugins/single-instance/src/socket.d.ts +15 -2
- package/types/vendor/use-agentic/AgentClientTools.d.ts +19 -0
- package/types/vendor/use-agentic/Compaction.d.ts +3 -1
- package/types/vendor/use-agentic/SessionQuestion.d.ts +26 -0
- package/types/vendor/use-agentic/Transcript.d.ts +1 -1
- package/types/vendor/use-agentic/failureCode.d.ts +4 -0
- package/types/vendor/use-agentic/index.d.ts +1 -0
- package/types/vendor/use-agentic/types.d.ts +12 -3
- package/types/webkit/CsrGuards.d.ts +3 -0
- package/types/webkit/McpAppHost.d.ts +24 -0
- package/types/webkit/RouteLevelBoundary.d.ts +17 -0
- package/types/webkit/csrRefresh.d.ts +13 -0
- package/types/webkit/index.d.ts +3 -0
- package/types/webkit/needsBrowser.d.ts +5 -0
- package/types/webkit/useCamera.d.ts +1 -1
- package/types/webkit/useCsrKeyboard.d.ts +19 -0
- package/types/webkit/useCsrLocationState.d.ts +21 -0
- package/types/webkit/useCsrNavigation.d.ts +25 -0
- package/types/webkit/useCsrRefs.d.ts +33 -0
- package/types/webkit/useCsrRenderTrace.d.ts +13 -0
- package/types/webkit/useCsrStackLifecycle.d.ts +12 -0
- package/types/webkit/useCsrTransitions.d.ts +2 -0
- package/types/webkit/useGeoLocation.d.ts +1 -1
- package/types/webkit/useHistory.d.ts +2 -3
- package/types/webkit/useResolvedFrame.d.ts +38 -0
- package/types/webkit/useSyncNavigation.d.ts +22 -0
- package/ui/Agent/Bubble.tsx +4 -118
- package/ui/Agent/Chat.tsx +402 -235
- package/ui/Agent/ChatHeader.tsx +59 -0
- package/ui/Agent/ChatPendingCards.tsx +49 -0
- package/ui/Agent/ToolRow.tsx +117 -0
- package/ui/Agent/fetchRunner.ts +8 -1
- package/ui/BottomSheet.tsx +1 -1
- package/ui/Data/Item.tsx +2 -2
- package/ui/Data/ListContainer.tsx +348 -181
- package/ui/Data/useViewModal.ts +10 -4
- package/ui/Dialog/LegacyModal.tsx +1 -1
- package/ui/Dialog/Modal.tsx +1 -1
- package/ui/Field/Choice.tsx +3 -1
- package/ui/Load/StreamBoundary.tsx +1 -6
- package/ui/Load/View.tsx +2 -1
- package/ui/Model/EditModal.tsx +2 -1
- package/ui/Popconfirm.tsx +1 -1
- package/ui/Reference/origin.ts +1 -0
- package/ui/Select.tsx +43 -51
- package/ui/Signal/RestApi.tsx +3 -2
- package/ui/System/Client.tsx +4 -1
- package/ui/UiOverride/UiOverride.tsx +2 -0
- package/ui/index.ts +5 -0
- package/ui/overlayLayer.ts +25 -2
- package/vendor/@akanjs/native/native/android/src/com/akanjs/runtime/AkanNativeActivity.kt +31 -13
- package/vendor/@akanjs/native/native/android/src/com/akanjs/runtime/AkanNativePlugin.kt +4 -0
- package/vendor/@akanjs/native/native/desktop/Cargo.lock +1 -0
- package/vendor/@akanjs/native/native/desktop/Cargo.toml +2 -0
- package/vendor/@akanjs/native/native/desktop/src/external.rs +240 -114
- package/vendor/@akanjs/native/native/desktop/src/json.rs +14 -1
- package/vendor/@akanjs/native/native/desktop/src/lib.rs +12 -4
- package/vendor/@akanjs/native/native/desktop/src/linux/external.rs +696 -0
- package/vendor/@akanjs/native/native/desktop/src/linux/mod.rs +1 -0
- package/vendor/@akanjs/native/native/ios/Sources/AkanNativeViewController.swift +6 -1
- package/vendor/@akanjs/native/packages/cli/src/lib/native-plugins.ts +5 -3
- package/vendor/@akanjs/native/packages/cli/src/lib/project.ts +25 -1
- package/vendor/@akanjs/native/packages/desktop/src/deeplinks.ts +2 -2
- package/vendor/@akanjs/native/packages/desktop/src/host.ts +2 -2
- package/vendor/@akanjs/native/packages/desktop/src/relaunch.ts +8 -3
- package/vendor/@akanjs/native/plugins/app/src/desktop.ts +2 -2
- package/vendor/@akanjs/native/plugins/appearance/android/AppearancePlugin.kt +13 -0
- package/vendor/@akanjs/native/plugins/appearance/ios/AppearancePlugin.swift +27 -0
- package/vendor/@akanjs/native/plugins/appearance/native-plugin.json +2 -2
- package/vendor/@akanjs/native/plugins/appearance/src/index.ts +8 -1
- package/vendor/@akanjs/native/plugins/autostart/src/desktop.ts +2 -1
- package/vendor/@akanjs/native/plugins/external-view/native-plugin.json +4 -1
- package/vendor/@akanjs/native/plugins/external-view/src/index.ts +22 -13
- package/vendor/@akanjs/native/plugins/single-instance/src/socket.ts +113 -24
- package/vendor/use-agentic/AgentClientTools.ts +33 -0
- package/vendor/use-agentic/AgentSession.ts +35 -73
- package/vendor/use-agentic/CHANGELOG.md +0 -43
- package/vendor/use-agentic/Compaction.ts +12 -2
- package/vendor/use-agentic/SessionQuestion.ts +99 -0
- package/vendor/use-agentic/ToolRunner.ts +3 -15
- package/vendor/use-agentic/Transcript.ts +8 -5
- package/vendor/use-agentic/WIRE.md +28 -9
- package/vendor/use-agentic/failureCode.ts +44 -0
- package/vendor/use-agentic/httpRunner.ts +22 -8
- package/vendor/use-agentic/index.ts +1 -0
- package/vendor/use-agentic/types.ts +13 -1
- package/webkit/CsrGuards.ts +11 -2
- package/webkit/McpAppFetchBridge.ts +3 -1
- package/webkit/McpAppHost.ts +122 -0
- package/webkit/RenderLayer.tsx +48 -14
- package/webkit/RouteLevelBoundary.tsx +37 -0
- package/webkit/csrRefresh.ts +33 -0
- package/webkit/index.ts +3 -0
- package/webkit/lazy.tsx +5 -1
- package/webkit/needsBrowser.ts +10 -0
- package/webkit/useCamera.tsx +18 -7
- package/webkit/useCsrKeyboard.ts +155 -0
- package/webkit/useCsrLocationState.ts +58 -0
- package/webkit/useCsrNavigation.ts +302 -0
- package/webkit/useCsrRefs.ts +52 -0
- package/webkit/useCsrRenderTrace.ts +68 -0
- package/webkit/useCsrStackLifecycle.ts +120 -0
- package/webkit/useCsrTransitions.ts +552 -0
- package/webkit/useCsrValues.ts +73 -1235
- package/webkit/useGeoLocation.tsx +1 -3
- package/webkit/useHistory.ts +2 -2
- package/webkit/useLocation.ts +3 -2
- package/webkit/useResolvedFrame.ts +116 -0
- package/webkit/useSyncNavigation.ts +109 -0
- package/vendor/@akanjs/native/CHANGELOG.md +0 -21
package/CHANGELOG.md
CHANGED
|
@@ -1,685 +1,5 @@
|
|
|
1
1
|
# akanjs
|
|
2
2
|
|
|
3
|
-
## 3.2.0
|
|
4
|
-
|
|
5
|
-
### Minor Changes
|
|
6
|
-
|
|
7
|
-
- bd198af: A turn its caller stops is billed at what the provider plausibly charged, never at zero.
|
|
8
|
-
|
|
9
|
-
- A streamed turn whose reader leaves stops its provider call, and a stream cut short carries no counts of the provider's own: an OpenAI-compatible stream sends them only in its last chunk, and an Anthropic one only the prompt. Its usage report keeps every count the provider did send, estimates the rest from the request and the text and tool arguments streamed, and says so with `estimated: true` on `AgentUsageReport` and `LlmSpent`. The estimate takes three UTF-8 bytes a token and 1,600 tokens a picture, which errs high.
|
|
10
|
-
- A plain turn's answer shows nothing before its end to estimate from, so its provider call runs on after the client leaves. The client still gets a 499 at once, and the turn is reported `aborted` with the provider's own counts when the call ends. Until then it holds the caller's next turn, as any turn not yet reported does.
|
|
11
|
-
- `AgentRelayPolicy.apply` takes the old `{ account, ip }` context again and fills in a fresh `id` and empty `headers`. `AgentRequestContext` is that old shape again, and stays deprecated.
|
|
12
|
-
|
|
13
|
-
**Upgrading.** A usage hook receives failed and aborted turns. Before, a streamed turn whose reader left ran to its end and was billed as finished; it now stops early and is billed at its estimate. To bill as before, bill every report except `outcome === "failed"`. Billing only `ok` would leave a stopped turn unbilled while the provider charged for it. Read `estimated` to treat estimated counts differently.
|
|
14
|
-
|
|
15
|
-
- 31f7039: The agent relay's hooks share one turn, and every turn the quota passes is billed, including one that fails or whose caller goes away.
|
|
16
|
-
|
|
17
|
-
- **One turn from the policy to the usage report.** `setAgentRequestPolicy`, `setAgentQuota` and `setAgentUsage` receive the same `AgentTurnContext`: `{ id, headers, account, ip }`. `id` is new for every turn, so an app can match a quota hold with the usage report that settles it, and `headers` lets it read an org header to pick the account to bill, once it has checked that the caller belongs to that org. The quota check also carries the `request` the policy returned. `AgentRequestContext` is deprecated.
|
|
18
|
-
- **Usage for every turn the quota passed.** The usage report carries an `outcome`.
|
|
19
|
-
- `ok`: the turn finished.
|
|
20
|
-
- `failed`: the provider or the network ended it. The report holds what the provider spent before then, such as the prompt of an Anthropic stream that broke after `message_start`, and the model.
|
|
21
|
-
- `aborted`: the caller went away first.
|
|
22
|
-
- A turn that spent nothing, such as one the provider refused, is reported with zero usage. Before, a failed turn and a turn without counts were not reported at all.
|
|
23
|
-
- A failed or aborted turn holds the caller's next turn until its report settles, as a finished one does.
|
|
24
|
-
- **A streamed turn whose reader goes away stops the provider call**, so the turn stops spending tokens on an answer nobody will read. `LlmAdaptor.chat` takes an optional third argument, `signal`, which the relay sends with `onDelta`, and both built-in adaptors pass it to `fetch`. A plain turn whose client left answers 499 rather than logging a server error.
|
|
25
|
-
- **Cache writes reported separately.** `LlmUsage.cacheWriteTokens` is the part of `inputTokens` the provider wrote to its cache, which Anthropic bills above its input rate. `inputTokens` still counts the whole prompt.
|
|
26
|
-
- **`AgentService.runTurn(request, { onDelta, preamble, signal })`.** `preamble` replaces the in-page preamble, and `false` sends none, for a turn with no screen behind it. Passing `onDelta` alone as the second argument still works.
|
|
27
|
-
|
|
28
|
-
- dcb7e61: The signal and service facets throw coded failures instead of a bare `Error`. Each one keeps its message, so a test or a log matching the text still matches. Each one carries a `code` that a caller, an agent or an MCP client can branch on, for example `DocumentStoreError.is(error, "invalidQuery")`.
|
|
29
|
-
|
|
30
|
-
| Class | Codes | Status |
|
|
31
|
-
| ------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------ | -------------- |
|
|
32
|
-
| `SignalDeclarationError` (`akanjs/signal`) | `handlerAlreadySet`, `nullableLastArg`, `liveAlreadySet`, `invalidArgType`, `invalidErrors`, `baseMismatch`, `missingModel`, `missingSlice` | 500 |
|
|
33
|
-
| `SignalContractError` (`akanjs/signal`) | `undefinedReturn`, `bytesThroughAny`, `wrongTransport`, `notRegistered`, `noHandler` | 500 |
|
|
34
|
-
| `PromptError` (`akanjs/signal`) | `invalidPrompt`, `unmaskedResource` | 500 |
|
|
35
|
-
| | `inlineFailed` | 502 |
|
|
36
|
-
| `InjectError` (`akanjs/service`) | `notRegistered`, `notInitialized`, `invalidInject` | 500 |
|
|
37
|
-
| `DocumentStoreError` (`akanjs/service`) | `invalidQuery`, `invalidSchema`, `invalidDocument`, `tableMissing`, `searchUnavailable`, `searchMisconfigured` | 500 |
|
|
38
|
-
| | `unstorableValue` | 400 |
|
|
39
|
-
| `InsightQueryError` (`akanjs/service`) | `invalidInsightQuery` | 400, forwarded |
|
|
40
|
-
| | `insightTimeout` | 504, forwarded |
|
|
41
|
-
| | `insightUnavailable` | 500 |
|
|
42
|
-
| `AkanError` | `invalidStorageKey` | 400 |
|
|
43
|
-
| | `storageNotShared`, `liveRoomTaken`, `unroutableLiveQuery`, `missingFilterQuery`, `compressorNotInitialized`, `redisUriMissing`, `transferUnsupported` | 500 |
|
|
44
|
-
|
|
45
|
-
The request path answers every one of these except the forwarded ones as `SignalFailure` already does for an `AkanError`. The response carries the status, the status's reason and the code. The message is left out in a production build, since it can name a table, a field, a role or a signed URL. A state that configuration must fix answers 500, and so does a broken declaration. Examples are text search switched off, no insight connection, and local files in a multi-instance deployment.
|
|
46
|
-
|
|
47
|
-
A refused insight statement is forwarded to its author as a fixed sentence or with the author's own keyword or column. When Postgres refuses the role (42501), the sentence carries none of the driver's text. That text stays on the error's `cause`, and the `Logging` middleware's line prints it. A statement Postgres cancels on its `statement_timeout` (57014) answers `insightTimeout`, like the timeout `InsightQuery` races.
|
|
48
|
-
|
|
49
|
-
**Upgrade.** Most of these used to answer `500 Internal Server Error` with no code. Check any caller that branches on the status:
|
|
50
|
-
|
|
51
|
-
- **400**: a string holding U+0000 that the store refuses to save, and a storage key outside the storage root.
|
|
52
|
-
- **502**: a prompt that fails to inline a file.
|
|
53
|
-
- **`InsightQuery`**: a refused statement now reaches its author as a 400 with its message, and a timeout as a 504.
|
|
54
|
-
- **No retry**: `HttpClient` does not retry these 502s and 504s. A body carrying a code is the server's own answer, not a gateway's.
|
|
55
|
-
- **Logging**: `SignalContext` writes its crash entry, with the stack, only from 500 up. So a 400 above gets the `Logging` middleware's one error line, and that line now names the error's `cause`.
|
|
56
|
-
|
|
57
|
-
**A 429 that is not forwarded** is now treated like the rate limit's own:
|
|
58
|
-
|
|
59
|
-
- `SignalFailure` sends its `Retry-After` from `data.seconds`, a finite number only. The new `SignalFailure.headersOf(error, statusCode)` builds the headers for both paths.
|
|
60
|
-
- The `Logging` middleware keeps it at debug level.
|
|
61
|
-
- `HttpClient` restores it under `base.error.tooManyRequests`, with the code it carried and the wait its `Retry-After` names. So it is retried and worded as a forwarded one is. One with no `Retry-After` to read, because none was sent or a cross-origin caller is not exposed to it, stays the refusal it was and is not retried.
|
|
62
|
-
|
|
63
|
-
**`Exception.<Status>.is(error)` type-checks.** `StatusException` now declares `is`, so `Exception.BadRequest.is(error)` narrows `error` to an `Exception` and checks its own class.
|
|
64
|
-
|
|
65
|
-
- 465ccb9: The `Err` that `makePageProto` returns has a named type, `PageErrConstructor`, exported from `akanjs/client` with `PageErrInstance` and `ErrPayload`, so the declaration every app's `useClient` emits no longer spells out the class shape for `Err` and each of its status classes. `akanjs/client`'s declaration of `makePageProto` drops from about 24,000 lines to about 30.
|
|
66
|
-
|
|
67
|
-
`new Err(...)`, `Err.is`, `Err.fromJSON` and `instanceof Err` type as before, on `Err` and on each status class (`new Err.NotFound(...)`, `Err.NotFound.is(...)`). The statics `Err` inherited from `Error` — `captureStackTrace`, `prepareStackTrace`, `stackTraceLimit` and `isError` — are no longer on its type; call them on `Error`.
|
|
68
|
-
|
|
69
|
-
- 3b7247e: A failed tool call now names a code a client or a model can branch on, beside the text it already sent, which is unchanged. No upgrade step is needed: `AgentWireToolResult` and `use-agentic`'s `ToolCallResult` only gain an optional `code`, and `akanjs/common` adds `MCP_FAILURE_META`, `McpFailure` and `FailureCode`.
|
|
70
|
-
|
|
71
|
-
Every code is a bounded token, a dictionary key (`<module>.error.<key>`) or one camelCase identifier, never prose, so no text can pass for one.
|
|
72
|
-
|
|
73
|
-
- **An app's `/mcp`:**
|
|
74
|
-
- A tool error carries `_meta["akanjs/failure"]: { code, statusCode }`, beside the server's own `_meta` for a 2026-07-28 client. The code is the one an HTTP caller gets:
|
|
75
|
-
- a domain `Err` by its dictionary key, such as `base.error.documentNotFound`;
|
|
76
|
-
- an `AkanError` by its code, such as `invalidArgument` for an argument the call got wrong;
|
|
77
|
-
- a 401 or 403 by its status alone (`unauthorized`, `forbidden`);
|
|
78
|
-
- a 5xx by a dictionary key or this server's own `AkanError` code, else by its status (`internalError`, `serviceUnavailable`), never by a code a duck-typed error put in its body.
|
|
79
|
-
- A JSON-RPC error carries `data.code`, which tells apart what `-32602` covers:
|
|
80
|
-
- `unknownTool`, `unknownPrompt` (an unlisted page prompt included) and `unknownResource`;
|
|
81
|
-
- `invalidArgument` for bad arguments or a missing tool name, prompt name or resource uri;
|
|
82
|
-
- a refused screen's `forbidden` or `notFound`.
|
|
83
|
-
A rate-limited call names `tooManyRequests` and the catch-all names `internalError`.
|
|
84
|
-
- An MCP Apps view's call that fails without a domain `Err` restores as an error with that status and code, where it used to be a plain `Error`. A tool the view itself serves to the host names its code in the same `_meta` entry, without a `statusCode`.
|
|
85
|
-
- **`akan mcp`:** a tool error carries the same `_meta["akanjs/failure"]`, with one of these codes:
|
|
86
|
-
- `unknownTool` for a name no mode lists;
|
|
87
|
-
- `toolUnavailable` for a tool outside the server's mode;
|
|
88
|
-
- `invalidArgument` for a missing argument, an unknown guideline name, or a workflow path outside `.akan/workflows/`;
|
|
89
|
-
- `toolFailed` for anything else, with `statusCode` 500. A coded `AkanError` keeps its own code.
|
|
90
|
-
- **The code agent:** an MCP server's tool result keeps the code it named, from `_meta["akanjs/failure"]` or a JSON-RPC error's `data.code`, in the call's `details`.
|
|
91
|
-
- **The in-page agent:** a `toolResults` entry whose tool threw carries `code` beside `error` (see `use-agentic`'s WIRE.md): a dictionary `Err`'s key, else the thrown error's own `code`. A `taint: "source"` tool's result carries none, since its code would travel outside the page-content fence. The bundled Anthropic and OpenAI adaptors send `code` to the model inside the tool result, beside `error`.
|
|
92
|
-
|
|
93
|
-
### Patch Changes
|
|
94
|
-
|
|
95
|
-
- bc792ab: What a coding agent needs to build its first app is now written where it looks, and two messages say what to do next.
|
|
96
|
-
|
|
97
|
-
- **A query or mutation that answers `null` without `nullable: true`** now fails with `query <name> answered null, but its return is not nullable: answer a value, or declare { nullable: true } and answer null`. It used to fail with `Required Any value: null`, or `Invalid Value (Nullable)` for a model, which named neither the endpoint nor the fix.
|
|
98
|
-
- **`akan build` for the `local` environment** ends its summary with one line: such a build serves the dev routes to every caller, and a host others can reach needs `AKAN_PUBLIC_ENV=main`, `AKAN_PUBLIC_REPO_NAME` and `AKAN_PUBLIC_SERVE_DOMAIN`. A build for any other environment prints nothing new, and the check that refuses a deployed build with stand-in values is unchanged.
|
|
99
|
-
- **The `akan-page` skill** carries a one-screen API summary: a data-driven `<title>`, an async render, `router.notFound()` and a layout's `.notFound()` / `.error()`, `Link`, and a shallow `router.replace` for a client filter kept in the URL. The page rule names the shallow replace too.
|
|
100
|
-
- **The `akan-service` skill** carries a recipe for pages backed by an external HTTP API: an `adapt()` adapter in `srvkit/` that reads its base URL at boot, a `lib/_<service>` service, a `Public` `query(Any, { nullable: true })` endpoint and its dictionary label, and the page that calls it.
|
|
101
|
-
- **The README's "Inside an existing repository"** runs the creator through `npx -y bun@1.4.4 x …` on a host with only Node and npm, so nothing global is written. It also gives copy-ready `build` and `start` scripts, says a fresh clone builds without a committed env file, and says which environment a `.env`-less build is for and what a deployed host sets instead.
|
|
102
|
-
|
|
103
|
-
- 61fbd7d: `get_graph` takes `since`, a git revision, and returns the Change Map: the Akan Graph of what changed since HEAD forked from that revision, working tree and untracked files included. Every node, field and edge is marked `added`, `removed` or `changed`. The unchanged nodes a changed one calls, or is called by, stay in as context, and `unmapped` lists the changed files under `apps/` or `libs/` that no node covers, each marked the same way. `since: "HEAD"` maps uncommitted work only. Files `.gitignore` covers stay out, a renamed file reads as removed and added, and a CRLF checkout of an unchanged file reads as unchanged. A revision git does not know returns a `graph-since-unknown` diagnostic, and so does one HEAD shares no commit with (a shallow clone, say) instead of comparing with its tip. A revision that starts with `-` also returns it and never reaches git.
|
|
104
|
-
|
|
105
|
-
- **`AkanGraphDiff.between(base, head)`** in `@akanjs/language` diffs two graphs. `index.graph(readText, { digests: true })` gives each member, query, component and field a hash of its body text, so an edit inside a method, or to a field's options, marks it changed and moving it does not.
|
|
106
|
-
- **The change types** (`AkanGraphChange`, `AkanChangeMap`, `AkanChangedFile`) live in `akanjs/common`.
|
|
107
|
-
|
|
108
|
-
- b3f85fa: The framework's errors share one base, `AkanError` in `akanjs/base`. It carries a `code` to branch on, the `statusCode` the request path answers with (500 unless given), and an optional `cause` and `data`. `toJSON()` writes them out, and `MigrationError.is(error, "locked")` checks the class and, when named, the code.
|
|
109
|
-
|
|
110
|
-
- **Existing classes extend it** with their names, messages and fields unchanged: `Exception` and its status classes, `NoDocumentError`, `InvalidInputError`, `FilterQueryError`, `MigrationError`, `McpArgumentError`, `McpAuthRequiredError`, `LogControlUnavailableError` and the image optimizer's error. An `Exception` takes the code of its status (`tooManyRequests` for a 429); its wire body is unchanged.
|
|
111
|
-
- **A failure the request path generalizes keeps its code and status.** An `AkanError` that is neither an `Exception` nor a missing document used to be answered as a plain `500 Internal Server Error`. It is now answered with its own status, the status's reason as `error` and its `code`, for example `{ "error": "Service Unavailable", "code": "queueFull", "statusCode": 503 }`. Its message still stays home in a production build, and a status outside 400–599 still answers 500. Anything that is not an `AkanError` is answered as before.
|
|
112
|
-
- **The code survives a restore.** A repeated idempotent mutation replays the first run's status and code, and a restored remote failure or client `Err` keeps `code` and writes it back out in `toJSON()`. `HttpClient` reads a 408, 413, 429 or 5xx body that carries a `code` as the server's own answer, so it restores it with its code and does not retry it, as it already did for a dictionary key.
|
|
113
|
-
- **MCP answers it the same way.** A tool call that fails with such an error under 500 reads `<reason>: <code>` (`Conflict: titleTaken`) instead of `The server failed to complete this request.`, and is not logged as a crash. Its message stays home here too.
|
|
114
|
-
- **`AkanError.is(error)` recognises an error from another copy of the module**, as a server bundle and main.js each carry one, so the redaction holds for those too. A subclass's `is` still checks `instanceof`.
|
|
115
|
-
|
|
116
|
-
- a707354: Akan Studio maps the framework itself, and `pkgs/akanjs/ARCHITECTURE.md` keeps its tables from the source.
|
|
117
|
-
|
|
118
|
-
- **The Framework view** (`/_akan/studio?view=framework`, `akan studio <app> --view framework`) lays the `akanjs` facets and `@akanjs/devkit` out by layer, with their largest classes, and draws value, lazy and type-only imports apart. Under it, one table per process channel names who sends and who handles each message, each linked to its source. It reads `pkgs/akanjs` in this repository and the installed `akanjs` in a consumer workspace (without its bundled `vendor/` and `types/`), and never joins the app's own graph or `get_graph`. The dev builder rebuilds it only when the installed version changes or a save lands under `pkgs/`.
|
|
119
|
-
- **`FrameworkMapBuilder`, `FrameworkChannelReader` and `FrameworkMapDoc`** in `@akanjs/language` build the map with the TypeScript compiler API: facets and their import layers, and for each channel union the classes that write a message's `type` literal or branch on it.
|
|
120
|
-
- **`pkgs/akanjs/ARCHITECTURE.md`** pairs a hand-kept walk through the processes and a request with a generated part between markers. `akan sync-architecture` regenerates that part, and a devkit test fails when it is stale, when a channel is gone, when two facets load values from each other, when a message lacks a recognised sender or handler outside a short list whose other end lies beyond the framework source, or when the hand-kept part names a class the source no longer has.
|
|
121
|
-
- **`AkanIpcMessage` no longer lists `backend-ready`.** The gateway sends it to the dev host, which reads it as a `BuilderMessage`, where it stays; no gateway or child ever handled it.
|
|
122
|
-
|
|
123
|
-
- 4d61170: The Akan Graph follows an app's adaptor wiring further. `applyAdaptor(LlmAdaptorRole, ChatCompletionsLlm)` in an app's or lib's `option.ts` draws a `binds` edge from the role, `adaptor::LlmAdaptorRole`, to the implementation it binds, labelled with the app or lib and located at the call, so a method that calls a plugged role reaches the class that answers it. `get_graph` scoped to an app keeps that app's own bindings, and a lib's binding of a role the app does not bind itself; scoped to a lib or a module it keeps every binding of a role it reaches. A Change Map carries every binding of a role it shows, changed or not, so the binding an app runs stays in view; a binding the app removed no longer hides the lib binding it now runs; and Studio's Change Map for one app keeps only the bindings that app runs. An app service holds the fields its module's lib services plug (`...user.services`), so `this.notifier.getMemo()` in an app method links to the `Notifier` a lib's `MemoService` plugs, where it linked to the `memo` model; a service whose own builder declares the field (`notifier: use<…>()`) inherits nothing. A plug imported from a package outside the workspace, `plug(Stripe)` from `stripe-sdk`, or through a lib's re-export of it (`export { Stripe }`, `export { default as Stripe }`, or `export * from "stripe-sdk"` where the lib declares no `Stripe` itself), is `adaptor:stripe-sdk:Stripe` with the package in `detail`, where it linked to a same-name adaptor the app declares or to an unlocated `adaptor:libs/util:Stripe`. Two adaptors with the same class name in one app or lib are two nodes, each with its own location, digest and `plugs`, and a plug reaches the one its import names. A job's `detail` lists only the options its kind honours: `once` on an `initialize` job, `unlocked` on an `interval` job (`Bun.cron` never overlaps a cron job, so `lock: false` changes nothing there); `cron("0 * * * *" as const)` reads `0 * * * *`.
|
|
124
|
-
|
|
125
|
-
Ids and details that change for a saved graph or a Change Map base:
|
|
126
|
-
|
|
127
|
-
- While two adaptors of one owner share a class name, each is keyed by its file, `adaptor:apps/demo:srvkit/clockB.ts#Clock`; an adaptor whose name no other adaptor of its owner shares keeps `adaptor:<owner>:<Name>`. The Change Map treats the two forms of one declaration as one node, so a second same-name adaptor shows as one added node, not a removal of the first.
|
|
128
|
-
- A plug from a non-workspace package is `adaptor:<package>:<Name>` with the package as `detail`, where it was `adaptor::<Name>` or a workspace adaptor of that name.
|
|
129
|
-
- A job's `detail` drops `once` and `unlocked` where the runtime ignores them, and `as const` from a cron expression.
|
|
130
|
-
|
|
131
|
-
- **`binds`** joins `AkanGraphEdgeKind` in `akanjs/common`.
|
|
132
|
-
- **`FileFacts.adaptorBindings`** in `@akanjs/language`: each `applyAdaptor(role, adaptor)` call a file makes; `AkanIndex.setFile` also reads non-test files whose text mentions `applyAdaptor`. **`ServiceClassFact.fields`**: the names a service's builder declares.
|
|
133
|
-
|
|
134
|
-
- c723713: The Akan Graph keys a guard function by the file that declares it, locates more of a workspace's guards, and stops counting things that are not guards.
|
|
135
|
-
|
|
136
|
-
A guard function a route or layout imports is keyed by its file, as one the page declares already was: `guard:libs/shared:webkit/signedIn.ts#signedIn`. A `canEdit` in `webkit/` and one in `common/` are two nodes, each at its own declaration, and an edit to either marks only that one changed in the Change Map. A guard called through a namespace import (`auth.signedIn()`), or imported under a name a file re-exports (`export { signedIn as hasSession } from "./auth"`), reaches its declaration. A function the guard declares, or a parameter it binds, shadows an import of the same name only inside its own scope, so `[1].forEach((signedIn) => …)` no longer hides a real `signedIn()` beside it. A guard declared after another declarator (`export const ready = true, signedIn = …`) is found, and an overloaded guard's digest covers every signature. Only a file whose text declares or re-exports the name is parsed, so a guard that calls `usePage()` from the generated client no longer parses every page that names it.
|
|
137
|
-
|
|
138
|
-
A function is a guard factory only when it returns a guard, a class that implements `Guard` (also one handed to a wrapper, `withName(class implements Guard {…}, field)`) or a call to a factory, so `const guardCount = countGuards()` is no longer a guard. An import from a package outside the workspace (`@vendor/auth`) resolves to no guard: it no longer links a same-name workspace guard, and a vendor's `Public` no longer reads as the framework's. A factory imported from akanjs or a package makes no guard. A lib's `export *` chain, walked from the path the import names, is followed only when it reaches exactly one workspace lib declaring the name, none of its `export *` names a package, and the lib does not declare, destructure or export the name itself; otherwise the guard stays `guard:<lib>:<Name>` without a location, so a vendor shim no longer links another lib's guard. A class extending a base that is not a known guard is no guard, even when a lib declares a guard of that name.
|
|
139
|
-
|
|
140
|
-
More guards carry their location: a name a lib re-exports under another name (`export { Admin as AdminGuard }`) reaches the class, and one it re-exports from akanjs is `guard::Public`; `srvkit.SSO.Kakao` reads through the namespace to the lib's map; a map entry a factory makes (`SSO = { Kakao: ssoGuardOf("kakao") }`) is the guard `SSO.Kakao`; a local wrapper of an imported factory, a factory called through a namespace (`srvkit.resourceGuard("pin")`) and a class that extends a guard (`class DemoAdmin extends Admin`) and a factory a lib re-exports under another name (`export { resourceGuard as rg }`) make guards; a guard made in place, `guards: [canEdit("memo")]`, is a node at the call, keyed by its member, callee and ordinal so an edit to its arguments, or to another member's guards, keeps the id. Of two same-name guards in one owner, an import reaches the one its path names. A wrapper's digest covers every factory it can return, and an edit to a factory in another file marks the guards it makes changed instead of listing the file as unmapped.
|
|
141
|
-
|
|
142
|
-
In the Change Map, a declaration whose id moves between `kind:owner:Name` and `kind:owner:<file>#Name` at the same file is one node, so a second same-name guard shows as one addition, not the first one removed and re-added.
|
|
143
|
-
|
|
144
|
-
`get_graph` past the node limit names owners by the nodes it would answer with, changed pages included, so 650 changed routes no longer hide behind one changed lib method. A guard on `const route = page()…; export default route` is no longer read: `RouteSourceValidator` rejects that shape.
|
|
145
|
-
|
|
146
|
-
Ids and details that change for a saved graph or a Change Map base:
|
|
147
|
-
|
|
148
|
-
- An imported guard function's id names its file: `guard:libs/shared:signedIn` is now `guard:libs/shared:webkit/signedIn.ts#signedIn`.
|
|
149
|
-
- A guard name two files of one owner declare is keyed by file, `guard:apps/demo:srvkit/admin.ts#Admin`.
|
|
150
|
-
- A guard made in place is `guard:<owner>:<file>#<model>.<key>:<callee>@<n>`, the `n`th in-place call of that callee in that slice or endpoint key (`…/memo.signal.ts#memo.shareMemo:resourceGuard@1`). Its label, an endpoint's `detail` and the editor hover name the call: `resourceGuard("memo")` where `detail` read `resourceGuard`, or `allow(…)` when the arguments run past 32 characters or a line. A guard read through a namespace's map reads `srvkit.SSO.Kakao` where it read `Kakao`.
|
|
151
|
-
- A map entry a factory makes is `guard:libs/shared:SSO.Kakao` where it was `guard::Kakao` or `guard:<lib>:Kakao`, and a local map's `Roles.Owner` is `guard:apps/demo:Roles.Owner` where it linked `guard:apps/demo:Owner`.
|
|
152
|
-
- A guard a lib re-exports, under its own name or another, or from akanjs, takes the declaring owner's id (`guard:libs/util:Admin`, `guard::Public`) where it took the re-exporting lib's.
|
|
153
|
-
- A guard imported from an unknown package draws no edge.
|
|
154
|
-
- A name the old "sole visible lib" fallback linked through a lib that does not declare it (`guard:libs/billing:Admin` behind a vendor `export *`) now reads `guard:<lib>:<Name>` without a location, unless the lib's `export *` chain reaches exactly one workspace lib declaring it.
|
|
155
|
-
- A class extending a base that is not a known guard (`class Thing extends Base` with an ordinary `Base`) no longer has a guard node; an endpoint naming it in `guards` links an unlocated `guard:<owner>:Thing`.
|
|
156
|
-
|
|
157
|
-
- **`AkanGraphNode.sources`** in `akanjs/common`: the files besides `at.file` that a node's digest reads, set only with digests. The Change Map uses it to map those files and leaves it out of its answer.
|
|
158
|
-
- **The fact reader** in `@akanjs/language`: `GuardFactoryFact.via` is a list and gains `direct`; `GuardCallFact` gains `kind` (`call` or `extends`) and `scope`; `FileFacts` gains `guardLabels`, an in-place guard's name to its call. A slice's or endpoint's guard made in place is read as `<model>.<key>:<callee>@<n>`, and every in-place call is a `GuardCallFact`.
|
|
159
|
-
|
|
160
|
-
- 0351ad4: The Akan Graph keys each guard by the app or lib that declares it, `guard:libs/shared:Admin`, and follows the import that names it there, so `Admin as AdminGuard` reaches `Admin`, `srvkit.Admin` reaches the lib's class, and two libs' `Admin` stay two nodes. A guard read out of an object map, `SSO.Kakao`, resolves through the imports of the file that declares the map. A name a lib only re-exports reaches the class it re-exports. A guard a factory makes is a guard too, whether the factory sits in the same file, wraps another factory there, or is imported from another lib. A guard node carries its source location, `doc` (the comment above its declaration that says what it checks) and, in `detail`, its `scope` (`account` or `resource`). A factory-made guard takes the factory's scope, and takes its doc when no guard of that factory has its own. With digests, an edit to a guard or to the factory that makes it marks the guard changed in the Change Map. Every guard a workspace declares is a node, referenced or not. `Public` and `None` come from `akanjs`, carry no location and say what they do. Studio shows a node's `doc` in its tooltip.
|
|
161
|
-
|
|
162
|
-
Ids and details that change for a saved graph or a Change Map base:
|
|
163
|
-
|
|
164
|
-
- A guard id names its owner: `guard:Admin` is now `guard:libs/shared:Admin`, and the framework's `guard:Public` is `guard::Public`.
|
|
165
|
-
- An endpoint's `detail` names a guard as written: `srvkit.Admin` and `SSO.Kakao` where it read `Admin` and `Kakao`.
|
|
166
|
-
- A slice map entry that lists several guards, `cru: [Owner, None]`, now reads `cru Owner` and `cru None` in `detail`, and links each of them, where it read `cru ?` and linked none.
|
|
167
|
-
|
|
168
|
-
- **`FileFacts.imports`, `guards`, `guardFactories` and `guardCalls`** in `@akanjs/language`: the reader records each class that implements `Guard` (under any name it is imported as), each factory that returns one or calls such a factory in the same file, and each const that a factory makes, a local one or an imported one. `AkanIndex.setFile` reads them from every non-test `srvkit/` file and every other non-test file that names `Guard` and `canPass`.
|
|
169
|
-
- **`AkanGraphNode.doc`** in `akanjs/common`: an optional one-paragraph description.
|
|
170
|
-
|
|
171
|
-
- ba417c6: The Akan Graph draws a module's jobs and the adaptors its services plug. Each key of an `internal()` class is an `internal` node, `internal:apps/demo:memo.sweepMemos` labelled `MemoInternal.sweepMemos`, whose `detail` reads its type, its schedule (a cron expression, or an interval or timeout such as `5m`), its `serverMode` and `operationMode`, `disabled` for `enabled: false`, `once` for `once: true` and `unlocked` for `lock: false`; a job links to the service methods its `exec` calls, as an endpoint does. A `resolveField` is a field resolver, not a job, and stays out. Each `adapt()` or `dangerouslyAdapt()` class is an `adaptor` node keyed by the app or lib that declares it, with its registered name in `detail`, its location, the comment above it and a digest; anything a service plugs from `akanjs`, such as `DatabaseAdaptorRole`, is `adaptor::DatabaseAdaptorRole` with no location. A service method that calls a plugged field (`this.storageApi.deleteData(url)`) links to that adaptor rather than to whatever else shares the method's name, and a `plugs` edge runs from an adaptor to each adaptor it plugs. Studio's signals view shows jobs in its "Endpoints, slices & jobs" column and adaptors in "Queries, models & adaptors".
|
|
172
|
-
|
|
173
|
-
- **`internal`, `adaptor` and `plugs`** join `AkanGraphNodeKind` and `AkanGraphEdgeKind` in `akanjs/common`.
|
|
174
|
-
- **`FileFacts.internals` and `FileFacts.adaptors`** in `@akanjs/language`, with `ServiceClassFact.plugs`; `AkanIndex.setFile` also reads non-test files that call `adapt` or `dangerouslyAdapt`.
|
|
175
|
-
|
|
176
|
-
- bb40785: The Akan Graph maps `page/`. Each route file is a `route` node named by its URL pattern after the locale (`route:apps/demo:/memo/:memoId`, groups dropped as the router drops them), and each `_layout.tsx` is a `layout` node keyed by its folder (`layout:apps/demo:/(app)`, `root` for a `rootLayout()`). A `wraps` edge runs from each layout to the routes and layouts directly inside it, located at the wrapped file. A route or layout whose default export runs `.guard()` reads `guard` and links each function its guard calls that the file imports or declares: `.guard(() => signedIn())` reaches `signedIn` in `@libs/shared/webkit`, with its location and the comment above it, and a function declared in the page itself is keyed by that file (`guard:apps/demo:page/pin.tsx#isOwn`). A call to anything else (`Boolean`, akanjs's `redirect`, a package's `dayjs`) is looked through, a helper handed to a guard (`isOwn(isId(id))`) is not a guard, and an imported guard is looked up under its import path first. A layout's guard gates every route it wraps; the routes themselves do not repeat it, so a guard added to a layout marks only that layout changed in the Change Map. A route's default export, or the const it names (`const route = page()…; export default route`), is the route node itself, so the slices and actions a page uses hang off its URL. `_overrides.tsx` and the git-ignored `page/(libs)/` links are left out; a lib's own pages are its routes. A route's digest covers its whole file, so the Change Map marks an edited page changed instead of listing it as unmapped.
|
|
177
|
-
|
|
178
|
-
An unscoped `get_graph` still answers a graph of up to 600 nodes whole. Past that, it first drops the routes and layouts that neither changed nor use a change, and the route-only guards they leave unlinked, before it asks for a scope; an `app` or `module` scope brings them back. Studio's first column reads "Pages & components".
|
|
179
|
-
|
|
180
|
-
- **`route`, `layout` and `wraps`** join `AkanGraphNodeKind` and `AkanGraphEdgeKind` in `akanjs/common`.
|
|
181
|
-
- **The fact reader** in `@akanjs/language` now also exposes `importsIn`, `docOf` and `extentOf`.
|
|
182
|
-
|
|
183
|
-
- d2bd9b7: A new read-only MCP tool, `get_graph`, returns the Akan Graph, read from source with no dev server. It holds the models with their fields and relations, scalars and enums, slices and endpoints with their guards, and the service methods and queries each one calls. It also holds the store actions that fetch them and the components and pages that use them. Every node and edge carries its file, line and column. A workspace over 600 nodes asks for `app` and/or `module`; a scope keeps its own nodes and their direct neighbours. Files under `env/` are never read.
|
|
184
|
-
|
|
185
|
-
- **`AkanIndex.graph(readText)`** in `@akanjs/language` builds the graph from the same index that answers definitions. An app module that extends a lib module of the same name links to the app's own node. A component links only through `fetch`, `st` and `sig`, so `option.orgId` is not read as model `org`.
|
|
186
|
-
- **The graph types** (`AkanGraph`, `AkanGraphNode`, `AkanGraphEdge` and their kinds) live in `akanjs/common`.
|
|
187
|
-
|
|
188
|
-
- 2d357d6: Editors can now jump from a name Akan.js derives to the key it comes from. `fetch.initMemoInPublic`, `st.do.setNameOnMemo` and `this.memoService.listByName` had no definition before, because TypeScript drops the declaration of a key a mapped type renames. A new package, `@akanjs/language`, indexes those names from source text, and an editor extension serves them. The extension (`pkgs/@akanjs/vscode`) is not on a marketplace yet; build it with `bun pkgs/@akanjs/vscode/build.ts --vsix`.
|
|
189
|
-
|
|
190
|
-
- **`@akanjs/language`** is an editor-neutral reverse index over a workspace's constant, document, service, signal and store files. It needs no type checker, and the host passes in its own `typescript`. For a derived name it answers definition and hover; for a source key it answers references, the keys to put a CodeLens on, and the edits of a rename. It covers slice names (`initMemoInPublic`, `slice.memoInPublic`, `memoListInPublic`), Filter queries (`listByName`), model CRUD and state (`getMemo`, `viewMemo`, `memoForm`), form setters across the `via(...)` chain (`setNameOnMemo` lands on `MemoInput.name`), store state setters, `subscribe`/`listen` endpoints, and module references (`this.memoService`, `srv.memo`, `sig.memo`). A name resolves within its own app and every lib, never another app. It ships as ES module and CommonJS with no runtime dependency.
|
|
191
|
-
- **The extension** adds those definitions and hovers next to TypeScript's, with a `Go to slice` link in the hover. A CodeLens on each slice key, Filter query key, constant field, store state key and pubsub or message endpoint shows its use count, plus the guards and `live` of a slice. Find References from a source key lists every derived use. F2 on a slice or Filter query key (or `Akan: Rename the slice or query key with its derived names`) renames the key, every name derived from it and its dictionary entry; a use that could also be another model's is left for TypeScript to report, and F2 elsewhere stays TypeScript's. In a trusted workspace it loads the workspace's own `@akanjs/language` when one is installed, so its rules match the framework version.
|
|
192
|
-
- **One copy of the name rules.** The templates behind the names apps call now live in `akanjs/common` (`sliceNames`, `queryNames`, `modelNames`, `databaseStateNames`, `formSetterNames`, `stateSetterName`, `endpointNames`, `moduleNames`). The runtime, devkit's scanners and scaffolds, and `@akanjs/language` all read them, and a type test fails when a mapped type and its table disagree. `databaseStateNames` and `formSetterNames` now live in `akanjs/common`; `akanjs/store` keeps them as deprecated aliases.
|
|
193
|
-
- devkit's write-placement and SSR checks read signals through the same reader, and its form-setter check now builds `set<Field>On<Model>` names forward from each module's constant instead of matching a pattern, so a slice setter such as `setPageOfProductOnSale` no longer reads as a field setter.
|
|
194
|
-
|
|
195
|
-
- 039ad3b: **Akan: Open the module side by side** in the VS Code / Cursor extension lays one module out as an editor grid: its constant, dictionary, document, service, signal and store files, in that order, two to a column.
|
|
196
|
-
|
|
197
|
-
- It takes the active file's module, a service module (`lib/_<name>/`) or scalar (`lib/__scalar/<name>/`) included, or asks you to pick one. Generated `lib/__lib/` folders are never offered.
|
|
198
|
-
- In the Studio panel, a pinned node with a module also offers **Open module**, which does the same and keeps Studio in a column of its own to the right. A browser tab does not show the button.
|
|
199
|
-
- The Studio panel now keeps its page while hidden or moved, so the pinned node and the module you navigated to survive a tab switch.
|
|
200
|
-
- The Akan Graph files a component or enum under `lib/_<service>/` in the `<service>` module, as it already did the service's methods and actions.
|
|
201
|
-
- The panel's handshake lists the messages the extension accepts (`open`, `workflow`, `module`), and Studio shows a panel button only for what is listed.
|
|
202
|
-
|
|
203
|
-
- 69ed07e: Akan Studio draws the Change Map.
|
|
204
|
-
|
|
205
|
-
- **The Changes view** (`/_akan/studio?view=changes`) draws what changed since HEAD forked from the default branch, or since `since=<rev>`, uncommitted work included.
|
|
206
|
-
- Components, store actions, signals, service methods, queries, models, scalars, enums and guards are laid out in flow order and outlined as added, removed or changed. The fields that changed are listed inside their model.
|
|
207
|
-
- The unchanged nodes a change calls, or is called by, are drawn dimmed. The changed files no node covers are listed under the diagram, each marked added, removed or changed.
|
|
208
|
-
- Only this app's and the libraries' nodes are drawn. `module=` scopes the map to one module.
|
|
209
|
-
- A revision git does not know is shown as a message on the page. The `since` you picked stays when you switch views.
|
|
210
|
-
- The dev builder keeps the last map until the next save, so reloading the page does not read the workspace again.
|
|
211
|
-
- **`akan studio <app> --view changes [--since <rev>]`** prints its URL. `--since` without `--view changes` is an error.
|
|
212
|
-
- **Akan: Open the Change Map** in the VS Code / Cursor extension opens it beside the editor. The extension offers to start the app only when no dev server answers, not on any other `akan studio` failure.
|
|
213
|
-
|
|
214
|
-
- 29ef72f: Akan Studio now opens from the CLI and inside the editor.
|
|
215
|
-
|
|
216
|
-
- **`akan studio <app>`** prints the Studio URL of the app's running `akan start`. `--module`, `--view erd|signals` and `--editor vscode|cursor` pick what it shows, `--open` opens it in the browser, and `--format json` prints `{ url }`. It exits 1 when no dev server answers.
|
|
217
|
-
- **Akan: Open Akan Studio** in the VS Code / Cursor extension opens Studio in a panel beside the editor: the ERD, or the active module's signals when the active file sits in one. Clicking a name opens its source in the editor. When no dev server answers, it offers to start one in a terminal.
|
|
218
|
-
- **Framing:** Studio pages now allow `vscode-webview:` and `vscode-file:` frame ancestors in place of `X-Frame-Options: SAMEORIGIN`. A web page can't have either scheme, so it still can't frame Studio. Source clicks reach the panel only after it introduces itself from a `vscode-webview:` origin, and the extension opens only files inside the workspace.
|
|
219
|
-
|
|
220
|
-
- 7c85c42: Akan Studio draws the running server's DI graph and jobs.
|
|
221
|
-
|
|
222
|
-
- **The Runtime view** (`/_akan/studio?view=runtime`) reads the container of the server that answered, the same data `/_akan/deps` and `/_akan/signal` serve, and is labelled live: it needs a running server and says which process it read (pid, server mode, replica).
|
|
223
|
-
- Jobs, services by boot stage and adaptors by boot stage are laid out so every arrow points from what injects to what it injects. A role is folded into the adaptor that implements it.
|
|
224
|
-
- Each job lists its schedule. A job this process does not run is greyed, with the reason as its tooltip. Behind the gateway only a federation or all child answers, so with separate federation and batch replicas every batch-only job shows greyed. The modules the server left out are listed under the diagram.
|
|
225
|
-
- `module=` scopes it to one module and its neighbours. `/_akan/studio/graph?view=runtime` returns `{ app, deps, signal }`, each part an `{ error }` when its serializer failed.
|
|
226
|
-
- **`akan studio <app> --view runtime`** prints its URL.
|
|
227
|
-
|
|
228
|
-
- ddd3d96: Akan Studio starts workflows from the diagram.
|
|
229
|
-
|
|
230
|
-
- **Clicking a node** in Studio lists the workflows it can start, aimed at its app and module:
|
|
231
|
-
- a model: add a field, an enum field, a mutation or a slice, or create a UI surface;
|
|
232
|
-
- a slice key or a Filter query key: rename it;
|
|
233
|
-
- with nothing pinned: a new module in the app.
|
|
234
|
-
- **In a browser,** a button copies the `akan workflow plan` command, with the inputs Studio cannot know left as placeholders.
|
|
235
|
-
- **In the VS Code / Cursor panel,** a button runs the workflow the way **Akan: Run a workflow…** does. The extension asks for the remaining inputs, shows them and the plan's files in the confirm, then reloads Studio on the page you were on. One workflow runs at a time.
|
|
236
|
-
- It accepts only these seven workflows, and only `app`, `module`, `slice` and `query` preset to plain identifiers.
|
|
237
|
-
- Studio itself never writes: the dev server gained no write endpoint.
|
|
238
|
-
|
|
239
|
-
- 3f231a7: `akan start` now serves Akan Studio at `/_akan/studio`, a read-only view of the Akan Graph for the running app and the libs it reaches.
|
|
240
|
-
|
|
241
|
-
- **ERD:** models, scalars and enums with their fields. Each relation is drawn from the field that names it, and each referenced type sits to the right of the model that names it.
|
|
242
|
-
- **Signals:** one module laid out from left to right: components and pages, store actions, endpoints and slices with their guards, service methods, then queries and models.
|
|
243
|
-
- **Interaction:**
|
|
244
|
-
- Hovering a box highlights its edges and neighbours, and clicking it pins the highlight.
|
|
245
|
-
- The filter dims boxes whose name doesn't match.
|
|
246
|
-
- Every name opens its source in VS Code or Cursor.
|
|
247
|
-
- `/_akan/studio/graph` returns the same graph as JSON.
|
|
248
|
-
- **How it's built:**
|
|
249
|
-
- The page is server-rendered SVG with a small inline script, and loads no client bundle.
|
|
250
|
-
- The dev builder draws the graph on request through a new `build-graph` builder RPC, and keeps it until the next save.
|
|
251
|
-
- It sits behind the same gate as the other `/_akan` devtools routes, and `akan tunnel` / `akan start --share` refuse it.
|
|
252
|
-
|
|
253
|
-
- 96f9ff6: A `Binary` argument reaches `exec` typed as `Uint8Array<ArrayBuffer>`, so it can go straight to a service or a `fetch` body. Before, it was a copy of `Uint8Array` with every method stripped. A `Binary` return still takes any `Uint8Array`.
|
|
254
|
-
- af7c411: The five child-process restart loops now share one restart schedule, `RestartSchedule` from `akanjs/common`: the gateway's replicas, the RSC worker, the incremental builder, and `akan start`'s backend and builder recovery. It counts failed restarts, waits before the next one and cancels a pending one on stop. Each loop keeps its own delays (200ms–30s for the RSC worker, 2s–60s for `akan start`'s builder recovery, 1s–30s for the rest), its own give-up rule and its own log lines.
|
|
255
|
-
|
|
256
|
-
Two stop races in those loops are fixed:
|
|
257
|
-
|
|
258
|
-
- A replica whose restart timer had fired no longer respawns after the gateway stops.
|
|
259
|
-
- A builder `akan start` was still creating or booting when it stopped is now stopped too, instead of being started or retried after its ready timeout.
|
|
260
|
-
|
|
261
|
-
In `@akanjs/devkit`, `shouldAbandonBackendRecovery` is replaced by `backendRecoveryPolicy`, which gives up after five failed backend restarts as before.
|
|
262
|
-
|
|
263
|
-
- 1ebc57a: The `Err` an app imports in client code now has `Err.is(error, ...keys)`, as the `Err` from the app's dictionary (the one services throw) already did. It was missing on the client one, so client code that checked a caught error with it failed to typecheck, or threw a `TypeError` when typed loosely. `Err.is` is true for an `Err`, or for any error carrying a string `error` key, so one restored from a failed `fetch` call passes too; naming keys accepts only those and narrows the error's type to them. Both `Err` classes now run the same check.
|
|
264
|
-
- c3b5b3c: The framework no longer puts `@akanjs/native/core` on a web page. `isNativeApp()` and the other host checks read the platform the shell writes before the bundle runs, and a native shell still starts core with the page. A file that imports `akanjs/client/native` statically still brings core to every page that reaches it. On the minimal app this takes 15 KB raw (5.6 KB brotli) off the vendor floor and 20 KB raw (6.6 KB brotli) off every route entry. `akan build` also resolves the `production` export condition for the browser, SSR-client, CSR and MCP App view bundles, so a package such as Lexical ships its production build alone. On the minimal app the Agent editor chunk drops from 91 KB to 63 KB brotli. `akan start` is unchanged.
|
|
265
|
-
- 6d5b544: A database service now has `create<Model>Many(rows)`. It creates the rows on the same path as `create<Model>`: `_preCreate` and `_postCreate`, the document's save and create hooks, and the live and pubsub events each row's commit fires. Every row's `_preCreate` and document pre hooks run first, so a check there that queries the table does not see the batch's own rows. The rows are then written in one transaction, joining the caller's when one is open, with one multi-row INSERT per 500 rows instead of one statement per row; if the database refuses one row, none is written. Every row's `_postCreate` runs once the transaction commits, as `create<Model>`'s runs once its row is stored, so a `_postCreate` that throws leaves the rows written. A service that already declares a method of that name, itself or in a lib service it extends, keeps its own at runtime, but its signature no longer typechecks against the generated one: rename it.
|
|
266
|
-
|
|
267
|
-
A store can list actions in `static silent = ["refreshToken"] satisfies (keyof UserStore)[]`. When a silent action fails, it shows no toast and logs at verbose instead of error. It still rejects with the original error, so a background write such as a token refresh is awaited by its caller, which handles the failure. Generated actions can be listed, and a store built on a lib store keeps the lib's silent actions. A name in `static silent` that is not an action of the store is reported when the store registers.
|
|
268
|
-
|
|
269
|
-
`akan lint`'s `akan.service.call-in-loop` fix and the agent guidelines name `create<Model>Many` as the way to write a set once.
|
|
270
|
-
|
|
271
|
-
- 73f8830: An error an endpoint declares in `errors` and throws with that status under 500 is now logged at debug, as a returned call is, rather than as an ERROR line. A public endpoint that answers a bad token with a declared 404 no longer sends every probe, token scan or mistyped webhook URL to real-error alerts. Undeclared errors, a declared key thrown with another status, and every 5xx still log as errors.
|
|
272
|
-
- 958f175: A dev server now answers only the host names it can be reached under locally. Under `akan start`, or on a local dev runtime, with `AKAN_ALLOWED_HOSTS` unset, it answers `localhost` and `*.localhost`, IPv4 and IPv6 addresses (a phone on the LAN included), and the app's own hosts: its route domains and `<app>-<environment>.<serveDomain>`. A request under any other `Host`, the HMR socket and the `/_akan/*` dev routes included, gets a 403 that names `AKAN_ALLOWED_HOSTS`. To open a dev server under another name, such as a container's service name or a forwarded editor URL, list every `host:port` it should answer there; a set list replaces the default, as before. A deployed server with the variable unset still answers every `Host`.
|
|
273
|
-
|
|
274
|
-
`akan tunnel` and `akan start --share` keep working: the tunnel agent now dials the local app under the app's own address and leaves the public host name in `x-forwarded-host`, which is where the app already reads it. A redirect a page raises during SSR now sends a same-origin target as a relative `Location`, so a tunnel or proxy caller lands on the host it used rather than the one the server was dialed as; a target on another origin stays absolute.
|
|
275
|
-
|
|
276
|
-
- 9f30e93: A dev page no longer loses its styles after a stylesheet change arrives together with a pages rebuild. The most common case was the first save after `akan start` released its builder for being idle: the waking builder announces a new pages bundle and a new stylesheet at once, and the SSR worker that had started importing the bundle put the old stylesheet back when the import finished. Pages kept linking that stylesheet, whose file the dev server had already deleted, so they rendered unstyled with a 404 until `akan start` was restarted. The same update also reaches an SSR worker that is still booting after a recycle, which used to keep the stylesheet it was started with.
|
|
277
|
-
- d9eaacc: A query takes `signal` in its `FetchPolicy`, joined with its deadline: an abort rejects the call with the signal's reason, stops the request, and ends the retries, including one waiting between tries. A signal already aborted sends nothing, over HTTP, inside a server render or through an MCP App view's host. A signal from `AbortSignal.timeout` rejects with the slow-server error (`base.error.gatewayTimeout`, 408), as the query's own deadline does. A mutation ignores it, since one already sent may have run. In an MCP App view an abort, or the query's own deadline running out, also asks the host to cancel the call it relayed (`notifications/cancelled`); a mutation that runs out of time is only given up on. A custom `FetchBridge` receives the signal as `signal`.
|
|
278
|
-
|
|
279
|
-
A slice's list loads (`init`, `refresh`, `setPage`, `setLimit`, `setSort`, `setQueryArgs`, `loadMore`) abort the request a newer load of the same slice supersedes, instead of letting it run to the end and dropping its answer. The superseded load writes nothing and shows no error, and so does one aborted by a `signal` its caller passed, which resolves; `init` still applies its `default` at once unless the signal was already aborted, and an `init` aborted mid-flight, or one with nothing to change, leaves a loaded-more list whole, so the next refresh still reloads every row shown. A caller's `AbortSignal.timeout` is the exception: the load rejects with the slow-server error and shows it, as a query does. A store action that rejects with the abort of a signal it was given no longer shows an error toast, whatever reason that signal was aborted with, except an app or server error (one with a dictionary key or a status) and a timeout, which still show.
|
|
280
|
-
|
|
281
|
-
- d9eaacc: Identical queries a browser tab has in flight at once share one request: same endpoint, arguments, credential, timeout and retry. The caller that started it parses the answer, and the others parse a copy. One caller's abort leaves the request running for the rest, and it stops only when every caller waiting on it has aborted. A write (a mutation, a file upload, a socket message) or a sign-in or sign-out ends the sharing: a call made after it sends a request of its own, while a caller already waiting keeps its answer. A server still memoizes a request's queries for the whole render, and outside a request it sends each call.
|
|
282
|
-
|
|
283
|
-
`FetchPolicy.cache` and `FetchPolicy.partial` are deprecated. Nothing has read them since v2 dropped GraphQL; an endpoint reuses its answer with its own `query(T, { cache })`. `FetchPolicy.onError` is deprecated too, since nothing calls it: catch the call's rejection instead.
|
|
284
|
-
|
|
285
|
-
- c334caf: A root layout's fonts now preload one face per family instead of every face. By default that is the regular face: 400 normal, or the weight a browser draws regular text with when the family has no 400 (500, then lighter, then heavier). Every other weight still has its `@font-face` rule, with `font-display: swap`, and loads when text first uses it. A path set to `preload: true` is preloaded as well, and `preload: false` still never is. The app template's home page declares nine Pretendard weights and preloaded all of them, 166 KB; it now preloads one, 18 KB, and fetches the three other weights it shows when it draws them. To keep a weight the first screen shows preloaded, set `preload: true` on its path; the akanjs.com layout now does that for 700 and 900.
|
|
286
|
-
- 170be15: A form field setter now costs about one copy of the state, like any other store write. `set<Field>On<Model>`, `add<Field>On<Model>`, `sub<Field>On<Model>`, `writeOn<Model>` and the file upload setters used to hand `set` an updater, which ran immer over the whole state and then compared every key. A keystroke cost 284 µs at 1,740 keys and 600 µs at 3,480. They now produce the new form alone and write it as a patch: 42 µs at 1,740 keys and 79 µs at 3,480, against 37 µs and 74 µs for a bare copy of the state.
|
|
287
|
-
|
|
288
|
-
- **`merge<Model>` marks the open model loading under its own key.** It wrote a literal `modelLoading` key, so `<model>Loading` never showed the merge in flight and the state gained a stray key. The view modal now shows its loading state during a merge.
|
|
289
|
-
- **A failed model action ends the loading it started.** When `create<Model>`, `create<Model>InForm`, `update<Model>`, `update<Model>InForm`, `merge<Model>` or `view<Model>` fails, `<model>Loading` goes back to `false`; when `edit<Model>` fails, `<model>FormLoading` does. That also holds when the request succeeds but the write after it throws. Before, the flag stayed set and the view or edit modal stayed under its loading overlay.
|
|
290
|
-
- **A loading flag is cleared only by the action that set it last.** An action that another one overtook leaves the flag alone, even when both are on the same record. Before, a merge or update landing during a `view<Model>` of the same record showed that view as loaded early.
|
|
291
|
-
- **A model action no longer takes over what the store's own `view<Model>`, `edit<Model>` or `new<Model>` opened during its request.** A component that writes a record or form into the store itself, as the edit modal does from a page payload, does not count as an open.
|
|
292
|
-
- `merge<Model>`, `update<Model>` and `update<Model>InForm` write the answer as the open model only while that record is still open.
|
|
293
|
-
- Creates and updates leave the modal alone.
|
|
294
|
-
- `update<Model>InForm` and `create<Model>InForm` leave the form to an `edit<Model>` or `new<Model>` opened meanwhile. A `view<Model>` does not take the form, so the saved form is still reset and its draft dropped.
|
|
295
|
-
- A `view<Model>` or `edit<Model>` overtaken by a later one no longer lands its record over the later one.
|
|
296
|
-
- Before, a view of another record was replaced or closed when the write landed, and an edit opened during a save lost its form.
|
|
297
|
-
- **A form opened under the same draft scope while `create<Model>InForm` or `update<Model>InForm` waits for the server opens without that draft**, so a second new form is not refilled with what the first is creating. The draft stays in storage until the request succeeds, so a reload during the save still restores it, and it is kept when the request fails. On success it is deleted only while it still holds the saved form, so a draft that a form opened meanwhile wrote is kept. A form holding an `undefined` value now compares equal to its stored draft, which drops that value; before, the saved form's own draft was kept and refilled the next new form. A draft discarded or reset during the save stays gone when the save fails. A draft write still pending when the save starts is written first.
|
|
298
|
-
- **A failed `view<Model>` or `edit<Model>` that is still the latest open closes its modal**, unless the modal already shows that record, as when a page payload seeded it. Before, the modal stayed open over the previous record.
|
|
299
|
-
|
|
300
|
-
- e143263: The optional `happy-dom` and `@happy-dom/global-registrator` peers now ask for `^21.0.4`. Versions 17.0.0 through 21.0.3 compile a `<script type="module">` import alias into code unchecked, so a page loaded into a happy-dom window could run code on the host (GHSA-834v-8h66-3h79). UI tests register one through `akanjs/test/registerDom`; run `bun update happy-dom @happy-dom/global-registrator` in a workspace that pins an older one.
|
|
301
|
-
- e4f7876: A hidden field declared `.optional()` (`field.hidden(String).optional()`) is optional again in a service's `create<Model>` and `create<Model>Many` input, and in the document type `by()` makes of an input model or a scalar. It was typed there as a required, non-null value, though the model's own document already typed it optional, so a create that left it out needed a cast. A hidden field without `.optional()` stays required. Code that read such a field off a scalar's document as always present now handles its absence, as it already did on the model's document.
|
|
302
|
-
- cb0fd5b: Reading the client address from a forwarded header no longer stalls the server on a crafted hop. `IpLiteral.parse` matched a bracketed IPv6 hop with a pattern that backtracked quadratically, so an `X-Forwarded-For` or `X-Real-IP` entry of `[` and a long run of colons kept the event loop busy for about 100 ms per 16 KB of header, on every request that carried it. The bracket is now matched in linear time and the colon checked apart; every address parses as before.
|
|
303
|
-
- 256b6e3: A lazily loaded chunk that fails to link during a rolling deploy now reloads its page as a document.
|
|
304
|
-
|
|
305
|
-
- **Before:** the chunk fallback covered only the chunks the Flight client loads. A chunk loaded through `import()` (`lazy` from `akanjs/webkit`, `React.lazy`, or a dynamic import in a client component) on a page from another build could fail to link against the document's import map. With no error boundary above it, the page went blank; with one, it showed that boundary's fallback. Nothing loaded the page again.
|
|
306
|
-
- **Now:** when a module link or resolve error reaches the React root (caught by an error boundary or not) or rejects an `import()` that nothing catches, the tab reloads the address it shows. It does so only when all of these hold:
|
|
307
|
-
- the page on screen was rendered from a client navigation's or refresh's response, not by the document itself;
|
|
308
|
-
- no navigation to another page is under way;
|
|
309
|
-
- the browser is online;
|
|
310
|
-
- no other document load is under way;
|
|
311
|
-
- the error is not one the Flight client's chunk loader already handled.
|
|
312
|
-
- **At most one reload per error per tab,** whichever page it shows up on, in the same per-tab list the chunk fallback uses.
|
|
313
|
-
- **An `import()` of your own that always fails to link** (a bare specifier missing from the import map, or a CDN module that lacks a name it is asked for) therefore costs one reload per distinct error per tab, the first time it happens on a page a client navigation rendered. After that it shows as it did before.
|
|
314
|
-
- This applies to `akan build` output only. There, React's own reporting is kept: a caught error is still logged, and an uncaught one is still reported, through a window `error` event where the browser has no `reportError`. `akan start` passes nothing new to the root.
|
|
315
|
-
|
|
316
|
-
- c48d780: The `shared` and `util` libraries that `akan install-library` copies are refreshed. Apps that use them should check these changes:
|
|
317
|
-
|
|
318
|
-
- Sign-up and sign-in steps run in a new `_sign` service. `generatePrepareUserWithAccountId`, `startPhoneSign` and `signinWithPhoneCode` are now one endpoint each, replacing store actions that chained several calls. `activateUserWithAgreePolicies` writes the agreed policies together with the activation. `leaveSelf` and `leaveAndSignoutSelf` take the leave survey with the deletion.
|
|
319
|
-
- Profile image review is removed, along with `setAppliedImagesOfSelf`, `setAppliedImagesOfPrepareUser` and `approveUserImages`.
|
|
320
|
-
- The server issues the session cookie as HttpOnly through `SessionCookie`, and pages read its expiry from an unsigned claims cookie. Refresh, SSO state and signup-token cookies are HttpOnly and carry a `Max-Age`. A response that issues a signup token also sets it as a cookie, and activation expires that cookie.
|
|
321
|
-
- Activation of a draft whose accountId is an email address now needs a verify that proves that address by default; a GitHub or phone sign-up still activates on its own verify. `signup.requireVerifiedEmail: false` restores the old default, which accepts any verify except `password`.
|
|
322
|
-
- `rootAdminInfo` has no default value. Boot creates the root admin only when it is missing. `resetRootAdmin: true` resets an existing root admin's password and roles to the configured ones.
|
|
323
|
-
- Admin password sign-in gives the same error for an unknown account and a wrong password, and locks the same way user sign-in does. An admin who changes their own password must give the current one. `setAdminRoles` replaces an admin's roles in one call. The new `SelfOrStaff` guard lets staff read user records, and only admins write them. `PlatformAdmin` admits only admins listed in `AKAN_PLATFORM_ADMIN_IDS`, and `isPlatformAdmin` tells whether the signed-in admin is one of them.
|
|
324
|
-
- OAuth: a session that holds only the admin identity may grant consent only when `oauth.allowAdminSubject` is on. A token issued to an OAuth client is refused at an `mcp: false` endpoint and at an endpoint named in `offShelfEndpoints`. The first-party refresh endpoints refuse an OAuth client's refresh token.
|
|
325
|
-
- Files: each upload takes up to 100 MB per file (`file.error.fileTooLarge`) and records its uploader. Reading `file` or `lightFile` needs a signed-in account, and `fileListInIds` needs an admin. Storage keys get a random suffix, and `audio/*` keeps its content type. A user can set as `image` or `images` only files that user uploaded.
|
|
326
|
-
- Verified emails: `requestEmailCodeInActiveUser` / `verifyEmailInActiveUser` prove another address, `verifiedEmailsOfSelf` lists them, and `removeVerifiedEmailOfSelf` removes one.
|
|
327
|
-
- `getActiveSetting` returns `LightSetting` only. The full setting is admin-only.
|
|
328
|
-
- `pushNoti.webIcon` and `pushNoti.webBadge` set the web push icon and badge.
|
|
329
|
-
- `util` moves to nodemailer 10, which ships its own types, so `@types/nodemailer` is no longer needed. `mailer.from` sets the sender. Every recipient must be one plain address, and no mail is sent in a preview.
|
|
330
|
-
- New UI pieces: `ContextMenu`, `SortableList`, `Upload` split into `UploadImage` and `UploadParts`, and app badge sync.
|
|
331
|
-
|
|
332
|
-
- 3537448: `<Link>` on a built SSR page now loads the page it points to before the click, once the pointer has rested on it or it has held keyboard focus for 65 ms; a press before then, a blur, or the pointer leaving cancels it. A touch never prefetches, since a scroll that starts on a link touches it too and a tap reaches its click about 100 ms later. `prefetch="viewport"` also loads the page once the link scrolls into view, behind every link pointed at, and `prefetch={false}` turns this off. `router.prefetch(href, { priority })` does the same from code. A prefetch is skipped under Save-Data or on a 2G connection, for a page the navigation cache holds or the navigation in flight is loading, and outside a production build. At most two run at once, the newest pointed-at link first.
|
|
333
|
-
|
|
334
|
-
A prefetched page is kept for 15 seconds, so a page shown off a prefetch is never older than that. Taken within 5 seconds it commits as current; older, it commits as a replay, so `Load.Units` and the edit modals refetch their data as they do for a cached page. Only a 2xx or 404 answer is kept: a 429, 408 or 5xx is asked for again on the click. The prefetch cache follows the navigation cache's account rule (a page prefetched for one account is never shown to another) and is cleared by `router.refresh()`. A redirect in a prefetch's answer is followed only when the link is clicked.
|
|
335
|
-
|
|
336
|
-
A prefetch sends `X-Akan-Rsc-Prefetch: 1` (fetch() may not set `Sec-Purpose`), and the server counts it as `httpRscPrefetchCount`, apart from `httpRscNavigationCount`. Hovering a link renders its page on the server, so a page whose render has a side effect, such as counting a view, should count it from the client or set `prefetch={false}` on its links.
|
|
337
|
-
|
|
338
|
-
- c882491: Behind the gateway, a change to a live-synced model now reaches only the replicas that hold a live room for that model. Each replica tells the gateway which models it holds rooms for when that set changes, and again in its periodic room snapshot. The gateway forwards a `live.change` only to those replicas, where it used to send every change to every replica but batch ones, and drops a replica's models when it exits. Apps on the Redis adaptor are unchanged.
|
|
339
|
-
- f3def22: A write to a live-synced model now evaluates only the rooms it can match. Each room is filed in a per-model index under one of its `eq` or `oneOf` conditions. A write looks up its own values there and evaluates the rooms it finds, plus the rooms that have no such condition. Room membership does not change. With 50,000 rooms whose queries mix `oneOf` and `q.all`, routing a write took 38 ms and now takes about 20 µs.
|
|
340
|
-
|
|
341
|
-
The live room replay log no longer slows down past 10,000 subscribed rooms. Its room cap now evicts only rooms nobody on the server subscribes to, so a publish no longer walks every subscribed room: at 12,000 rooms it took 414 µs and now takes 0.5 µs. Kept frames now share a 64 MiB budget: past it, the room that published least recently loses its oldest frames first. Frames older than the retention window are dropped even in a room that stopped publishing. A full log used 866 MiB and now stays near 61 MiB. A client whose missed frames were dropped resynchronizes, as it already does after any gap.
|
|
342
|
-
|
|
343
|
-
- 8424863: Each caller of `get<Model>`, `load<Model>`, `load<Model>Many` or a declared loader now gets its own document, while the loads made together still cost one query. Before, two concurrent requests that loaded the same id in the same tick were handed one document object. An edit one request made and never saved, for instance because a check refused it, was visible to the other, and was written by the other's unrelated `save()`. The same was true of a key repeated in one `load<Model>Many`, of two keys of a `byArrayField` loader that match the same document, and of every caller a loader with `cache` answered from memory.
|
|
344
|
-
|
|
345
|
-
A caller after the first gets the document as it was read, built from the same stored row: it has the same prototype and methods, a save writes only the fields it changed, and a document read without its secret fields still keeps them on save. A loader with `cache` still answers from memory without a query, but every answer is the document as it was loaded, not as an earlier caller left it. `DataLoader` takes a `copy` option that gives a caller its own value whenever another caller already holds that value.
|
|
346
|
-
|
|
347
|
-
- bf28968: An app can now serve its default locale at unprefixed paths. Set `i18n.localePrefix` to `"as-needed"` in `akan.config.ts`, and `/books/OL45804W` is the English page itself. Before, every page lived under `/<locale>/…`, and an unprefixed path answered with a 307 to the locale the browser asked for. An app with one language, or with URLs fixed from outside (OAuth callbacks, QR codes, links in mail, a migrated site), could only meet them with raw `<a href>`s, which reloaded the whole page and went through that 307 on every click.
|
|
348
|
-
|
|
349
|
-
```ts
|
|
350
|
-
const config: AppConfig = {
|
|
351
|
-
i18n: {
|
|
352
|
-
defaultLocale: "en",
|
|
353
|
-
locales: ["en", "ko"],
|
|
354
|
-
localePrefix: "as-needed",
|
|
355
|
-
},
|
|
356
|
-
};
|
|
357
|
-
```
|
|
358
|
-
|
|
359
|
-
- **The default stays `"always"`**, so an app that sets nothing serves and links exactly as before.
|
|
360
|
-
- **Under `"as-needed"` the default locale drops the prefix and the other locales keep it.** `<Link href="/types">` renders `/types` on an English page and `/ko/types` on a Korean one, and still navigates in place. So do `router.push`, a server `router.redirect()`, `setLang`, active-link matching, the 404 page's home link, `hreflang` alternates and `/sitemap.xml`. `setLang` to the default locale drops the prefix. A single-locale app has no prefix anywhere.
|
|
361
|
-
- **An unprefixed URL always means the default locale.** No Accept-Language redirect runs, so one URL is one locale for caches and search engines.
|
|
362
|
-
- **`/<defaultLocale>/x` answers with a 308 to `/x`**, so links from the `"always"` days keep working and land on the one canonical URL. The 308 is cached for a day, so an app that goes back to `"always"` stops redirecting within that time.
|
|
363
|
-
- **Native and CSR boots keep their locale paths.** Their routes match on the `/:lang` segment, so a `?csr=true` request without one is redirected to the default locale's prefixed path. An Android app link limited to a basePath lists the default locale's unprefixed path as well as its prefixed one, so links from before the switch still open the app.
|
|
364
|
-
- `akan preview` keeps an unprefixed path unprefixed under `"as-needed"`, except with `--csr`. The value reaches bundles as `AKAN_PUBLIC_LOCALE_PREFIX`, and the image env carries it when it is `"as-needed"`. `LocalePath` (`akanjs/common`) and a fourth `localePrefix` argument to `getPathInfo` build the same URLs in app code.
|
|
365
|
-
|
|
366
|
-
- 9b5bcee: Every SSR page now loads 72K less framework JavaScript (22K less after Brotli).
|
|
367
|
-
|
|
368
|
-
- **`akan build` narrows the vendor entries to the names the page code imports.** The `akanjs/*` and `tailwind-merge` entries in the page's import map used to re-export a whole facet. Each one now exports only the names the built route bundles import, lazy chunks included. On the minimal app, the framework floor, meaning the runtime plus the vendor entries every page loads, drops from 630.2K raw / 189.4K br to 558.4K raw / 167.4K br. `akan start` keeps whole facets, so a newly saved import never misses a name.
|
|
369
|
-
- **The agent runtime moved to `akanjs/store/agent`, which has its own vendor entry.** This covers `AgentContext`, `AgentVisual`, `AgentPrompts`, `StoreSurfaceSource`, the `Screen*` readers and the rest. A page now loads that entry (28.6K raw / 9.4K br) only when it mounts `Agent.Chat`, `Agent.Zone` or `Agent.Dock`. `akanjs/store` still re-exports these names for one minor, marked `@deprecated`. A build whose pages import none of them keeps the runtime out of the store entry. `ToolReturn`, `AgentAbort` and `AgentProgress` stay in `akanjs/store`.
|
|
370
|
-
- **A tab left open across a deploy loads its next page as a document when the import map changed.** Narrowed vendor entries differ from build to build, so a newer route chunk could import a name the tab's vendor entries lack. Each document now names its import map, and the server answers a navigation from another import map with 409. The client then loads the target as a document, with the current import map.
|
|
371
|
-
- **A narrowed build fails when route code imports a name its facet does not export**, and names the missing names. Before, the page threw a `SyntaxError` in the browser.
|
|
372
|
-
|
|
373
|
-
- 4561152: The skill examples now use one neutral domain, books from a public read-only API: a `BookApi` adapter in `srvkit/`, a `lib/_openlibrary/` service with a `book` query, `fetch.book(id)` and `/books/[id]` pages. This covers the `akan-service` external-API recipe, the `akan-page` API summary, the `akanApi` import block, the `config` rule's `localePrefix` example and the README's as-needed path. The recipes teach the same steps as before.
|
|
374
|
-
- 73e833b: A not-found or error view's own `<title>` and `<meta>` replace the document head, so a 404 page has one title.
|
|
375
|
-
|
|
376
|
-
- The tags at the top of what a layout's `.notFound()` or `.error()` returns are merged over the layouts' head by tag identity and leave the view's body. Before, React hoisted them beside the head's own, so the document had two titles.
|
|
377
|
-
- This holds for an unmatched path, for `router.notFound()` from a page's `.head()` or `.render()`, and for an error a page throws.
|
|
378
|
-
- A not-found view raised by a page's render now has the layouts' head, as one raised before any byte already had, not the head of the page that is missing.
|
|
379
|
-
- Its `noindex` is one `robots` meta that keeps the other directives a layout's `robots` meta gives, such as `nofollow`.
|
|
380
|
-
- Under a `.loading()` the head is out before the view renders, so its tags stay in the view, as before.
|
|
381
|
-
|
|
382
|
-
- b24fef3: An app that draws no Akan UI component now builds and runs without the UI's optional peers. Before, `akan build` failed with `Could not resolve: "react-icons/ai"` or `"react-spring"` in an app that imported nothing from `akanjs/ui`: the System UI every root layout mounts drew react-icons glyphs and reached the model, list and dialog components through the `Load` and `Button` modules, and the CSR build, on by default, bundled the whole `akanjs/ui` barrel.
|
|
383
|
-
|
|
384
|
-
**Upgrade note.** A workspace can drop `react-spring`, `@react-spring/web`, `@use-gesture/react`, `react-refresh`, `scheduler` and `tailwind-scrollbar` from its `package.json`, unless its own code imports them. `akanjs` now depends on `@react-spring/web`, `@use-gesture/react`, `react-refresh`, `scheduler` and `tailwind-scrollbar` itself, because the System UI, the dev runtime and `akanjs/ui/styles.css` always use them, and nothing uses `react-spring` any more. New workspaces no longer list them. A workspace whose own code keeps `react-spring` or `@react-spring/web` must move it to major 10: an older one installs a second copy under `akanjs`, and a spring value the app makes no longer typechecks on an `animated.*` element from `akanjs/ui`.
|
|
385
|
-
|
|
386
|
-
- **`react-icons` stays an optional peer.** Install it when the app draws a component that shows its icons, as most form, list and dialog components do. Under `akan start`, a CSR page (`?csr=true` or a native shell) of an app that imports anything from `akanjs/ui` still needs it: the dev module registry loads that barrel whole.
|
|
387
|
-
- **`chance`** stays an optional peer that only `akanjs/test` needs.
|
|
388
|
-
- **The System UI draws its own icons.** The Button's processing and done states, the toasts and the reconnect overlay render inline SVGs with the same markup react-icons drew.
|
|
389
|
-
- **The generated root layout and `_overrides.tsx` wrapper** import `System` and `UiOverrideProvider` from their own files instead of the `akanjs/ui` barrel.
|
|
390
|
-
- **The CSR build and its MCP App views** rewrite `akanjs/ui` imports to the components a file names, as the SSR route builds already did, so a page that imports `Link` no longer bundles every component.
|
|
391
|
-
- **Animations use `@react-spring/web`** instead of the `react-spring` umbrella package, which also installed the native, three.js, konva and zdog renderers.
|
|
392
|
-
|
|
393
|
-
- 513e48d: A page whose render has a side effect, such as counting a view, can now refuse every Link prefetch itself with `.config({ prefetch: false })`; on a `_layout` it covers every page below, and a page there can opt back in with `prefetch: true`. The server runs the route's guards and then answers such a prefetch with an empty 204, rendering nothing, cached or not: a guard's redirect still answers as a redirect, and a refusal as it would for the click, so a prefetch tells a visitor no more than a click about the paths behind a guard. The browser keeps that answer as nothing for the prefetch lifetime, so hovering the link again asks no more, and the click renders the page as usual.
|
|
394
|
-
|
|
395
|
-
A page prefetched before this tab's own write is no longer shown as current: a mutation, a file upload, a socket message sent or a changed credential drops every prefetched page, as it already ended in-flight query sharing. Only this tab's own writes through `fetch` count: a write from another tab or device, or a server push, leaves a prefetched page as it is for the rest of its 15-second lifetime, and a socket message drops them as it is sent, not once the server has acted on it. A write that changes nothing a page reads, such as a typing notice, passes `{ keepsReads: true }` to keep both its in-flight queries and its prefetched pages.
|
|
396
|
-
|
|
397
|
-
In production, an RSC navigation's answer no longer carries the headers that explain a render to its developer (`X-Akan-Rsc-Route`, `-Pathname`, `-Nav-Id`, `-Cache`, `-Cache-Reason`, `-Cache-Key`, `-Partial-Reason`, `-Partial-Common-Prefix`, and `X-Akan-Rsc-Partial` other than a patch's): a missing path carried them where one a guard refused did not, telling a visitor which paths exist behind the guard. `akan start` still sends them.
|
|
398
|
-
|
|
399
|
-
Link prefetch fixes:
|
|
400
|
-
|
|
401
|
-
- A link's focus prefetches it after a key press, and until the first pointer press on the page, so focus moved by a screen reader's cursor, switch access or voice control still does; the focus a mouse press, a tap or a pen tap gives a link does not, until the next key press.
|
|
402
|
-
- A late redirect from the page on screen, raised while another navigation loads, now runs once that navigation ends keeping the page (a bare 404 refusal, a refresh that finds no page, or a shallow update or a Back between the page's shallow entries that cancels it) instead of being dropped; a navigation that replaces the page still drops it.
|
|
403
|
-
- A page the navigation cache holds under another `#fragment` is neither prefetched again nor fetched on the click: the fragment never reaches the server, so the cached payload serves it.
|
|
404
|
-
- When more `prefetch="viewport"` links come into view than the queue holds, the first to show are kept, as a page lists its links top down, instead of the last. A link stays watched: one still queued is withdrawn as it leaves the view, and asks again when it comes back.
|
|
405
|
-
- `router.prefetch(href)` returns a call that withdraws the request while it still waits.
|
|
406
|
-
|
|
407
|
-
- 5cd1fc3: Disposing a pubsub subscription or a message listener now removes that subscription's own listener. When one handler function served two subscriptions, such as two rooms or a re-subscribe before the previous cleanup ran, disposing the first one removed nothing: the first room stayed subscribed on the server and kept calling the handler after unmount. Each dispose now removes exactly one listener, and a room is unsubscribed on the socket once its last listener leaves.
|
|
408
|
-
- f47cc82: A server now answers `/_akan/app/ready`, a readiness route that returns 503 while it cannot serve and 200 once it can. A gateway is ready while at least one replica that takes traffic is ready, and a gateway that runs only batch replicas once one of them is; it turns unready again when the last one exits or stops answering. A solo server, the desktop server included, is ready once it runs and its RSC worker can render, so it answers 503 while the pages bundle loads at boot and while the worker restarts; a server with no pages waits for nothing else. The route follows the access rules of `/_akan/app/health`: a caller without `AKAN_STATUS_TOKEN` or `AKAN_LOG_STREAM_TOKEN` gets `{ "status": "ready" }` or `{ "status": "unavailable" }` alone, and the token holder also gets each replica's state. `/_akan/app/health` is unchanged and stays the liveness check, answering 200 while the process is up.
|
|
409
|
-
|
|
410
|
-
The `infra/app` chart's readiness probe calls a new `readinessPath` value, `/_akan/app/health` unless set, because an image built with an earlier akanjs answers `/_akan/app/ready` with 404 and its pod would never become Ready. Set `readinessPath: /_akan/app/ready` once every image the chart deploys carries this release. The repository's own values set it, since its pipeline builds the image from the same commit as the chart. The startup and liveness probes stay on `/_akan/app/health`.
|
|
411
|
-
|
|
412
|
-
- 7f0de74: On the Redis WebSocket adaptor, each room's events and each live-synced model's changes now go out on channels of their own, and a server subscribes only to those of the rooms and models it holds. Both used to go to every server of the app on one channel, `<prefix>ws:broadcast`, which servers keep using for one more release so that a rolling deploy loses nothing (see the note on rolling deploys).
|
|
413
|
-
|
|
414
|
-
- **A room's events** go out on one of 16,384 channels, picked by a hash of the room id (`<prefix>ws:room:<shard>`). A server subscribes to a shard while it holds a room on it.
|
|
415
|
-
- **A change to a live-synced model** goes out on `<prefix>ws:change:<model>`. A server subscribes to it while it holds a live room for that model.
|
|
416
|
-
- **A subscribe is acknowledged once Redis has confirmed the SUBSCRIBE** for its channel, so an event another server publishes after the ack still arrives. While the subscriber is disconnected, the ack does not wait.
|
|
417
|
-
- **`WebsocketAdaptor.joinRoom`** takes an optional third argument, `{ live: refName }`, for a live room.
|
|
418
|
-
|
|
419
|
-
- c0b84d0: A rolling deploy of an app on the Redis WebSocket adaptor loses no event while servers of this release and of an earlier one run side by side.
|
|
420
|
-
|
|
421
|
-
- **Servers of this release also publish every room event and live change on `<prefix>ws:broadcast`**, in the format earlier releases read, and listen there for theirs. They skip a copy another server of this release put there, since they heard it on its own channel. Servers of 3.2.0-rc.6, which use only the new channels, hear and are heard on those.
|
|
422
|
-
- **This lasts one release** (#458). Until then Redis still sends every event to every server on `<prefix>ws:broadcast`, plus once more to the servers holding its room, so the traffic saving of the per-room channels arrives with the next release. Deploy this release before that one rather than skipping it.
|
|
423
|
-
- **A Redis ACL** that names `<prefix>ws:broadcast` must allow `<prefix>ws:*` before this release goes out, since its servers publish on both.
|
|
424
|
-
|
|
425
|
-
- 1f93507: On the Redis WebSocket adaptor, events buffered while the publisher was disconnected now go out in the order they were sent. Before, an event published while the buffer drained after a reconnect went straight out, ahead of older buffered ones, and the drain started on `connect`, ahead of the commands ioredis resends on `ready`. So another server's subscribers could see a room's events out of order. A message now waits behind a non-empty buffer, and the buffer drains once the publisher is `ready`. A publish that fails goes back into the buffer in the order it was sent, where it used to go to the back. When Redis refuses a publish with an error reply, the buffer is retried on a timer, starting at 200 ms and backing off to 5 s, instead of not until the next reconnect. Shutting down waits for a drain that is still running, unless the publisher drops meanwhile.
|
|
426
|
-
- 5d3cb3e: In production, an error thrown while a page renders no longer reaches the browser as its message. The RSC worker returned the message as the error's digest, and React writes the digest into the Flight payload that the HTML inlines and that client navigations fetch, so a database driver's message, a file path or a value read from a record was on the page. Under `NODE_ENV=production` the digest is now a random 8-character id, and the worker's `[rsc] render failed` log line carries the same `digest=<id>` beside the full error, so the id a page shows finds its log line.
|
|
427
|
-
|
|
428
|
-
Development keeps the message as the digest. Redirects and not-found answers keep their digests and behave as before, and a layout's `.error()` view still gets `AKAN_RENDER_ERROR`. A typed `Err` thrown after the page has started streaming now gets an id as well, rather than its dictionary key; nothing in the framework read the key from the digest.
|
|
429
|
-
|
|
430
|
-
- 9a9e1fa: A server page from `akan build` now preloads its client modules from `<head>`, so a cold load stops waiting on chains of imports.
|
|
431
|
-
|
|
432
|
-
- **What is preloaded:** the rsc client and the chunks it imports, the chunks every client reference row (`I` row) in the shell's flight names, and the importmap vendors those chunks import, each with its own chunks. A client URL that only the page's own text carries is never preloaded. Before, only the rsc client and the locale dictionary were preloaded. The browser found the rest one import level at a time, after the document finished.
|
|
433
|
-
- **Measured on `apps/minimal`:** `/en/explore` preloads 64 modules and its flight names 37 client chunks, all of them preloaded. `/en/lab/buttons` preloads 165 for 137. Preloading every client component each route's page and layouts import would have meant 274 modules for `/en/explore`, so the preloads follow the flight instead.
|
|
434
|
-
- **A boundary that resolves after the shell** still loads its chunks when its flight rows arrive. `akan start` preloads nothing new, because a dev page loads its client code from the SSR dev registry.
|
|
435
|
-
- `routes-manifest.json` carries the preload table as `modulePreloads`: the runtime chunks, each vendor's chunks, and the vendors each browser chunk imports.
|
|
436
|
-
|
|
437
|
-
- 9055634: Partial RSC commit can now patch a real page, and it patches cleanly. It is still off by default behind `AKAN_PUBLIC_RSC_PARTIAL_COMMIT=1`. With the flag on:
|
|
438
|
-
|
|
439
|
-
- **Which pages render their head through `AkanRouteHead`.** Every page whose head is plain `title`, `meta` and `link` tags now renders it through a client component instead of plain head tags. That way any page can be the one a patch starts from. Patches still only land on pages that set `.config({ rscPatchHeadSafe: true })`.
|
|
440
|
-
- **A plain `.head()` is its own head snapshot.** A page no longer needs a hand-written snapshot. A head with anything else, such as a script or a component, keeps the full render.
|
|
441
|
-
- **React renders the head.** The old patch swapped `<head>` nodes behind React's back. That left a stale or broken head after the next full navigation or a back navigation.
|
|
442
|
-
- **A patch carries only the page's part of the head.** The layouts' part stays on the client, under the layouts the patch keeps. The page's part travels in the `X-Akan-Rsc-Patch-Head-Snapshot` header, which is now capped at 2 KB encoded, down from 12 KB. A larger page head renders whole, and the server logs that once per route.
|
|
443
|
-
- The cap leaves room under nginx's default 4 KB `proxy_buffer_size`, but it doesn't guarantee a fit: router state, trace headers and `Set-Cookie` share that buffer.
|
|
444
|
-
- The docs pages' part is about 1.1 KB, against about 5.7 KB for their whole head.
|
|
445
|
-
- **The layouts a patch keeps follow the new page.** `usePathCtx()` under an SSR page gives the patched page's path, pathname and query, so a menu's active item and a pager move with it.
|
|
446
|
-
- **A full commit after a patch goes straight to the new page's head, path and body.** It no longer shows the last full page for a frame first.
|
|
447
|
-
- **A patch falls back to a full render when the kept layouts would be wrong:**
|
|
448
|
-
- another route group's layout sits at the same URL prefix (`(guest)/account/login` to `(member)/account/settings`);
|
|
449
|
-
- the layouts' head would be different for the target, for example a layout `.head()` that reads a search arg. The router state carries a key of the layouts head its page rendered (`headKey`), and the server compares it with the target's. The key changes together with the rest of the router state, so a navigation started while the previous page is still committing sends that page's key;
|
|
450
|
-
- a route param differs (`/en` to `/ko`);
|
|
451
|
-
- a frame setting differs, such as `transition`;
|
|
452
|
-
- the page navigated from has no patchable head;
|
|
453
|
-
- its frame cannot be resolved.
|
|
454
|
-
- **A client built without the flag no longer asks for patches it cannot apply.** Before, a server running with the flag answered such a client with patches, and every sibling navigation made a second request. Such a client leaves the head key out of the router state it sends.
|
|
455
|
-
- **A refused head-safe patch runs each `.head()` once.** When a patch is refused after its head resolved, the full render reuses that head. Before, it ran every `.head()` a second time.
|
|
456
|
-
- **`@akanjs/devkit`: the SSR runtime manifest keeps every client export of the segment outlet module.** Before, it kept only one.
|
|
457
|
-
|
|
458
|
-
- 3537448: A navigation that a newer one overtakes before its page commits now cuts its `/__rsc` request once the response headers are in, so the server stops streaming it and the browser stops reading it. Before, it ran to the end and was only kept from committing. The cut waits for the headers because a session refresh may answer with a rotated single-use refresh token in `Set-Cookie`, and a request aborted before it lands leaves the browser holding the spent token. A refresh, a shallow push and a move back or forward overtake it the same way. A page that has already committed is never cut, so the Suspense content it still streams keeps arriving while the next navigation loads.
|
|
459
|
-
- a373d51: With partial RSC commit on (`AKAN_PUBLIC_RSC_PARTIAL_COMMIT=1`), a page reached by a patch is now replayed from the browser's cache on a revisit, even after a full navigation in between. Before, every full navigation dropped every cached patch, so a section change made every page of the section before it a network fetch again.
|
|
460
|
-
|
|
461
|
-
- **A cached patch remembers the full render it went under.** It is replayed only while that same render is on screen, which is the case when a navigation brings that page back from the full-page cache, a not-found view in between included.
|
|
462
|
-
- **It is never laid under other layouts.** A patch is refetched, never replayed, under another route group's layouts or another locale's at the same URL prefix. The same goes for a new render of the page it went under, once that page has left the full-page cache.
|
|
463
|
-
- **The cache stays bounded at 32 entries.** A patch whose full render can no longer come back is dropped. `clearRscNavigationCache()`, `refreshRsc()`, an HMR refresh and an account change still drop every cached patch.
|
|
464
|
-
- **The default is unchanged.** Partial commit is still off unless the flag is set.
|
|
465
|
-
|
|
466
|
-
- c723e7a: With `AKAN_PUBLIC_RSC_PARTIAL_COMMIT=1`, a Link prefetch now carries the router state, so a prefetched sibling page comes back as a patch. A prefetched patch is used only under the full commit it was requested from, and a link the patch cache would replay is no longer prefetched.
|
|
467
|
-
- 6c3a303: A page that renders a string of 1024 characters or more, such as a post body or a long comment, now renders and hydrates whatever its lines say. React sends such a string, and every typed array or `ArrayBuffer`, as a length-prefixed Flight row whose raw bytes may hold newlines. The SSR sanitizer, the client navigation redirect guard and the partial-navigation patch check all split the stream on every newline, so they read lines inside the text as rows of their own. A line shaped like a debug row was dropped and a line shaped like a redirect row was rewritten, which broke the render. On a client navigation the guard could act on such a line as a redirect, and a partial navigation fell back to a full one.
|
|
468
|
-
|
|
469
|
-
All three now share one Flight row reader that follows React's row headers. It skips a length-prefixed row by its byte length across any chunk boundary, and it checks only real rows, which keep their sanitizing and redirect handling. Long text is no longer split and pattern-tested line by line. The server-rendered HTML also carries one inline script per Flight row instead of one per line, about 9% less inline-script HTML on a 400 KB payload.
|
|
470
|
-
|
|
471
|
-
- 27440aa: A production build now runs without Docker: `cd dist/apps/<app> && bun main.js` serves the app with no env set. Until now the env the built server needs (the app and repo names, the serve domain, locales, route prefixes, database modes and the rest) existed only as `ENV` lines in the generated Dockerfile. On a host without the image, such as a PaaS or a test harness, the server stopped at boot with `getEnv() cannot run at build time` unless a start script copied every value by hand.
|
|
472
|
-
|
|
473
|
-
**Upgrade note.** Run `akan agent install` and commit what it writes: the `akan-runtime` skill, the `config` path rule and `runtimeRule` now say how to run a build without Docker.
|
|
474
|
-
|
|
475
|
-
- **`akan build` writes `akan.env.json` beside `main.js`**, with the same values as the Dockerfile's `ENV` lines. None of them is a secret.
|
|
476
|
-
- **`main.js` reads it before any other module loads** and fills in only the variables the process was not started with. A variable set in the environment wins, even an empty one, so `PORT=3000 bun main.js` and a host's own settings still apply, and an image built from the generated Dockerfile runs exactly as before. The file is found beside `main.js` from any working directory, but start the server from its own folder, because the runtime reads its artifacts and writes `runtime/` and SQLite files relative to the working directory.
|
|
477
|
-
- **An app that writes its own Dockerfile** (`docker` as a string) and copies the build into its image now gets these values too, for whatever its Dockerfile leaves unset: among them `NODE_ENV=production`, `AKAN_PUBLIC_OPERATION_MODE=cloud` and `AKAN_LOG_TO_FILE=0`, so set those in the Dockerfile if the image needs other values.
|
|
478
|
-
- **A desktop app's carried server leaves `akan.env.json` behind.** Its launcher hands it its env as before, and the file would otherwise set the `PORT` and `AKAN_LOG_TO_FILE` the launcher leaves out on purpose.
|
|
479
|
-
|
|
480
|
-
- e3de9ef: `akan code` hardening:
|
|
481
|
-
|
|
482
|
-
- Every profile's deny list now also covers per-environment server env files (`env.server.{debug,develop,main,testing,local}*.ts`; the `env.server.ts` loader and the type file stay readable), Kubernetes and Jenkins credential files, `.akan/code/mcp.json` and `.akan/code/extensions/`, and the home credential stores `~/.akan`, `~/.ssh`, `~/.aws`, `~/.kube`, `~/.docker/config.json`, `~/.netrc` and `~/.git-credentials`, for read, write and the shell. A path is checked the way the engine reads it (`@`, `~`, `$HOME` and `file://` expand) and again through its real path, so a link cannot give a denied file another name. A profile passed to `CodeAgent.create` with its own `paths.deny` still decides its list.
|
|
483
|
-
- The `local` profile asks before a `web_fetch` to a host off a short list of documentation and registry hosts, and before a shell command that reaches the network (`curl`, `wget`, `ssh`, `scp`, `rsync`, `nc`, …); loopback is exempt. Where nobody can answer, such as a sub-agent or a one-shot run, the call is refused instead. `akan code --no-ask-network` turns the question off. A fetch the profile makes without asking follows a redirect only to a host it would also reach without asking. Other profiles are unchanged.
|
|
484
|
-
- `akan code` prints at start that the `local` profile is not a sandbox.
|
|
485
|
-
- A one-shot `akan code "<prompt>"` no longer offers approvals or questions, since nobody answers them during the run. `AKAN_CODE_CAN_PROMPT=1` restores them.
|
|
486
|
-
- MCP sign-in tokens in `~/.akan/code/mcpAuth.json` are bound to the server's origin instead of its name, so a server declared under a known name at another url gets no token. Tokens an older version stored by name move to the origin they were minted for; one whose origin cannot be read is dropped and signs in again.
|
|
487
|
-
- This repo's own `.akan/code/mcp.json` servers and `.akan/code/extensions/` start only after the user approves them once at a terminal. The approval is kept in `~/.akan/code/trust.json` (mode 0600) and asked again when that content changes. An extensions folder past 10,000 files or 64 MiB, or with a link that leads out of it, is not read through and its approval is not kept, so it is asked about at every start. With nobody to ask they are not started, and the start notice says why. `akan code --trust-workspace` (`-T`) starts them for one run without asking. Servers in `~/.akan/code/mcp.json`, where `/mcp add` writes, need no approval; `/mcp add --local` writes this repo's file and keeps the approval it had, so a server added while that file waits for approval waits with it.
|
|
488
|
-
- `akan code --rpc-listen tcp:…` asks each connection to open with `{"auth":"<token>"}` on its first line and answers `{"type":"reply","id":"auth","ok":true}`. The token is generated at start and written to `~/.akan/code/rpc/<port>.token` (mode 0600), or read from the file `AKAN_CODE_RPC_TOKEN_FILE` names. A connection whose first byte is not `{`, or that does not authenticate within five seconds, is closed, and it never displaces the client already attached. `--no-rpc-token` serves without a token. A non-loopback bind is refused unless `--rpc-bind-any` is given. A `unix:` socket is created with mode 0600 and asks for no token, though a client that sends one is answered. Without a token, under `--no-rpc-token` or on a `unix:` socket, a connection whose first byte is not `{`, or that sends nothing within five seconds, is still closed.
|
|
489
|
-
- `AKAN_CODE_HOME`, `AKAN_CODE_CAN_PROMPT`, `AKAN_CODE_PROXY_*` and `AKAN_CODE_RPC_TOKEN_FILE` are ignored, with a start warning, when a dotenv file in the working directory (`.env`, `.env.local`, `.env.<mode>`, `.env.<mode>.local`) names them, because Bun loads those files before the CLI runs. Export them in the shell instead. `~/.akan` and `~/.akan/code` are created with mode 0700, and an existing `~/.akan/code` the user owns with a looser mode is tightened.
|
|
490
|
-
|
|
491
|
-
- e3de9ef: - A `q.raw()` or `q.search()` condition compiles only when `q` built it; an object of the same shape, from JSON or a spread copy, is refused with an error naming `q.raw()`/`q.search()`.
|
|
492
|
-
- An open (`Any`) request value is remembered by `InputParser`. A query refuses a condition read out of one: a combinator node, or an operator object such as `{ ne: ... }` or an operator node (`{ kind: "op", ... }`) at a field. The same shorthand written in code works as before. An `Any` value shaped exactly like `{ kind: "raw", sql, params }` is refused as a request value (400).
|
|
493
|
-
- A combinator (`q.all`/`q.any`/`q.not`) or a `q.raw()`/`q.search()` node used as a field's value is refused with an error that shows where it goes, in the SQL compiler and in the in-memory evaluator, instead of recursing.
|
|
494
|
-
- A plain object as the value of a single-value field (`String`, `ID`, `Int`, `Float`, `Boolean`, `Date`, or a base column) is refused instead of compiling to an equality that matches nothing.
|
|
495
|
-
- Root-slice filter arguments are parsed by `InputParser` against their declared type, enum included, so a value outside an enum is a 400.
|
|
496
|
-
- A filter argument declared as `Any` (or `[Any]`) throws when the filter is declared. Declare a primitive, an enum or a scalar instead.
|
|
497
|
-
- A list filter argument from the root slice takes at most 1000 items in total; raise it per argument with `.arg(name, [Type], { maxItems })`.
|
|
498
|
-
- Filter and sort keys are looked up as the filter's own keys only, so `constructor`, `__proto__` and similar names are unknown keys (400).
|
|
499
|
-
- `q.search()` text is refused past 32 terms or 1000 characters (400); raise either with `database.search.maxTerms` / `database.search.maxLength`.
|
|
500
|
-
- `BlobStorage` read, write, copy, delete and listing methods resolve every key under their root and refuse one that leaves it.
|
|
501
|
-
- `agent.error.llmRequestFailed` now carries `provider` and `status` only; the provider's own sentence goes to the server log at `warn`.
|
|
502
|
-
- The Postgres JSON path literal double-quotes a key that contains `,`, `{`, `}`, `"` or `\`, has leading or trailing whitespace, is empty, or is `NULL`. Other keys compile to the same SQL as before.
|
|
503
|
-
- e3de9ef: The server, gateway and image optimizer bound the resources one client can hold, and HTML responses carry stricter default headers.
|
|
504
|
-
|
|
505
|
-
- A connection that sends nothing for 120 seconds is closed, where it used to stay open for good; `akan start` keeps it open. A request whose handler is still working is never cut; a streamed response that sends nothing for that long is. `AKAN_IDLE_TIMEOUT` (`30` or `30s`) sets it, up to Bun's 255, and `0` restores the old behaviour. The gateway's WebSockets now idle out the same way after 120 seconds without a frame, which the automatic pings keep from happening to a live socket; `AKAN_WS_IDLE_TIMEOUT=0` restores the old behaviour.
|
|
506
|
-
- A request body is capped at 128 MiB server-wide (`AKAN_MAX_UPLOAD_BODY`, e.g. `512mb`, `512M`, `1.5g` or `512MiB`), and a body other than `multipart/form-data` or the agent's `runAgentTurn` relay at 16 MiB (`AKAN_MAX_REQUEST_BODY`, `off` lifts it). A declared length over the cap gets 413 before the body is read, and a chunked body gets 413 once it passes the cap.
|
|
507
|
-
- A size or timeout value the server cannot read is logged once as a warning, and the default applies.
|
|
508
|
-
- `akan start` binds the dev server to 127.0.0.1 outside a container instead of every interface. `AKAN_LISTEN_HOST=*` binds every interface again, and `AKAN_LISTEN_HOST` still takes one address.
|
|
509
|
-
- The gateway's socket to its replicas is readable and writable by its owner only.
|
|
510
|
-
- The gateway closes a WebSocket with 1009 when it sends more than 1 MiB before its replica's socket opens, and with 1013 when that socket has not opened within 10 seconds. `AKAN_MAX_WEBSOCKETS` and `AKAN_MAX_WEBSOCKETS_PER_IP` cap open sockets in total (503) and per client address (429); both are unset by default.
|
|
511
|
-
- A production HTML page answered 200 carries `Cache-Control: no-cache`, or `private, no-cache` when the request has an `Authorization` header or a cookie other than `theme`. `AKAN_HTML_CACHE_CONTROL` sets the anonymous value, and `off` sends no header as before.
|
|
512
|
-
- A production HTML page served over HTTPS carries `Strict-Transport-Security: max-age=31536000`. `AKAN_HSTS` sets another value, and `off` drops it.
|
|
513
|
-
- HTML pages, system pages and the gateway's status pages carry `Content-Security-Policy: frame-ancestors 'self'; base-uri 'self'`, and system and status pages also `X-Frame-Options: SAMEORIGIN` and `X-Content-Type-Options: nosniff`. `AKAN_CONTENT_SECURITY_POLICY` replaces the policy, and `off` drops it; there is no default `script-src`, as the pages inline their bootstrap scripts without a nonce.
|
|
514
|
-
- `/__rsc/manifest` is served in development only. `AKAN_EXPOSE_RSC_MANIFEST=1` serves it in production again.
|
|
515
|
-
- The client reads a 413 answer as `base.error.payloadTooLarge` ("The request is too large for the server to accept.") instead of an unexpected response, and does not send it again.
|
|
516
|
-
- A static file whose real path, after symlinks, is outside the public directory is not served, except the `public/libs/<lib>` links `akan sync` makes to a lib's own public directory.
|
|
517
|
-
- The 404 page's retry link always points at the same origin, whatever the requested path starts with.
|
|
518
|
-
- The image optimizer keys a local image by its path, so a query string no longer makes a new cache entry unless a `localPatterns` entry names that query.
|
|
519
|
-
- The image optimizer keeps its disk cache under `images.maxCacheBytes` (default 1 GiB, `0` for no limit), removing the oldest entries first.
|
|
520
|
-
- The image optimizer answers 503 with `Retry-After: 1` once `images.maxQueue` encodes (default 256, `0` for no limit) are waiting for a free slot.
|
|
521
|
-
- The image optimizer serves a source over `images.maxInputPixels` (default 120 million) as it is instead of decoding it.
|
|
522
|
-
- The image optimizer refuses, with 400, a remote image whose host, on any redirect hop, resolves to a loopback, private, link-local or other non-public address. `images.dangerouslyAllowLocalIP: true` allows them again.
|
|
523
|
-
- The image optimizer answers 502 when a remote image request fails, instead of passing the remote status on.
|
|
524
|
-
- An IPv6 address that carries an IPv4 one (mapped, compatible, NAT64, 6to4, Teredo) is judged by the IPv4 address it carries when deciding whether an address is private.
|
|
525
|
-
- With `AKAN_TRUSTED_PROXIES` unset, the server logs one warning when a non-loopback proxy passes on an `X-Forwarded-For` chain whose last hop is not its `X-Real-IP`, or several hops and no `X-Real-IP`. The warning names the proxy's address and suggests listing it; the default reading of the headers is unchanged.
|
|
526
|
-
|
|
527
|
-
- e3de9ef: Native and desktop builds now ship tighter defaults for page content, external links, temporary files and installed updates.
|
|
528
|
-
|
|
529
|
-
- **A content security policy by default.** An Akan app's native build puts a Content-Security-Policy in its `index.html`: scripts from `'self'` only (inline ones by hash), connections to `'self'` and any `https:` or `wss:` origin, `https:` images, media, fonts, stylesheets and frames, inline styles, and the plain-`http:` origins the build knows of (an `http:` `AKAN_PUBLIC_SERVER_URL`, `http://localhost:*` in local mode, the carried server's loopback port). The policy also sets `form-action 'self'`, `base-uri 'self'` and `object-src 'none'`, so a form that posts to another origin (an outside payment page, say) no longer submits, and `<object>`/`<embed>` content does not load; add the origin in a map (`{ "form-action": ["https://pay.example.com"] }`). A directive map in `native.csp` adds sources to that policy (`{ "script-src": ["https://cdn.example.com"] }`), a string replaces it, and `native.csp: false` ships no policy, as before; `native.csp: ""` is a build error. In a map, directive names ignore case, a `default-src` entry is added to every fetch directive of the policy but `object-src`, and a directive the policy lacks starts from the one CSP falls back to (`script-src-elem` from `script-src`, `manifest-src` from `default-src`). akan-native hashes inline scripts and styles into `script-src-elem` and `style-src-elem` too when a policy has them.
|
|
530
|
-
- **External links open `https:`, `mailto:` and `tel:` by default.** `opener.openUrl`, and the links and `window.open` calls the iOS, Android and desktop shells hand to the system, open only URLs that the app's `opener` permissions allow: plain `http:` links are not opened unless the app lists them, and an akan-native app whose `capabilities` grant no `opener` hands no link to the system. `native.openUrls` names the URL patterns; `native.openUrls: ["*"]` restores the previous scope. When the app refuses a link this way, `Link` and the router no longer retry it with `window.open`.
|
|
531
|
-
- **Private temporary folders on Linux.** `file-picker` copies, the `filesystem` plugin's `temp` folder and `external-view` captures live under `$XDG_CACHE_HOME/<appId>/tmp` (`~/.cache/<appId>/tmp` when unset), in folders only the user can open, instead of `/tmp/<appId>`. Unlike `/tmp`, nothing empties it at a restart: `file-picker` and `external-view` empty their own folders at launch, and a file an app writes to `temp` stays until the app removes it. macOS and Windows keep their per-user temporary folder. Set `XDG_CACHE_HOME` to move it.
|
|
532
|
-
- **single-instance on Linux without `XDG_RUNTIME_DIR`.** The socket and lock move into a per-user `akan-native-<uid>` folder that only the user can open, and an existing folder another user owns or others can read is not used. A private `XDG_RUNTIME_DIR` is used as before.
|
|
533
|
-
- **A downloaded desktop release is checked again before it is installed.** `updates.apply()` repeats the code-signature check (macOS) and the signer check (Windows) on the staged bundle. The install at quit installs a bundle only once that check passed in this run, outside the time the quit hooks share: as the release was downloaded or the app started, and again when a quit is asked for (Cmd+Q, the last window closed, a logout), which waits up to 10 s for it. A bundle that no longer passes is removed and has to be downloaded again; one whose check has not finished stays for the next quit.
|
|
534
|
-
- **`updates.windowsSigners`** (new, Windows): certificate thumbprints a release's executable must be signed by. Unset keeps the existing check that a release is signed by the same certificate as the running app.
|
|
535
|
-
- **`updates.expiresIn`** (new): `akan publish-update` signs an `expiresAt` that many seconds ahead (at least 3600) into the release manifest, and desktop, iOS and Android apps refuse a manifest past its `expiresAt`. Unset publishes no expiry, and a manifest without one is accepted as before.
|
|
536
|
-
- **`desktop.screenCapture: "auto"` on Windows denies camera and microphone requests**, which the setting would otherwise grant without asking. `"picker"`, the default, keeps the usual prompts.
|
|
537
|
-
- **`native.csp`, `native.openUrls`, `updates.windowsSigners` and `updates.expiresIn` are typed in `akan.config.ts`**, and `csp` and `openUrls` given in the `native` section reach the native build, as a target's own did.
|
|
538
|
-
- **A release build with `devtools` on prints a warning**, since the web inspector then reaches every plugin the page can call.
|
|
539
|
-
- **Paths with a `.` or `..` segment are answered by the app shell** on every platform, literal or percent-encoded, and a navigation to one is not loaded as a page, as `/__akan_native/*` paths already were.
|
|
540
|
-
- **A public env value holding a private key is refused** when the native build records its `AKAN_PUBLIC_*` values, as names with `SECRET`, `TOKEN`, `PASSWORD`, `PRIVATE` or `CREDENTIAL` already were.
|
|
541
|
-
- **akan-native only warns about `'unsafe-inline'` in `script-src`.** Inline styles under `style-src 'unsafe-inline'` no longer produce a warning; inline scripts are still left unhashed when `script-src` allows them.
|
|
542
|
-
|
|
543
|
-
- e3de9ef: Hardening for the ops channel, status and log routes, snapshots, the tunnel agent and dev-only surfaces.
|
|
544
|
-
|
|
545
|
-
- The ops channel counts only signed, verified calls toward its 30 a minute, so unsigned calls no longer spend that budget. Refused calls are limited separately, 10 a minute per caller address, and only the first 10 refusals a minute are logged one by one. The gateway and a solo server hand the ops channel, health, metrics and the log stream each caller's address, read through `TrustedProxy` as every other route reads it.
|
|
546
|
-
- An ops token's `typ` header must be absent, `JWT` or `akan-ops+jwt`; any other `typ` is refused before its `jti` is spent. Without `AKAN_OPS_INSTANCE`, the boot log says a token is good on every instance of the app and environment.
|
|
547
|
-
- The ops channel stays off, with an error at boot, when `AKAN_OPS_PUBLIC_KEY` is the same key as `AKAN_MACHINE_PUBLIC_KEY`. Give the ops channel a key of its own.
|
|
548
|
-
- `ops snapshot` outside local operation refuses to run when `AKAN_BACKUP_RECIPIENT` is unset, and so does a snapshot job started through the ops channel. `--allow-plaintext` or `AKAN_BACKUP_PLAINTEXT=1` writes it unencrypted as before, with a warning on stderr and in the job log.
|
|
549
|
-
- A snapshot is captured into a private `.capture-*` staging dir under the snapshot dir, named for its host and process, and renamed into place once complete. Its uncompressed database copy is 0600 and removed even when the capture fails. The next capture, and the ops channel when it starts, remove a staging dir whose process on this host is gone, including one from an earlier run under the same PID, and one another host left once nothing in it has changed for an hour (`SqliteSnapshot.staleAfterMs`). Snapshot files are 0600 and their dir 0700 by default; `AKAN_OPS_SNAPSHOT_FILE_MODE` (octal, e.g. `640`) sets another mode, and a value that is not a three- or four-digit octal mode keeps 600 with a warning.
|
|
550
|
-
- `ops restore` refuses a manifest whose file names point outside the manifest's own dir or name a role other than `main` or `solid`. Given `--identity` or `AKAN_BACKUP_IDENTITY_FILE`, it refuses a manifest that records no encryption unless `--allow-plaintext` is passed.
|
|
551
|
-
- Rotating log files are created 0600; `AKAN_LOG_FILE_MODE` (octal, e.g. `644`) sets another mode, and a value that is not a three- or four-digit octal mode keeps 600 with a warning. Files that already exist keep their mode. The log control socket is created under a 0177 umask, so it is never connectable by others before its chmod.
|
|
552
|
-
- `AKAN_STATUS_TOKEN` and `AKAN_LOG_STREAM_TOKEN` are compared as fixed-length digests, so the log stream route no longer compares lengths first. A token shorter than 32 characters still works, with a warning at boot that never prints it. Wrong bearers are limited to 10 a minute per caller address: once an address passes it, it gets the status alone and 401 for the rest of the minute, even with the right token.
|
|
553
|
-
- Open health detail and metrics, the devtools routes and an `x-akan-debug` header without the secret now need a local dev runtime: `AKAN_PUBLIC_ENV=local`, operation mode `local`, and either a `NODE_ENV` other than `production` or `akan start`. A built server under `AKAN_PUBLIC_ENV=local` keeps them closed. `AKAN_STATUS_TOKEN`, `AKAN_DEVTOOLS=true` and `AKAN_LOG_DEBUG_HEADER` still open each one explicitly.
|
|
554
|
-
- The `x-akan-debug` secret is compared as fixed-length digests, so a value of another length or with non-ASCII characters is refused instead of failing the request.
|
|
555
|
-
- A dev client report (`ClientReport`) prints its message, page, platform and target on one line, with line breaks shown as `\n` and C1 control characters removed.
|
|
556
|
-
- `TunnelAgent` takes a `wss://` gateway only, or `ws://` on loopback; `allowInsecureGateway: true` accepts any `ws://`. It opens tcp streams only to ports listed in `tcpPorts` (none by default), opens at most `maxSockets` data sockets (default 128, and never more than the gateway offers), and refuses an http or websocket stream whose path would leave the shared origin.
|
|
557
|
-
|
|
558
|
-
- e3de9ef: Signals, websocket rooms, MCP, OAuth and the agent relay now take the narrower default wherever the old one let a caller reach more than the endpoint declared. Each changed default has a way back:
|
|
559
|
-
|
|
560
|
-
- An endpoint, slice query or pubsub room that declares no guards is refused with 403. `[Public]` is how an endpoint is opened to anonymous callers. Outside local operation (an operation mode other than `local`, and not under `bun test`), a server whose signals declare a guardless endpoint stops at boot and names each one; under local operation it warns. `AKAN_UNGUARDED_ENDPOINTS=open` answers them as before and only warns at boot.
|
|
561
|
-
- A slice whose `guards` leaves out `root` mounts no root list or insight, as a CRUD verb left out mounts no endpoint; `root: []` is still refused. Before, the root list and insight answered anyone. Name `root` (`Public` for anonymous callers) to keep them.
|
|
562
|
-
- `guard(name)` returns a guard whose `canPass` refuses until the subclass overrides it. Previously it admitted every caller. A guard meant to admit everyone overrides `canPass` to return `true`, or the endpoint uses `Public`.
|
|
563
|
-
- A websocket room id escapes every character outside `[A-Za-z0-9_.]` in its arguments, so two argument lists never share a room. `Any` arguments are keyed by their canonical JSON. A live slice's room also carries a digest of its query and internal arguments, so subscribers whose queries differ never share a room; a live filter whose query reads the clock (such as `q.gte(new Date())`) gets one room per subscriber. The subscribe ack still echoes the client's own label as `requestRoomId`, so 3.x clients route frames as before. Ids made only of letters, digits, `_` and `.` (ObjectIds) are unchanged. Ids containing `-`, such as UUIDs, and object arguments map to new room ids. During a rolling deploy, a publish from an old instance does not reach a subscriber held by a new one until every instance runs this version.
|
|
564
|
-
- An HTTP mutation reads its body only after the account-scoped guards admit the caller. Middleware and account guards still see its path and query arguments, but a body argument is `undefined` until then. The upload does not count against the endpoint's `timeout`.
|
|
565
|
-
- A multipart field named `__proto__` is stored as a plain key. A JSON body that is not an object, or is not valid JSON, is answered 400 instead of 500.
|
|
566
|
-
- A 500 response includes the error message and stack only under `akan start`, with `NODE_ENV` set to `development` or `test`, or with `AKAN_ERROR_DETAIL=1`. A server whose `NODE_ENV` is unset or unrecognised now hides them. `AKAN_ERROR_DETAIL=1` shows them again.
|
|
567
|
-
- The agent relay refuses a request past fixed limits with `agent.error.requestRefused` (413). The limits are 5,000 messages, 512 tools, 256 context entries, 8,000,000 characters of text and 64 MiB of attachment content, set in `AgentRelayPolicy.defaultLimits`. Before, it relayed the request as written. A policy set with `setAgentRequestPolicy` replaces the limits. `AgentRelayPolicy.capped(request, limits)` keeps them inside an app's own policy, and `setAgentRequestPolicy((request) => request)` relays every request unchanged. The `runAgentTurn` body is held to the server-wide ceiling (`AKAN_MAX_UPLOAD_BODY`, 128 MiB) rather than the 16 MiB cap on other JSON bodies, because each turn resends the transcript with its attachments; an app that lowers that ceiling below these limits meets a 413 first.
|
|
568
|
-
- With a quota hook set, one signed-in caller's agent turns run one at a time, and each checks the quota only after the turn ahead has reported its usage. `AgentMeter.use({ serial: false })` lets them run side by side again. A usage hook that has not settled within 30 s (`AgentMeter.usageTimeoutMs`) stops holding the caller's next turn, with a warning in the server log.
|
|
569
|
-
- When an agent turn fails with an error that is not an `Err` after its stream has opened, the stream carries a generic message unless error details are on. The server log keeps the real error. An `Err` still reaches the browser with its key and data.
|
|
570
|
-
- Without `auth.verify`, MCP rate-limits a caller that sends a bearer token by its address, as it already did for a caller without one. A token's own id starts a separate budget only once `verify` has accepted the token. `tools/list`, `resources/list`, `resources/templates/list` and `prompts/list` now count against the same budget as calls. `listFor` does not count. To widen the budget, raise `rateLimit.calls`. `rateLimit: false` turns the limit off. `McpAuth.callerKey(req)` is now an instance method, since the budget it names depends on whether that `McpAuth` has `verify`.
|
|
571
|
-
- A browser request to `/mcp` whose Origin matches its own host passes only when that host is an IP address, `localhost`, a host the app declares (`akan.config` domains, `AKAN_ALLOWED_HOSTS`) or the host of a pinned `auth.resource`. If `auth.resource` is not pinned, a token's `aud` is matched only against such a host. To admit another host, list its origin in `allowedOrigins`, add it to `AKAN_ALLOWED_HOSTS`, or pin `auth.resource`.
|
|
572
|
-
- The fetch of a client ID metadata document stops reading once the body passes 64 KiB, whether or not it states a length. The document's `grant_types` are narrowed to `authorization_code` and `refresh_token`.
|
|
573
|
-
- Dynamic client registration accepts at most 10 `redirect_uris` of at most 2,048 characters each. `OAuthRegistration.maxRedirectUris` and `OAuthRegistration.maxRedirectUriLength` raise either limit.
|
|
574
|
-
|
|
575
|
-
- e3de9ef: Tighter defaults for the web client and the in-page agent. Every changed default below names the option that restores the old behaviour.
|
|
576
|
-
|
|
577
|
-
- **Write tools confirm by default.** An `st.tool` whose name starts with `remove`, `delete`, `create`, `update`, `upsert`, `submit`, `save`, `send` or `export` now shows the approval card unless it declares `confirm`. Before, only `remove*` did. This covers `submit<Model>` in `Model.EditModal` and `exportCsvOf<Model>` / `exportJsonOf<Model>` in `Data.ListContainer`. Opt out per tool with `{ confirm: false }`, which also drops the tool's confirm mark in the dock and the screen actions and its MCP `destructiveHint`, or app-wide with `AgentConfirm.set({ byName: (name) => name.startsWith("remove") })`.
|
|
578
|
-
- **A change right after a page read asks once.** A tool can declare `taint: "source"` (its result carries text the user did not write) or `taint: "exempt"` (it only moves the view). `readScreen`, `readState` and `viewImage` are sources, and `navigate`, `goBack` and the framework's view-only tools are exempt: tabs, dialogs, dropdowns, the side menu, the screen navigator, a list's view, sort, page size and page, and opening or closing a detail view. After a source call, the next call that changes something shows the approval card, even with `confirm: false`. A read (`settle: false`) and a card tool do not count as changes. The user's approval lifts the ask until the next source call. `st.tool(name, { taint })`, `useAgentTool(name, { taint })` and `ToolEntry.taint` declare it. Turn it off app-wide with `AgentConfirm.set({ afterScreenRead: false })`, or with `AgentSession` / `ToolRunner` `askAfterUntrusted: false`.
|
|
579
|
-
- **Page text reaches the model fenced as data.** A `taint: "source"` result or error is wrapped in a `<page-content …>` block. The block has a fresh boundary per call and a note that its contents are data, not instructions. The agent's system prompt, and the default prompt of the Anthropic and OpenAI-compatible adaptors, say the same.
|
|
580
|
-
- **`readScreen` withholds more.** It never reads the value of an input with `autocomplete` `one-time-code`, `current-password`, `new-password` or a card field (`cc-number`, `cc-csc`, `cc-exp*`). It also withholds any element marked `data-agent-private`. A private control prints only its kind and name, and a private region prints `[private: label]`, even when asked for by name. A private region is never a `highlight` or section target. Mark content `data-agent-private` to keep it from the agent.
|
|
581
|
-
- **The agent transcript belongs to one account.** A stored transcript, including one under an app-chosen `persist.key`, now records which account wrote it. It is neither restored nor overwritten while another account is signed in, and other accounts' transcripts under the app's default keys are removed. Default keys now include the account (`akan.agent.<app>.<account>[.<zone>]`), so transcripts stored before this change are removed, not restored; a `persist.key` of the app's own is kept, even one under `akan.agent.<app>`, unless it holds such a transcript. `Agent.Chat` and `Agent.Zone` reset a conversation they own when the signed-in account changes in this tab, or in another tab once this one is focused again. A session the app provides (`AgentProvider`, `SessionContext` or `Agent.Zone`'s `session`) is left to the app, and a `SessionHistory` passed as `persist` or attached with `Agent.History` keeps what it stored. `AgentSession.reset({ keepHistory: true })` empties a transcript without clearing its history.
|
|
582
|
-
- **The session token stays on the app's origin.** A `FetchClient` sends the token set with `setJwt` only to its own origin, over HTTP and WebSocket. `fetch.clone({ origin })` for another origin starts without it. Pass `clone({ origin, jwt })` to send one on purpose, over HTTP and WebSocket. A per-call `{ token }` covers that HTTP call only: the socket a call opens for its `FetchPolicy.origin` carries no token.
|
|
583
|
-
- **SSR web pages keep no token in `localStorage`.** `setAuth` on an SSR web page removes the stored copy, so the session cookie is the only place the token is stored. CSR and native clients still keep it in `secretStorage`. A web CSR boot with nothing stored now adopts the session cookie of an SSR page on the same origin.
|
|
584
|
-
- **Server-held sessions.** New `SessionCookie` (`akanjs/fetch`): `SessionCookie.issue(jwt, { maxAge })` returns the `Set-Cookie` values for an HttpOnly session cookie and a readable claims cookie beside it, and `SessionCookie.expire()` returns the sign-out values. While the claims cookie is present, the page never writes the session cookie itself, and `getAccount()` and form drafts read the account from the claims (`getSessionClaims()`). Nothing changes until a server sends these cookies.
|
|
585
|
-
- **`pathChange` goes only to known parents in production.** `router.postPathChange` posts to a same-origin parent frame, or to origins the app names with `router.setFrameParentOrigins([...])`. Local mode still posts to any parent. `router.setFrameParentOrigins("*")` restores the old target.
|
|
586
|
-
- **`l.rich` escapes its params.** Param values are HTML-escaped before interpolation, and a param named `br` no longer replaces the line break. Put markup in the dictionary text, not in a param.
|
|
587
|
-
- **Links in agent markdown.** `isSafeHref` drops tabs, newlines and leading control characters and spaces before it reads the scheme, as a browser does, so a disguised `javascript:` link is refused.
|
|
588
|
-
- **CSV export keeps formulas as text.** A text cell that starts with `=`, `+`, `-`, `@`, a tab or a carriage return gets a leading `'`. Numbers are written unchanged.
|
|
589
|
-
|
|
590
|
-
- 99fda20: A session whose access token expired can be renewed on the server before a page renders, and a websocket no longer outlives the credential it opened with.
|
|
591
|
-
|
|
592
|
-
- **`option.setSessionRefresh(fn)`** runs before a page load or an RSC navigation renders.
|
|
593
|
-
- `fn` gets the request as the browser sent it and returns the `Set-Cookie` values to answer it with, or none.
|
|
594
|
-
- The render reads the cookies those values set, so a page guard, an `unauthorize:` redirect and every server fetch see the renewed session.
|
|
595
|
-
- Every response to that request carries the values, a redirect, a not-found or an error included, as `Cache-Control: private, no-store`.
|
|
596
|
-
- Concurrent requests with the same cookies share one call. A request that arrives with them in the next 10 seconds gets the same answer, so a single-use refresh token is not presented twice. That holds within one server process: with several replicas, `fn` should accept a refresh token presented again within a few seconds. Since requests with the same cookies share an answer, `fn` answers only from the cookies the request carries.
|
|
597
|
-
- A throwing `fn`, or one with no answer in 10 seconds (`SessionRefresh.timeoutMs`), is logged, and the page renders with the cookies the browser sent. The app's call wins over its libs'; `null` clears a lib's.
|
|
598
|
-
- It does not run for API endpoints, assets or a CSR shell.
|
|
599
|
-
- **A websocket closes at its credential's expiry.**
|
|
600
|
-
- The server reads `exp` off the bearer token, or else the session cookie, at the handshake and at each `__auth` frame.
|
|
601
|
-
- At that time the server closes the socket with code `4401` (`websocketCredentialContract.expiredCode`).
|
|
602
|
-
- Nothing is closed for a socket with no credential, one without `exp`, or one already expired, which the account middleware treats as anonymous.
|
|
603
|
-
- **`WsClient` reconnects at once on that close,** with no backoff and no counted attempt.
|
|
604
|
-
- It first awaits `onCredentialExpired`, set through `configure`, for up to `WsClient.renewTimeoutMs` (10 s). Renew the session cookie there, or call `setJwt`.
|
|
605
|
-
- The new handshake then carries the current credential, and every room is resubscribed under it.
|
|
606
|
-
|
|
607
|
-
- db5b284: An app using the `shared` and `util` libraries no longer loads `@akanjs/native/core` on its web pages. Their stores imported `akanjs/client/native` for `isNativeShell()` and for the push installation id. That put core and every native plugin wrapper on every page. Native SSO and `usePushNotification` now load the plugin they call on first use inside a shell. The `useCamera`, `useGeoLocation` and `usePurchase` hooks in `akanjs/webkit`, which `shared`'s `Field` and `User.Template` reach, import their plugin and the few core exports they use dynamically, when first called; inside a shell `useCamera` still reads the camera permission at mount. On the minimal app with `shared` merged into its store:
|
|
608
|
-
|
|
609
|
-
- a Link route drops from 148.7 KB raw (38.5 KB brotli) to 101.5 KB raw (23.3 KB brotli);
|
|
610
|
-
- a route drawing `Field` drops from 416.6 KB (113.8 KB brotli) to 370.2 KB (99.8 KB brotli);
|
|
611
|
-
- a route drawing `User.Template` drops from 526.8 KB (140.2 KB brotli) to 481.2 KB (126.3 KB brotli).
|
|
612
|
-
|
|
613
|
-
The runtime guideline and the `no-web-only-api-outside-webkit` message now name `akanjs/client` for `isNativeApp()`, and the native subpaths for push and haptics.
|
|
614
|
-
|
|
615
|
-
- 5e08722: A coding agent now finds the imports and signatures a first app needs in its skills, instead of reading the akanjs sources.
|
|
616
|
-
|
|
617
|
-
- **The `akan-service` and `akan-page` recipes** start each file with its import lines, and the `akan-service` rules say what `serverMode: "batch"` does: the module, endpoints included, mounts only in a `batch` or `all` process, so a page-facing service leaves it off.
|
|
618
|
-
- **A new `akanApi` guideline** lists every import path and the exact signatures of the route stages, `router`, `Link`, `serve`, `adapt`, the endpoint builders, `SignalOption`, `serviceDictionary`, and the keys of `akan.config.ts` with the `web` and `i18n` shapes. It is generated from the akanjs types of the same release, and a test fails when the two drift apart. `akan agent install` ships it as a reference of both skills, and `get_guideline` / `akan guideline show akanApi` print it.
|
|
619
|
-
- **`ServiceOptions.serverMode`** carries a doc comment, so an editor shows the same explanation on hover.
|
|
620
|
-
|
|
621
|
-
- df32c46: On SQLite, work outside an open `this.transaction()` no longer sees it or joins it. A read from another request ran on the one shared connection, inside the transaction, so it returned rows the transaction had not committed, including rows it then rolled back. It now runs on a second, read-only connection to the same WAL file and sees what is committed, as on Postgres, without waiting for the transaction; code inside the transaction still reads its own writes. A write from another request already waited for the open transaction, but when a second transaction began as the first committed, the waiting write could run inside the second one and be rolled back with it after its caller was told it had succeeded. It now runs between the two.
|
|
622
|
-
|
|
623
|
-
An in-memory database (`:memory:`, the `TestServer` default) and a journal mode other than WAL keep one connection: a second connection cannot read the same in-memory data, and outside WAL it would wait on the writer's lock and stall the event loop. There, writes from other requests still wait for the transaction and are never rolled back with it, but reads still see its uncommitted rows. Code that read another request's uncommitted write now sees the committed state instead.
|
|
624
|
-
|
|
625
|
-
- 5f809e8: A server-rendered page now shows its content as soon as the HTML arrives. The response started before the layout and page bodies had rendered, so React put even a page whose data was ready into a hidden segment and revealed it with a script it throttles to 300ms after the first paint. A browser test that clicked in that gap failed now and then, and a URL with a fragment (`/books/OL45804W#editions`) missed its target. `ssr: "block"` did not fully help: React still showed the `.loading()` fallback in front of a large page it had already rendered.
|
|
626
|
-
|
|
627
|
-
- **The response waits for the levels above the first `.loading()`.** Every layout and page above a route's first `.loading()`, or the whole route when it declares none, renders before the first byte is sent and is written in place, with the client modules it uses loaded. Each level keeps its own boundary, so a client component that fails on the server, or a hydration mismatch, still client-renders only its level. A level with `.loading()` sends its fallback first and reveals its content together with the levels below it. A route whose data is slow and that declares no `.loading()` now sends nothing until the data is ready; give the slow level a `.loading()` to keep the fallback first. An async component a body renders that is still pending once the bodies are done streams in after the shell, as before. A client navigation's payload starts at the same point.
|
|
628
|
-
- **Real statuses from the page body.** A `router.notFound()` or `router.redirect()` raised after I/O by a body above the first `.loading()` is a real 404 or 3xx. An error such a body throws after I/O answers with the nearest layout's `.error()` view and status 500, or the error page when none declares one. Before, the server sent a 200 page with that level empty, and the same error broke the page again when the browser rendered it.
|
|
629
|
-
- **`ssr: "block"` writes every boundary in place,** so a blocking page never shows its `.loading()` fallback.
|
|
630
|
-
- **Fragments land on their target.** A document opened at a fragment scrolls to the target when React reveals it, if the target was not on the page yet and the visitor has not scrolled; a reload or a back/forward visit keeps the offset the browser restored. A client navigation to another page's fragment lands on the target instead of the top.
|
|
631
|
-
|
|
632
|
-
- 76705dd: `StoreRegistry.build` now reads a root store's state, actions and slices from the merged type rather than inferring them back out of it. That inference grew quadratically with the number of stores. In an app merging about 70 stores, `build` took most of the typecheck, and adding a few more stores failed it with TS2589 ("Type instantiation is excessively deep"). With this change the typecheck cost grows linearly with the store count, and the `st` type is unchanged.
|
|
633
|
-
- 206bb69: A store write now costs about one copy of the state, whatever else the root holds. Before, every `set` copied the state twice, compared every key, re-read every `search()` value, and walked every persisted key and every model form. That came to 173 µs at 1,740 keys and 364 µs at 3,480. Now `set` works out the changed keys from the patch and copies the state once. It then recomputes only the `search()` values (when `searchParams` changed) and the `computed()` values whose dependencies changed, and syncs only the persisted keys and form drafts the write touched. That is 38 µs at 1,740 keys and 78 µs at 3,480, the cost of the copy itself.
|
|
634
|
-
|
|
635
|
-
- **One `set` per model write.** `update<Model>`, `update<Model>InForm`, `merge<Model>`, `set<Model>`, `remove<Model>`, `create<Model>` and `create<Model>InForm` now write the model, every slice list that holds the row, and the stale stamps in one `set`. Before, they called `set` once per slice, plus once more. An update at 1,640 keys went from 488 µs to 47 µs.
|
|
636
|
-
- **`set<Model>` no longer changes the list it read.** It copies a slice's list before replacing the row, so a reader holding the old state keeps the old row. It also leaves alone a slice list that holds none of the given rows, which used to get a new list on every call.
|
|
637
|
-
- **A write leaves untouched `search()` values as they were.** An array `search()` value used to be parsed again on every write, as a new array, so a component reading it rendered again on writes it did not read.
|
|
638
|
-
- **`set` with a `search()` or `computed()` key** now throws before it writes anything. Before, the state was already replaced when it threw.
|
|
639
|
-
|
|
640
|
-
- 170be15: A store's generated writes and loads that take `onError` (`create<Model>InForm`, `update<Model>InForm`, `create<Model>`, `update<Model>`, `merge<Model>`, `remove<Model>`, `submit<Model>`, `edit<Model>`, `view<Model>`) now call it with the failed request's dictionary key before they reject, as a `Button`'s `onError` takes it. Before, they handed it to the fetch call, which never called it, and `merge<Model>` took no `onError` at all. The rejection and its error toast are unchanged. An abort calls nothing, and neither does a failure in the store's own write after the server took the request, since the request did not fail.
|
|
641
|
-
|
|
642
|
-
- **A `Button` keeps the error its `onError` reported.** When the `onClick` promise then rejected, the button went back to idle and dropped the error line under it, so an edit modal's submit or a remove showed only the toast. Now the error line stays until the next click.
|
|
643
|
-
|
|
644
|
-
- cfe50cb: A `Load.Stream` whose promise rejects now renders a short notice ("This could not be loaded.") with a "Try again" button in its own place, and the rest of the page stays. Before, a rejection that reached the browser after the page had started streaming was rethrown outside any error boundary, so React unmounted the whole page (production error #441, a blank screen). `Load.Units`, `Load.View`, `Load.Edit` and `Load.Pagination` stream through it, so a list whose `init` the server refuses, such as a role-guarded slice or an expired session, keeps its page around it.
|
|
645
|
-
|
|
646
|
-
- "Try again" calls `router.refresh()`. A new promise after a failure clears the notice, so a refresh that loads renders the value.
|
|
647
|
-
- Outside production the notice also shows the error's message.
|
|
648
|
-
- `Load.Stream`, `Load.Units`, `Load.View`, `Load.Edit` and `Load.Pagination` take `error`: a node to render instead of the notice, or, where they render on the client, `(error, retry) => ReactNode`. `Load.Pagination` renders nothing by default, since the list sharing its `init` shows the notice.
|
|
649
|
-
- A not-found or redirect raised below the route after the page started streaming renders nothing in its place, as the host answers it.
|
|
650
|
-
- **Propagation change:** a rejection now stops at its `Load.*`. An error boundary an app put above one no longer sees it; pass `error` to replace the notice.
|
|
651
|
-
- A field of a fetch handle that a page hands to a `Load.*` unawaited (`const { memoInitInPublic } = fetch.initMemoInPublic()`) no longer turns the page into the nearest layout's `.error()` or the 500 page when it is refused before the first byte has left. The page answers 200 and the browser draws the notice in that section. Such a render is never stored in the RSC or HTML result cache, so the next visitor and "Try again" render it anew.
|
|
652
|
-
- A page or layout body that awaits the field, or a layout's `.notFound()` view that does, still gets its `.error()`. So does an awaited handle (`await fetch.initMemoInPublic()`) and any promise that is not a handle's field.
|
|
653
|
-
- **Limit:** the server cannot see where a field ends up, so a refused field is excused wherever it goes. One that reaches no `Load.*` used to take `.error()` or the 500 page when it was refused before the first byte. Now the page answers 200 and the browser blanks it (#441), as it already did when the refusal came later. That covers a server component below the page awaiting the field, the field rendered as a child, and a client component `use()`-ing it outside `Load.*`. Hand a field only to a `Load.*`, directly or through a Zone, or await the handle.
|
|
654
|
-
|
|
655
|
-
- 94d3673: Akan Studio lands on the Runtime view when `akan start`'s builder is stopped, not only when there is none or it never answers.
|
|
656
|
-
|
|
657
|
-
- **The dev host marks a reply no builder answered.** A builder request the dev host answers itself carries `kind: "unavailable"`: the builder is stopped, not started yet, failed to start, or exited or was stopped before answering. A failure the builder reports, such as a broken build, carries no kind and reads as before.
|
|
658
|
-
- **`BuilderRpc.isUnavailable(error)`** tells such a failure apart, as `BuilderRpc.isTimeout` does for a request that times out. A bare, empty or unknown `/_akan/studio` view then lands on Runtime, and a view asked for by name still answers 503 with the reason.
|
|
659
|
-
- **Mixed versions keep working.** A server reading a reply from an older dev host, with no kind, answers 503 as before, and an older server ignores the new field.
|
|
660
|
-
|
|
661
|
-
- e4c7e5c: Akan Studio lands on the Runtime view in two more cases where no dev builder can draw the others, and says the right thing when web is off.
|
|
662
|
-
|
|
663
|
-
- **An empty or unknown `view`** (`/_akan/studio?view=`, `?view=bogus`) lands on Runtime when the server has no dev builder, as a bare `/_akan/studio` already did. It used to answer the ERD's 503.
|
|
664
|
-
- **A builder that never answers.** When the builder RPC times out, a bare `/_akan/studio` lands on Runtime instead of answering 503. A view asked for by name still answers 503 inside Studio's nav with the timeout, and a failed build still shows its error without landing.
|
|
665
|
-
- **Web off.** On a server that serves the API only (`AKAN_SSR=false` or `setWeb(false)`), a builder view says the builder is reached only with the web surface on, instead of telling you to open it under `akan start`, which does not change that.
|
|
666
|
-
|
|
667
|
-
- 6291fec: Akan Studio opens without a dev builder, and names every job in full.
|
|
668
|
-
|
|
669
|
-
- **`/_akan/studio` with no dev builder** lands on the Runtime view, which reads the running server, instead of answering 503 with nothing to click. A view that needs the builder (ERD, Signals, Changes, Framework) still answers 503, now inside Studio's header and nav, saying to open it under `akan start` and that Runtime needs no builder. A failed build shows its error the same way.
|
|
670
|
-
- **Each job row** carries its full name and schedule as a tooltip (`cron syncAccountBalances · 0 * * * *`), with the skip reason below it for a job this server does not run, so two long names clipped alike can be told apart.
|
|
671
|
-
|
|
672
|
-
- 0c480c6: The signal-test harness clears the env cache once it has set the test port, so a fetch client built after setup reaches the test server even when a module read `getEnv()` before the harness ran.
|
|
673
|
-
- e4c3009: In the `util` library that `akan install-library` copies, `security` and `security.jwtSecret` are now optional in `ModulesOptions`. A fresh clone of an app on `util` typechecks and builds with the empty env files `akan sync` writes. Before, `akan typecheck`, `akan build` and `akan verify` failed with TS2322 (`Property 'security' is missing`) until someone wrote real env files. The runtime already worked without both keys: a local server derives the JWT secret, and outside `local` the server still refuses to boot with `util.error.jwtSecretRequired` unless `JWT_SECRET` or `security.jwtSecret` is set.
|
|
674
|
-
- 0d7294c: Narrowed vendor entries hold up during a rolling deploy and on very large builds.
|
|
675
|
-
|
|
676
|
-
- **A route chunk that fails to load during a rolling deploy now loads its page as a document.** A document from the new build can get a page from a replica the deploy has not reached yet, and that page's chunks can import a name the document's narrowed vendor entries lack. Before, the page broke, and React's Flight client kept the failed load, so retrying in the tab failed the same way. Now, if a navigation to another page has not committed, the tab loads its target as a document, which brings a matching import map. If the page is already on screen (a refresh of it counts), the tab reloads it at its current address, fragment and any later query-only change included, and only when the error is a module link or resolve error and the browser is online. A network, ad-blocker or evaluation error leaves the page in place. Only chunks that the latest page navigation's response imports count. The document's own chunks, an overtaken navigation's and a replaced response's do not trigger it. The exception is a refresh of the same page that imports a chunk the document is still loading, which takes that chunk over. Each chunk starts at most one document load per tab, so a chunk that always fails shows its error instead of reloading in a loop. While one document load is under way, another failure does not start a second; the page's next navigation, or its return from the back-forward cache, ends that wait. This applies to `akan build` output only.
|
|
677
|
-
- **A document fallback to the address the tab already shows now reloads it.** A failed refresh, or a back or forward move to a URL with a `#fragment`, fell back with `location.replace` to that same URL, which only scrolls to the fragment and loads nothing. It now calls `location.reload()`.
|
|
678
|
-
- **`akan build` fails when the vendor scan cannot find a route's client entry**, and names the entry. Before, a build that wrote its route bundles somewhere the scan did not look narrowed every vendor entry to nothing. The build passed, and pages threw in the browser.
|
|
679
|
-
- **The vendor scan no longer overflows the stack on large minified chunks.** A function body of about 20,000 statements, which a minifier folds into one comma chain, used to fail `akan build` with `Maximum call stack size exceeded`.
|
|
680
|
-
|
|
681
|
-
- d9eaacc: A socket that is down keeps at most 100 messages emitted meanwhile, dropping the oldest, and says how many it dropped when it reconnects. Before, the outbox grew without end, so a stream of emits (a cursor, a typing signal) on a tab offline for minutes held every one of them and sent them all at once on reconnect. `configureWs({ outboxLimit })` sets the cap: `0` keeps none and says so once rather than on every reconnect, and a negative limit or `Infinity` keeps every one. Room subscriptions never queue there and are sent again on every open, as before.
|
|
682
|
-
|
|
683
3
|
## 3.1.1
|
|
684
4
|
|
|
685
5
|
### Patch Changes
|