akanjs 3.2.0-rc.2 → 3.2.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 +42 -41
- package/CHANGELOG.md +593 -3
- package/CONTRIBUTING.md +26 -0
- package/base/base.ts +2 -1
- package/client/clientRuntime.ts +1 -0
- package/client/cn.ts +2 -2
- package/client/csrTypes.ts +15 -1
- package/client/frameConfig.ts +5 -2
- package/client/index.ts +249 -26
- package/client/locale.ts +1 -0
- package/client/makePageProto.tsx +33 -82
- package/client/nativeThemeColor.ts +51 -0
- package/client/route/RouteDefinition.ts +24 -7
- package/client/route/RouteGuards.ts +2 -1
- package/client/route/RouteHead.ts +11 -2
- package/client/route/routeArgs.ts +7 -0
- package/client/router.ts +25 -6
- package/client/rscNavigation.ts +3 -3
- package/client/rscRoutePatch.ts +42 -0
- package/client/viewportMeta.ts +34 -4
- package/common/CodeTranscript.ts +1 -1
- package/common/PipelinePlanSchema.ts +2 -2
- package/common/akanGraph.ts +1 -1
- package/common/err.ts +122 -0
- package/common/facetBarrel.ts +38 -0
- package/common/failureCode.ts +18 -0
- package/common/index.ts +9 -0
- package/common/isGuardRefusal.ts +14 -0
- package/common/mcpExposure.ts +17 -4
- package/common/mcpFailure.ts +9 -0
- package/common/pipelinePlan.ts +1 -1
- package/common/restartSchedule.ts +55 -0
- 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 +4 -0
- package/dictionary/base.dictionary.ts +1 -0
- package/dictionary/locale.ts +1 -1
- package/dictionary/trans.ts +14 -97
- 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 +87 -270
- package/fetch/client/fetchClientTypes.ts +49 -0
- package/fetch/client/fetchHandle.ts +11 -1
- package/fetch/client/httpClient.ts +14 -2
- package/fetch/client/inflightQueries.ts +17 -0
- package/fetch/client/remoteError.ts +4 -20
- package/fetch/client/requestScope.ts +32 -0
- package/fetch/client/signalCatalog.ts +131 -0
- package/fetch/client/wsClient.ts +11 -0
- package/fetch/index.ts +1 -0
- package/fetch/staleReads.ts +27 -0
- package/fetch/streamedRead.ts +23 -0
- package/package.json +1 -1
- package/server/agentHooks.ts +16 -0
- package/server/akanApp.ts +107 -1272
- package/server/akanOption.ts +17 -4
- package/server/akanServer.ts +167 -675
- package/server/artifact/builderRpc.ts +33 -10
- package/server/artifact/ipcTypes.ts +9 -3
- 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/devtools/README.md +4 -3
- package/server/devtools/devtoolsRouter.ts +9 -5
- package/server/devtools/studio/studioRoute.ts +18 -11
- package/server/di/diLifecycle.ts +24 -35
- package/server/di/predefinedAdaptor.ts +24 -1
- package/server/di/resolveHierarchy.ts +19 -6
- package/server/di/utils.ts +7 -3
- package/server/ed25519Key.ts +31 -15
- package/server/flightRowReader.ts +95 -18
- package/server/gateway/childSupervisor.ts +326 -0
- package/server/gateway/devHostChannel.ts +47 -0
- package/server/gateway/gatewayChildren.ts +135 -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 +116 -0
- package/server/gateway/gatewayStatusPage.ts +54 -0
- package/server/gateway/gatewayWebSocketRelay.ts +149 -0
- package/server/head.tsx +4 -19
- package/server/hmr/devHmrController.ts +10 -1
- package/server/htmlResultCache.ts +234 -0
- package/server/imageOptimizer.ts +4 -1
- package/server/index.ts +257 -17
- package/server/lifecycle/parentChannel.ts +78 -0
- package/server/lifecycle/shutdownManager.ts +6 -3
- package/server/lifecycle/startGuard.ts +90 -0
- package/server/logging/logControlSocket.ts +42 -3
- 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/McpDispatcher.ts +48 -19
- package/server/mcp/McpPages.ts +21 -6
- package/server/mcp/McpRateLimiter.ts +14 -0
- package/server/mcp/McpRouter.ts +52 -23
- package/server/mcp/McpUiSession.ts +2 -1
- package/server/mcp/index.ts +1 -0
- package/server/nativeFile.ts +30 -11
- package/server/nativeSecret.ts +12 -3
- package/server/oauth/OAuthClientIdMetadata.ts +2 -2
- package/server/ops/opsRoute.ts +5 -1
- package/server/ops/opsToken.ts +3 -1
- package/server/resolver/CascadeRunner.ts +10 -4
- package/server/resolver/database.resolver.ts +10 -417
- package/server/resolver/databaseModelInstance.ts +200 -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 +52 -0
- package/server/resolver/modelSchema.ts +52 -0
- package/server/resolver/signal.resolver.ts +92 -116
- package/server/resolver/timedQuery.ts +16 -0
- package/server/resolver/websocketOf.ts +23 -0
- package/server/routeElementComposer.tsx +131 -9
- package/server/routeState.ts +5 -1
- package/server/routeTreeBuilder.ts +22 -9
- package/server/routing/apiRouter.ts +44 -25
- 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 +210 -227
- package/server/rscClientCache.ts +165 -0
- package/server/rscClientChunks.ts +209 -0
- package/server/rscClientFetch.ts +15 -3
- package/server/rscClientPatch.ts +78 -15
- package/server/rscDocumentHead.tsx +170 -0
- package/server/rscFlightRenderer.ts +83 -0
- package/server/rscFlightStream.ts +257 -0
- package/server/rscHeadPatch.ts +17 -56
- 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/rscInlineStream.ts +34 -0
- package/server/rscNavigationState.ts +21 -1
- package/server/rscPagePrompts.ts +11 -5
- package/server/rscParkedRedirect.ts +23 -0
- package/server/rscPatchPlanner.ts +220 -0
- package/server/rscPrefetchCache.ts +68 -32
- package/server/rscRenderControl.ts +33 -0
- package/server/rscRenderFallbacks.ts +297 -0
- package/server/rscRenderHandler.ts +439 -0
- package/server/rscRenderStats.ts +49 -0
- package/server/rscResponse.ts +78 -0
- package/server/rscResultCaches.ts +74 -0
- package/server/rscRouteDocument.tsx +299 -0
- package/server/rscSegmentOutlet.tsx +24 -5
- package/server/rscSegmentOutletReference.ts +14 -12
- package/server/rscWorker.tsx +86 -1392
- package/server/rscWorkerCache.ts +56 -0
- package/server/rscWorkerHost.ts +145 -811
- 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/ssrTypes.ts +9 -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 +126 -1242
- package/server/webRscRoute.ts +155 -0
- package/server/webSiteFiles.ts +139 -0
- package/server/wellKnownRoutes.ts +73 -0
- package/service/agent.service.ts +59 -5
- package/service/agentAccounts.ts +19 -0
- package/service/agentLoop/agentLoop.ts +387 -0
- package/service/agentLoop/agentLoopTypes.ts +112 -0
- package/service/agentLoop/deltaStream.ts +40 -0
- package/service/agentLoop/loopCompaction.ts +135 -0
- package/service/agentLoop/loopRequest.ts +62 -0
- package/service/agentLoop/loopToolOutput.ts +54 -0
- package/service/agentLoop/loopToolkits.ts +107 -0
- package/service/agentLoop/loopTranscript.ts +102 -0
- package/{signal → service}/agentMeter.ts +83 -15
- package/{signal → service}/agentRelayPolicy.ts +30 -7
- package/service/documentStoreError.ts +16 -0
- package/service/index.ts +7 -0
- package/service/injectError.ts +5 -0
- package/service/injectInfo.ts +30 -18
- package/service/insightQueryError.ts +19 -0
- package/service/ipcTypes.ts +3 -1
- package/service/liveSyncHub.ts +5 -2
- package/service/predefinedAdaptor/agentTools.adaptor.ts +34 -0
- package/service/predefinedAdaptor/anthropicLlm.ts +52 -21
- package/service/predefinedAdaptor/cache.adaptor.ts +3 -2
- package/service/predefinedAdaptor/compress.adaptor.ts +7 -3
- package/service/predefinedAdaptor/database.adaptor.ts +3 -1
- package/service/predefinedAdaptor/documentTransfer.ts +2 -1
- package/service/predefinedAdaptor/index.ts +2 -0
- package/service/predefinedAdaptor/insightQuery.ts +35 -11
- package/service/predefinedAdaptor/llm.adaptor.ts +22 -2
- package/service/predefinedAdaptor/llmSpend.ts +80 -0
- package/service/predefinedAdaptor/openaiDialect.ts +52 -17
- package/service/predefinedAdaptor/openaiLlm.ts +17 -9
- package/service/predefinedAdaptor/role.adaptor.ts +2 -0
- package/service/predefinedAdaptor/searchIndex.ts +5 -1
- package/service/predefinedAdaptor/solidPubsub.adaptor.ts +35 -2
- package/service/predefinedAdaptor/solidQueue.adaptor.ts +2 -2
- package/service/predefinedAdaptor/solidSqlite.ts +3 -2
- package/service/predefinedAdaptor/sql/DocumentHydrator.ts +95 -0
- package/service/predefinedAdaptor/sql/DocumentRowCodec.ts +192 -0
- package/service/predefinedAdaptor/sql/DocumentWriter.ts +292 -0
- package/service/predefinedAdaptor/sql/PostgresInsightSession.ts +15 -5
- package/service/predefinedAdaptor/sql/QueryCompiler.ts +29 -13
- package/service/predefinedAdaptor/sql/QueryScope.ts +70 -0
- package/service/predefinedAdaptor/sql/QueryWriter.ts +200 -0
- package/service/predefinedAdaptor/sql/RawDocumentTable.ts +20 -8
- package/service/predefinedAdaptor/sql/SqlDocumentStore.ts +83 -1124
- package/service/predefinedAdaptor/sql/SqlTableSchema.ts +319 -0
- package/service/predefinedAdaptor/sql/SqliteInsightSession.ts +2 -1
- package/service/predefinedAdaptor/sql/StoredRows.ts +95 -0
- package/service/predefinedAdaptor/sql/UpdateCompiler.ts +6 -2
- package/service/predefinedAdaptor/sql/driver/bunSqlite.ts +3 -3
- package/service/predefinedAdaptor/sql/driver/postgres.ts +1 -1
- package/service/predefinedAdaptor/sql/fieldValues.ts +74 -0
- package/service/predefinedAdaptor/sql/search/fts5.ts +4 -1
- package/service/predefinedAdaptor/sql/search/postgres.ts +6 -2
- package/service/predefinedAdaptor/sql/values.ts +8 -4
- package/service/predefinedAdaptor/sseData.ts +14 -0
- package/service/predefinedAdaptor/storage.adaptor.ts +9 -4
- package/service/predefinedAdaptor/websocket.adaptor.ts +199 -43
- package/service/serve.ts +3 -2
- package/service/serviceModule.ts +2 -2
- package/service/serviceRegistry.ts +1 -0
- package/signal/SignalFailure.ts +30 -1
- package/signal/agent.signal.ts +30 -9
- package/signal/agentTurnStream.ts +12 -8
- package/signal/byIdRead.ts +18 -0
- package/signal/carriedClientIps.ts +1 -0
- package/signal/endpointErrorContract.ts +20 -2
- package/signal/endpointInfo.ts +6 -5
- package/signal/exception.ts +1 -0
- package/signal/index.ts +314 -30
- package/signal/internalInfo.ts +6 -4
- package/signal/mcp/McpDocument.ts +8 -1
- package/signal/mcp/Msg.ts +23 -10
- package/signal/mcp/index.ts +1 -0
- package/signal/mcp/promptError.ts +9 -0
- package/signal/middleware.ts +12 -3
- package/signal/openapi/openapi.ts +10 -1
- package/signal/resolveFieldContext.ts +34 -0
- package/signal/serializer/fetch.serializer.ts +23 -15
- package/signal/signalContext.ts +24 -57
- package/signal/signalContractError.ts +10 -0
- package/signal/signalDeclarationError.ts +13 -0
- package/signal/signalRegistry.ts +3 -1
- package/signal/slice.ts +24 -20
- package/signal/sliceInfo.ts +12 -9
- package/signal/trace.ts +3 -0
- package/signal/types.ts +35 -6
- package/store/action.ts +44 -1086
- package/store/actionErrorKey.ts +9 -0
- package/store/actionOption.ts +22 -0
- package/store/baseSt.ts +1 -0
- package/store/draftFlush.ts +5 -0
- package/store/draftStore.ts +2 -0
- package/store/formDrafts.ts +115 -0
- package/store/formFieldSetters.ts +229 -0
- package/store/index.ts +125 -17
- package/store/modelActionContext.ts +65 -0
- package/store/modelListPatch.ts +53 -0
- package/store/modelOpenActions.ts +158 -0
- package/store/modelWriteActions.ts +240 -0
- package/store/modelWriteGuard.ts +82 -0
- package/store/openSeq.ts +34 -0
- package/store/rootStore.ts +2 -0
- package/store/sliceListActions.ts +370 -0
- package/store/sliceLiveActions.ts +130 -0
- package/store/stateBuilder.ts +2 -0
- package/store/storeInstance.ts +9 -10
- package/store/uploadPoll.ts +52 -0
- package/store/withSelector.ts +6 -4
- 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 +15 -1
- 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 +28 -26091
- package/types/client/nativeThemeColor.d.ts +6 -0
- package/types/client/route/RouteDefinition.d.ts +2 -2
- package/types/client/route/RouteHead.d.ts +5 -1
- package/types/client/route/routeArgs.d.ts +6 -0
- package/types/client/router.d.ts +6 -3
- package/types/client/rscNavigation.d.ts +3 -2
- package/types/client/rscRoutePatch.d.ts +22 -0
- package/types/client/viewportMeta.d.ts +3 -1
- package/types/common/CodeTranscript.d.ts +1 -1
- package/types/common/akanGraph.d.ts +1 -1
- package/types/common/err.d.ts +48 -0
- package/types/common/facetBarrel.d.ts +4 -0
- package/types/common/failureCode.d.ts +6 -0
- package/types/common/index.d.ts +8 -2
- package/types/common/isGuardRefusal.d.ts +3 -0
- package/types/common/mcpExposure.d.ts +9 -2
- package/types/common/mcpFailure.d.ts +6 -0
- package/types/common/restartSchedule.d.ts +16 -0
- 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/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/fetchHandle.d.ts +1 -0
- package/types/fetch/client/httpClient.d.ts +2 -0
- package/types/fetch/client/inflightQueries.d.ts +2 -0
- package/types/fetch/client/remoteError.d.ts +0 -4
- package/types/fetch/client/requestScope.d.ts +6 -0
- package/types/fetch/client/signalCatalog.d.ts +25 -0
- package/types/fetch/client/wsClient.d.ts +1 -0
- package/types/fetch/index.d.ts +1 -0
- package/types/fetch/staleReads.d.ts +8 -0
- package/types/fetch/streamedRead.d.ts +8 -0
- package/types/server/agentHooks.d.ts +4 -0
- package/types/server/akanApp.d.ts +2 -20
- package/types/server/akanOption.d.ts +9 -3
- package/types/server/akanServer.d.ts +1 -1
- package/types/server/artifact/builderRpc.d.ts +8 -0
- package/types/server/artifact/ipcTypes.d.ts +8 -0
- package/types/server/assetHeaders.d.ts +1 -0
- package/types/server/console.d.ts +4 -3
- package/types/server/devtools/devtoolsRouter.d.ts +4 -1
- package/types/server/devtools/studio/studioRoute.d.ts +2 -1
- package/types/server/di/predefinedAdaptor.d.ts +1 -0
- package/types/server/ed25519Key.d.ts +1 -0
- package/types/server/flightRowReader.d.ts +3 -1
- package/types/server/gateway/childSupervisor.d.ts +33 -0
- package/types/server/gateway/devHostChannel.d.ts +14 -0
- package/types/server/gateway/gatewayChildren.d.ts +47 -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 +62 -0
- package/types/server/gateway/gatewayStatusPage.d.ts +9 -0
- package/types/server/gateway/gatewayWebSocketRelay.d.ts +17 -0
- package/types/server/head.d.ts +2 -2
- package/types/server/htmlResultCache.d.ts +51 -0
- package/types/server/index.d.ts +17 -17
- package/types/server/lifecycle/parentChannel.d.ts +13 -0
- package/types/server/lifecycle/startGuard.d.ts +10 -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/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/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 +9 -0
- package/types/server/resolver/modelSchema.d.ts +6 -0
- package/types/server/resolver/signal.resolver.d.ts +2 -2
- package/types/server/resolver/timedQuery.d.ts +8 -0
- package/types/server/resolver/websocketOf.d.ts +2 -0
- package/types/server/routeElementComposer.d.ts +45 -6
- package/types/server/routeState.d.ts +2 -0
- 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/rscClient.d.ts +1 -5
- package/types/server/rscClientCache.d.ts +34 -0
- package/types/server/rscClientChunks.d.ts +18 -0
- package/types/server/rscClientFetch.d.ts +1 -1
- package/types/server/rscClientPatch.d.ts +12 -1
- package/types/server/rscDocumentHead.d.ts +32 -0
- package/types/server/rscFlightRenderer.d.ts +14 -0
- package/types/server/rscFlightStream.d.ts +52 -0
- package/types/server/rscHeadPatch.d.ts +5 -4
- 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/rscInlineStream.d.ts +9 -0
- package/types/server/rscNavigationState.d.ts +8 -3
- package/types/server/rscParkedRedirect.d.ts +12 -0
- package/types/server/rscPatchPlanner.d.ts +49 -0
- package/types/server/rscPrefetchCache.d.ts +8 -7
- 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/rscResponse.d.ts +9 -0
- package/types/server/rscResultCaches.d.ts +18 -0
- package/types/server/rscRouteDocument.d.ts +52 -0
- package/types/server/rscSegmentOutlet.d.ts +5 -0
- package/types/server/rscSegmentOutletReference.d.ts +2 -1
- package/types/server/rscWorker.d.ts +1 -3
- package/types/server/rscWorkerCache.d.ts +33 -1
- package/types/server/rscWorkerHost.d.ts +9 -76
- 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/ssrTypes.d.ts +8 -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 +4 -35
- package/types/server/webRscRoute.d.ts +24 -0
- package/types/server/webSiteFiles.d.ts +12 -0
- package/types/server/wellKnownRoutes.d.ts +5 -0
- package/types/service/agent.service.d.ts +13 -4
- package/types/service/agentAccounts.d.ts +8 -0
- package/types/service/agentLoop/agentLoop.d.ts +31 -0
- package/types/service/agentLoop/agentLoopTypes.d.ts +126 -0
- package/types/service/agentLoop/deltaStream.d.ts +3 -0
- package/types/service/agentLoop/loopCompaction.d.ts +11 -0
- package/types/service/agentLoop/loopRequest.d.ts +6 -0
- package/types/service/agentLoop/loopToolOutput.d.ts +7 -0
- package/types/service/agentLoop/loopToolkits.d.ts +14 -0
- package/types/service/agentLoop/loopTranscript.d.ts +12 -0
- package/types/service/agentMeter.d.ts +50 -0
- package/types/service/agentRelayPolicy.d.ts +45 -0
- package/types/service/documentStoreError.d.ts +7 -0
- package/types/service/index.d.ts +7 -0
- package/types/service/injectError.d.ts +4 -0
- package/types/service/injectInfo.d.ts +2 -1
- package/types/service/insightQueryError.d.ts +9 -0
- package/types/service/ipcTypes.d.ts +6 -0
- package/types/service/predefinedAdaptor/agentTools.adaptor.d.ts +31 -0
- package/types/service/predefinedAdaptor/anthropicLlm.d.ts +2 -2
- package/types/service/predefinedAdaptor/index.d.ts +2 -0
- package/types/service/predefinedAdaptor/llm.adaptor.d.ts +18 -2
- package/types/service/predefinedAdaptor/llmSpend.d.ts +22 -0
- package/types/service/predefinedAdaptor/openaiDialect.d.ts +2 -1
- package/types/service/predefinedAdaptor/openaiLlm.d.ts +1 -1
- 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 +24 -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 +1 -32
- package/types/service/predefinedAdaptor/sql/SqlTableSchema.d.ts +20 -0
- package/types/service/predefinedAdaptor/sql/StoredRows.d.ts +27 -0
- package/types/service/predefinedAdaptor/sql/driver/bunSqlite.d.ts +1 -14
- package/types/service/predefinedAdaptor/sql/driver/postgres.d.ts +0 -8
- package/types/service/predefinedAdaptor/sql/fieldValues.d.ts +5 -0
- package/types/service/predefinedAdaptor/sseData.d.ts +5 -0
- package/types/service/predefinedAdaptor/websocket.adaptor.d.ts +14 -5
- package/types/service/serviceModule.d.ts +1 -1
- package/types/service/serviceRegistry.d.ts +1 -0
- package/types/signal/SignalFailure.d.ts +2 -0
- package/types/signal/agentTurnStream.d.ts +2 -1
- package/types/signal/byIdRead.d.ts +7 -0
- package/types/signal/carriedClientIps.d.ts +4 -0
- package/types/signal/endpointErrorContract.d.ts +3 -0
- package/types/signal/exception.d.ts +1 -0
- package/types/signal/index.d.ts +32 -30
- package/types/signal/mcp/McpDocument.d.ts +2 -0
- package/types/signal/mcp/index.d.ts +1 -0
- package/types/signal/mcp/promptError.d.ts +5 -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 +1 -13
- package/types/signal/signalContractError.d.ts +4 -0
- package/types/signal/signalDeclarationError.d.ts +4 -0
- package/types/signal/slice.d.ts +15 -13
- package/types/signal/trace.d.ts +3 -0
- package/types/signal/types.d.ts +33 -6
- package/types/store/action.d.ts +8 -27
- package/types/store/actionErrorKey.d.ts +1 -0
- package/types/store/actionOption.d.ts +24 -0
- package/types/store/baseSt.d.ts +2 -295
- package/types/store/draftFlush.d.ts +4 -0
- package/types/store/formDrafts.d.ts +21 -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/modelListPatch.d.ts +34 -0
- package/types/store/modelOpenActions.d.ts +12 -0
- package/types/store/modelWriteActions.d.ts +16 -0
- package/types/store/modelWriteGuard.d.ts +42 -0
- package/types/store/openSeq.d.ts +17 -0
- package/types/store/rootStore.d.ts +6 -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/store/uploadPoll.d.ts +16 -0
- package/types/store/withSelector.d.ts +1 -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/Field/Choice.d.ts +2 -1
- package/types/ui/Field/index.d.ts +1 -1
- package/types/ui/Link/inputModality.d.ts +5 -0
- package/types/ui/Link/viewportPrefetch.d.ts +4 -0
- package/types/ui/Load/Edit_Client.d.ts +2 -0
- package/types/ui/Load/Pagination.d.ts +4 -1
- package/types/ui/Load/Stream.d.ts +7 -1
- package/types/ui/Load/StreamBoundary.d.ts +20 -0
- package/types/ui/Load/Units.d.ts +2 -0
- package/types/ui/Load/View.d.ts +2 -0
- package/types/ui/Reference/origin.d.ts +1 -0
- package/types/ui/index.d.ts +1 -1
- package/types/ui/overlayLayer.d.ts +6 -1
- 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 +18 -11
- package/types/vendor/use-agentic/AgentClientTools.d.ts +19 -0
- 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 +11 -0
- package/types/webkit/CsrGuards.d.ts +2 -0
- package/types/webkit/RouteLevelBoundary.d.ts +17 -0
- package/types/webkit/nativeCore.d.ts +1 -0
- package/types/webkit/nativePurchase.d.ts +2 -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/useFrameRuntime.d.ts +1 -0
- package/types/webkit/useGeoLocation.d.ts +1 -1
- package/types/webkit/useHistory.d.ts +2 -3
- package/types/webkit/usePurchase.d.ts +1 -1
- package/types/webkit/useResolvedFrame.d.ts +38 -0
- package/types/webkit/useSyncNavigation.d.ts +22 -0
- package/types/webkit/useTransitionStore.d.ts +1 -0
- package/ui/Agent/Chat.tsx +392 -235
- package/ui/Agent/ChatHeader.tsx +59 -0
- package/ui/Agent/ChatPendingCards.tsx +49 -0
- package/ui/Agent/fetchRunner.ts +8 -1
- package/ui/BottomSheet.tsx +1 -1
- package/ui/Button.tsx +1 -0
- 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/Link/inputModality.ts +21 -0
- package/ui/Link/prefetchIntent.ts +7 -25
- package/ui/Link/viewportPrefetch.ts +30 -0
- package/ui/Load/Edit_Client.tsx +7 -1
- package/ui/Load/Pagination.tsx +10 -2
- package/ui/Load/Stream.tsx +24 -4
- package/ui/Load/StreamBoundary.tsx +65 -0
- package/ui/Load/Units.tsx +3 -0
- package/ui/Load/View.tsx +5 -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 +32 -8
- package/ui/index.ts +4 -0
- package/ui/overlayLayer.ts +22 -1
- package/vendor/@akanjs/native/CHANGELOG.md +7 -1
- package/vendor/@akanjs/native/native/android/src/com/akanjs/runtime/AkanNativeActivity.kt +27 -12
- package/vendor/@akanjs/native/native/android/src/com/akanjs/runtime/AkanNativePlugin.kt +4 -0
- package/vendor/@akanjs/native/native/desktop/src/external.rs +213 -111
- package/vendor/@akanjs/native/native/desktop/src/lib.rs +12 -4
- package/vendor/@akanjs/native/native/desktop/src/linux/external.rs +509 -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 +18 -11
- package/vendor/use-agentic/AgentClientTools.ts +33 -0
- package/vendor/use-agentic/AgentSession.ts +11 -11
- package/vendor/use-agentic/CHANGELOG.md +46 -1
- package/vendor/use-agentic/Compaction.ts +2 -1
- package/vendor/use-agentic/ToolRunner.ts +6 -3
- package/vendor/use-agentic/Transcript.ts +6 -3
- package/vendor/use-agentic/WIRE.md +29 -7
- package/vendor/use-agentic/failureCode.ts +44 -0
- package/vendor/use-agentic/httpRunner.ts +15 -4
- package/vendor/use-agentic/index.ts +1 -0
- package/vendor/use-agentic/types.ts +11 -0
- package/webkit/CsrGuards.ts +7 -2
- package/webkit/McpAppAgent.ts +8 -3
- package/webkit/McpAppFetchBridge.ts +11 -5
- package/webkit/RouteLevelBoundary.tsx +37 -0
- package/webkit/nativeCore.ts +1 -0
- package/webkit/nativePurchase.ts +6 -3
- package/webkit/useCamera.tsx +22 -21
- 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 +69 -1234
- package/webkit/useGeoLocation.tsx +4 -1
- package/webkit/useHistory.ts +2 -2
- package/webkit/useLocation.ts +3 -2
- package/webkit/usePurchase.tsx +4 -2
- package/webkit/useResolvedFrame.ts +116 -0
- package/webkit/useSyncNavigation.ts +109 -0
- package/webkit/useTransitionStore.ts +13 -0
- package/types/signal/agentMeter.d.ts +0 -27
- package/types/signal/agentRelayPolicy.d.ts +0 -25
package/types/ui/Agent/Chat.d.ts
CHANGED
|
@@ -8,7 +8,10 @@ import type { VoiceEngine } from "./voice.d.ts";
|
|
|
8
8
|
export interface ChatProps {
|
|
9
9
|
/** Applied to the launcher while closed and to the panel while open. */
|
|
10
10
|
className?: string;
|
|
11
|
-
title
|
|
11
|
+
/** The header's title; also the panel's accessible name when it is a string and `label` is left off. */
|
|
12
|
+
title?: ReactNode;
|
|
13
|
+
/** The panel's accessible name, for a `title` that is not plain text. */
|
|
14
|
+
label?: string;
|
|
12
15
|
/** App-global framing; route-scoped `Agent.Guide`s layer on it. */
|
|
13
16
|
instructions?: string;
|
|
14
17
|
/** Defaults to the app's `runAgentTurn` endpoint. */
|
|
@@ -63,6 +66,6 @@ export interface ChatProps {
|
|
|
63
66
|
/** Speech in and out; a reply is read aloud only when the ask came in by voice. */
|
|
64
67
|
voice?: VoiceEngine;
|
|
65
68
|
}
|
|
66
|
-
export declare const DefaultChat: ({ className, title,
|
|
69
|
+
export declare const DefaultChat: ({ className, title, label, defaultOpen, open: openProp, onOpenChange, launcher, inline, shortcut, launcherClassName, launcherPlacement, hideLauncherBelow, panelClassName, intro, header, chrome, defaultDraft, attach, attachLimits, reference, mentions, voice, ...sessionOptions }: ChatProps) => ReactNode;
|
|
67
70
|
declare const _default: import("react").ComponentType<ChatProps>;
|
|
68
71
|
export default _default;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
export interface ChatHeaderProps {
|
|
3
|
+
title?: ReactNode;
|
|
4
|
+
running: boolean;
|
|
5
|
+
context: {
|
|
6
|
+
used: number;
|
|
7
|
+
compactAt?: number;
|
|
8
|
+
};
|
|
9
|
+
controls?: ReactNode;
|
|
10
|
+
onClear?: () => void;
|
|
11
|
+
onClose?: () => void;
|
|
12
|
+
}
|
|
13
|
+
export declare const ChatHeader: ({ title, running, context, controls, onClear, onClose }: ChatHeaderProps) => import("react").JSX.Element;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { AgentSession } from "../../vendor/use-agentic.d.ts";
|
|
2
|
+
export declare const isAsking: (session: AgentSession) => boolean;
|
|
3
|
+
export declare const ChatPendingCards: ({ session, portal }: {
|
|
4
|
+
session: AgentSession;
|
|
5
|
+
portal: HTMLElement | null;
|
|
6
|
+
}) => import("react").JSX.Element;
|
|
7
|
+
export declare const usePanelOverlays: () => {
|
|
8
|
+
layer: HTMLElement | null;
|
|
9
|
+
cardLayer: HTMLElement | null;
|
|
10
|
+
hosts: {
|
|
11
|
+
layer: HTMLElement | null;
|
|
12
|
+
onLayer: import("react").Dispatch<import("react").SetStateAction<HTMLElement | null>>;
|
|
13
|
+
onCardLayer: import("react").Dispatch<import("react").SetStateAction<HTMLElement | null>>;
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
interface PanelOverlayHostsProps {
|
|
17
|
+
asking: boolean;
|
|
18
|
+
layer: HTMLElement | null;
|
|
19
|
+
onLayer: (layer: HTMLElement | null) => void;
|
|
20
|
+
onCardLayer: (layer: HTMLElement | null) => void;
|
|
21
|
+
}
|
|
22
|
+
export declare const PanelOverlayHosts: ({ asking, layer, onLayer, onCardLayer }: PanelOverlayHostsProps) => import("react").JSX.Element;
|
|
23
|
+
export {};
|
|
@@ -10,8 +10,9 @@ export interface SwitchProps {
|
|
|
10
10
|
onDesc?: string;
|
|
11
11
|
offDesc?: string;
|
|
12
12
|
disabled?: boolean;
|
|
13
|
+
variant?: "primary" | "accent" | "success";
|
|
13
14
|
}
|
|
14
|
-
export declare const Switch: ({ label, desc, labelClassName, className, value, onChange, disabled, inputClassName, onDesc, offDesc, }: SwitchProps) => import("react").JSX.Element;
|
|
15
|
+
export declare const Switch: ({ label, desc, labelClassName, className, value, onChange, disabled, inputClassName, onDesc, offDesc, variant, }: SwitchProps) => import("react").JSX.Element;
|
|
15
16
|
export interface ToggleSelectProps<I, Nullable extends boolean> {
|
|
16
17
|
className?: string;
|
|
17
18
|
labelClassName?: string;
|
|
@@ -14,7 +14,7 @@ export declare const Field: (({ className, containerClassName, labelClassName, l
|
|
|
14
14
|
List: <Item>({ className, labelClassName, label, desc, value, onChange, onAdd, nullable, renderItem, }: import("./Collection.d.ts").ListProps<Item>) => import("react").JSX.Element;
|
|
15
15
|
Text: import("react").MemoExoticComponent<({ label, desc, labelClassName, className, value, onChange, placeholder, nullable, disabled, minlength, maxlength, transform, validate, onPressEnter, inputClassName, inputStyleType, }: import("./Text.d.ts").TextProps) => import("react").JSX.Element>;
|
|
16
16
|
TextArea: import("react").MemoExoticComponent<({ label, desc, labelClassName, className, value, onChange, placeholder, nullable, disabled, rows, minlength, maxlength, transform, validate, onPressEnter, inputClassName, }: import("./Text.d.ts").TextAreaProps) => import("react").JSX.Element>;
|
|
17
|
-
Switch: ({ label, desc, labelClassName, className, value, onChange, disabled, inputClassName, onDesc, offDesc, }: import("./Choice.d.ts").SwitchProps) => import("react").JSX.Element;
|
|
17
|
+
Switch: ({ label, desc, labelClassName, className, value, onChange, disabled, inputClassName, onDesc, offDesc, variant, }: import("./Choice.d.ts").SwitchProps) => import("react").JSX.Element;
|
|
18
18
|
ToggleSelect: <I extends string | number | boolean | null, Nullable extends boolean = false>({ className, labelClassName, label, desc, items, value, validate, onChange, nullable, disabled, btnClassName, }: import("./Choice.d.ts").ToggleSelectProps<I, Nullable>) => import("react").JSX.Element;
|
|
19
19
|
MultiToggleSelect: <I extends string | number | boolean>({ className, labelClassName, label, desc, items, value, minlength, maxlength, validate, onChange, disabled, }: import("./Choice.d.ts").MultiToggleSelectProps<I>) => import("react").JSX.Element;
|
|
20
20
|
TextList: ({ label, desc, labelClassName, className, value, onChange, placeholder, disabled, transform, minlength, maxlength, minTextlength, maxTextlength, validate, inputClassName, }: import("./Collection.d.ts").TextListProps) => import("react").JSX.Element;
|
|
@@ -2,6 +2,7 @@ import type { ClientEdit, SliceMeta } from "akanjs/fetch";
|
|
|
2
2
|
import type { CreateOption } from "akanjs/store";
|
|
3
3
|
import type { ReactNode } from "react";
|
|
4
4
|
import type { DraftProp } from "../Model/draftScope.d.ts";
|
|
5
|
+
import type { StreamError } from "./StreamBoundary.d.ts";
|
|
5
6
|
interface DefaultProps {
|
|
6
7
|
type?: "modal" | "form" | "empty";
|
|
7
8
|
className?: string;
|
|
@@ -11,6 +12,7 @@ interface DefaultProps {
|
|
|
11
12
|
modal?: string;
|
|
12
13
|
/** Custom fallback shown while an unawaited `edit` is pending. */
|
|
13
14
|
loading?: ReactNode;
|
|
15
|
+
error?: StreamError;
|
|
14
16
|
children?: ReactNode;
|
|
15
17
|
onSubmit?: string;
|
|
16
18
|
onCancel?: string;
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import type { ClientInit } from "akanjs/fetch";
|
|
2
|
+
import type { StreamError } from "./StreamBoundary.d.ts";
|
|
2
3
|
interface PaginationProps<RefName extends string, Light> {
|
|
3
4
|
className?: string;
|
|
4
5
|
init: ClientInit<RefName, Light>;
|
|
5
6
|
scrollToTop?: boolean;
|
|
7
|
+
/** Rendered when `init` rejects; nothing by default, since the list sharing that `init` shows the notice. */
|
|
8
|
+
error?: StreamError;
|
|
6
9
|
}
|
|
7
|
-
export default function Pagination<T extends string, L>({ className, init, scrollToTop }: PaginationProps<T, L>): import("react").JSX.Element;
|
|
10
|
+
export default function Pagination<T extends string, L>({ className, init, scrollToTop, error, }: PaginationProps<T, L>): import("react").JSX.Element;
|
|
8
11
|
export {};
|
|
@@ -1,10 +1,16 @@
|
|
|
1
1
|
import type { PromiseOrObject } from "akanjs/base";
|
|
2
2
|
import { type ReactNode } from "react";
|
|
3
|
+
import { type StreamError } from "./StreamBoundary.d.ts";
|
|
3
4
|
interface StreamProps<Value> {
|
|
4
5
|
of: PromiseOrObject<Value>;
|
|
5
6
|
/** Rendered while `of` is pending. Only a thenable `of` gets a boundary, so a resolved one never shows it. */
|
|
6
7
|
fallback?: ReactNode;
|
|
8
|
+
/**
|
|
9
|
+
* Rendered in place of the value when `of` rejects; a localized notice with a retry by default. The
|
|
10
|
+
* `(error, retry)` form works only where Stream renders on the client: a server one cannot hand a function over.
|
|
11
|
+
*/
|
|
12
|
+
error?: StreamError;
|
|
7
13
|
children: (value: Value) => ReactNode;
|
|
8
14
|
}
|
|
9
|
-
export default function Stream<Value>({ of, fallback, children }: StreamProps<Value>): string | number | bigint | boolean | Iterable<ReactNode> | Promise<string | number | bigint | boolean | import("react").ReactPortal | import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>> | Iterable<ReactNode> | null | undefined> | import("react").JSX.Element | null | undefined;
|
|
15
|
+
export default function Stream<Value>({ of, fallback, error, children }: StreamProps<Value>): string | number | bigint | boolean | Iterable<ReactNode> | Promise<string | number | bigint | boolean | import("react").ReactPortal | import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>> | Iterable<ReactNode> | null | undefined> | import("react").JSX.Element | null | undefined;
|
|
10
16
|
export {};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Component, type ReactNode } from "react";
|
|
2
|
+
export type StreamError = ReactNode | ((error: unknown, retry: () => void) => ReactNode);
|
|
3
|
+
interface StreamBoundaryProps {
|
|
4
|
+
resetKey: string;
|
|
5
|
+
error?: StreamError;
|
|
6
|
+
children: ReactNode;
|
|
7
|
+
}
|
|
8
|
+
interface StreamBoundaryState {
|
|
9
|
+
resetKey: string;
|
|
10
|
+
failure: {
|
|
11
|
+
error: unknown;
|
|
12
|
+
} | null;
|
|
13
|
+
}
|
|
14
|
+
export declare class StreamBoundary extends Component<StreamBoundaryProps, StreamBoundaryState> {
|
|
15
|
+
state: StreamBoundaryState;
|
|
16
|
+
static getDerivedStateFromError(error: unknown): Partial<StreamBoundaryState>;
|
|
17
|
+
static getDerivedStateFromProps(props: StreamBoundaryProps, state: StreamBoundaryState): Partial<StreamBoundaryState> | null;
|
|
18
|
+
render(): string | number | bigint | boolean | Iterable<ReactNode> | Promise<string | number | bigint | boolean | import("react").ReactPortal | import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>> | Iterable<ReactNode> | null | undefined> | import("react").JSX.Element | null | undefined;
|
|
19
|
+
}
|
|
20
|
+
export {};
|
package/types/ui/Load/Units.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { DataList } from "akanjs/base";
|
|
2
2
|
import type { ClientInit } from "akanjs/fetch";
|
|
3
3
|
import { type ReactNode, type RefObject } from "react";
|
|
4
|
+
import type { StreamError } from "./StreamBoundary.d.ts";
|
|
4
5
|
interface DefaultProps<L extends {
|
|
5
6
|
id: string;
|
|
6
7
|
}> {
|
|
@@ -11,6 +12,7 @@ interface DefaultProps<L extends {
|
|
|
11
12
|
from?: number;
|
|
12
13
|
to?: number;
|
|
13
14
|
loading?: ReactNode;
|
|
15
|
+
error?: StreamError;
|
|
14
16
|
filter?: (item: L, idx: number) => boolean;
|
|
15
17
|
sort?: (a: L, b: L) => number;
|
|
16
18
|
/** Placeholder for a slice with no rows. Takes precedence over `renderEmpty`. */
|
package/types/ui/Load/View.d.ts
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import type { ClientView } from "akanjs/fetch";
|
|
2
2
|
import { type ReactNode } from "react";
|
|
3
|
+
import type { StreamError } from "./StreamBoundary.d.ts";
|
|
3
4
|
interface DefaultProps<_T extends string, M> {
|
|
4
5
|
className?: string;
|
|
5
6
|
/** Renders the model without the default wrapper div. */
|
|
6
7
|
noDiv?: boolean;
|
|
7
8
|
loading?: ReactNode;
|
|
8
9
|
empty?: ReactNode;
|
|
10
|
+
error?: StreamError;
|
|
9
11
|
renderView: (model: M) => ReactNode;
|
|
10
12
|
}
|
|
11
13
|
interface ViewProps<T extends string, Full extends {
|
|
@@ -9,4 +9,5 @@ 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. */
|
|
12
13
|
export declare const groupByOwner: <Item>(items: Item[], originOf: (item: Item) => string[] | undefined, order: string[]) => [string, Item[]][];
|
package/types/ui/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { type AgentReferenceInput, useAgentReference } from "akanjs/store";
|
|
2
|
-
export { AgentProvider, type AgentProviderProps, type AgentRunner, AgentSession, type AgentSessionOptions, type ChatMessage, type CompactOptions, type ContextBlock, httpRunner, type MessageAttachment, type MessageReference, type PublishedTool, Reference, type RunnerEvent, type RunnerRequest, SessionContext, type SessionHistory, type SurfaceView, useAgent, } from "../vendor/use-agentic.d.ts";
|
|
2
|
+
export { type AgentClientToolDefinition, AgentClientTools, AgentProvider, type AgentProviderProps, type AgentRunner, AgentSession, type AgentSessionOptions, type ChatMessage, type CompactOptions, type ContextBlock, httpRunner, type MessageAttachment, type MessageReference, type PublishedTool, Reference, type RunnerEvent, type RunnerRequest, SessionContext, type SessionHistory, type SurfaceView, type ToolApprovalRequest, type ToolRunnerHost, useAgent, } from "../vendor/use-agentic.d.ts";
|
|
3
3
|
export { Agent } from "./Agent.d.ts";
|
|
4
4
|
export { type ApprovalProps, DefaultApproval } from "./Agent/Approval.d.ts";
|
|
5
5
|
export { Chips as AgentAttachments, type ChipsProps as AgentAttachmentsProps } from "./Agent/Attach.d.ts";
|
|
@@ -9,15 +9,20 @@ export declare const overlayZ: {
|
|
|
9
9
|
readonly modal: 120;
|
|
10
10
|
readonly approval: 130;
|
|
11
11
|
readonly toast: 140;
|
|
12
|
+
readonly agentPanelOverlaySunk: 145;
|
|
12
13
|
readonly agentPanel: 150;
|
|
14
|
+
readonly agentPanelOverlay: 160;
|
|
15
|
+
readonly agentPanelCardOverlay: 170;
|
|
13
16
|
readonly reconnect: 200;
|
|
14
17
|
};
|
|
18
|
+
export declare const useHoldsScrim: (layer: HTMLElement | null) => boolean;
|
|
15
19
|
/** Takes the scope from {@link useOverlayScope}. */
|
|
16
20
|
export declare const OverlayOwnerProvider: import("react").Provider<string>;
|
|
17
21
|
/** Nests under the enclosing scope as a `parent/child` path. */
|
|
18
22
|
export declare const useOverlayScope: (id: string) => string;
|
|
19
23
|
/** Spread onto every root an overlay portals out of its own tree. */
|
|
20
|
-
export declare const useOverlayLayerProps: () => {
|
|
24
|
+
export declare const useOverlayLayerProps: (scrim?: boolean) => {
|
|
25
|
+
"data-akan-scrim"?: string | undefined;
|
|
21
26
|
"data-akan-overlay": string;
|
|
22
27
|
};
|
|
23
28
|
/** True when the click landed in an overlay `scope`, or a scope nested in it, rendered; any other is outside. */
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
/** 뱃지 look — 시맨틱 variant × size, outline 플래그는 색을 유지한 외곽선 스타일. `<Badge>` 가 소비하며, recipes.badge 슬롯으로 교체 가능. */
|
|
2
2
|
export declare const badgeRecipe: (variants?: Omit<({
|
|
3
3
|
size?: "lg" | "md" | "sm" | "xs" | undefined;
|
|
4
|
-
variant?: "default" | "error" | "info" | "warning" | "success" | "primary" | "outline" | "secondary" | "accent" | "neutral" | undefined;
|
|
5
4
|
outline?: boolean | undefined;
|
|
5
|
+
variant?: "default" | "error" | "info" | "warning" | "success" | "primary" | "outline" | "secondary" | "accent" | "neutral" | undefined;
|
|
6
6
|
} & {
|
|
7
7
|
class?: import("tailwind-variants/lite").ClassValue;
|
|
8
8
|
className?: never;
|
|
9
9
|
}) | ({
|
|
10
10
|
size?: "lg" | "md" | "sm" | "xs" | undefined;
|
|
11
|
-
variant?: "default" | "error" | "info" | "warning" | "success" | "primary" | "outline" | "secondary" | "accent" | "neutral" | undefined;
|
|
12
11
|
outline?: boolean | undefined;
|
|
12
|
+
variant?: "default" | "error" | "info" | "warning" | "success" | "primary" | "outline" | "secondary" | "accent" | "neutral" | undefined;
|
|
13
13
|
} & {
|
|
14
14
|
class?: never;
|
|
15
15
|
className?: import("tailwind-variants/lite").ClassValue;
|
|
16
|
-
}), "
|
|
16
|
+
}), "className" | "class"> | undefined, className?: import("tailwind-merge").ClassNameValue) => string;
|
|
17
17
|
export type BadgeVariants = NonNullable<Parameters<typeof badgeRecipe>[0]>;
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
/** 버튼 look — 시맨틱 variant × size × shape, outline 플래그는 색을 유지한 외곽선 스타일. `<Button>` 이 소비하며, `_overrides.tsx` 의 recipes.button 슬롯으로 교체 가능. */
|
|
2
2
|
export declare const buttonRecipe: (variants?: Omit<({
|
|
3
3
|
size?: "xl" | "lg" | "md" | "sm" | "xs" | "icon" | undefined;
|
|
4
|
-
variant?: "default" | "link" | "info" | "warning" | "success" | "primary" | "outline" | "secondary" | "accent" | "destructive" | "neutral" | "ghost" | undefined;
|
|
5
4
|
outline?: boolean | undefined;
|
|
5
|
+
variant?: "default" | "link" | "info" | "warning" | "success" | "destructive" | "primary" | "outline" | "secondary" | "accent" | "neutral" | "ghost" | undefined;
|
|
6
6
|
shape?: "default" | "circle" | "square" | undefined;
|
|
7
7
|
} & {
|
|
8
8
|
class?: import("tailwind-variants/lite").ClassValue;
|
|
9
9
|
className?: never;
|
|
10
10
|
}) | ({
|
|
11
11
|
size?: "xl" | "lg" | "md" | "sm" | "xs" | "icon" | undefined;
|
|
12
|
-
variant?: "default" | "link" | "info" | "warning" | "success" | "primary" | "outline" | "secondary" | "accent" | "destructive" | "neutral" | "ghost" | undefined;
|
|
13
12
|
outline?: boolean | undefined;
|
|
13
|
+
variant?: "default" | "link" | "info" | "warning" | "success" | "destructive" | "primary" | "outline" | "secondary" | "accent" | "neutral" | "ghost" | undefined;
|
|
14
14
|
shape?: "default" | "circle" | "square" | undefined;
|
|
15
15
|
} & {
|
|
16
16
|
class?: never;
|
|
17
17
|
className?: import("tailwind-variants/lite").ClassValue;
|
|
18
|
-
}), "
|
|
18
|
+
}), "className" | "class"> | undefined, className?: import("tailwind-merge").ClassNameValue) => string;
|
|
19
19
|
export type ButtonVariants = NonNullable<Parameters<typeof buttonRecipe>[0]>;
|
|
@@ -13,5 +13,5 @@ export declare const inputRecipe: (variants?: Omit<({
|
|
|
13
13
|
} & {
|
|
14
14
|
class?: never;
|
|
15
15
|
className?: import("tailwind-variants/lite").ClassValue;
|
|
16
|
-
}), "
|
|
16
|
+
}), "className" | "class"> | undefined, className?: import("tailwind-merge").ClassNameValue) => string;
|
|
17
17
|
export type InputSurfaceVariants = NonNullable<Parameters<typeof inputRecipe>[0]>;
|
|
@@ -142,9 +142,13 @@ export interface AndroidManifest extends NativeSubset {
|
|
|
142
142
|
*/
|
|
143
143
|
minSdk?: number;
|
|
144
144
|
}
|
|
145
|
+
export declare const DESKTOP_OSES: readonly ["macos", "windows", "linux"];
|
|
146
|
+
export type DesktopOs = (typeof DESKTOP_OSES)[number];
|
|
145
147
|
/** Desktop Bun module that implements only some methods (the rest are UNSUPPORTED, or web with `web: true`). */
|
|
146
148
|
export interface DesktopManifest extends NativeSubset {
|
|
147
149
|
module: string;
|
|
150
|
+
/** The methods one desktop OS lacks: left out of that OS's declaration, so `isSupported()` is false there only. */
|
|
151
|
+
unsupported?: Partial<Record<DesktopOs, string[]>>;
|
|
148
152
|
}
|
|
149
153
|
export interface PluginManifest {
|
|
150
154
|
id: string;
|
|
@@ -24,6 +24,7 @@ export declare function recoveryScript(exe: string, moves: [string, string][], s
|
|
|
24
24
|
* read as text: an execution policy that refuses .ps1 files does not apply to it, as it does not to -EncodedCommand.
|
|
25
25
|
*/
|
|
26
26
|
export declare function recoveryCommand(script: string): string | null;
|
|
27
|
+
export declare const appLauncher: (env?: NodeJS.ProcessEnv, exe?: string) => string;
|
|
27
28
|
/**
|
|
28
29
|
* Once this process has exited: renames `moves` in order and starts `exe` with this environment. macOS and
|
|
29
30
|
* Linux rename a running app's folder right away, so only the start waits; Windows refuses that, so a helper
|
|
@@ -22,6 +22,15 @@ export interface AppearanceApi {
|
|
|
22
22
|
set(args: {
|
|
23
23
|
mode: AppearanceSetting;
|
|
24
24
|
}): Promise<void>;
|
|
25
|
+
/**
|
|
26
|
+
* iOS and Android: the color the page paints under the status bar, as `#rrggbb`. The bar's icons turn dark on a light
|
|
27
|
+
* color and light on a dark one; null hands them back to the shell (the appearance on iOS, the app's background color
|
|
28
|
+
* on Android). The page keeps drawing under the bar, so the bar gets no background of its own, and the setting ends
|
|
29
|
+
* with the page's document. Not available on the web or the desktop (UNSUPPORTED).
|
|
30
|
+
*/
|
|
31
|
+
setThemeColor(args: {
|
|
32
|
+
color: string | null;
|
|
33
|
+
}): Promise<void>;
|
|
25
34
|
}
|
|
26
35
|
export interface AppearanceEvents {
|
|
27
36
|
/** `mode` or `setting` changed: an OS switch while following the system, or set(). */
|
|
@@ -9,8 +9,10 @@ import { type FileRef } from "../../../packages/core/src/index.ts";
|
|
|
9
9
|
* permissions and links another program would open (`mailto:`, a custom scheme) are refused. Listing the plugin in
|
|
10
10
|
* `native.plugins` is what lets an app open one.
|
|
11
11
|
*
|
|
12
|
-
* Windows has every method.
|
|
13
|
-
*
|
|
12
|
+
* Windows has every method. Linux has every method and sends no `consoleMessage`; there the visible view shown last
|
|
13
|
+
* also holds the keyboard focus inside its window, so the user's own keys reach it, until a click on the page takes the
|
|
14
|
+
* focus or the view is hidden or closed. macOS (14 or later, for its separate profile) has all but `sendKey`,
|
|
15
|
+
* `setMuted` and `capture`, and sends no `loadFailed` or `consoleMessage`. iOS and Android: UNSUPPORTED.
|
|
14
16
|
*/
|
|
15
17
|
export type ExternalViewBounds = "fill" | {
|
|
16
18
|
x: number;
|
|
@@ -32,7 +34,7 @@ export interface ExternalViewOpenOptions {
|
|
|
32
34
|
* with `evaluate`. It may not declare `__akanTopOnly`, and an empty one registers nothing.
|
|
33
35
|
*/
|
|
34
36
|
initScript?: string;
|
|
35
|
-
/**
|
|
37
|
+
/** macOS refuses `true` as UNSUPPORTED. */
|
|
36
38
|
muted?: boolean;
|
|
37
39
|
/** Media plays with sound without a gesture first (default true): nobody taps a signage screen. */
|
|
38
40
|
autoplay?: boolean;
|
|
@@ -53,7 +55,7 @@ export interface ExternalViewApi {
|
|
|
53
55
|
/**
|
|
54
56
|
* Opens the view, or brings an open one with this id to these options (a page that mounts again finds it). Another
|
|
55
57
|
* `initScript` builds the view again and loads its page anew, as does another `console` on Windows and another
|
|
56
|
-
* `autoplay` on macOS; Windows refuses another `autoplay` as UNSUPPORTED, before anything is built.
|
|
58
|
+
* `autoplay` on macOS and Linux; Windows refuses another `autoplay` as UNSUPPORTED, before anything is built.
|
|
57
59
|
*/
|
|
58
60
|
open(args: ExternalViewOpenOptions): Promise<ExternalViewState>;
|
|
59
61
|
/** Rejects NOT_ALLOWED for a URL on none of its `allowOrigins`. */
|
|
@@ -88,13 +90,16 @@ export interface ExternalViewApi {
|
|
|
88
90
|
}): Promise<{
|
|
89
91
|
value: unknown;
|
|
90
92
|
}>;
|
|
91
|
-
/**
|
|
93
|
+
/**
|
|
94
|
+
* A trusted key press (`{ key: "z", code: "KeyZ" }`), whether or not the view has the focus. Not on macOS; on Linux
|
|
95
|
+
* UNSUPPORTED while the view's window is hidden.
|
|
96
|
+
*/
|
|
92
97
|
sendKey(args: {
|
|
93
98
|
id: string;
|
|
94
99
|
key: string;
|
|
95
100
|
code: string;
|
|
96
101
|
}): Promise<void>;
|
|
97
|
-
/** The view's own sound only; the system volume is the volume plugin's.
|
|
102
|
+
/** The view's own sound only; the system volume is the volume plugin's. Not on macOS. */
|
|
98
103
|
setMuted(args: {
|
|
99
104
|
id: string;
|
|
100
105
|
muted: boolean;
|
|
@@ -103,7 +108,7 @@ export interface ExternalViewApi {
|
|
|
103
108
|
clearData(args: {
|
|
104
109
|
id: string;
|
|
105
110
|
}): Promise<void>;
|
|
106
|
-
/** A PNG of the view's content (not the screen), kept until its next capture or the next launch.
|
|
111
|
+
/** A PNG of the view's content (not the screen), kept until its next capture or the next launch. Not on macOS. */
|
|
107
112
|
capture(args: {
|
|
108
113
|
id: string;
|
|
109
114
|
}): Promise<FileRef & {
|
|
@@ -120,7 +125,8 @@ export interface ExternalViewEvents {
|
|
|
120
125
|
/**
|
|
121
126
|
* A navigation that failed. `errorCode`: `http<status>` for a server's 4xx or 5xx page, else WebView2's own
|
|
122
127
|
* (`hostNameNotResolved`, `cannotConnect`, `timeout`, `certificate`, `disconnected`, …; a refused connection is
|
|
123
|
-
* `unknown`).
|
|
128
|
+
* `unknown`). Linux names the same failures by those names (a refused connection is `cannotConnect`) and any other
|
|
129
|
+
* `unknown`. Not on macOS.
|
|
124
130
|
*/
|
|
125
131
|
loadFailed: {
|
|
126
132
|
id: string;
|
|
@@ -128,9 +134,10 @@ export interface ExternalViewEvents {
|
|
|
128
134
|
errorCode: string;
|
|
129
135
|
};
|
|
130
136
|
/**
|
|
131
|
-
* Its web process ended (`reason`: `crashed`, `unresponsive` or `browserExited` on Windows, `terminated` on macOS
|
|
132
|
-
* the view loads its page again by itself, sooner the first times, and an end
|
|
133
|
-
* again. `rebuildFailed`: after its browser exited the view could not be built
|
|
137
|
+
* Its web process ended (`reason`: `crashed`, `unresponsive` or `browserExited` on Windows, `terminated` on macOS,
|
|
138
|
+
* `crashed`, `killed` or `oom` on Linux); the view loads its page again by itself, sooner the first times, and an end
|
|
139
|
+
* while that waits is not reported again. `rebuildFailed`: after its browser exited the view could not be built
|
|
140
|
+
* again, and is closed; open it again.
|
|
134
141
|
*/
|
|
135
142
|
gone: {
|
|
136
143
|
id: string;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { type ToolRunnerHost } from "./ToolRunner.d.ts";
|
|
2
|
+
import type { PublishedTool, SurfaceView, ToolCallRequest, ToolCallResult } from "./types.d.ts";
|
|
3
|
+
/** `readOnly` is always `false`: a screen tool declares no such flag, so a server loop counts every one as a write. */
|
|
4
|
+
export interface AgentClientToolDefinition extends PublishedTool {
|
|
5
|
+
readOnly: false;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* A screen's tools lent to an agent loop that runs on the server: `list()` is what that loop takes as its client
|
|
9
|
+
* tools, and `run(call)` answers a call it parked. A call goes through the same `ToolRunner` as the in-page chat, so a
|
|
10
|
+
* `confirm` still asks through `host.approve` (refused without one), a card needs `host.card`, and the answer is
|
|
11
|
+
* clipped and fenced as the chat's would be.
|
|
12
|
+
*/
|
|
13
|
+
export declare class AgentClientTools {
|
|
14
|
+
#private;
|
|
15
|
+
constructor(surface?: SurfaceView, host?: ToolRunnerHost);
|
|
16
|
+
list(): AgentClientToolDefinition[];
|
|
17
|
+
/** Never throws: a tool no longer on the screen, a refusal and a failure all come back as the result's `error`. */
|
|
18
|
+
run(call: ToolCallRequest, signal?: AbortSignal): Promise<ToolCallResult>;
|
|
19
|
+
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export declare const isFailureCode: (value: unknown) => value is string;
|
|
2
|
+
export declare const codeOfStatus: (status: number) => string;
|
|
3
|
+
export declare const codeOfAnswer: (status: number, body: unknown) => string;
|
|
4
|
+
export declare const failureCodeOf: (value: unknown) => string | undefined;
|
|
@@ -146,6 +146,11 @@ export interface ToolCallResult {
|
|
|
146
146
|
/** What the call changed on the surface — the whole report for a tool that returns nothing. */
|
|
147
147
|
changes?: ResourceDiff[];
|
|
148
148
|
error?: string;
|
|
149
|
+
/**
|
|
150
|
+
* The failure's code, when what the tool threw named one, so the model can branch on it rather than on `error`.
|
|
151
|
+
* Never on a `taint: "source"` tool's result, whose text is fenced as page content.
|
|
152
|
+
*/
|
|
153
|
+
code?: string;
|
|
149
154
|
/**
|
|
150
155
|
* Files the call handed the model — a picture it looked at — in the shape a user's attachment takes. A `result`
|
|
151
156
|
* cannot carry one: it reaches the model as JSON text, so a URL is read as letters and base64 as a wall of them.
|
|
@@ -241,6 +246,8 @@ export interface ChatMessage {
|
|
|
241
246
|
toolResults?: ToolCallResult[];
|
|
242
247
|
/** A failed or capped turn, recorded in the transcript rather than thrown past it. */
|
|
243
248
|
error?: string;
|
|
249
|
+
/** The code the runner named that failure by, for a host to branch on where `error` is text. Never sent. */
|
|
250
|
+
errorCode?: string;
|
|
244
251
|
/**
|
|
245
252
|
* Host-rendered and never sent: a command's own output belongs in the transcript the user reads but not in the
|
|
246
253
|
* history the model reads, which would take it for something it had said itself.
|
|
@@ -284,10 +291,14 @@ export type RunnerEvent = {
|
|
|
284
291
|
*
|
|
285
292
|
* `overflow` marks the provider refusing a prompt too long for its window — the one refusal a session can undo
|
|
286
293
|
* on its own, by compacting and asking again. `limit` is the window when the refusal named it.
|
|
294
|
+
*
|
|
295
|
+
* `code` names the failure for a host to branch on, since `message` may reach it already translated: a
|
|
296
|
+
* dictionary key (`<module>.error.<key>`) or a camelCase token, never prose.
|
|
287
297
|
*/
|
|
288
298
|
| {
|
|
289
299
|
type: "error";
|
|
290
300
|
message: string;
|
|
301
|
+
code?: string;
|
|
291
302
|
data?: Record<string, string | number>;
|
|
292
303
|
overflow?: {
|
|
293
304
|
limit?: number;
|
|
@@ -4,6 +4,8 @@ interface GuardedLocation {
|
|
|
4
4
|
pathRoute: PathRoute;
|
|
5
5
|
params: Record<string, string>;
|
|
6
6
|
searchParams: Record<string, string | string[]>;
|
|
7
|
+
pathname?: string;
|
|
8
|
+
search?: string;
|
|
7
9
|
}
|
|
8
10
|
/**
|
|
9
11
|
* A CSR navigation's route guards, run before any of its layers draws. On the client a guard refuses by moving the
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Component, type ReactNode } from "react";
|
|
2
|
+
interface RouteLevelBoundaryProps {
|
|
3
|
+
children?: ReactNode;
|
|
4
|
+
}
|
|
5
|
+
interface RouteLevelBoundaryState {
|
|
6
|
+
children?: ReactNode;
|
|
7
|
+
failure: {
|
|
8
|
+
error: unknown;
|
|
9
|
+
} | null;
|
|
10
|
+
}
|
|
11
|
+
export declare class RouteLevelBoundary extends Component<RouteLevelBoundaryProps, RouteLevelBoundaryState> {
|
|
12
|
+
state: RouteLevelBoundaryState;
|
|
13
|
+
static getDerivedStateFromError(error: unknown): Partial<RouteLevelBoundaryState>;
|
|
14
|
+
static getDerivedStateFromProps(props: RouteLevelBoundaryProps, state: RouteLevelBoundaryState): Partial<RouteLevelBoundaryState> | null;
|
|
15
|
+
render(): string | number | bigint | boolean | Iterable<ReactNode> | Promise<string | number | bigint | boolean | import("react").ReactPortal | import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>> | Iterable<ReactNode> | null | undefined> | import("react").JSX.Element | null | undefined;
|
|
16
|
+
}
|
|
17
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { AkanNativeError, fileBlob, releaseFile } from "../vendor/@akanjs/native/packages/core/src/index.d.ts";
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { IapTransaction } from "akanjs/client/native";
|
|
2
|
+
export declare const loadIap: () => Promise<typeof import("akanjs/client/native/iap")>;
|
|
2
3
|
export type PurchaseProductType = "consumable" | "nonConsumable" | "subscription";
|
|
3
4
|
export interface PurchaseProductInfo {
|
|
4
5
|
id: string;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { CsrLocationState } from "./useCsrLocationState.d.ts";
|
|
2
|
+
import type { CsrRefs } from "./useCsrRefs.d.ts";
|
|
3
|
+
import { type useFrameSlots, type useFrameViewport } from "./useFrameRuntime.d.ts";
|
|
4
|
+
import type { ResolvedFrame } from "./useResolvedFrame.d.ts";
|
|
5
|
+
export declare const useCsrKeyboard: ({ viewport, updateViewport, frameSlots, phase, resolvedLocation, pageContentRef, }: {
|
|
6
|
+
viewport: ReturnType<typeof useFrameViewport>["viewport"];
|
|
7
|
+
updateViewport: ReturnType<typeof useFrameViewport>["updateViewport"];
|
|
8
|
+
frameSlots: ReturnType<typeof useFrameSlots>["frameSlots"];
|
|
9
|
+
phase: CsrLocationState["phase"];
|
|
10
|
+
resolvedLocation: ResolvedFrame["resolvedLocation"];
|
|
11
|
+
pageContentRef: CsrRefs["pageContentRef"];
|
|
12
|
+
}) => {
|
|
13
|
+
platformProfile: import("akanjs/client").FramePlatformProfile;
|
|
14
|
+
accessoryHeight: number;
|
|
15
|
+
shouldAnchorContentBottom: boolean;
|
|
16
|
+
keyboardFrame: import("akanjs/client").KeyboardFrameState;
|
|
17
|
+
keyboardLayout: Pick<import("akanjs/client").FrameLayoutState, "keyboardAccessory" | "contentViewport">;
|
|
18
|
+
};
|
|
19
|
+
export type CsrKeyboard = ReturnType<typeof useCsrKeyboard>;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { type LocationState, type RouteGuide } from "akanjs/client";
|
|
2
|
+
export declare const useCsrLocationState: (rootRouteGuide: RouteGuide) => {
|
|
3
|
+
getLocation: (href: string) => import("akanjs/client").Location;
|
|
4
|
+
history: import("react").RefObject<import("akanjs/client").History>;
|
|
5
|
+
setHistoryForward: ({ type, location, scrollTop, scrollToTop }: import("./useHistory.d.ts").setForwardOptions) => void;
|
|
6
|
+
setHistoryBack: ({ location, scrollTop, scrollToTop }: import("./useHistory.d.ts").setBackOptions) => void;
|
|
7
|
+
setHistoryJump: (idx: number, scrollTop?: number) => void;
|
|
8
|
+
getNextLocation: () => import("akanjs/client").Location | null;
|
|
9
|
+
getCurrentLocation: () => import("akanjs/client").Location;
|
|
10
|
+
getPrevLocation: () => import("akanjs/client").Location | null;
|
|
11
|
+
getScrollTop: (location: import("akanjs/client").Location) => number;
|
|
12
|
+
isBackgrounded: boolean;
|
|
13
|
+
setIsBackgrounded: import("react").Dispatch<import("react").SetStateAction<boolean>>;
|
|
14
|
+
setLocationState: import("react").Dispatch<import("react").SetStateAction<LocationState>>;
|
|
15
|
+
location: import("akanjs/client").Location;
|
|
16
|
+
prevLocation: import("akanjs/client").Location | null;
|
|
17
|
+
pendingLocation: import("akanjs/client").Location | null;
|
|
18
|
+
navigationIntent: import("akanjs/client").NavigationIntent | null;
|
|
19
|
+
phase: import("akanjs/client").CsrNavigationPhase;
|
|
20
|
+
};
|
|
21
|
+
export type CsrLocationState = ReturnType<typeof useCsrLocationState>;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { type LocationState, type NavigationIntent, type PageState, type RouteOptions } from "akanjs/client";
|
|
2
|
+
import type { CsrKeyboard } from "./useCsrKeyboard.d.ts";
|
|
3
|
+
import type { CsrLocationState } from "./useCsrLocationState.d.ts";
|
|
4
|
+
import { type CsrRefs } from "./useCsrRefs.d.ts";
|
|
5
|
+
import { type useFrameSlots, type useFrameViewport } from "./useFrameRuntime.d.ts";
|
|
6
|
+
import type { ResolvedFrame } from "./useResolvedFrame.d.ts";
|
|
7
|
+
interface CsrNavigationInput {
|
|
8
|
+
viewport: ReturnType<typeof useFrameViewport>["viewport"];
|
|
9
|
+
slots: ReturnType<typeof useFrameSlots>;
|
|
10
|
+
setTransitionPageStateSnapshot: (snapshot: Map<string, PageState> | null) => void;
|
|
11
|
+
refs: CsrRefs;
|
|
12
|
+
nav: CsrLocationState;
|
|
13
|
+
frame: ResolvedFrame;
|
|
14
|
+
keyboard: CsrKeyboard;
|
|
15
|
+
}
|
|
16
|
+
export declare const useCsrNavigation: ({ viewport, slots, setTransitionPageStateSnapshot, refs, nav, frame, keyboard: { keyboardFrame }, }: CsrNavigationInput) => {
|
|
17
|
+
shouldPrepareFrameTransition: (nextHref?: string) => boolean;
|
|
18
|
+
startFrameTransition: () => Promise<void>;
|
|
19
|
+
settle: (prev: LocationState["prevLocation"]) => void;
|
|
20
|
+
cancelPendingNavigation: () => NavigationIntent | null;
|
|
21
|
+
broadcastSyncNavigation: (kind: "replace" | "pop" | "push" | "back", href: string) => void;
|
|
22
|
+
runForwardNavigation: (kind: "push" | "replace", href: string, { scrollToTop }?: RouteOptions) => void;
|
|
23
|
+
};
|
|
24
|
+
export type CsrNavigation = ReturnType<typeof useCsrNavigation>;
|
|
25
|
+
export {};
|