akanjs 3.3.0-rc.2 → 3.3.0-rc.21
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 +3 -2
- package/CHANGELOG.md +391 -23
- package/CONTRIBUTING.md +2 -2
- package/README.ko.md +40 -296
- package/README.md +41 -297
- package/client/appOpenedTab.ts +12 -0
- package/client/clientRuntime.ts +3 -10
- package/client/cn.ts +4 -4
- package/client/cookie.ts +15 -6
- package/client/csrTypes.ts +17 -0
- package/client/device.ts +43 -3
- package/client/frameConfig.ts +27 -6
- package/client/index.ts +12 -6
- package/client/keyboardRide.ts +124 -0
- package/client/router.ts +6 -3
- package/client/rscNavigation.ts +0 -7
- package/client/scriptPolicy.ts +14 -0
- package/common/CodeTranscript.ts +4 -2
- package/common/Logger.ts +4 -1
- package/common/TraceContext.ts +97 -0
- package/common/TrustedProxy.ts +10 -0
- package/common/codeAgentProfile.ts +1 -1
- package/common/codeAgentWire.ts +7 -2
- package/common/index.ts +1 -0
- package/common/inlineToken.ts +26 -0
- package/common/logContext.ts +1 -0
- package/common/sessionTokenContract.ts +7 -0
- package/constant/index.ts +0 -1
- package/constant/types.ts +0 -2
- package/document/documentSchema.ts +0 -3
- package/document/filterMeta.ts +3 -16
- package/fetch/client/fetchClient.ts +8 -17
- package/fetch/client/httpClient.ts +22 -12
- package/fetch/client/wsClient.ts +10 -6
- package/fetch/requestStorage.ts +30 -0
- package/index.ts +8 -0
- package/package.json +263 -57
- package/server/SSR_MEMORY_DIAGNOSIS.md +88 -1
- package/server/admissionQueue.ts +107 -0
- package/server/akanApp.ts +39 -14
- package/server/akanAppHeaders.ts +20 -6
- package/server/akanOption.ts +28 -0
- package/server/akanServer.ts +13 -1
- package/server/assetHeaders.ts +8 -3
- package/server/cachePolicy.ts +2 -1
- package/server/clientErrorReport.ts +191 -0
- package/server/clientReportId.ts +54 -0
- package/server/console.ts +5 -12
- package/server/devtools/README.md +15 -3
- package/server/devtools/devtoolsAccess.ts +119 -0
- package/server/devtools/devtoolsRouter.ts +30 -26
- package/server/devtools/devtoolsUnlockPage.ts +38 -0
- package/server/devtools/signalSerializer.ts +18 -1
- package/server/devtools/studio/studioDocument.tsx +3 -1
- package/server/devtools/studio/studioRoute.ts +4 -1
- package/server/devtools/types.ts +6 -0
- package/server/flightSanitizeRecorded.fixture.json +36 -34
- package/server/forwardedError.ts +43 -0
- package/server/gateway/gatewayChildren.ts +3 -0
- package/server/gateway/gatewayConfig.ts +5 -0
- package/server/gateway/gatewayHttpProxy.ts +10 -2
- package/server/gateway/gatewayStatus.ts +21 -1
- package/server/gateway/gatewayStatusPage.ts +18 -11
- package/server/headSplice.ts +73 -0
- package/server/hmr/clientReport.ts +9 -9
- package/server/hmr/csrDevShell.ts +7 -4
- package/server/htmlResultCache.ts +81 -14
- package/server/imageOptimizer.ts +44 -12
- package/server/index.ts +2 -4
- package/server/lifecycle/secretEnv.ts +98 -0
- package/server/lifecycle/shutdownManager.ts +6 -0
- package/server/logging/logForwarder.ts +2 -2
- package/server/logging/logQuery.ts +9 -1
- package/server/mcp/McpDispatcher.ts +13 -10
- package/server/metrics/metricAggregate.ts +27 -0
- package/server/metrics/metricExposition.ts +92 -0
- package/server/metrics/metricMerge.ts +81 -0
- package/server/metrics/metricRegistry.ts +271 -0
- package/server/metrics/pubsubGauges.ts +20 -0
- package/server/metrics/requestMetrics.ts +110 -0
- package/server/metrics/runtimeFamilies.ts +61 -0
- package/server/metrics/slowStatementLog.ts +63 -0
- package/server/metrics/statementMetrics.ts +259 -0
- package/server/metrics/statementPlanCheck.ts +141 -0
- package/server/metrics/statementReport.ts +105 -0
- package/server/migration/migrationRunner.ts +13 -10
- package/server/oauth/OAuthErrors.ts +5 -1
- package/server/ops/statusAccess.ts +23 -3
- package/server/otlp/otlpBatcher.ts +221 -0
- package/server/otlp/otlpConfig.ts +185 -0
- package/server/otlp/otlpEncode.ts +114 -0
- package/server/otlp/otlpExporter.ts +98 -0
- package/server/otlp/otlpSampler.ts +50 -0
- package/server/pageFailure.ts +33 -0
- package/server/processMetricsCollector.ts +1 -0
- package/server/renderBusyResponse.ts +97 -0
- package/server/reportText.ts +27 -0
- package/server/resolver/databaseModelInstance.ts +21 -19
- package/server/resolver/httpEndpointHandler.ts +43 -0
- package/server/resolver/jobTrace.ts +18 -0
- package/server/resolver/modelFacade.ts +24 -18
- package/server/resolver/modelLoaders.ts +10 -3
- package/server/resolver/signal.resolver.ts +28 -31
- package/server/resolver/timedQuery.ts +8 -4
- package/server/routeCacheQuery.ts +58 -0
- package/server/routeCacheTally.ts +65 -0
- package/server/routeElementComposer.tsx +16 -0
- package/server/routeTreeBuilder.ts +6 -0
- package/server/routing/apiRouter.ts +34 -11
- package/server/routing/appWsData.ts +4 -0
- package/server/routing/builtinRoutes.ts +4 -1
- package/server/routing/devRoutes.ts +50 -0
- package/server/routing/devSurfacePolicy.ts +40 -0
- package/server/routing/devSurfaces.ts +101 -0
- package/server/routing/hostAllowlist.ts +2 -0
- package/server/routing/roomReplay.ts +4 -0
- package/server/routing/serverListener.ts +13 -0
- package/server/routing/soloAppRoutes.ts +14 -1
- package/server/rscClient.tsx +6 -1
- package/server/rscClientChunks.ts +8 -1
- package/server/rscClientErrorSender.ts +77 -0
- package/server/rscClientErrors.ts +26 -0
- package/server/rscFirstRenderMemory.ts +49 -0
- package/server/rscFlightRenderer.ts +21 -4
- package/server/rscFlightStream.ts +2 -2
- package/server/rscHostRenderStream.ts +5 -3
- package/server/rscHostRequests.ts +17 -3
- package/server/rscRenderAdmission.ts +130 -0
- package/server/rscRenderControl.ts +2 -1
- package/server/rscRenderHandler.ts +112 -31
- package/server/rscRenderLevels.ts +40 -0
- package/server/rscRenderRefusal.ts +23 -0
- package/server/rscRenderStats.ts +3 -0
- package/server/rscResultCaches.ts +20 -2
- package/server/rscWorker.tsx +25 -5
- package/server/rscWorkerCache.ts +2 -0
- package/server/rscWorkerHost.ts +35 -4
- package/server/rscWorkerProcess.ts +12 -0
- package/server/rscWorkerRecycler.ts +3 -3
- package/server/scriptPolicy.ts +128 -0
- package/server/serverConfig.ts +11 -0
- package/server/serverMetrics.ts +34 -1
- package/server/sitemap.ts +0 -5
- package/server/ssrFromRscRenderer.tsx +32 -204
- package/server/ssrInlineScripts.ts +195 -0
- package/server/ssrTypes.ts +15 -2
- package/server/systemPageDocument.tsx +6 -2
- package/server/systemPages.tsx +9 -4
- package/server/webCsrSurface.ts +55 -21
- package/server/webDocumentRoute.ts +47 -21
- package/server/webRouteContext.ts +25 -8
- package/server/webRouter.ts +15 -12
- package/server/webRscRoute.ts +18 -14
- package/service/agent.service.ts +34 -8
- package/service/agentLoop/agentLoop.ts +35 -24
- package/service/agentLoop/agentLoopTypes.ts +16 -7
- package/service/agentLoop/loopCompaction.ts +1 -1
- package/service/agentLoop/loopContext.ts +33 -0
- package/service/agentLoop/loopToolkits.ts +17 -8
- package/service/index.ts +0 -1
- package/service/ipcTypes.ts +56 -0
- package/service/mentionToken.ts +44 -0
- package/service/predefinedAdaptor/anthropicLlm.ts +18 -17
- package/service/predefinedAdaptor/database.adaptor.ts +43 -9
- package/service/predefinedAdaptor/directoryNotWritableError.ts +30 -0
- package/service/predefinedAdaptor/index.ts +1 -0
- package/service/predefinedAdaptor/llm.adaptor.ts +9 -3
- package/service/predefinedAdaptor/llmContext.ts +26 -0
- package/service/predefinedAdaptor/llmFence.ts +55 -0
- package/service/predefinedAdaptor/openaiDialect.ts +45 -18
- package/service/predefinedAdaptor/solidSqlite.ts +2 -0
- package/service/predefinedAdaptor/sql/driver/bunSqlite.ts +49 -11
- package/service/predefinedAdaptor/sql/driver/postgres.ts +47 -10
- package/service/predefinedAdaptor/sql/statementFingerprint.ts +117 -0
- package/service/predefinedAdaptor/sql/statementPlans.ts +71 -0
- package/service/predefinedAdaptor/sql/statementProbe.ts +110 -0
- package/service/predefinedAdaptor/sql/statementScrub.ts +149 -0
- package/service/predefinedAdaptor/storage.adaptor.ts +5 -0
- package/service/predefinedAdaptor/websocket.adaptor.ts +6 -0
- package/signal/CrossSiteGuard.ts +5 -0
- package/signal/SignalFailure.ts +24 -2
- package/signal/browserError.ts +24 -0
- package/signal/errorReporting.ts +168 -0
- package/signal/httpPeer.ts +9 -0
- package/signal/index.ts +2 -3
- package/signal/openapi/openapi.ts +4 -0
- package/signal/requestTrace.ts +124 -0
- package/signal/signalContext.ts +15 -22
- package/signal/spanExport.ts +137 -0
- package/signal/trace.ts +168 -37
- package/store/agent/AgentBridge.ts +6 -2
- package/store/agent/AgentContext.ts +81 -14
- package/store/agent/AgentInline.ts +72 -0
- package/store/agent/StoreSurfaceSource.ts +2 -1
- package/store/baseSt.ts +0 -6
- package/store/index.ts +1 -3
- package/store/stateBuilder.ts +1 -6
- package/types/client/appOpenedTab.d.ts +1 -0
- package/types/client/clientRuntime.d.ts +4 -2
- package/types/client/cn.d.ts +0 -4
- package/types/client/cookie.d.ts +4 -3
- package/types/client/csrTypes.d.ts +20 -0
- package/types/client/device.d.ts +8 -0
- package/types/client/frameConfig.d.ts +1 -3
- package/types/client/index.d.ts +7 -7
- package/types/client/keyboardRide.d.ts +16 -0
- package/types/client/rscNavigation.d.ts +0 -10
- package/types/client/scriptPolicy.d.ts +4 -0
- package/types/common/CodeTranscript.d.ts +1 -0
- package/types/common/Logger.d.ts +2 -0
- package/types/common/TraceContext.d.ts +28 -0
- package/types/common/TrustedProxy.d.ts +1 -0
- package/types/common/codeAgentWire.d.ts +10 -2
- package/types/common/index.d.ts +1 -0
- package/types/common/inlineToken.d.ts +5 -0
- package/types/common/logContext.d.ts +1 -0
- package/types/common/sessionTokenContract.d.ts +6 -0
- package/types/constant/index.d.ts +1 -1
- package/types/constant/types.d.ts +0 -2
- package/types/document/documentSchema.d.ts +0 -2
- package/types/document/filterMeta.d.ts +0 -13
- package/types/fetch/client/fetchClient.d.ts +1 -4
- package/types/fetch/client/httpClient.d.ts +2 -5
- package/types/fetch/client/wsClient.d.ts +3 -3
- package/types/fetch/requestStorage.d.ts +9 -0
- package/types/index.d.ts +12 -0
- package/types/server/admissionQueue.d.ts +26 -0
- package/types/server/akanAppHeaders.d.ts +3 -1
- package/types/server/akanOption.d.ts +16 -1
- package/types/server/assetHeaders.d.ts +5 -3
- package/types/server/cachePolicy.d.ts +2 -0
- package/types/server/clientErrorReport.d.ts +27 -0
- package/types/server/clientReportId.d.ts +9 -0
- package/types/server/console.d.ts +0 -7
- package/types/server/devtools/devtoolsAccess.d.ts +12 -0
- package/types/server/devtools/devtoolsRouter.d.ts +0 -1
- package/types/server/devtools/devtoolsUnlockPage.d.ts +11 -0
- package/types/server/devtools/signalSerializer.d.ts +3 -1
- package/types/server/devtools/studio/studioDocument.d.ts +1 -0
- package/types/server/devtools/types.d.ts +5 -0
- package/types/server/forwardedError.d.ts +13 -0
- package/types/server/gateway/gatewayChildren.d.ts +2 -0
- package/types/server/gateway/gatewayConfig.d.ts +1 -0
- package/types/server/gateway/gatewayHttpProxy.d.ts +1 -0
- package/types/server/gateway/gatewayStatus.d.ts +2 -0
- package/types/server/headSplice.d.ts +11 -0
- package/types/server/hmr/clientReport.d.ts +2 -0
- package/types/server/hmr/csrDevShell.d.ts +3 -1
- package/types/server/htmlResultCache.d.ts +13 -3
- package/types/server/index.d.ts +4 -3
- package/types/server/lifecycle/secretEnv.d.ts +23 -0
- package/types/server/logging/logForwarder.d.ts +1 -0
- package/types/server/logging/logStdoutWriter.d.ts +1 -0
- package/types/server/logging/rotatingLogWriter.d.ts +1 -1
- package/types/server/metrics/metricAggregate.d.ts +6 -0
- package/types/server/metrics/metricExposition.d.ts +8 -0
- package/types/server/metrics/metricMerge.d.ts +9 -0
- package/types/server/metrics/metricRegistry.d.ts +76 -0
- package/types/server/metrics/pubsubGauges.d.ts +5 -0
- package/types/server/metrics/requestMetrics.d.ts +22 -0
- package/types/server/metrics/runtimeFamilies.d.ts +9 -0
- package/types/server/metrics/slowStatementLog.d.ts +18 -0
- package/types/server/metrics/statementMetrics.d.ts +45 -0
- package/types/server/metrics/statementPlanCheck.d.ts +16 -0
- package/types/server/metrics/statementReport.d.ts +28 -0
- package/types/server/ops/statusAccess.d.ts +7 -1
- package/types/server/otlp/otlpBatcher.d.ts +18 -0
- package/types/server/otlp/otlpConfig.d.ts +25 -0
- package/types/server/otlp/otlpEncode.d.ts +13 -0
- package/types/server/otlp/otlpExporter.d.ts +18 -0
- package/types/server/otlp/otlpSampler.d.ts +10 -0
- package/types/server/pageFailure.d.ts +14 -0
- package/types/server/renderBusyResponse.d.ts +9 -0
- package/types/server/reportText.d.ts +4 -0
- package/types/server/resolver/httpEndpointHandler.d.ts +14 -0
- package/types/server/resolver/jobTrace.d.ts +5 -0
- package/types/server/resolver/modelLoaders.d.ts +3 -0
- package/types/server/resolver/timedQuery.d.ts +2 -1
- package/types/server/routeCacheQuery.d.ts +11 -0
- package/types/server/routeCacheTally.d.ts +23 -0
- package/types/server/routeElementComposer.d.ts +2 -0
- package/types/server/routing/appWsData.d.ts +3 -0
- package/types/server/routing/devRoutes.d.ts +9 -0
- package/types/server/routing/devSurfacePolicy.d.ts +12 -0
- package/types/server/routing/devSurfaces.d.ts +18 -0
- package/types/server/routing/hostAllowlist.d.ts +1 -0
- package/types/server/routing/roomReplay.d.ts +1 -0
- package/types/server/routing/serverListener.d.ts +2 -0
- package/types/server/routing/soloAppRoutes.d.ts +3 -1
- package/types/server/rscClient.d.ts +1 -0
- package/types/server/rscClientChunks.d.ts +3 -1
- package/types/server/rscClientErrorSender.d.ts +8 -0
- package/types/server/rscClientErrors.d.ts +3 -0
- package/types/server/rscFirstRenderMemory.d.ts +16 -0
- package/types/server/rscFlightStream.d.ts +1 -1
- package/types/server/rscHostRenderStream.d.ts +2 -1
- package/types/server/rscRenderAdmission.d.ts +14 -0
- package/types/server/rscRenderControl.d.ts +2 -1
- package/types/server/rscRenderHandler.d.ts +5 -2
- package/types/server/rscRenderLevels.d.ts +8 -0
- package/types/server/rscRenderRefusal.d.ts +9 -0
- package/types/server/rscRenderStats.d.ts +2 -0
- package/types/server/rscResultCaches.d.ts +8 -1
- package/types/server/rscWorkerCache.d.ts +2 -0
- package/types/server/rscWorkerHost.d.ts +2 -1
- package/types/server/rscWorkerProcess.d.ts +1 -0
- package/types/server/rscWorkerRecycler.d.ts +1 -1
- package/types/server/scriptPolicy.d.ts +31 -0
- package/types/server/serverConfig.d.ts +1 -0
- package/types/server/serverMetrics.d.ts +4 -1
- package/types/server/sitemap.d.ts +0 -2
- package/types/server/ssrFromRscRenderer.d.ts +2 -6
- package/types/server/ssrInlineScripts.d.ts +39 -0
- package/types/server/ssrTypes.d.ts +14 -2
- package/types/server/systemPageDocument.d.ts +3 -1
- package/types/server/systemPages.d.ts +2 -1
- package/types/server/webRouteContext.d.ts +7 -4
- package/types/server/webRouter.d.ts +2 -1
- package/types/service/agent.service.d.ts +3 -0
- package/types/service/agentLoop/agentLoopTypes.d.ts +16 -7
- package/types/service/agentLoop/loopContext.d.ts +13 -0
- package/types/service/agentLoop/loopToolkits.d.ts +1 -0
- package/types/service/index.d.ts +0 -1
- package/types/service/ipcTypes.d.ts +60 -0
- package/types/service/mentionToken.d.ts +13 -0
- package/types/service/predefinedAdaptor/anthropicLlm.d.ts +3 -3
- package/types/service/predefinedAdaptor/database.adaptor.d.ts +2 -0
- package/types/service/predefinedAdaptor/directoryNotWritableError.d.ts +6 -0
- package/types/service/predefinedAdaptor/index.d.ts +1 -0
- package/types/service/predefinedAdaptor/llm.adaptor.d.ts +9 -3
- package/types/service/predefinedAdaptor/llmContext.d.ts +11 -0
- package/types/service/predefinedAdaptor/llmFence.d.ts +15 -0
- package/types/service/predefinedAdaptor/openaiDialect.d.ts +3 -3
- package/types/service/predefinedAdaptor/sql/driver/bunSqlite.d.ts +3 -1
- package/types/service/predefinedAdaptor/sql/driver/postgres.d.ts +3 -1
- package/types/service/predefinedAdaptor/sql/statementFingerprint.d.ts +21 -0
- package/types/service/predefinedAdaptor/sql/statementPlans.d.ts +17 -0
- package/types/service/predefinedAdaptor/sql/statementProbe.d.ts +37 -0
- package/types/service/predefinedAdaptor/sql/statementScrub.d.ts +5 -0
- package/types/service/predefinedAdaptor/storage.adaptor.d.ts +1 -0
- package/types/service/predefinedAdaptor/websocket.adaptor.d.ts +3 -0
- package/types/signal/CrossSiteGuard.d.ts +1 -0
- package/types/signal/SignalFailure.d.ts +2 -0
- package/types/signal/browserError.d.ts +17 -0
- package/types/signal/errorReporting.d.ts +27 -0
- package/types/signal/httpPeer.d.ts +5 -0
- package/types/signal/index.d.ts +3 -1
- package/types/signal/requestTrace.d.ts +33 -0
- package/types/signal/signalContext.d.ts +2 -1
- package/types/signal/spanExport.d.ts +47 -0
- package/types/signal/trace.d.ts +33 -12
- package/types/store/agent/AgentBridge.d.ts +1 -0
- package/types/store/agent/AgentContext.d.ts +6 -2
- package/types/store/agent/AgentInline.d.ts +16 -0
- package/types/store/baseSt.d.ts +0 -2
- package/types/store/index.d.ts +2 -2
- package/types/store/stateBuilder.d.ts +0 -4
- package/types/ui/Link/Action.d.ts +2 -1
- package/types/ui/Reference/origin.d.ts +0 -2
- package/types/ui/System/Common.d.ts +1 -1
- package/types/vendor/@akanjs/native/packages/cli/src/lib/project.d.ts +5 -0
- package/types/vendor/@akanjs/native/packages/core/src/boot.d.ts +5 -0
- package/types/vendor/@akanjs/native/plugins/external-view/src/index.d.ts +20 -8
- package/types/vendor/@akanjs/native/plugins/keyboard/src/index.d.ts +3 -2
- package/types/vendor/use-agentic/ToolRunner.d.ts +2 -1
- package/types/vendor/use-agentic/types.d.ts +8 -0
- package/types/webkit/CsrStack.d.ts +2 -1
- package/types/webkit/csrPageReadiness.d.ts +18 -0
- package/types/webkit/csrSlide.d.ts +30 -0
- package/types/webkit/index.d.ts +1 -1
- package/types/webkit/nativeNavigation.d.ts +2 -2
- package/types/webkit/nativeSplash.d.ts +6 -0
- package/types/webkit/openSurfaces.d.ts +13 -0
- package/types/webkit/useCsrKeyboard.d.ts +2 -1
- package/types/webkit/useCsrNavigation.d.ts +1 -1
- package/types/webkit/useEscapeKey.d.ts +7 -2
- package/types/webkit/useFrameRuntime.d.ts +6 -2
- package/types/webkit/usePageLocation.d.ts +3 -1
- package/types/webkit/useVisualViewportFrame.d.ts +2 -0
- package/ui/Dialog/Modal.tsx +16 -2
- package/ui/KeyboardAvoiding.tsx +2 -1
- package/ui/Layout/FrameSlotPortal.tsx +10 -3
- package/ui/Link/Action.tsx +2 -1
- package/ui/Reference/origin.ts +0 -10
- package/ui/System/CSR.tsx +33 -13
- package/ui/System/Common.tsx +8 -2
- package/ui/System/SSR.tsx +7 -4
- package/ui/Tooltip.tsx +1 -1
- package/ui/styles.css +14 -0
- package/vendor/@akanjs/native/CHANGELOG.md +20 -52
- package/vendor/@akanjs/native/native/android/src/com/akanjs/runtime/AkanNativeActivity.kt +27 -14
- 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/acl.rs +27 -7
- package/vendor/@akanjs/native/native/desktop/src/external.rs +240 -29
- package/vendor/@akanjs/native/native/desktop/src/lib.rs +3 -3
- package/vendor/@akanjs/native/native/desktop/src/navigation.rs +4 -0
- package/vendor/@akanjs/native/native/ios/Sources/AkanNativeViewController.swift +21 -2
- package/vendor/@akanjs/native/packages/cli/src/lib/acl.ts +10 -2
- package/vendor/@akanjs/native/packages/cli/src/lib/project.ts +11 -1
- package/vendor/@akanjs/native/packages/core/src/boot.ts +6 -0
- package/vendor/@akanjs/native/plugins/external-view/native-plugin.json +26 -0
- package/vendor/@akanjs/native/plugins/external-view/src/desktop.ts +9 -1
- package/vendor/@akanjs/native/plugins/external-view/src/index.ts +20 -8
- package/vendor/@akanjs/native/plugins/keyboard/src/index.ts +3 -2
- package/vendor/use-agentic/AgentSession.ts +1 -1
- package/vendor/use-agentic/CHANGELOG.md +9 -59
- package/vendor/use-agentic/Compaction.ts +1 -1
- package/vendor/use-agentic/ToolRunner.ts +12 -0
- package/vendor/use-agentic/WIRE.md +8 -2
- package/vendor/use-agentic/types.ts +8 -0
- package/webkit/CsrStack.ts +17 -9
- package/webkit/McpAppAgent.ts +3 -1
- package/webkit/RenderLayer.tsx +22 -13
- package/webkit/bootCsr.tsx +19 -1
- package/webkit/csrPageReadiness.ts +43 -0
- package/webkit/csrSlide.ts +130 -0
- package/webkit/index.ts +1 -1
- package/webkit/nativeNavigation.ts +12 -3
- package/webkit/nativeSplash.ts +30 -0
- package/webkit/openSurfaces.ts +54 -0
- package/webkit/useCsrKeyboard.ts +33 -1
- package/webkit/useCsrNavigation.ts +69 -21
- package/webkit/useCsrTransitions.ts +130 -29
- package/webkit/useCsrValues.ts +17 -5
- package/webkit/useEscapeKey.tsx +10 -23
- package/webkit/useFrameRuntime.ts +55 -6
- package/webkit/usePageLocation.ts +8 -2
- package/webkit/useVisualViewportFrame.tsx +24 -0
- package/client/locale.ts +0 -5
- package/service/serviceRegistry.ts +0 -27
- package/types/client/locale.d.ts +0 -6
- package/types/service/serviceRegistry.d.ts +0 -10
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { type StatementShape } from "./statementFingerprint.d.ts";
|
|
2
|
+
export interface StatementSite {
|
|
3
|
+
/** Empty outside a model call: the statement is then named by its table and verb. */
|
|
4
|
+
readonly model: string;
|
|
5
|
+
readonly op: string;
|
|
6
|
+
readonly planned: boolean;
|
|
7
|
+
}
|
|
8
|
+
export interface StatementCall {
|
|
9
|
+
readonly site: StatementSite;
|
|
10
|
+
/** Statements the drivers sent during the call, a nested call's included. */
|
|
11
|
+
sent: number;
|
|
12
|
+
}
|
|
13
|
+
export interface StatementPlanner {
|
|
14
|
+
explain(sql: string, params: readonly unknown[]): Promise<string[]>;
|
|
15
|
+
rowsUpTo(table: string, limit: number): Promise<number>;
|
|
16
|
+
isModelTable(table: string): boolean;
|
|
17
|
+
}
|
|
18
|
+
export interface SentStatement {
|
|
19
|
+
readonly shape: StatementShape;
|
|
20
|
+
readonly sql: string;
|
|
21
|
+
readonly planner: StatementPlanner | null;
|
|
22
|
+
}
|
|
23
|
+
export interface StatementSink {
|
|
24
|
+
sent(statement: SentStatement, site: StatementSite | undefined, params: readonly unknown[], durationMs: number, waitMs: number, rows: number): void;
|
|
25
|
+
}
|
|
26
|
+
export declare class StatementProbe {
|
|
27
|
+
#private;
|
|
28
|
+
static install(sink: StatementSink | null): void;
|
|
29
|
+
static get schemaEpoch(): number;
|
|
30
|
+
static schemaChanged(): void;
|
|
31
|
+
static sent(statement: SentStatement, params: readonly unknown[], durationMs: number, waitMs: number, rows: number): void;
|
|
32
|
+
static siteOf(model: string, op: string, planned?: boolean): StatementSite;
|
|
33
|
+
static call(model: string, op: string): StatementCall;
|
|
34
|
+
static within<T>(call: StatementCall, fn: () => Promise<T>): Promise<T>;
|
|
35
|
+
static unplanned<T>(fn: () => Promise<T>): Promise<T>;
|
|
36
|
+
static fixed(sql: string): SentStatement;
|
|
37
|
+
}
|
|
@@ -75,6 +75,7 @@ export declare class BlobStorage extends BlobStorage_base implements StorageAdap
|
|
|
75
75
|
#private;
|
|
76
76
|
/** Throws for a deployed `multiple`/`cluster` app on local disk unless `AKAN_STORAGE_SHARED=true` marks it shared. */
|
|
77
77
|
static assertShared(storage: string): void;
|
|
78
|
+
onInit(): void;
|
|
78
79
|
resolveLocalPath(path: string, access?: "public" | "private"): string | null;
|
|
79
80
|
readData(path: string): Promise<ReadableStream>;
|
|
80
81
|
readDataAsJson<T>(path: string): Promise<T>;
|
|
@@ -41,6 +41,8 @@ export interface WebsocketAdaptor {
|
|
|
41
41
|
leaveAllRooms(ws: Bun.ServerWebSocket<unknown>): Promise<void>;
|
|
42
42
|
registerSocket(ws: Bun.ServerWebSocket<unknown>, meta?: Record<string, string>): Promise<void>;
|
|
43
43
|
unregisterSocket(ws: Bun.ServerWebSocket<unknown>): Promise<void>;
|
|
44
|
+
/** Publishes waiting for the cross-server link to take them; absent for an adaptor that holds none back. */
|
|
45
|
+
readonly bufferedCount?: number;
|
|
44
46
|
}
|
|
45
47
|
declare const WebSocketRedisAdaptor_base: import("..").AdaptorCls<{}, {
|
|
46
48
|
channelPrefix: import("..").InjectInfo<"plug", string, never, never>;
|
|
@@ -52,6 +54,7 @@ declare const WebSocketRedisAdaptor_base: import("..").AdaptorCls<{}, {
|
|
|
52
54
|
}>;
|
|
53
55
|
export declare class WebSocketRedisAdaptor extends WebSocketRedisAdaptor_base implements WebsocketAdaptor {
|
|
54
56
|
#private;
|
|
57
|
+
get bufferedCount(): number;
|
|
55
58
|
onInit(): Promise<void>;
|
|
56
59
|
onDestroy(): Promise<void>;
|
|
57
60
|
publish(roomId: string, data: unknown, { coalesce }?: WebsocketPublishOption): void;
|
|
@@ -18,6 +18,7 @@ export declare class CrossSiteGuard {
|
|
|
18
18
|
/** Call only where a JSON body is read: a multipart upload relies on `assertOrigin` alone. */
|
|
19
19
|
static assertJsonBody(contentType: string | null): void;
|
|
20
20
|
static assertOrigin(req: Request, url: URL, key: string): void;
|
|
21
|
+
static isFromOwnHost(req: Request, url: URL): boolean;
|
|
21
22
|
/** The origin a cross-origin caller may read answers from: an allowlisted one, never the serving host's neighbours. */
|
|
22
23
|
static corsOrigin(req: Request): string | null;
|
|
23
24
|
static preflight(req: Request, methods: string[]): Response;
|
|
@@ -17,9 +17,11 @@ export declare class SignalFailure {
|
|
|
17
17
|
error: string;
|
|
18
18
|
statusCode: number;
|
|
19
19
|
code?: string;
|
|
20
|
+
traceId?: string;
|
|
20
21
|
timestamp: string;
|
|
21
22
|
stack?: string;
|
|
22
23
|
};
|
|
24
|
+
static answer(error: unknown, extra?: Record<string, unknown>): Response;
|
|
23
25
|
static response(error: unknown, extra?: Record<string, unknown>): Response;
|
|
24
26
|
static headersOf(error: unknown, statusCode: number): Record<string, string>;
|
|
25
27
|
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { AkanError } from "akanjs/base";
|
|
2
|
+
export type BrowserErrorKind = "uncaught" | "caught" | "recoverable" | "error" | "rejection";
|
|
3
|
+
export interface BrowserErrorData {
|
|
4
|
+
/** How the page heard it: a React root's uncaught, caught or recoverable error, `window.onerror`, or a rejection. */
|
|
5
|
+
kind: BrowserErrorKind;
|
|
6
|
+
name: string;
|
|
7
|
+
message: string;
|
|
8
|
+
stack: string | null;
|
|
9
|
+
routeId: string | null;
|
|
10
|
+
digest: string | null;
|
|
11
|
+
buildId: string | null;
|
|
12
|
+
userAgent: string | null;
|
|
13
|
+
}
|
|
14
|
+
export declare class BrowserError extends AkanError<"browserError", BrowserErrorData> {
|
|
15
|
+
readonly data: BrowserErrorData;
|
|
16
|
+
constructor(data: BrowserErrorData);
|
|
17
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
export type ErrorReportSource = "server" | "render" | "client" | "process";
|
|
2
|
+
export interface ErrorReportContext {
|
|
3
|
+
source: ErrorReportSource;
|
|
4
|
+
/** The request id `x-request-id` names; for a browser report, the id of the page view it came from. */
|
|
5
|
+
traceId: string | null;
|
|
6
|
+
/** `<type>:<key>` of the endpoint that answered 5xx. */
|
|
7
|
+
endpoint: string | null;
|
|
8
|
+
/** The route pattern, such as `/:lang/orders/:orderId`, never the URL with its values. */
|
|
9
|
+
routeId: string | null;
|
|
10
|
+
accountId: string | null;
|
|
11
|
+
/** The id a production render error shows the browser, also on the server log line. */
|
|
12
|
+
digest: string | null;
|
|
13
|
+
}
|
|
14
|
+
export type ErrorReportInput = Pick<ErrorReportContext, "source"> & Partial<Omit<ErrorReportContext, "source">>;
|
|
15
|
+
export type ErrorReporter = (error: Error, context: ErrorReportContext) => void | Promise<void>;
|
|
16
|
+
export declare class ErrorReporting {
|
|
17
|
+
#private;
|
|
18
|
+
static readonly flushTimeoutMs = 2000;
|
|
19
|
+
static readonly perMinute = 600;
|
|
20
|
+
static readonly processPerMinute = 10;
|
|
21
|
+
static readonly renderPerRequest = 3;
|
|
22
|
+
static use(reporter: ErrorReporter | null): void;
|
|
23
|
+
static get enabled(): boolean;
|
|
24
|
+
static report(error: unknown, input: ErrorReportInput): void;
|
|
25
|
+
static renderReported(traceId: string | null): boolean;
|
|
26
|
+
static flush(timeoutMs?: number): Promise<void>;
|
|
27
|
+
}
|
package/types/signal/index.d.ts
CHANGED
|
@@ -4,11 +4,13 @@ export { Agent, AgentEndpoint, AgentInternal, agent } from "./agent.signal";
|
|
|
4
4
|
export { AgentStop, AgentTurn, AgentTurnDocument, agentTurnConstant, agentTurnDocument } from "./agentTurn.d.ts";
|
|
5
5
|
export { AgentTurnStream } from "./agentTurnStream.d.ts";
|
|
6
6
|
export { Base, BaseEndpoint, BaseInternal, base, fetch, getSerializedSignal } from "./base.signal";
|
|
7
|
+
export { BrowserError, type BrowserErrorData, type BrowserErrorKind } from "./browserError.d.ts";
|
|
7
8
|
export { CrossSiteGuard, type CrossSiteOption } from "./CrossSiteGuard.d.ts";
|
|
8
9
|
export { type Endpoint, type EndpointCls, type EndpointDictArgShape, type EndpointDictShape, endpoint, sliceEndpoint, } from "./endpoint.d.ts";
|
|
9
10
|
export { EndpointErrorContract } from "./endpointErrorContract.d.ts";
|
|
10
11
|
export { type ArgInfo, type BuildEndpoint, buildEndpoint, type EndpInfoArgNames, type EndpInfoArgs, type EndpInfoClientReturns, type EndpInfoInternalArgs, type EndpInfoNullable, type EndpInfoReqType, type EndpInfoReturnRef, type EndpInfoServerArgs, type EndpInfoServerReturns, type EndpInfoSrvs, type EndpointArgProps, type EndpointBuilder, EndpointInfo, type EndpointInfoParts, type EndpointType, type InternalArgInfo, type InternalArgProps, type ReturnInfo, } from "./endpointInfo.d.ts";
|
|
11
12
|
export { EndpointRateLimit, type RateLimitBudget, type RateLimitSetting, type SubscribeRateSetting, } from "./endpointRateLimit.d.ts";
|
|
13
|
+
export type { ErrorReportContext, ErrorReporter, ErrorReportSource } from "./errorReporting.d.ts";
|
|
12
14
|
export { Exception, type ExceptionLike, isExceptionLike, type StatusException } from "./exception.d.ts";
|
|
13
15
|
export { type Guard, type GuardCls, type GuardScope, guard, guardOf, refusesAgents } from "./guard.d.ts";
|
|
14
16
|
export { AgentRelayAccess, None, Public } from "./guards.d.ts";
|
|
@@ -30,5 +32,5 @@ export { SignalDeclarationError, type SignalDeclarationErrorCode } from "./signa
|
|
|
30
32
|
export { DatabaseSignal, ServiceSignal, SignalRegistry } from "./signalRegistry.d.ts";
|
|
31
33
|
export { type ResolvedSliceCrud, type ResolvedSliceMcp, type Slice, type SliceCls, type SliceDictArgShape, type SliceDictShape, slice, } from "./slice.d.ts";
|
|
32
34
|
export { buildSlice, type LiveSliceOption, type ResolvedLiveSliceOption, type SliceBuilder, SliceInfo, type SliceInfoArgNames, type SliceInfoArgs, type SliceInfoFilter, type SliceInfoFull, type SliceInfoInput, type SliceInfoInsight, type SliceInfoInternalArgs, type SliceInfoLight, type SliceInfoParts, type SliceInfoRefName, type SliceInfoServerArgs, type SliceInfoSrvs, } from "./sliceInfo.d.ts";
|
|
33
|
-
export { type CanonicalLineMode, getCanonicalLineMode, getCurrentTrace, getFlightThresholdMs, getTraceSnapshot,
|
|
35
|
+
export { type CanonicalLineMode, getCanonicalLineMode, getCurrentTrace, getFlightThresholdMs, getTraceSnapshot, isFlightRecorderEnabled, isLocalDevRuntime, isLogContextEnabled, isTraceEnabled, runTraced, SignalTrace, type SpanRecord, setCanonicalLineMode, setFlightRecorderEnabled, setFlightThresholdMs, setLogContextEnabled, setTraceEnabled, type TraceMode, type TraceOrigin, type TraceOutcome, traceAggregator, traceCache, traceDataLoaderBatch, traceSpan, } from "./trace.d.ts";
|
|
34
36
|
export { type ArgType, argTypes, type CnstCapitalizedRefName, type CnstDefault, type CnstDefaultInput, type CnstDefaultState, type CnstFull, type CnstInput, type CnstInsight, type CnstLight, type CnstOf, type CnstPurifiedInput, type CnstRefName, type CnstStateInsight, type CnstStateLight, type DbDoc, type DbFilter, type DbOf, type DbQuery, type DbSort, type EndpointErrorKey, type EndpointErrors, type HttpMutationMethod, type LiveEndpointOption, type LiveEventPayload, type SerializedArg, type SerializedEndpoint, type SerializedFilter, type SerializedReturns, type SerializedSignal, type SerializedSignalMcp, type SerializedSignalShelf, type SerializedSlice, type SignalOption, type SignalType, type SlceCnstCapitalizedRefName, type SlceCnstDefault, type SlceCnstDefaultInput, type SlceCnstDefaultState, type SlceCnstFull, type SlceCnstInput, type SlceCnstInsight, type SlceCnstLight, type SlceCnstPurifiedInput, type SlceCnstRefName, type SlceCnstStateInsight, type SlceCnstStateLight, type SlceDbFilter, type SlceDbQuery, type SlceDbSort, type SlceSrv, type SrvMap, type SrvOf, type SrvRefName, type WebsocketAuthAck, type WebsocketMessageData, type WebsocketPublishData, type WebsocketReqData, type WebsocketResData, type WebsocketResyncData, type WebsocketRoomCursor, type WebsocketSubscribeAck, } from "./types.d.ts";
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { type LogContextSnapshot } from "akanjs/common";
|
|
2
|
+
import { type AdoptedTrace } from "../common/TraceContext.d.ts";
|
|
3
|
+
export interface TraceParentRef {
|
|
4
|
+
readonly traceId: string;
|
|
5
|
+
readonly spanId: string;
|
|
6
|
+
readonly sampled?: boolean;
|
|
7
|
+
readonly link?: string | null;
|
|
8
|
+
}
|
|
9
|
+
export declare class RequestTrace implements TraceParentRef {
|
|
10
|
+
#private;
|
|
11
|
+
readonly traceId: string;
|
|
12
|
+
readonly parentSpanId: string | null;
|
|
13
|
+
readonly sampled: boolean;
|
|
14
|
+
readonly link: string | null;
|
|
15
|
+
readonly linkSpanId: string | null;
|
|
16
|
+
constructor({ traceId, parentSpanId, sampled, link, linkSpanId }: AdoptedTrace);
|
|
17
|
+
get spanId(): string;
|
|
18
|
+
get traceparent(): string;
|
|
19
|
+
get logContext(): LogContextSnapshot;
|
|
20
|
+
static adopt(headers: Headers, isTrustedPeer: () => boolean): RequestTrace;
|
|
21
|
+
static accept(headers: Headers, peer: {
|
|
22
|
+
address: string;
|
|
23
|
+
} | null | undefined): RequestTrace;
|
|
24
|
+
static adoptsFrom(peer: {
|
|
25
|
+
address: string;
|
|
26
|
+
} | null | undefined): boolean;
|
|
27
|
+
static fresh(): RequestTrace;
|
|
28
|
+
static continued(traceparent: string | null | undefined, link?: string | null): TraceParentRef | null;
|
|
29
|
+
static current(): RequestTrace | undefined;
|
|
30
|
+
static run<T>(trace: RequestTrace, fn: () => T): T;
|
|
31
|
+
static serve<R extends Response | undefined>(trace: RequestTrace, req: Request, route: string | null, handle: () => R | Promise<R>): R | Promise<R>;
|
|
32
|
+
static echo<R extends Response | undefined>(response: R, trace: RequestTrace): R;
|
|
33
|
+
}
|
|
@@ -3,6 +3,7 @@ import { type ConstantFieldTypeInput } from "akanjs/constant";
|
|
|
3
3
|
import type { Adaptor, AdaptorCls, DatabaseService, InjectRegistry, LiveRegistry } from "akanjs/service";
|
|
4
4
|
import type { ArgInfo, EndpointInfo } from "./endpointInfo.d.ts";
|
|
5
5
|
import type { MiddlewareCls } from "./middleware.d.ts";
|
|
6
|
+
import { type TraceParentRef } from "./requestTrace.d.ts";
|
|
6
7
|
import { SignalTrace, type TraceOrigin } from "./trace.d.ts";
|
|
7
8
|
export type SignalTransportType = "http" | "websocket";
|
|
8
9
|
/** The socket a request arrived on: `null` for a unix socket (a local hop), `undefined` when no socket is known. */
|
|
@@ -76,7 +77,7 @@ export declare class SignalContext<Ctx extends HttpExecutionContext | WebSocketE
|
|
|
76
77
|
/** Whether `run` already logged this failure, so a transport's catch does not log it a second time. */
|
|
77
78
|
static wasReported(error: unknown): boolean;
|
|
78
79
|
/** The 5xx log is written in here, not in the transport, so it carries the call's traceId; rethrows after. */
|
|
79
|
-
static run<T>(endpoint: Adaptor, endpointInfo: EndpointInfo, key: string, origin: TraceOrigin, fn: () => Promise<T
|
|
80
|
+
static run<T>(endpoint: Adaptor, endpointInfo: EndpointInfo, key: string, origin: TraceOrigin, fn: () => Promise<T>, parent?: TraceParentRef | null): Promise<T>;
|
|
80
81
|
static try(endpoint: Adaptor, endpointInfo: EndpointInfo, key: string, fn: () => Promise<Response | undefined>): Promise<Response | undefined>;
|
|
81
82
|
static resolveReturn(value: unknown, { signalContext, returnRef, arrDepth, registry, live, cache, path, }: {
|
|
82
83
|
signalContext: SignalContext | null;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import type { AdoptedTrace } from "../common/TraceContext.d.ts";
|
|
2
|
+
import type { SignalTrace } from "./trace.d.ts";
|
|
3
|
+
export type ExportAttrs = Record<string, string | number | boolean>;
|
|
4
|
+
export declare const spanKind: {
|
|
5
|
+
readonly internal: 1;
|
|
6
|
+
readonly server: 2;
|
|
7
|
+
readonly client: 3;
|
|
8
|
+
};
|
|
9
|
+
export interface ExportSpan {
|
|
10
|
+
traceId: string;
|
|
11
|
+
spanId: string;
|
|
12
|
+
parentSpanId: string | null;
|
|
13
|
+
name: string;
|
|
14
|
+
kind: number;
|
|
15
|
+
/** `performance.now()` of the process that recorded it. */
|
|
16
|
+
startMs: number;
|
|
17
|
+
endMs: number;
|
|
18
|
+
attrs: ExportAttrs;
|
|
19
|
+
/** A trace id this span was handed and did not continue. */
|
|
20
|
+
link: string | null;
|
|
21
|
+
linkSpanId: string | null;
|
|
22
|
+
failed: boolean;
|
|
23
|
+
exception: {
|
|
24
|
+
type: string;
|
|
25
|
+
message: string;
|
|
26
|
+
} | null;
|
|
27
|
+
}
|
|
28
|
+
export interface SpanExportSink {
|
|
29
|
+
/** `parentSampled` is `null` for a trace that starts here. */
|
|
30
|
+
sample(traceId: string, parentSampled: boolean | null): boolean;
|
|
31
|
+
enqueue(span: ExportSpan): void;
|
|
32
|
+
}
|
|
33
|
+
interface ServedTrace {
|
|
34
|
+
readonly traceId: string;
|
|
35
|
+
readonly spanId: string;
|
|
36
|
+
readonly parentSpanId: string | null;
|
|
37
|
+
readonly link: string | null;
|
|
38
|
+
readonly linkSpanId?: string | null;
|
|
39
|
+
}
|
|
40
|
+
export declare class SpanExport {
|
|
41
|
+
static get sink(): SpanExportSink | null;
|
|
42
|
+
static install(sink: SpanExportSink | null): void;
|
|
43
|
+
static headSample(adopted: AdoptedTrace, internalHop: boolean): AdoptedTrace;
|
|
44
|
+
static openServerSpan(trace: ServedTrace, req: Request, route: string | null): ((response: Response | undefined, error?: unknown) => void) | null;
|
|
45
|
+
static exportTrace(trace: SignalTrace): void;
|
|
46
|
+
}
|
|
47
|
+
export {};
|
package/types/signal/trace.d.ts
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { type LogAttrs, type LogFlightRecorder, type LogRecord } from "akanjs/common";
|
|
2
|
+
import { type ErrorReportContext } from "./errorReporting.d.ts";
|
|
3
|
+
import { type TraceParentRef } from "./requestTrace.d.ts";
|
|
2
4
|
export declare const isTraceEnabled: () => boolean;
|
|
3
5
|
export declare const setTraceEnabled: (enabled: boolean) => void;
|
|
4
6
|
export declare const isLogContextEnabled: () => boolean;
|
|
@@ -16,11 +18,17 @@ export declare const isLocalDevRuntime: ({ environment, operationMode, }?: {
|
|
|
16
18
|
environment?: string;
|
|
17
19
|
operationMode?: string;
|
|
18
20
|
}) => boolean;
|
|
19
|
-
|
|
20
|
-
export declare const
|
|
21
|
+
export declare const setLocalServerTiming: (enabled: boolean | null) => void;
|
|
22
|
+
export declare const sameSecret: (presented: string, secret: string) => boolean;
|
|
21
23
|
export interface SpanRecord {
|
|
24
|
+
id: string;
|
|
25
|
+
/** The span open around this one, else the call's own span; for that one, the caller's. */
|
|
26
|
+
parentId: string | null;
|
|
22
27
|
name: string;
|
|
28
|
+
/** From the start of the call. */
|
|
29
|
+
startMs: number;
|
|
23
30
|
durationMs: number;
|
|
31
|
+
attrs?: LogAttrs;
|
|
24
32
|
}
|
|
25
33
|
export type TraceMode = "context" | "full";
|
|
26
34
|
export type TraceOrigin = "http" | "websocket" | "mcp" | "internal" | "page";
|
|
@@ -33,7 +41,7 @@ export declare class SignalTrace {
|
|
|
33
41
|
readonly endpointKey: string;
|
|
34
42
|
readonly endpointType: string;
|
|
35
43
|
readonly origin: TraceOrigin;
|
|
36
|
-
|
|
44
|
+
mode: TraceMode;
|
|
37
45
|
readonly startedAt: number;
|
|
38
46
|
readonly spans: SpanRecord[];
|
|
39
47
|
readonly attrs: LogAttrs;
|
|
@@ -48,41 +56,54 @@ export declare class SignalTrace {
|
|
|
48
56
|
error: unknown;
|
|
49
57
|
debugSev: number | null;
|
|
50
58
|
flight: LogFlightRecorder | null;
|
|
51
|
-
|
|
59
|
+
readonly aggregated: boolean;
|
|
60
|
+
/** An id this call was handed but did not take: an untrusted caller's, or the trace that enqueued a job. */
|
|
61
|
+
link: string | null;
|
|
62
|
+
constructor(endpointKey: string, endpointType: string, { mode, origin, parent, }?: {
|
|
52
63
|
mode?: TraceMode;
|
|
53
64
|
origin?: TraceOrigin;
|
|
65
|
+
parent?: TraceParentRef | null;
|
|
54
66
|
});
|
|
55
67
|
get traceId(): string;
|
|
68
|
+
get spanId(): string;
|
|
69
|
+
get parentSpanId(): string | null;
|
|
70
|
+
/** Head-sampled for the OTLP exporter: its spans are recorded and sent once it finalizes. */
|
|
71
|
+
get exported(): boolean;
|
|
72
|
+
get sampled(): boolean;
|
|
73
|
+
get traceparent(): string;
|
|
56
74
|
/** `null` when both modes are off. */
|
|
57
|
-
static create(endpointKey: string, endpointType: string, origin: TraceOrigin): SignalTrace | null;
|
|
75
|
+
static create(endpointKey: string, endpointType: string, origin: TraceOrigin, parent?: TraceParentRef | null): SignalTrace | null;
|
|
58
76
|
static get activeFlights(): number;
|
|
59
77
|
get endpoint(): string;
|
|
60
78
|
startFlightRecorder(): boolean;
|
|
61
79
|
/** Honours `x-akan-debug` for this call when the deployment allows it; anything else is ignored, not refused. */
|
|
62
80
|
applyDebugHeader(value: string | null | undefined): boolean;
|
|
81
|
+
get exposesTiming(): boolean;
|
|
82
|
+
writeServerTiming(response: Response): void;
|
|
83
|
+
serverTiming(): string;
|
|
63
84
|
setAttr(key: string, value: LogAttrs[string]): void;
|
|
64
|
-
recordSpan(name: string, durationMs: number): void;
|
|
85
|
+
recordSpan(name: string, durationMs: number, attrs?: LogAttrs): void;
|
|
86
|
+
span<T>(name: string, fn: () => Promise<T>): Promise<T>;
|
|
65
87
|
countDbQuery(durationMs: number): void;
|
|
88
|
+
recordDbQuery(model: string, op: string, durationMs: number): void;
|
|
66
89
|
countCache(hit: boolean): void;
|
|
67
90
|
countDataLoaderBatch(keyCount: number): void;
|
|
68
91
|
fail(error: unknown): void;
|
|
69
92
|
finalize(): void;
|
|
70
93
|
}
|
|
71
94
|
export declare const getCurrentTrace: () => SignalTrace | undefined;
|
|
95
|
+
export declare const reportedTraceOf: (trace?: SignalTrace | null) => Pick<ErrorReportContext, "traceId" | "endpoint" | "accountId">;
|
|
72
96
|
interface CrashLine {
|
|
73
97
|
name: string;
|
|
74
|
-
|
|
98
|
+
type: string;
|
|
99
|
+
key: string;
|
|
75
100
|
error: unknown;
|
|
76
101
|
status: number;
|
|
77
102
|
}
|
|
78
|
-
export declare const logCrash: (trace: SignalTrace | null, { name,
|
|
79
|
-
/** @deprecated Unused by akanjs. `runTraced` replaces it only where the caller owns the trace: it finalizes it. */
|
|
80
|
-
export declare const runWithTrace: <T>(trace: SignalTrace, fn: () => T) => T;
|
|
103
|
+
export declare const logCrash: (trace: SignalTrace | null, { name, type, key, error, status }: CrashLine) => void;
|
|
81
104
|
/** Finalizes `trace` after the caller's own catch has run, which is what lets an error log carry the traceId. */
|
|
82
105
|
export declare const runTraced: <T>(trace: SignalTrace | null, fn: () => Promise<T>) => Promise<T>;
|
|
83
106
|
export declare const traceSpan: <T>(name: string, fn: () => Promise<T>) => Promise<T>;
|
|
84
|
-
/** @deprecated Unused by akanjs; call `getCurrentTrace()?.countDbQuery(ms)`. */
|
|
85
|
-
export declare const traceDbQuery: (durationMs: number) => void;
|
|
86
107
|
export declare const traceCache: (hit: boolean) => void;
|
|
87
108
|
export declare const traceDataLoaderBatch: (keyCount: number) => void;
|
|
88
109
|
declare class TraceAggregator {
|
|
@@ -4,6 +4,7 @@ import { type SerializedStoreState } from "./StoreCatalogue.d.ts";
|
|
|
4
4
|
/** Masked store reads for an in-page agent: `<model>Form` holds typed credentials, and reads ship to a remote model. */
|
|
5
5
|
export declare class AgentBridge {
|
|
6
6
|
#private;
|
|
7
|
+
static readonly routeKeys: readonly ["pathname", "params", "searchParams"];
|
|
7
8
|
readonly refusals: AgentRefusal[];
|
|
8
9
|
static of(): AgentBridge;
|
|
9
10
|
constructor(instance: StoreInstance);
|
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
import type { ContextBlock, SurfaceView } from "../../vendor/use-agentic.d.ts";
|
|
2
2
|
import type { StoreInstance } from "../storeInstance.d.ts";
|
|
3
|
-
import
|
|
4
|
-
/** A turn's default context: route, on-screen scopes, and live keys (
|
|
3
|
+
import { AgentBridge } from "./AgentBridge.d.ts";
|
|
4
|
+
/** A turn's default context: route, on-screen scopes, and live keys (one-token values inline, the rest by name). */
|
|
5
5
|
export declare class AgentContext {
|
|
6
6
|
#private;
|
|
7
|
+
static readonly withheldNote = "Free text is left out. Call readState(key) with a key of `withheld` to read it.";
|
|
8
|
+
static readonly screenNote = "Labels left out are text on the page. Call readScreen with `section` set to a scope's path to read them.";
|
|
7
9
|
static of(): AgentContext;
|
|
10
|
+
/** A pathname as the route block carries it: a segment of free text, or one past twelve words, reads `…`. */
|
|
11
|
+
static routePath(pathname: string): string;
|
|
8
12
|
constructor(instance: StoreInstance, bridge: AgentBridge);
|
|
9
13
|
blocks(surface: SurfaceView, view?: string[]): ContextBlock[];
|
|
10
14
|
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export interface InlineRecord {
|
|
2
|
+
inline: {
|
|
3
|
+
[key: string]: string | string[];
|
|
4
|
+
};
|
|
5
|
+
withheld: number;
|
|
6
|
+
}
|
|
7
|
+
export declare class AgentInline {
|
|
8
|
+
#private;
|
|
9
|
+
static readonly maxEntries = 12;
|
|
10
|
+
static readonly maxWords = 12;
|
|
11
|
+
static readonly maxUndeclared = 4;
|
|
12
|
+
static readonly elided = "\u2026";
|
|
13
|
+
static path(pathname: string): string;
|
|
14
|
+
static params(record: unknown): InlineRecord;
|
|
15
|
+
static search(record: unknown, declared: ReadonlySet<string>): InlineRecord;
|
|
16
|
+
}
|
package/types/store/baseSt.d.ts
CHANGED
|
@@ -11,8 +11,6 @@ declare const defaultMessage: {
|
|
|
11
11
|
export type BaseSearchParamsState = {
|
|
12
12
|
[key: string]: string | string[];
|
|
13
13
|
};
|
|
14
|
-
/** @deprecated Unused by akanjs; read `searchParams[key]`, taking the first value of an array. */
|
|
15
|
-
export declare const getBaseSearchParam: (searchParams: BaseSearchParamsState, key: string) => string;
|
|
16
14
|
declare const BaseStore_base: import("./store.d.ts").StoreCls<"base", import("./stateBuilder.d.ts").WritableStateOf<{
|
|
17
15
|
csrLoaded: boolean;
|
|
18
16
|
path: string;
|
package/types/store/index.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ export { type DefaultAction, makeActions, makeFormSetter, type SliceAction } fro
|
|
|
2
2
|
export type { CreateOption, EditOption, ErrorReportOption, NewOption } from "./actionOption.d.ts";
|
|
3
3
|
export { type ActionOwner, type ActionTag, actionTagOf, tagAction } from "./actionTag.d.ts";
|
|
4
4
|
export { AgentAbort, AgentConfirm, type AgentConfirmPolicy, type AgentFieldType, AgentProgress, type AgentProgressStep, type AgentReferenceInput, AgentValue, type AgentValueOf, attachAgentic, type FieldToolOptions, type FileFieldSource, type FormFieldRef, FormFields, type RelationFieldSource, type StAgentic, StExposeBuilder, StExposeDraft, type StExposeMeta, StStateBuilder, StStateDraft, type StStateMeta, type StToolArgOption, type StToolArgType, StToolBuilder, type StToolCardControl, StToolDraft, type StToolMeta, ToolReturn, useAgentReference, useFieldTool, useFileFieldTool, useFormTools, useRelationFieldTool, } from "./agentic.d.ts";
|
|
5
|
-
export { type BaseSearchParamsState, BaseStore, base,
|
|
5
|
+
export { type BaseSearchParamsState, BaseStore, base, RootStore, st } from "./baseSt.d.ts";
|
|
6
6
|
export { AgentBridge, AgentContext, AgentCursor, AgentPrompts, AgentVisual, type AgentVisualOption, databaseStateModelTypes, ensureStoreSurface, ScreenFlash, ScreenImage, type ScreenImageView, ScreenReader, type ScreenReadOptions, ScreenSettle, type ScreenSettleOptions, ScreenTarget, type SerializedStoreState, StoreCatalogue, type StoreSurface, StoreSurfaceSource, } from "./deprecatedAgent.d.ts";
|
|
7
7
|
export { databaseStateNames, formSetterNames } from "./deprecatedNames.d.ts";
|
|
8
8
|
export { type DraftRecord, DraftStore } from "./draftStore.d.ts";
|
|
@@ -11,7 +11,7 @@ export { type LivePlacementProps, type LiveSortableRow, livePlacementIndex } fro
|
|
|
11
11
|
export type { RootStoreCls } from "./rootStore.d.ts";
|
|
12
12
|
export type { SliceActionKey, SliceActionRole, SliceStateRole } from "./sliceRole.d.ts";
|
|
13
13
|
export { createDatabaseState, createSliceState, type DefaultState, type DraftState, type FormUploading, type SliceState, type SliceStateKey, } from "./state.d.ts";
|
|
14
|
-
export { type ComputedMeta, type ComputedOptions, createDerivedStateBuilder, createEmptyDerivedMeta, createStateInitializerMap, createWritableStateBuilder, type DepValues, type DerivedStateBuilder, type DerivedStateOf, type DraftMeta, draftMetaOf, evaluateInitializers,
|
|
14
|
+
export { type ComputedMeta, type ComputedOptions, createDerivedStateBuilder, createEmptyDerivedMeta, createStateInitializerMap, createWritableStateBuilder, type DepValues, type DerivedStateBuilder, type DerivedStateOf, type DraftMeta, draftMetaOf, evaluateInitializers, makeDefaultFactory, mergeDerivedMeta, type PersistSessionMeta, type PersistSessionOptions, resolveDerivedState, resolveWritableState, type SearchMeta, type SearchOptions, type SearchParamsState, type StateDerivedMeta, type StateInitializer, type StateInitializerMap, type WritableStateBuilder, type WritableStateOf, } from "./stateBuilder.d.ts";
|
|
15
15
|
export { type ModelStore, type StoreCls, type StoreReturn, store } from "./store.d.ts";
|
|
16
16
|
export { StoreInstance } from "./storeInstance.d.ts";
|
|
17
17
|
export { type ReactAPI, StoreRegistry } from "./storeRegistry.d.ts";
|
|
@@ -132,8 +132,6 @@ export declare const createEmptyDerivedMeta: () => StateDerivedMeta;
|
|
|
132
132
|
export declare const mergeDerivedMeta: (...metas: (StateDerivedMeta | undefined)[]) => StateDerivedMeta;
|
|
133
133
|
export declare const createWritableStateBuilder: () => WritableStateBuilder;
|
|
134
134
|
export declare const createDerivedStateBuilder: <WritableState>() => DerivedStateBuilder<WritableState>;
|
|
135
|
-
/** @internal */
|
|
136
|
-
export declare const isStateBuilderMarker: (value: unknown) => value is Marker;
|
|
137
135
|
export declare const createStateInitializerMap: (state: Record<string, unknown>) => StateInitializerMap;
|
|
138
136
|
export declare const evaluateInitializers: (initializers: StateInitializerMap) => Record<string, unknown>;
|
|
139
137
|
export declare const resolveWritableState: (refName: string, state: Record<string, unknown>) => {
|
|
@@ -146,6 +144,4 @@ export declare const resolveDerivedState: <_WritableState>(state: Record<string,
|
|
|
146
144
|
meta: StateDerivedMeta;
|
|
147
145
|
};
|
|
148
146
|
export declare const makeDefaultFactory: (value: unknown) => StateInitializer;
|
|
149
|
-
/** @deprecated Unused by akanjs; read `searchParams[key]`, taking the first value of an array. */
|
|
150
|
-
export declare const getSearchParam: (searchParams: SearchParamsState, key: string) => string | undefined;
|
|
151
147
|
export {};
|
|
@@ -4,7 +4,8 @@ export interface ActionProps {
|
|
|
4
4
|
children?: ReactNode;
|
|
5
5
|
}
|
|
6
6
|
export interface BackProps extends ActionProps {
|
|
7
|
-
/** Where to go when there is no history to go back to, as on a deep link or a freshly opened app
|
|
7
|
+
/** Where to go when there is no history to go back to, as on a deep link or a freshly opened app; a browser tab this
|
|
8
|
+
* app opened closes instead. */
|
|
8
9
|
fallback?: string;
|
|
9
10
|
}
|
|
10
11
|
export declare const Back: ({ className, children, fallback }: BackProps) => import("react").JSX.Element;
|
|
@@ -9,5 +9,3 @@ export declare const originText: (origin: string[]) => {
|
|
|
9
9
|
en: string;
|
|
10
10
|
ko: string;
|
|
11
11
|
};
|
|
12
|
-
/** @deprecated Unused by akanjs, and removed in a later minor. */
|
|
13
|
-
export declare const groupByOwner: <Item>(items: Item[], originOf: (item: Item) => string[] | undefined, order: string[]) => [string, Item[]][];
|
|
@@ -32,7 +32,7 @@ export declare function ManifestLink({ manifest, basePath }: {
|
|
|
32
32
|
basePath?: string | null;
|
|
33
33
|
}): import("react").JSX.Element | null;
|
|
34
34
|
export declare function createManifestDataUrl(manifest: WebAppManifest): string;
|
|
35
|
-
export type AkanFrameCssVarName = "--akan-top-safe-area" | "--akan-bottom-safe-area" | "--akan-top-inset" | "--akan-bottom-inset" | "--akan-page-padding-top" | "--akan-page-padding-bottom" | "--akan-content-height" | `--akan-${"top" | "bottom"}-inset-visibility` | `--akan-${"top" | "bottom"}-inset-${InsetBreakpoint}` | `--akan-${"top" | "bottom"}-inset-visibility-${InsetBreakpoint}`;
|
|
35
|
+
export type AkanFrameCssVarName = "--akan-top-safe-area" | "--akan-bottom-safe-area" | "--akan-top-inset" | "--akan-bottom-inset" | "--akan-page-padding-top" | "--akan-page-padding-bottom" | "--akan-overlay-top" | "--akan-overlay-bottom" | "--akan-content-height" | `--akan-${"top" | "bottom"}-inset-visibility` | `--akan-${"top" | "bottom"}-inset-${InsetBreakpoint}` | `--akan-${"top" | "bottom"}-inset-visibility-${InsetBreakpoint}`;
|
|
36
36
|
export type AkanFrameCssVars = CSSProperties & {
|
|
37
37
|
[name in AkanFrameCssVarName]?: string;
|
|
38
38
|
};
|
|
@@ -178,11 +178,16 @@ export interface PluginManifest {
|
|
|
178
178
|
permissionSets?: Record<string, PermissionSet>;
|
|
179
179
|
/** The scope fields the plugin enforces, with a description each, e.g. { path: "glob relative to base" }. */
|
|
180
180
|
/** `urlFields`: the fields that hold URL patterns (matched by urlMatch; the build checks their denies). */
|
|
181
|
+
/**
|
|
182
|
+
* `required`: the app lists the scope: every grant of the plugin, not only `<plugin>:default`, gets `defaultScope`
|
|
183
|
+
* (none: nothing) unless it gives its own allow, and an entry naming no field is refused.
|
|
184
|
+
*/
|
|
181
185
|
scope?: {
|
|
182
186
|
description?: string;
|
|
183
187
|
fields: Record<string, string>;
|
|
184
188
|
urlFields?: string[];
|
|
185
189
|
pathFields?: string[];
|
|
190
|
+
required?: boolean;
|
|
186
191
|
};
|
|
187
192
|
/**
|
|
188
193
|
* Scopes of `<plugin>:default`, which an app without `capabilities` gets: what the plugin allows
|
|
@@ -50,6 +50,11 @@ export interface AkanNativeBoot {
|
|
|
50
50
|
/** Native hosts: the page's engine (wkwebview, webview2, webkitgtk, android-webview) and its version. */
|
|
51
51
|
engine?: string;
|
|
52
52
|
engineVersion?: string;
|
|
53
|
+
/**
|
|
54
|
+
* "page" when the shell took the WebView's own keyboard avoidance away (keyboard mode "none", iOS and Android), so
|
|
55
|
+
* nothing pans the page to a focused field and the page lays itself out from the keyboard plugin's events.
|
|
56
|
+
*/
|
|
57
|
+
keyboardAvoidance?: "page";
|
|
53
58
|
}
|
|
54
59
|
/** The global object. init.js fills the boot fields, @akanjs/native/core adds `receive`. */
|
|
55
60
|
export interface AkanNativeGlobal extends Partial<AkanNativeBoot> {
|
|
@@ -7,7 +7,9 @@ import { type FileRef } from "../../../packages/core/src/index.ts";
|
|
|
7
7
|
* profile (cookies, storage, cache), so `clearData` never touches the app's, and its top level navigates only to
|
|
8
8
|
* `allowOrigins` (its frames load http, https, data, blob and about URLs from anywhere); popups, downloads, device
|
|
9
9
|
* permissions and links another program would open (`mailto:`, a custom scheme) are refused. Listing the plugin in
|
|
10
|
-
* `native.plugins` is what lets an app open one.
|
|
10
|
+
* `native.plugins` is what lets an app open one, and `native.desktop.externalView` in `akan.config.ts` what for:
|
|
11
|
+
* `allowOrigins`, the origins any view may be opened for (none by default), and `evaluate` and `sendKey`, off by
|
|
12
|
+
* default, whether a page may run script in a view or type into it. The shell checks each again.
|
|
11
13
|
*
|
|
12
14
|
* Windows has every method. Linux has every method and sends no `consoleMessage`; there the visible view shown last
|
|
13
15
|
* also holds the keyboard focus inside its window, so the user's own keys reach it, until a click on the page takes the
|
|
@@ -25,13 +27,18 @@ export interface ExternalViewOpenOptions {
|
|
|
25
27
|
/** Names the view in every later call: letters, digits, `-` and `_`. */
|
|
26
28
|
id: string;
|
|
27
29
|
url: string;
|
|
28
|
-
/**
|
|
30
|
+
/**
|
|
31
|
+
* The origins it may navigate to (`https://host[:port]`); `url` must be on one. Each must be one of
|
|
32
|
+
* `native.desktop.externalView.allowOrigins`, compared as parsed (a punycode host, no trailing dot or default port),
|
|
33
|
+
* else NOT_ALLOWED.
|
|
34
|
+
*/
|
|
29
35
|
allowOrigins: string[];
|
|
30
36
|
/** Logical pixels in the window's content area; "fill" (default) follows the window's size. */
|
|
31
37
|
bounds?: ExternalViewBounds;
|
|
32
38
|
/**
|
|
33
39
|
* Runs at the start of every top document, never in its frames, before the page's own scripts; read what it keeps
|
|
34
|
-
* with `evaluate`. It may not declare `__akanTopOnly`, and an empty one registers nothing.
|
|
40
|
+
* with `evaluate`. It may not declare `__akanTopOnly`, and an empty one registers nothing. NOT_ALLOWED unless
|
|
41
|
+
* `native.desktop.externalView.evaluate` is true.
|
|
35
42
|
*/
|
|
36
43
|
initScript?: string;
|
|
37
44
|
/** macOS refuses `true` as UNSUPPORTED. */
|
|
@@ -40,7 +47,7 @@ export interface ExternalViewOpenOptions {
|
|
|
40
47
|
autoplay?: boolean;
|
|
41
48
|
/** Sends the page's console as `consoleMessage` from this level up (`true` is "warn"); off by default. */
|
|
42
49
|
console?: boolean | ExternalViewConsoleLevel;
|
|
43
|
-
/** The window it is laid over
|
|
50
|
+
/** The window it is laid over: only the calling page's own (the default); another is NOT_ALLOWED. */
|
|
44
51
|
window?: number;
|
|
45
52
|
}
|
|
46
53
|
export interface ExternalViewState {
|
|
@@ -55,10 +62,13 @@ export interface ExternalViewApi {
|
|
|
55
62
|
/**
|
|
56
63
|
* Opens the view, or brings an open one with this id to these options (a page that mounts again finds it). Another
|
|
57
64
|
* `initScript` builds the view again and loads its page anew, as does another `console` on Windows and another
|
|
58
|
-
* `autoplay` on macOS and Linux; Windows refuses another `autoplay` as UNSUPPORTED, before anything is built.
|
|
65
|
+
* `autoplay` on macOS and Linux; Windows refuses another `autoplay` as UNSUPPORTED, before anything is built. While
|
|
66
|
+
* open, the view keeps its `allowOrigins` or narrows to fewer of them: one it was not open for is NOT_ALLOWED. Closed,
|
|
67
|
+
* the id opens again for any origins of `native.desktop.externalView.allowOrigins`, with the same profile (its
|
|
68
|
+
* cookies and storage belong to the id).
|
|
59
69
|
*/
|
|
60
70
|
open(args: ExternalViewOpenOptions): Promise<ExternalViewState>;
|
|
61
|
-
/** Rejects NOT_ALLOWED for a URL on none of its `allowOrigins`. */
|
|
71
|
+
/** Rejects NOT_ALLOWED for a URL on none of its `allowOrigins`. The view loads the URL as the URL parser writes it. */
|
|
62
72
|
navigate(args: {
|
|
63
73
|
id: string;
|
|
64
74
|
url: string;
|
|
@@ -82,7 +92,8 @@ export interface ExternalViewApi {
|
|
|
82
92
|
* The script's completion value as JSON has it (a Date as its ISO string, a lone surrogate as U+FFFD), and `null`
|
|
83
93
|
* for undefined, NaN, a cycle or an exception: catch it in the script. macOS and Linux answer `null` past 128 levels
|
|
84
94
|
* of nesting too. A promise is not awaited. CANCELLED: a close or a rebuild of the view cut the call off. TIMEOUT: no
|
|
85
|
-
* answer within 30 s, as from a page busy in a loop; `sendKey` and `capture` time out the same way.
|
|
95
|
+
* answer within 30 s, as from a page busy in a loop; `sendKey` and `capture` time out the same way. NOT_ALLOWED
|
|
96
|
+
* unless `native.desktop.externalView.evaluate` is true.
|
|
86
97
|
*/
|
|
87
98
|
evaluate(args: {
|
|
88
99
|
id: string;
|
|
@@ -94,7 +105,8 @@ export interface ExternalViewApi {
|
|
|
94
105
|
* A trusted key press (`{ key: "z", code: "KeyZ" }`), whether or not the view has the focus. Not on macOS; on Linux
|
|
95
106
|
* UNSUPPORTED while the view's window is hidden. On Linux a Tab past the page's last element takes the page's focus
|
|
96
107
|
* out of it, as in a browser, but the keyboard stays with the view or the app's page, whichever had it; `Dead` is
|
|
97
|
-
* INVALID_ARGS there, since GTK's input method would compose it with the next key into one character.
|
|
108
|
+
* INVALID_ARGS there, since GTK's input method would compose it with the next key into one character. NOT_ALLOWED
|
|
109
|
+
* unless `native.desktop.externalView.sendKey` is true.
|
|
98
110
|
*/
|
|
99
111
|
sendKey(args: {
|
|
100
112
|
id: string;
|
|
@@ -7,8 +7,9 @@ export interface KeyboardState {
|
|
|
7
7
|
* What the keyboard does to the page (akanjs readiness O6-1):
|
|
8
8
|
* - "resize" (default, or the app config's keyboard.resize): the page's viewport shrinks by the keyboard, so bottom-fixed UI stays above it
|
|
9
9
|
* (Android pads the WebView's container, iOS shortens the web view with the keyboard's animation).
|
|
10
|
-
* - "none": the page keeps its full size and the keyboard covers its bottom
|
|
11
|
-
* itself with the heights of the events
|
|
10
|
+
* - "none": the page keeps its full size and the keyboard covers its bottom (the whole overlap, Android's navigation
|
|
11
|
+
* bar included); the app moves its UI itself with the heights of the events, and neither WebView pans to a focused
|
|
12
|
+
* field (`__AKAN_NATIVE__.keyboardAvoidance` is "page").
|
|
12
13
|
*/
|
|
13
14
|
export type KeyboardResizeMode = "resize" | "none";
|
|
14
15
|
/** A keyboard transition: its height in CSS pixels once it ends (0 when hiding) and its animation length in ms. */
|