akanjs 3.2.0-rc.8 → 3.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/ARCHITECTURE.md +41 -38
- package/CHANGELOG.md +0 -679
- package/CONTRIBUTING.md +3 -0
- package/base/base.ts +2 -1
- package/client/clientRuntime.ts +1 -0
- package/client/cn.ts +2 -2
- package/client/csrTypes.ts +2 -0
- package/client/frameConfig.ts +1 -0
- package/client/index.ts +249 -26
- package/client/locale.ts +1 -0
- package/client/makePageProto.tsx +12 -85
- package/client/nativeThemeColor.ts +51 -0
- package/client/route/PageDefinition.ts +11 -3
- package/client/route/RouteDefinition.ts +24 -7
- package/client/route/RouteGuards.ts +2 -1
- package/client/route/RouteHead.ts +4 -1
- package/client/route/routeArgs.ts +8 -0
- package/client/router.ts +17 -2
- package/client/rscNavigation.ts +1 -0
- package/client/viewportMeta.ts +86 -6
- package/common/CodeTranscript.ts +1 -1
- package/common/Logger.ts +4 -2
- package/common/PipelinePlanSchema.ts +2 -2
- package/common/clientAddress.ts +14 -0
- package/common/err.ts +122 -0
- package/common/eventStream.ts +71 -19
- package/common/facetBarrel.ts +38 -0
- package/common/index.ts +7 -0
- package/common/isGuardRefusal.ts +14 -0
- package/common/loggedFailure.ts +11 -0
- package/common/mcpExposure.ts +17 -4
- package/common/pipelinePlan.ts +1 -1
- package/common/routeConvention.ts +3 -1
- package/common/types.ts +18 -1
- package/constant/constantRegistry.ts +4 -8
- package/constant/crystalize.ts +1 -2
- package/constant/getDefault.ts +1 -1
- package/constant/immerify.ts +1 -1
- package/constant/index.ts +78 -21
- package/constant/purify.ts +4 -9
- package/constant/serialize.ts +4 -2
- package/constant/types.ts +1 -0
- package/constant/via.ts +1 -2
- package/dictionary/agent.dictionary.ts +12 -0
- package/dictionary/base.dictionary.ts +11 -0
- package/dictionary/locale.ts +1 -1
- package/dictionary/trans.ts +14 -97
- package/document/dataLoader.ts +39 -19
- package/document/databaseRegistry.ts +2 -1
- package/document/documentSchema.ts +1 -0
- package/document/filterMeta.ts +4 -1
- package/document/into.ts +2 -1
- package/document/loaderInfo.ts +2 -1
- package/document/noDocumentError.ts +4 -1
- package/document/queryEvaluator.ts +1 -1
- package/document/types.ts +1 -1
- package/fetch/client/fetchClient.ts +83 -269
- package/fetch/client/fetchClientTypes.ts +49 -0
- package/fetch/client/httpClient.ts +3 -2
- package/fetch/client/remoteError.ts +4 -20
- package/fetch/client/requestScope.ts +41 -0
- package/fetch/client/signalCatalog.ts +131 -0
- package/fetch/client/wsClient.ts +82 -6
- package/fetch/requestStorage.ts +1 -0
- package/package.json +1 -1
- package/server/agentHooks.ts +16 -0
- package/server/akanApp.ts +110 -1272
- package/server/akanOption.ts +30 -3
- package/server/akanServer.ts +179 -674
- package/server/artifact/builderRpc.ts +14 -6
- package/server/artifact/routeSeedIndexStore.ts +4 -2
- package/server/assetHeaders.ts +6 -0
- package/server/console.ts +6 -4
- package/server/decorators.ts +2 -2
- package/server/di/diLifecycle.ts +24 -35
- package/server/di/predefinedAdaptor.ts +24 -1
- package/server/di/resolveHierarchy.ts +19 -6
- package/server/di/stageFailedError.ts +10 -0
- package/server/di/utils.ts +8 -3
- package/server/ed25519Key.ts +31 -15
- package/server/flightRowReader.ts +106 -20
- package/server/gateway/childSupervisor.ts +328 -0
- package/server/gateway/devHostChannel.ts +47 -0
- package/server/gateway/gatewayChildren.ts +161 -0
- package/server/gateway/gatewayConfig.ts +182 -0
- package/server/gateway/gatewayHttpProxy.ts +231 -0
- package/server/gateway/gatewayLogging.ts +111 -0
- package/server/gateway/gatewayRooms.ts +141 -0
- package/server/gateway/gatewayStatus.ts +122 -0
- package/server/gateway/gatewayStatusPage.ts +54 -0
- package/server/gateway/gatewayWebSocketRelay.ts +149 -0
- package/server/gateway/listeningPort.ts +13 -0
- package/server/hmr/devHmrController.ts +10 -1
- package/server/htmlResultCache.ts +234 -0
- package/server/imageOptimizer.ts +4 -1
- package/server/index.ts +281 -17
- package/server/lifecycle/parentChannel.ts +79 -0
- package/server/lifecycle/shutdownManager.ts +6 -3
- package/server/lifecycle/startGuard.ts +90 -0
- package/server/logging/hubFileSink.ts +1 -0
- package/server/logging/logControlSocket.ts +42 -3
- package/server/logging/logHub.ts +0 -0
- package/server/logging/logStdoutWriter.ts +3 -1
- package/server/logging/logStreamRoute.ts +28 -11
- package/server/logging/serverLogging.ts +74 -0
- package/server/machine/machineToken.ts +10 -3
- package/server/mcp/AgentTools.ts +149 -0
- package/server/mcp/AgentToolsAccount.ts +26 -0
- package/server/mcp/McpApps.ts +32 -2
- package/server/mcp/McpDispatcher.ts +44 -30
- package/server/mcp/McpPages.ts +34 -12
- package/server/mcp/McpRateLimiter.ts +14 -0
- package/server/mcp/McpRouter.ts +4 -2
- package/server/mcp/McpUiSession.ts +2 -1
- package/server/mcp/index.ts +1 -0
- package/server/migration/migrationCommand.ts +31 -2
- package/server/migration/migrationRunner.ts +36 -1
- package/server/nativeFile.ts +39 -12
- package/server/nativeSecret.ts +12 -3
- package/server/oauth/OAuthClientIdMetadata.ts +2 -2
- package/server/ops/migrateJobs.ts +2 -2
- package/server/ops/opsCommand.ts +1 -1
- package/server/ops/opsRoute.ts +5 -1
- package/server/ops/opsToken.ts +3 -1
- package/server/remote/RemoteFetch.ts +161 -0
- package/server/remote/RemoteMcp.ts +242 -0
- package/server/remote/RemoteOAuth.ts +270 -0
- package/server/remote/RemoteSource.ts +214 -0
- package/server/remote/index.ts +17 -0
- package/server/remote/remoteError.ts +19 -0
- package/server/resolver/CascadeRunner.ts +20 -8
- package/server/resolver/database.resolver.ts +10 -417
- package/server/resolver/databaseModelInstance.ts +209 -0
- package/server/resolver/invalidSignal.ts +7 -0
- package/server/resolver/livePause.ts +34 -0
- package/server/resolver/modelFacade.ts +136 -0
- package/server/resolver/modelLoaders.ts +84 -0
- package/server/resolver/modelSchema.ts +52 -0
- package/server/resolver/roomAdmission.ts +68 -0
- package/server/resolver/signal.resolver.ts +45 -111
- package/server/resolver/sliceCrud.ts +63 -0
- package/server/resolver/timedQuery.ts +16 -0
- package/server/resolver/websocketOf.ts +2 -1
- package/server/routeElementComposer.tsx +45 -6
- package/server/routeTreeBuilder.ts +23 -9
- package/server/routing/apiRouter.ts +53 -28
- package/server/routing/builtinRoutes.ts +194 -0
- package/server/routing/localRooms.ts +34 -0
- package/server/routing/roomReplay.ts +2 -2
- package/server/routing/serverLimits.ts +4 -1
- package/server/routing/serverListener.ts +194 -0
- package/server/rscClient.tsx +122 -195
- package/server/rscClientCache.ts +165 -0
- package/server/rscClientChunks.ts +126 -8
- package/server/rscClientFetch.ts +9 -2
- package/server/rscClientPatch.ts +78 -15
- package/server/rscDocumentHead.tsx +177 -0
- package/server/rscFlightRenderer.ts +83 -0
- package/server/rscFlightStream.ts +259 -0
- package/server/rscHostReloads.ts +238 -0
- package/server/rscHostRenderStream.ts +297 -0
- package/server/rscHostRequests.ts +158 -0
- package/server/rscHttp.ts +18 -6
- package/server/rscNavigationState.ts +24 -1
- package/server/rscPagePrompts.ts +65 -14
- package/server/rscPrefetchCache.ts +31 -17
- package/server/rscRenderControl.ts +33 -0
- package/server/rscRenderFallbacks.ts +299 -0
- package/server/rscRenderHandler.ts +439 -0
- package/server/rscRenderStats.ts +49 -0
- package/server/rscResultCaches.ts +74 -0
- package/server/rscRouteDocument.tsx +316 -0
- package/server/rscSegmentOutletReference.ts +5 -1
- package/server/rscStaticApp.tsx +73 -0
- package/server/rscWorker.tsx +112 -1341
- package/server/rscWorkerHost.ts +175 -803
- package/server/rscWorkerProcess.ts +155 -0
- package/server/rscWorkerRecycler.ts +128 -0
- package/server/serverConfig.ts +128 -0
- package/server/serverMetrics.ts +52 -0
- package/server/sitemap.ts +1 -0
- package/server/ssrFromRscRenderer.tsx +20 -20
- package/server/ssrStaticApp.tsx +243 -0
- package/server/webArtifact.ts +86 -0
- package/server/webAssetRoutes.ts +84 -0
- package/server/webCsrSurface.ts +172 -0
- package/server/webDocumentRoute.ts +180 -0
- package/server/webRouteContext.ts +232 -0
- package/server/webRouter.ts +129 -1165
- package/server/webRscRoute.ts +155 -0
- package/server/webSiteFiles.ts +139 -0
- package/server/webStaticApp.ts +62 -0
- package/server/wellKnownRoutes.ts +73 -0
- package/service/agent.service.ts +14 -2
- package/service/agentAccounts.ts +19 -0
- package/service/agentLoop/agentLoop.ts +550 -0
- package/service/agentLoop/agentLoopTypes.ts +220 -0
- package/service/agentLoop/deltaStream.ts +40 -0
- package/service/agentLoop/loopAnswer.ts +67 -0
- package/service/agentLoop/loopAsk.ts +44 -0
- package/service/agentLoop/loopCompaction.ts +146 -0
- package/service/agentLoop/loopRemotes.ts +181 -0
- package/service/agentLoop/loopRequest.ts +120 -0
- package/service/agentLoop/loopStored.ts +24 -0
- package/service/agentLoop/loopToolOutput.ts +54 -0
- package/service/agentLoop/loopToolkits.ts +155 -0
- package/service/agentLoop/loopTranscript.ts +138 -0
- package/{signal → service}/agentMeter.ts +2 -1
- package/{signal → service}/agentRelayPolicy.ts +43 -8
- package/service/endpointCacheKeys.ts +14 -2
- package/service/index.ts +6 -0
- package/service/injectInfo.ts +2 -1
- package/service/ipcTypes.ts +8 -2
- package/service/liveRoomLimit.ts +68 -0
- package/service/liveRoomLimitError.ts +16 -0
- package/service/liveSyncHub.ts +24 -2
- package/service/predefinedAdaptor/agentTools.adaptor.ts +34 -0
- package/service/predefinedAdaptor/anthropicLlm.ts +33 -14
- package/service/predefinedAdaptor/compress.adaptor.ts +2 -2
- package/service/predefinedAdaptor/database.adaptor.ts +62 -19
- package/service/predefinedAdaptor/index.ts +1 -0
- package/service/predefinedAdaptor/llm.adaptor.ts +24 -1
- package/service/predefinedAdaptor/openaiDialect.ts +72 -23
- package/service/predefinedAdaptor/openaiLlm.ts +1 -1
- package/service/predefinedAdaptor/role.adaptor.ts +2 -0
- package/service/predefinedAdaptor/solidPubsub.adaptor.ts +35 -2
- package/service/predefinedAdaptor/solidQueue.adaptor.ts +2 -2
- package/service/predefinedAdaptor/solidSqlite.ts +6 -3
- package/service/predefinedAdaptor/sql/DocumentHydrator.ts +95 -0
- package/service/predefinedAdaptor/sql/DocumentRowCodec.ts +192 -0
- package/service/predefinedAdaptor/sql/DocumentWriter.ts +298 -0
- package/service/predefinedAdaptor/sql/QueryScope.ts +70 -0
- package/service/predefinedAdaptor/sql/QueryWriter.ts +200 -0
- package/service/predefinedAdaptor/sql/SqlDocumentStore.ts +127 -1069
- package/service/predefinedAdaptor/sql/SqlTableSchema.ts +357 -0
- package/service/predefinedAdaptor/sql/StoredRows.ts +95 -0
- package/service/predefinedAdaptor/sql/TransactionScope.ts +14 -7
- package/service/predefinedAdaptor/sql/dialect/postgres.ts +1 -1
- package/service/predefinedAdaptor/sql/dialect/sqlite.ts +1 -1
- package/service/predefinedAdaptor/sql/driver/bunSqlite.ts +20 -9
- package/service/predefinedAdaptor/sql/driver/postgres.ts +1 -1
- package/service/predefinedAdaptor/sql/types.ts +28 -4
- package/service/predefinedAdaptor/sseData.ts +88 -0
- package/service/predefinedAdaptor/storage.adaptor.ts +2 -1
- package/service/predefinedAdaptor/websocket.adaptor.ts +74 -44
- package/service/serviceRegistry.ts +1 -0
- package/signal/SignalFailure.ts +35 -0
- package/signal/agent.signal.ts +15 -9
- package/signal/agentTurnStream.ts +23 -9
- package/signal/byIdRead.ts +18 -0
- package/signal/carriedClientIps.ts +1 -0
- package/signal/endpointCache.ts +61 -6
- package/signal/endpointErrorContract.ts +1 -1
- package/signal/endpointRateLimit.ts +84 -3
- package/signal/index.ts +322 -32
- package/signal/mcp/McpDocument.ts +8 -1
- package/signal/mcp/mcpProtocol.ts +6 -1
- package/signal/mcp/pagePrompt.ts +15 -0
- package/signal/middleware.ts +10 -3
- package/signal/openapi/openapi.ts +10 -1
- package/signal/resolveFieldContext.ts +34 -0
- package/signal/serializer/fetch.serializer.ts +22 -15
- package/signal/signalContext.ts +15 -42
- package/signal/slice.ts +22 -19
- package/signal/trace.ts +44 -5
- package/signal/types.ts +46 -8
- package/store/action.ts +32 -1057
- package/store/actionErrorMessage.ts +20 -0
- package/store/actionOption.ts +22 -0
- package/store/baseSt.ts +1 -0
- package/store/formFieldSetters.ts +229 -0
- package/store/index.ts +125 -17
- package/store/modelActionContext.ts +65 -0
- package/store/modelOpenActions.ts +158 -0
- package/store/modelWriteActions.ts +240 -0
- package/store/modelWriteGuard.ts +3 -12
- package/store/openSeq.ts +34 -0
- package/store/sliceListActions.ts +370 -0
- package/store/sliceLiveActions.ts +140 -0
- package/store/stateBuilder.ts +2 -0
- package/store/storeInstance.ts +4 -18
- package/store/storeRegistry.ts +1 -1
- package/test/conformance.ts +25 -5
- package/types/base/base.d.ts +2 -1
- package/types/client/clientRuntime.d.ts +1 -0
- package/types/client/cn.d.ts +2 -2
- package/types/client/csrTypes.d.ts +2 -0
- package/types/client/frameConfig.d.ts +1 -0
- package/types/client/index.d.ts +25 -26
- package/types/client/locale.d.ts +1 -0
- package/types/client/makePageProto.d.ts +5 -13
- package/types/client/nativeThemeColor.d.ts +6 -0
- package/types/client/route/PageDefinition.d.ts +5 -2
- package/types/client/route/RouteDefinition.d.ts +2 -2
- package/types/client/route/routeArgs.d.ts +7 -0
- package/types/client/router.d.ts +3 -1
- package/types/client/rscNavigation.d.ts +1 -0
- package/types/client/viewportMeta.d.ts +5 -2
- package/types/common/CodeTranscript.d.ts +1 -1
- package/types/common/clientAddress.d.ts +5 -0
- package/types/common/err.d.ts +48 -0
- package/types/common/eventStream.d.ts +5 -1
- package/types/common/facetBarrel.d.ts +4 -0
- package/types/common/index.d.ts +6 -3
- package/types/common/isGuardRefusal.d.ts +3 -0
- package/types/common/loggedFailure.d.ts +2 -0
- package/types/common/mcpExposure.d.ts +9 -2
- package/types/common/routeConvention.d.ts +2 -0
- package/types/common/types.d.ts +18 -1
- package/types/constant/constantRegistry.d.ts +3 -1
- package/types/constant/crystalize.d.ts +1 -1
- package/types/constant/getDefault.d.ts +1 -1
- package/types/constant/immerify.d.ts +1 -1
- package/types/constant/index.d.ts +21 -21
- package/types/constant/purify.d.ts +2 -1
- package/types/constant/serialize.d.ts +1 -1
- package/types/constant/types.d.ts +1 -0
- package/types/dictionary/agent.dictionary.d.ts +1 -1
- package/types/dictionary/base.dictionary.d.ts +1 -1
- package/types/dictionary/dictionary.d.ts +9 -9
- package/types/dictionary/locale.d.ts +1 -1
- package/types/dictionary/trans.d.ts +3 -26
- package/types/document/dataLoader.d.ts +5 -0
- package/types/document/databaseRegistry.d.ts +2 -1
- package/types/document/documentSchema.d.ts +1 -0
- package/types/document/filterMeta.d.ts +4 -1
- package/types/document/into.d.ts +1 -1
- package/types/document/loaderInfo.d.ts +2 -1
- package/types/document/noDocumentError.d.ts +8 -1
- package/types/document/queryEvaluator.d.ts +1 -1
- package/types/document/types.d.ts +1 -1
- package/types/fetch/client/fetchClient.d.ts +6 -36
- package/types/fetch/client/fetchClientTypes.d.ts +40 -0
- package/types/fetch/client/httpClient.d.ts +2 -0
- package/types/fetch/client/remoteError.d.ts +0 -4
- package/types/fetch/client/requestScope.d.ts +11 -0
- package/types/fetch/client/signalCatalog.d.ts +25 -0
- package/types/fetch/client/wsClient.d.ts +2 -0
- package/types/fetch/requestStorage.d.ts +1 -0
- package/types/server/agentHooks.d.ts +4 -0
- package/types/server/akanApp.d.ts +2 -20
- package/types/server/akanOption.d.ts +16 -2
- package/types/server/akanServer.d.ts +2 -2
- package/types/server/assetHeaders.d.ts +1 -0
- package/types/server/console.d.ts +4 -3
- package/types/server/di/predefinedAdaptor.d.ts +1 -0
- package/types/server/di/stageFailedError.d.ts +5 -0
- package/types/server/ed25519Key.d.ts +1 -0
- package/types/server/flightRowReader.d.ts +8 -2
- package/types/server/gateway/childSupervisor.d.ts +35 -0
- package/types/server/gateway/devHostChannel.d.ts +14 -0
- package/types/server/gateway/gatewayChildren.d.ts +50 -0
- package/types/server/gateway/gatewayConfig.d.ts +82 -0
- package/types/server/gateway/gatewayHttpProxy.d.ts +22 -0
- package/types/server/gateway/gatewayLogging.d.ts +16 -0
- package/types/server/gateway/gatewayRooms.d.ts +25 -0
- package/types/server/gateway/gatewayStatus.d.ts +63 -0
- package/types/server/gateway/gatewayStatusPage.d.ts +9 -0
- package/types/server/gateway/gatewayWebSocketRelay.d.ts +17 -0
- package/types/server/gateway/listeningPort.d.ts +5 -0
- package/types/server/htmlResultCache.d.ts +51 -0
- package/types/server/index.d.ts +19 -17
- package/types/server/lifecycle/parentChannel.d.ts +13 -0
- package/types/server/lifecycle/startGuard.d.ts +10 -0
- package/types/server/logging/logHub.d.ts +5 -1
- package/types/server/logging/logStreamRoute.d.ts +2 -0
- package/types/server/logging/rotatingLogWriter.d.ts +1 -1
- package/types/server/logging/serverLogging.d.ts +12 -0
- package/types/server/mcp/AgentTools.d.ts +31 -0
- package/types/server/mcp/AgentToolsAccount.d.ts +7 -0
- package/types/server/mcp/McpApps.d.ts +6 -2
- package/types/server/mcp/McpDispatcher.d.ts +10 -1
- package/types/server/mcp/McpPages.d.ts +2 -1
- package/types/server/mcp/McpRateLimiter.d.ts +3 -0
- package/types/server/mcp/index.d.ts +1 -0
- package/types/server/migration/migrationCommand.d.ts +1 -1
- package/types/server/migration/migrationRunner.d.ts +9 -1
- package/types/server/remote/RemoteFetch.d.ts +42 -0
- package/types/server/remote/RemoteMcp.d.ts +52 -0
- package/types/server/remote/RemoteOAuth.d.ts +58 -0
- package/types/server/remote/RemoteSource.d.ts +51 -0
- package/types/server/remote/index.d.ts +5 -0
- package/types/server/remote/remoteError.d.ts +12 -0
- package/types/server/remote.d.ts +1 -0
- package/types/server/resolver/CascadeRunner.d.ts +2 -2
- package/types/server/resolver/database.resolver.d.ts +2 -2
- package/types/server/resolver/databaseModelInstance.d.ts +4 -0
- package/types/server/resolver/invalidSignal.d.ts +2 -0
- package/types/server/resolver/livePause.d.ts +5 -0
- package/types/server/resolver/modelFacade.d.ts +5 -0
- package/types/server/resolver/modelLoaders.d.ts +15 -0
- package/types/server/resolver/modelSchema.d.ts +6 -0
- package/types/server/resolver/roomAdmission.d.ts +7 -0
- package/types/server/resolver/signal.resolver.d.ts +1 -1
- package/types/server/resolver/sliceCrud.d.ts +8 -0
- package/types/server/resolver/timedQuery.d.ts +8 -0
- package/types/server/routeElementComposer.d.ts +21 -5
- package/types/server/routing/builtinRoutes.d.ts +24 -0
- package/types/server/routing/localRooms.d.ts +14 -0
- package/types/server/routing/roomReplay.d.ts +2 -2
- package/types/server/routing/serverListener.d.ts +31 -0
- package/types/server/rscClientCache.d.ts +34 -0
- package/types/server/rscClientChunks.d.ts +3 -1
- package/types/server/rscClientFetch.d.ts +1 -1
- package/types/server/rscClientPatch.d.ts +12 -1
- package/types/server/rscDocumentHead.d.ts +33 -0
- package/types/server/rscFlightRenderer.d.ts +14 -0
- package/types/server/rscFlightStream.d.ts +53 -0
- package/types/server/rscHostReloads.d.ts +54 -0
- package/types/server/rscHostRenderStream.d.ts +53 -0
- package/types/server/rscHostRequests.d.ts +29 -0
- package/types/server/rscHttp.d.ts +4 -2
- package/types/server/rscNavigationState.d.ts +5 -1
- package/types/server/rscPagePrompts.d.ts +13 -0
- package/types/server/rscPrefetchCache.d.ts +7 -6
- package/types/server/rscRenderControl.d.ts +12 -0
- package/types/server/rscRenderFallbacks.d.ts +41 -0
- package/types/server/rscRenderHandler.d.ts +29 -0
- package/types/server/rscRenderStats.d.ts +32 -0
- package/types/server/rscResultCaches.d.ts +18 -0
- package/types/server/rscRouteDocument.d.ts +52 -0
- package/types/server/rscStaticApp.d.ts +28 -0
- package/types/server/rscWorker.d.ts +1 -3
- package/types/server/rscWorkerHost.d.ts +10 -70
- package/types/server/rscWorkerProcess.d.ts +31 -0
- package/types/server/rscWorkerRecycler.d.ts +22 -0
- package/types/server/serverConfig.d.ts +30 -0
- package/types/server/serverMetrics.d.ts +11 -0
- package/types/server/sitemap.d.ts +1 -0
- package/types/server/ssrFromRscRenderer.d.ts +2 -2
- package/types/server/ssrStaticApp.d.ts +20 -0
- package/types/server/webArtifact.d.ts +7 -0
- package/types/server/webAssetRoutes.d.ts +11 -0
- package/types/server/webCsrSurface.d.ts +18 -0
- package/types/server/webDocumentRoute.d.ts +19 -0
- package/types/server/webRouteContext.d.ts +45 -0
- package/types/server/webRouter.d.ts +3 -28
- package/types/server/webRscRoute.d.ts +24 -0
- package/types/server/webSiteFiles.d.ts +12 -0
- package/types/server/webStaticApp.d.ts +8 -0
- package/types/server/wellKnownRoutes.d.ts +5 -0
- package/types/service/agent.service.d.ts +3 -0
- package/types/service/agentAccounts.d.ts +8 -0
- package/types/service/agentLoop/agentLoop.d.ts +33 -0
- package/types/service/agentLoop/agentLoopTypes.d.ts +235 -0
- package/types/service/agentLoop/deltaStream.d.ts +3 -0
- package/types/service/agentLoop/loopAnswer.d.ts +13 -0
- package/types/service/agentLoop/loopAsk.d.ts +12 -0
- package/types/service/agentLoop/loopCompaction.d.ts +12 -0
- package/types/service/agentLoop/loopRemotes.d.ts +40 -0
- package/types/service/agentLoop/loopRequest.d.ts +9 -0
- package/types/service/agentLoop/loopStored.d.ts +6 -0
- package/types/service/agentLoop/loopToolOutput.d.ts +8 -0
- package/types/service/agentLoop/loopToolkits.d.ts +17 -0
- package/types/service/agentLoop/loopTranscript.d.ts +13 -0
- package/types/{signal → service}/agentMeter.d.ts +1 -1
- package/types/{signal → service}/agentRelayPolicy.d.ts +18 -3
- package/types/service/index.d.ts +6 -0
- package/types/service/injectInfo.d.ts +2 -1
- package/types/service/ipcTypes.d.ts +10 -0
- package/types/service/liveRoomLimit.d.ts +26 -0
- package/types/service/liveRoomLimitError.d.ts +9 -0
- package/types/service/predefinedAdaptor/agentTools.adaptor.d.ts +31 -0
- package/types/service/predefinedAdaptor/anthropicLlm.d.ts +2 -2
- package/types/service/predefinedAdaptor/database.adaptor.d.ts +9 -7
- package/types/service/predefinedAdaptor/index.d.ts +1 -0
- package/types/service/predefinedAdaptor/llm.adaptor.d.ts +12 -0
- package/types/service/predefinedAdaptor/openaiDialect.d.ts +3 -2
- package/types/service/predefinedAdaptor/role.adaptor.d.ts +2 -0
- package/types/service/predefinedAdaptor/solidPubsub.adaptor.d.ts +3 -0
- package/types/service/predefinedAdaptor/solidSqlite.d.ts +1 -1
- package/types/service/predefinedAdaptor/sql/DocumentHydrator.d.ts +11 -0
- package/types/service/predefinedAdaptor/sql/DocumentRowCodec.d.ts +26 -0
- package/types/service/predefinedAdaptor/sql/DocumentWriter.d.ts +25 -0
- package/types/service/predefinedAdaptor/sql/QueryScope.d.ts +16 -0
- package/types/service/predefinedAdaptor/sql/QueryWriter.d.ts +20 -0
- package/types/service/predefinedAdaptor/sql/SqlDocumentStore.d.ts +5 -28
- package/types/service/predefinedAdaptor/sql/SqlTableSchema.d.ts +22 -0
- package/types/service/predefinedAdaptor/sql/StoredRows.d.ts +27 -0
- package/types/service/predefinedAdaptor/sql/TransactionScope.d.ts +3 -1
- package/types/service/predefinedAdaptor/sql/driver/bunSqlite.d.ts +3 -15
- package/types/service/predefinedAdaptor/sql/driver/postgres.d.ts +0 -8
- package/types/service/predefinedAdaptor/sql/types.d.ts +27 -4
- package/types/service/predefinedAdaptor/sseData.d.ts +13 -0
- package/types/service/predefinedAdaptor/websocket.adaptor.d.ts +7 -3
- package/types/service/serviceRegistry.d.ts +1 -0
- package/types/signal/SignalFailure.d.ts +4 -0
- package/types/signal/agentTurnStream.d.ts +3 -0
- package/types/signal/byIdRead.d.ts +7 -0
- package/types/signal/carriedClientIps.d.ts +4 -0
- package/types/signal/endpointRateLimit.d.ts +12 -0
- package/types/signal/index.d.ts +32 -32
- package/types/signal/mcp/McpDocument.d.ts +2 -0
- package/types/signal/mcp/mcpProtocol.d.ts +5 -0
- package/types/signal/mcp/pagePrompt.d.ts +13 -0
- package/types/signal/resolveFieldContext.d.ts +15 -0
- package/types/signal/serializer/fetch.serializer.d.ts +3 -1
- package/types/signal/signalContext.d.ts +2 -14
- package/types/signal/slice.d.ts +15 -13
- package/types/signal/trace.d.ts +12 -1
- package/types/signal/types.d.ts +38 -7
- package/types/store/action.d.ts +4 -27
- package/types/store/actionErrorMessage.d.ts +1 -0
- package/types/store/actionOption.d.ts +24 -0
- package/types/store/baseSt.d.ts +1 -0
- package/types/store/formFieldSetters.d.ts +80 -0
- package/types/store/index.d.ts +17 -16
- package/types/store/modelActionContext.d.ts +189 -0
- package/types/store/modelOpenActions.d.ts +12 -0
- package/types/store/modelWriteActions.d.ts +16 -0
- package/types/store/modelWriteGuard.d.ts +2 -5
- package/types/store/openSeq.d.ts +17 -0
- package/types/store/sliceListActions.d.ts +295 -0
- package/types/store/sliceLiveActions.d.ts +6 -0
- package/types/store/stateBuilder.d.ts +2 -0
- package/types/test/conformance.d.ts +3 -1
- package/types/ui/Agent/Chat.d.ts +5 -2
- package/types/ui/Agent/ChatHeader.d.ts +13 -0
- package/types/ui/Agent/ChatPendingCards.d.ts +23 -0
- package/types/ui/Agent/ToolRow.d.ts +13 -0
- package/types/ui/Field/Choice.d.ts +2 -1
- package/types/ui/Field/index.d.ts +1 -1
- package/types/ui/Reference/origin.d.ts +1 -0
- package/types/ui/UiOverride/UiOverride.d.ts +2 -0
- package/types/ui/index.d.ts +2 -1
- package/types/ui/overlayLayer.d.ts +8 -2
- package/types/ui/recipe/badgeRecipe.d.ts +3 -3
- package/types/ui/recipe/buttonRecipe.d.ts +3 -3
- package/types/ui/recipe/inputRecipe.d.ts +1 -1
- package/types/vendor/@akanjs/native/packages/cli/src/lib/project.d.ts +4 -0
- package/types/vendor/@akanjs/native/packages/desktop/src/relaunch.d.ts +1 -0
- package/types/vendor/@akanjs/native/plugins/appearance/src/index.d.ts +9 -0
- package/types/vendor/@akanjs/native/plugins/external-view/src/index.d.ts +22 -13
- package/types/vendor/@akanjs/native/plugins/single-instance/src/socket.d.ts +15 -2
- package/types/vendor/use-agentic/AgentClientTools.d.ts +19 -0
- package/types/vendor/use-agentic/Compaction.d.ts +3 -1
- package/types/vendor/use-agentic/SessionQuestion.d.ts +26 -0
- package/types/vendor/use-agentic/Transcript.d.ts +1 -1
- package/types/vendor/use-agentic/failureCode.d.ts +4 -0
- package/types/vendor/use-agentic/index.d.ts +1 -0
- package/types/vendor/use-agentic/types.d.ts +12 -3
- package/types/webkit/CsrGuards.d.ts +3 -0
- package/types/webkit/McpAppHost.d.ts +24 -0
- package/types/webkit/RouteLevelBoundary.d.ts +17 -0
- package/types/webkit/csrRefresh.d.ts +13 -0
- package/types/webkit/index.d.ts +3 -0
- package/types/webkit/needsBrowser.d.ts +5 -0
- package/types/webkit/useCamera.d.ts +1 -1
- package/types/webkit/useCsrKeyboard.d.ts +19 -0
- package/types/webkit/useCsrLocationState.d.ts +21 -0
- package/types/webkit/useCsrNavigation.d.ts +25 -0
- package/types/webkit/useCsrRefs.d.ts +33 -0
- package/types/webkit/useCsrRenderTrace.d.ts +13 -0
- package/types/webkit/useCsrStackLifecycle.d.ts +12 -0
- package/types/webkit/useCsrTransitions.d.ts +2 -0
- package/types/webkit/useGeoLocation.d.ts +1 -1
- package/types/webkit/useHistory.d.ts +2 -3
- package/types/webkit/useResolvedFrame.d.ts +38 -0
- package/types/webkit/useSyncNavigation.d.ts +22 -0
- package/ui/Agent/Bubble.tsx +4 -118
- package/ui/Agent/Chat.tsx +402 -235
- package/ui/Agent/ChatHeader.tsx +59 -0
- package/ui/Agent/ChatPendingCards.tsx +49 -0
- package/ui/Agent/ToolRow.tsx +117 -0
- package/ui/Agent/fetchRunner.ts +8 -1
- package/ui/BottomSheet.tsx +1 -1
- package/ui/Data/Item.tsx +2 -2
- package/ui/Data/ListContainer.tsx +348 -181
- package/ui/Data/useViewModal.ts +10 -4
- package/ui/Dialog/LegacyModal.tsx +1 -1
- package/ui/Dialog/Modal.tsx +1 -1
- package/ui/Field/Choice.tsx +3 -1
- package/ui/Load/StreamBoundary.tsx +1 -6
- package/ui/Load/View.tsx +2 -1
- package/ui/Model/EditModal.tsx +2 -1
- package/ui/Popconfirm.tsx +1 -1
- package/ui/Reference/origin.ts +1 -0
- package/ui/Select.tsx +43 -51
- package/ui/Signal/RestApi.tsx +3 -2
- package/ui/System/Client.tsx +4 -1
- package/ui/UiOverride/UiOverride.tsx +2 -0
- package/ui/index.ts +5 -0
- package/ui/overlayLayer.ts +25 -2
- package/vendor/@akanjs/native/native/android/src/com/akanjs/runtime/AkanNativeActivity.kt +31 -13
- package/vendor/@akanjs/native/native/android/src/com/akanjs/runtime/AkanNativePlugin.kt +4 -0
- package/vendor/@akanjs/native/native/desktop/Cargo.lock +1 -0
- package/vendor/@akanjs/native/native/desktop/Cargo.toml +2 -0
- package/vendor/@akanjs/native/native/desktop/src/external.rs +240 -114
- package/vendor/@akanjs/native/native/desktop/src/json.rs +14 -1
- package/vendor/@akanjs/native/native/desktop/src/lib.rs +12 -4
- package/vendor/@akanjs/native/native/desktop/src/linux/external.rs +696 -0
- package/vendor/@akanjs/native/native/desktop/src/linux/mod.rs +1 -0
- package/vendor/@akanjs/native/native/ios/Sources/AkanNativeViewController.swift +6 -1
- package/vendor/@akanjs/native/packages/cli/src/lib/native-plugins.ts +5 -3
- package/vendor/@akanjs/native/packages/cli/src/lib/project.ts +25 -1
- package/vendor/@akanjs/native/packages/desktop/src/deeplinks.ts +2 -2
- package/vendor/@akanjs/native/packages/desktop/src/host.ts +2 -2
- package/vendor/@akanjs/native/packages/desktop/src/relaunch.ts +8 -3
- package/vendor/@akanjs/native/plugins/app/src/desktop.ts +2 -2
- package/vendor/@akanjs/native/plugins/appearance/android/AppearancePlugin.kt +13 -0
- package/vendor/@akanjs/native/plugins/appearance/ios/AppearancePlugin.swift +27 -0
- package/vendor/@akanjs/native/plugins/appearance/native-plugin.json +2 -2
- package/vendor/@akanjs/native/plugins/appearance/src/index.ts +8 -1
- package/vendor/@akanjs/native/plugins/autostart/src/desktop.ts +2 -1
- package/vendor/@akanjs/native/plugins/external-view/native-plugin.json +4 -1
- package/vendor/@akanjs/native/plugins/external-view/src/index.ts +22 -13
- package/vendor/@akanjs/native/plugins/single-instance/src/socket.ts +113 -24
- package/vendor/use-agentic/AgentClientTools.ts +33 -0
- package/vendor/use-agentic/AgentSession.ts +35 -73
- package/vendor/use-agentic/CHANGELOG.md +0 -43
- package/vendor/use-agentic/Compaction.ts +12 -2
- package/vendor/use-agentic/SessionQuestion.ts +99 -0
- package/vendor/use-agentic/ToolRunner.ts +3 -15
- package/vendor/use-agentic/Transcript.ts +8 -5
- package/vendor/use-agentic/WIRE.md +28 -9
- package/vendor/use-agentic/failureCode.ts +44 -0
- package/vendor/use-agentic/httpRunner.ts +22 -8
- package/vendor/use-agentic/index.ts +1 -0
- package/vendor/use-agentic/types.ts +13 -1
- package/webkit/CsrGuards.ts +11 -2
- package/webkit/McpAppFetchBridge.ts +3 -1
- package/webkit/McpAppHost.ts +122 -0
- package/webkit/RenderLayer.tsx +48 -14
- package/webkit/RouteLevelBoundary.tsx +37 -0
- package/webkit/csrRefresh.ts +33 -0
- package/webkit/index.ts +3 -0
- package/webkit/lazy.tsx +5 -1
- package/webkit/needsBrowser.ts +10 -0
- package/webkit/useCamera.tsx +18 -7
- package/webkit/useCsrKeyboard.ts +155 -0
- package/webkit/useCsrLocationState.ts +58 -0
- package/webkit/useCsrNavigation.ts +302 -0
- package/webkit/useCsrRefs.ts +52 -0
- package/webkit/useCsrRenderTrace.ts +68 -0
- package/webkit/useCsrStackLifecycle.ts +120 -0
- package/webkit/useCsrTransitions.ts +552 -0
- package/webkit/useCsrValues.ts +73 -1235
- package/webkit/useGeoLocation.tsx +1 -3
- package/webkit/useHistory.ts +2 -2
- package/webkit/useLocation.ts +3 -2
- package/webkit/useResolvedFrame.ts +116 -0
- package/webkit/useSyncNavigation.ts +109 -0
- package/vendor/@akanjs/native/CHANGELOG.md +0 -21
package/types/signal/types.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { DefaultPrimitiveName, UnCls } from "akanjs/base";
|
|
2
|
+
import type { McpShelf } from "akanjs/common";
|
|
2
3
|
import type { AkanJob, ServiceModel } from "akanjs/service";
|
|
3
4
|
import type { RateLimitBudget } from "./endpointRateLimit.d.ts";
|
|
4
5
|
import type { GuardCls } from "./guard.d.ts";
|
|
@@ -106,8 +107,17 @@ export interface SignalOption<Response = any, Nullable extends boolean = false,
|
|
|
106
107
|
/** HTTP verb of a `mutation`, `POST` unless named; every other endpoint type ignores it. */
|
|
107
108
|
method?: HttpMutationMethod;
|
|
108
109
|
fileUpload?: boolean;
|
|
109
|
-
/**
|
|
110
|
-
|
|
110
|
+
/**
|
|
111
|
+
* `false` keeps it out of the MCP catalogue (default `true`), and `"agent"` keeps it off `/mcp` while the in-process
|
|
112
|
+
* agent (`AgentToolsRole`, `agentService.loop`) still lists it; curation, not authorization — HTTP still serves it.
|
|
113
|
+
*/
|
|
114
|
+
mcp?: McpShelf;
|
|
115
|
+
/**
|
|
116
|
+
* Overrides what the key implies for a `mutation`'s MCP `destructiveHint`: `true` for one no verb gives away, such as
|
|
117
|
+
* `archiveOrder`, `false` for a `drop…` that loses nothing. `agentService.loop` refuses a destructive tool unless
|
|
118
|
+
* `approve` allows it.
|
|
119
|
+
*/
|
|
120
|
+
destructive?: boolean;
|
|
111
121
|
/**
|
|
112
122
|
* The errors this endpoint throws on purpose, by status. Published as OpenAPI responses and in the MCP tool's
|
|
113
123
|
* description; outside production, throwing a key this leaves out is warned about once.
|
|
@@ -134,8 +144,8 @@ interface SerializedSignalOption {
|
|
|
134
144
|
guards?: string[];
|
|
135
145
|
method?: HttpMutationMethod;
|
|
136
146
|
fileUpload?: boolean;
|
|
137
|
-
/** Only ever `false`, when declared. Resolved here because the API explorer holds guard names, not classes. */
|
|
138
|
-
mcp?: false;
|
|
147
|
+
/** Only ever `false` or `"agent"`, when declared. Resolved here because the API explorer holds guard names, not classes. */
|
|
148
|
+
mcp?: false | "agent";
|
|
139
149
|
/** Only ever `false`, when a guard declares `static agents = false` (a person-only act). */
|
|
140
150
|
agents?: false;
|
|
141
151
|
}
|
|
@@ -172,6 +182,7 @@ export interface SerializedEndpoint extends SerializedSignalOption {
|
|
|
172
182
|
/** Milliseconds; the client sizes its request budget from it. */
|
|
173
183
|
timeout?: number;
|
|
174
184
|
errors?: EndpointErrors;
|
|
185
|
+
destructive?: boolean;
|
|
175
186
|
}
|
|
176
187
|
export interface SerializedFilter {
|
|
177
188
|
filter: {
|
|
@@ -200,7 +211,7 @@ export interface SerializedSignal {
|
|
|
200
211
|
updateGuards?: string[];
|
|
201
212
|
removeGuards?: string[];
|
|
202
213
|
/** Generated CRUD verbs kept off the agent shelf, carried here because `FetchClient.getBaseEndpoint` synthesizes them. */
|
|
203
|
-
mcp?:
|
|
214
|
+
mcp?: SerializedSignalShelf;
|
|
204
215
|
/** Generated CRUD verbs the server does not mount at all, so no client synthesizes them. */
|
|
205
216
|
crud?: SerializedSignalMcp;
|
|
206
217
|
/** Which generated CRUD verbs a person-only guard protects, by the same verb map; only the `false` keys travel. */
|
|
@@ -208,6 +219,13 @@ export interface SerializedSignal {
|
|
|
208
219
|
/** The app or lib that registered the signal, first registrant first: an app extending a lib module reads `["shared", "sceny"]`. */
|
|
209
220
|
origin?: string[];
|
|
210
221
|
}
|
|
222
|
+
/** The generated CRUD verbs not on `/mcp`, by the same verb map; `"agent"` ones are still listed to the in-process agent. */
|
|
223
|
+
export interface SerializedSignalShelf {
|
|
224
|
+
get?: false | "agent";
|
|
225
|
+
create?: false | "agent";
|
|
226
|
+
update?: false | "agent";
|
|
227
|
+
remove?: false | "agent";
|
|
228
|
+
}
|
|
211
229
|
/** Keyed by generated verb, mirroring the `guards` map `slice()` takes. The root slice's own flag rides on `slice[""]`. */
|
|
212
230
|
export interface SerializedSignalMcp {
|
|
213
231
|
get?: false;
|
|
@@ -221,12 +239,16 @@ export type WebsocketRoomCursor = {
|
|
|
221
239
|
epoch: string;
|
|
222
240
|
seq: number;
|
|
223
241
|
};
|
|
224
|
-
/**
|
|
242
|
+
/**
|
|
243
|
+
* `since` asks a resubscribe to send what was published after it, if the server still can. `token` numbers one
|
|
244
|
+
* subscribe and comes back on its error frame, so a refusal is matched to the subscribe it answers.
|
|
245
|
+
*/
|
|
225
246
|
export type WebsocketReqData = {
|
|
226
247
|
key: string;
|
|
227
248
|
data: unknown[];
|
|
228
249
|
subscribe?: boolean;
|
|
229
250
|
since?: WebsocketRoomCursor;
|
|
251
|
+
token?: number;
|
|
230
252
|
};
|
|
231
253
|
export type WebsocketMessageData = {
|
|
232
254
|
type: "msg";
|
|
@@ -267,5 +289,14 @@ export type WebsocketAuthAck = {
|
|
|
267
289
|
type: "auth";
|
|
268
290
|
revokedRooms: string[];
|
|
269
291
|
};
|
|
270
|
-
|
|
292
|
+
/**
|
|
293
|
+
* The room may have missed events another server published, while this socket stayed open and numbered no hole. `seq`
|
|
294
|
+
* numbers it among the room's `pub` frames, so a socket that missed it under backpressure sees a hole instead.
|
|
295
|
+
*/
|
|
296
|
+
export type WebsocketResyncData = {
|
|
297
|
+
type: "resync";
|
|
298
|
+
roomId: string;
|
|
299
|
+
seq?: number;
|
|
300
|
+
};
|
|
301
|
+
export type WebsocketResData = WebsocketMessageData | WebsocketSubscribeAck | WebsocketPublishData | WebsocketAuthAck | WebsocketResyncData;
|
|
271
302
|
export {};
|
package/types/store/action.d.ts
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { type GetStateObject } from "akanjs/base";
|
|
2
2
|
import { type FetchPolicy } from "akanjs/common";
|
|
3
|
-
import {
|
|
3
|
+
import type { DefaultOf, FieldState, ProtoLightFile } from "akanjs/constant";
|
|
4
4
|
import type { ExtractSort, FilterInstance } from "akanjs/document";
|
|
5
|
-
import {
|
|
5
|
+
import type { FetchInitForm, FetchProxy } from "akanjs/fetch";
|
|
6
6
|
import type { SerializedSlice, SlceCnstCapitalizedRefName, SlceCnstDefault, SlceCnstDefaultInput, SlceCnstFull, SlceCnstInput, SlceCnstLight, SlceCnstRefName, SlceDbFilter, SlceDbSort, SliceCls } from "akanjs/signal";
|
|
7
|
+
import type { CreateOption, EditOption, NewOption } from "./actionOption.d.ts";
|
|
8
|
+
import { type ReportingFetchPolicy } from "./modelActionContext.d.ts";
|
|
7
9
|
import type { SetGet, StoreSliceArgs, StoreSliceMap, StoreSliceSuffixCap } from "./types.d.ts";
|
|
8
10
|
type _SliceMap<S extends SliceCls> = StoreSliceMap<S>;
|
|
9
11
|
type _ActionRefName<S extends SliceCls> = SlceCnstRefName<S>;
|
|
@@ -19,31 +21,6 @@ type SliceInitForm<S extends SliceCls> = FetchInitForm<_ActionInput<S>, _ActionF
|
|
|
19
21
|
type SliceRefreshForm<S extends SliceCls, Suffix extends keyof _SliceMap<S>> = SliceInitForm<S> & {
|
|
20
22
|
queryArgs?: StoreSliceArgs<S, Suffix>;
|
|
21
23
|
};
|
|
22
|
-
export interface ErrorReportOption {
|
|
23
|
-
/** Called with the failed request's dictionary key, as a `Button`'s `onError` takes it; the action still rejects. */
|
|
24
|
-
onError?: (key: string) => void;
|
|
25
|
-
}
|
|
26
|
-
type ReportingFetchPolicy = Omit<FetchPolicy, "onError"> & ErrorReportOption;
|
|
27
|
-
export interface CreateOption<Full extends {
|
|
28
|
-
id: string;
|
|
29
|
-
}> extends ErrorReportOption {
|
|
30
|
-
path?: string;
|
|
31
|
-
modal?: string;
|
|
32
|
-
sliceName?: string;
|
|
33
|
-
onSuccess?: (model: Full) => void | Promise<void>;
|
|
34
|
-
}
|
|
35
|
-
export interface NewOption {
|
|
36
|
-
modal?: string;
|
|
37
|
-
setDefault?: boolean;
|
|
38
|
-
sliceName?: string;
|
|
39
|
-
/** Built by the shell from the raw seed (merged date defaults would rotate the key). Absent means no draft. */
|
|
40
|
-
draftScope?: string;
|
|
41
|
-
}
|
|
42
|
-
export interface EditOption {
|
|
43
|
-
modal?: string | null;
|
|
44
|
-
/** Built by the shell from the record id. Absent means no draft. */
|
|
45
|
-
draftScope?: string;
|
|
46
|
-
}
|
|
47
24
|
type PartialOrNull<O> = {
|
|
48
25
|
[K in keyof O]?: O[K] | null;
|
|
49
26
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const actionErrorMessageOf: (error: unknown) => string;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export interface ErrorReportOption {
|
|
2
|
+
/** Called with the failed request's dictionary key, as a `Button`'s `onError` takes it; the action still rejects. */
|
|
3
|
+
onError?: (key: string) => void;
|
|
4
|
+
}
|
|
5
|
+
export interface CreateOption<Full extends {
|
|
6
|
+
id: string;
|
|
7
|
+
}> extends ErrorReportOption {
|
|
8
|
+
path?: string;
|
|
9
|
+
modal?: string;
|
|
10
|
+
sliceName?: string;
|
|
11
|
+
onSuccess?: (model: Full) => void | Promise<void>;
|
|
12
|
+
}
|
|
13
|
+
export interface NewOption {
|
|
14
|
+
modal?: string;
|
|
15
|
+
setDefault?: boolean;
|
|
16
|
+
sliceName?: string;
|
|
17
|
+
/** Built by the shell from the raw seed (merged date defaults would rotate the key). Absent means no draft. */
|
|
18
|
+
draftScope?: string;
|
|
19
|
+
}
|
|
20
|
+
export interface EditOption {
|
|
21
|
+
modal?: string | null;
|
|
22
|
+
/** Built by the shell from the record id. Absent means no draft. */
|
|
23
|
+
draftScope?: string;
|
|
24
|
+
}
|
package/types/store/baseSt.d.ts
CHANGED
|
@@ -11,6 +11,7 @@ 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. */
|
|
14
15
|
export declare const getBaseSearchParam: (searchParams: BaseSearchParamsState, key: string) => string;
|
|
15
16
|
declare const BaseStore_base: import("./store.d.ts").StoreCls<"base", import("./stateBuilder.d.ts").WritableStateOf<{
|
|
16
17
|
csrLoaded: boolean;
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { type BaseObject, type ConstantField } from "akanjs/constant";
|
|
2
|
+
import type { FetchProxy } from "akanjs/fetch";
|
|
3
|
+
import type { SetGet } from "./types.d.ts";
|
|
4
|
+
import { type Uploading } from "./uploadPoll.d.ts";
|
|
5
|
+
type Light = BaseObject;
|
|
6
|
+
type StateRecord = {
|
|
7
|
+
[key: string]: unknown;
|
|
8
|
+
};
|
|
9
|
+
type FormState = {
|
|
10
|
+
[key: string]: unknown;
|
|
11
|
+
};
|
|
12
|
+
export declare const formSetterContextOf: (refName: string, fetch: FetchProxy<any>) => {
|
|
13
|
+
className: string;
|
|
14
|
+
modelRef: import("akanjs/constant").ConstantCls<any, import("akanjs/constant").FieldObject>;
|
|
15
|
+
fileUploadRefName: string | undefined;
|
|
16
|
+
names: {
|
|
17
|
+
getModel: string;
|
|
18
|
+
loadModel: string;
|
|
19
|
+
loadModelMany: string;
|
|
20
|
+
createModel: string;
|
|
21
|
+
createModelMany: string;
|
|
22
|
+
updateModel: string;
|
|
23
|
+
removeModel: string;
|
|
24
|
+
modelModel: string;
|
|
25
|
+
modelLoader: string;
|
|
26
|
+
modelCache: string;
|
|
27
|
+
modelId: string;
|
|
28
|
+
lightModel: string;
|
|
29
|
+
viewModel: string;
|
|
30
|
+
getModelView: string;
|
|
31
|
+
modelView: string;
|
|
32
|
+
editModel: string;
|
|
33
|
+
getModelEdit: string;
|
|
34
|
+
modelEdit: string;
|
|
35
|
+
modelObj: string;
|
|
36
|
+
modelObjList: string;
|
|
37
|
+
modelObjInsight: string;
|
|
38
|
+
addModelFiles: string;
|
|
39
|
+
mergeModel: string;
|
|
40
|
+
createModelInForm: string;
|
|
41
|
+
updateModelInForm: string;
|
|
42
|
+
checkModelSubmitable: string;
|
|
43
|
+
submitModel: string;
|
|
44
|
+
newModel: string;
|
|
45
|
+
setModel: string;
|
|
46
|
+
resetModel: string;
|
|
47
|
+
invalidateModel: string;
|
|
48
|
+
loadModelFormDraft: string;
|
|
49
|
+
restoreModelFormDraft: string;
|
|
50
|
+
discardModelFormDraft: string;
|
|
51
|
+
writeOnModel: string;
|
|
52
|
+
setViewOfModel: string;
|
|
53
|
+
exportCsvOfModel: string;
|
|
54
|
+
exportJsonOfModel: string;
|
|
55
|
+
model: string;
|
|
56
|
+
modelLoading: string;
|
|
57
|
+
modelForm: string;
|
|
58
|
+
modelFormLoading: string;
|
|
59
|
+
modelFormUploading: string;
|
|
60
|
+
modelSubmit: string;
|
|
61
|
+
modelViewAt: string;
|
|
62
|
+
modelModal: string;
|
|
63
|
+
modelDraft: string;
|
|
64
|
+
modelOperation: string;
|
|
65
|
+
defaultModel: string;
|
|
66
|
+
};
|
|
67
|
+
fetch: any;
|
|
68
|
+
nextUploadTicket: () => string;
|
|
69
|
+
formPatchOf: (state: StateRecord, recipe: (form: FormState) => void, uploading?: Uploading) => {
|
|
70
|
+
[x: string]: FormState;
|
|
71
|
+
};
|
|
72
|
+
};
|
|
73
|
+
type FormSetterContext = ReturnType<typeof formSetterContextOf>;
|
|
74
|
+
export declare const fieldSettersOf: (ctx: FormSetterContext, key: string, field: ConstantField) => {
|
|
75
|
+
[x: string]: ((this: SetGet, value: any | null) => void) | ((this: SetGet, value: Light | Light[], options?: {
|
|
76
|
+
idx?: number;
|
|
77
|
+
limit?: number;
|
|
78
|
+
}) => void) | ((this: SetGet, idx: number | number[]) => void) | ((this: SetGet, fileList: FileList | File[], index?: number) => Promise<void>);
|
|
79
|
+
};
|
|
80
|
+
export {};
|
package/types/store/index.d.ts
CHANGED
|
@@ -1,17 +1,18 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
3
|
-
export
|
|
4
|
-
export
|
|
5
|
-
export
|
|
6
|
-
export
|
|
7
|
-
export
|
|
8
|
-
export
|
|
9
|
-
export
|
|
10
|
-
export
|
|
11
|
-
export
|
|
12
|
-
export
|
|
13
|
-
export
|
|
14
|
-
export
|
|
1
|
+
export { type DefaultAction, makeActions, makeFormSetter, type SliceAction } from "./action.d.ts";
|
|
2
|
+
export type { CreateOption, EditOption, ErrorReportOption, NewOption } from "./actionOption.d.ts";
|
|
3
|
+
export { type ActionOwner, type ActionTag, actionTagOf, tagAction } from "./actionTag.d.ts";
|
|
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, getBaseSearchParam, RootStore, st } from "./baseSt.d.ts";
|
|
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
|
+
export { databaseStateNames, formSetterNames } from "./deprecatedNames.d.ts";
|
|
8
|
+
export { type DraftRecord, DraftStore } from "./draftStore.d.ts";
|
|
9
|
+
export { type FormUpload, formUploadOf } from "./formUploadOf.d.ts";
|
|
10
|
+
export { type LivePlacementProps, type LiveSortableRow, livePlacementIndex } from "./liveInsert.d.ts";
|
|
11
|
+
export type { RootStoreCls } from "./rootStore.d.ts";
|
|
12
|
+
export type { SliceActionKey, SliceActionRole, SliceStateRole } from "./sliceRole.d.ts";
|
|
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, getSearchParam, isStateBuilderMarker, 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
|
+
export { type ModelStore, type StoreCls, type StoreReturn, store } from "./store.d.ts";
|
|
15
16
|
export { StoreInstance } from "./storeInstance.d.ts";
|
|
16
|
-
export
|
|
17
|
-
export
|
|
17
|
+
export { type ReactAPI, StoreRegistry } from "./storeRegistry.d.ts";
|
|
18
|
+
export type { Get, InternalSlice, SetGet, SetGetWritable, SetPick, SliceStateAction, StoreSliceArgs, StoreSliceMap, StoreSliceName, StoreSliceSuffix, StoreSliceSuffixCap, StoreUseOptions, Submit, VoidActions, } from "./types.d.ts";
|
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
import { type FetchPolicy } from "akanjs/common";
|
|
2
|
+
import { type BaseObject } from "akanjs/constant";
|
|
3
|
+
import { type FetchProxy } from "akanjs/fetch";
|
|
4
|
+
import type { SerializedSlice } from "akanjs/signal";
|
|
5
|
+
import type { ErrorReportOption } from "./actionOption.d.ts";
|
|
6
|
+
export type ReportingFetchPolicy = Omit<FetchPolicy, "onError"> & ErrorReportOption;
|
|
7
|
+
export declare const modelActionContextOf: (refName: string, slice: {
|
|
8
|
+
[key: string]: SerializedSlice;
|
|
9
|
+
}, fetch: FetchProxy<any>) => {
|
|
10
|
+
createdListPatchOf: (sliceName: string, model: BaseObject, seen: {
|
|
11
|
+
[key: string]: unknown;
|
|
12
|
+
}) => {
|
|
13
|
+
[x: string]: any;
|
|
14
|
+
};
|
|
15
|
+
applyLiveCreate: (this: import("./types.d.ts").SetGet, sliceName: string, model: BaseObject) => void;
|
|
16
|
+
updatedListPatchOf: (state: {
|
|
17
|
+
[key: string]: unknown;
|
|
18
|
+
}, ...updatedModels: BaseObject[]) => {
|
|
19
|
+
[key: string]: import("../base.d.ts").DataList<BaseObject>;
|
|
20
|
+
};
|
|
21
|
+
formBase: () => object | null;
|
|
22
|
+
armDraft: (this: import("./types.d.ts").SetGet, draftScope: string | undefined, form: object, baseUpdatedAt: string | null) => {
|
|
23
|
+
key: string;
|
|
24
|
+
baseHash: string;
|
|
25
|
+
baseUpdatedAt: string | null;
|
|
26
|
+
pending: null;
|
|
27
|
+
appliedAt: null;
|
|
28
|
+
} | null;
|
|
29
|
+
applyDraft: (this: import("./types.d.ts").SetGet, { auto }: {
|
|
30
|
+
auto: boolean;
|
|
31
|
+
}) => Promise<void>;
|
|
32
|
+
forgetDraft: (ctx: import("./types.d.ts").SetGet, key: string) => void;
|
|
33
|
+
clearDraft: (ctx: import("./types.d.ts").SetGet, draft: import("./state.d.ts").DraftState | null) => null;
|
|
34
|
+
savingDraft: <T>(ctx: import("./types.d.ts").SetGet, draft: import("./state.d.ts").DraftState | null, form: object, save: () => Promise<T>) => Promise<T>;
|
|
35
|
+
openSeqOf: (ctx: import("./types.d.ts").SetGet) => import("./openSeq.d.ts").OpenSeq;
|
|
36
|
+
markOpened: (ctx: import("./types.d.ts").SetGet, opens: {
|
|
37
|
+
form: boolean;
|
|
38
|
+
}) => {
|
|
39
|
+
open: number;
|
|
40
|
+
form: number;
|
|
41
|
+
};
|
|
42
|
+
isOvertaken: (ctx: import("./types.d.ts").SetGet, seen: import("./openSeq.d.ts").OpenSeq) => boolean;
|
|
43
|
+
isSavedFormOpen: (ctx: import("./types.d.ts").SetGet, seen: import("./openSeq.d.ts").OpenSeq, savedForm: {
|
|
44
|
+
id?: string;
|
|
45
|
+
}) => boolean;
|
|
46
|
+
withFlag: <T>(ctx: import("./types.d.ts").SetGet, { flag, opening, failed, onError, request, land, }: {
|
|
47
|
+
flag: {
|
|
48
|
+
key: string;
|
|
49
|
+
value: string | true;
|
|
50
|
+
} | null;
|
|
51
|
+
opening?: {
|
|
52
|
+
[key: string]: unknown;
|
|
53
|
+
};
|
|
54
|
+
failed?: () => {
|
|
55
|
+
[key: string]: unknown;
|
|
56
|
+
};
|
|
57
|
+
onError?: (key: string) => void;
|
|
58
|
+
request: () => Promise<T>;
|
|
59
|
+
land: (answer: T, ownsFlag: boolean) => void;
|
|
60
|
+
}) => Promise<T>;
|
|
61
|
+
closedUnlessShown: (ctx: import("./types.d.ts").SetGet, seen: import("./openSeq.d.ts").OpenSeq, shownKey: string, id: string) => {
|
|
62
|
+
[key: string]: unknown;
|
|
63
|
+
};
|
|
64
|
+
openModelPatchOf: (latest: {
|
|
65
|
+
[key: string]: unknown;
|
|
66
|
+
}, updatedModel: {
|
|
67
|
+
id: string;
|
|
68
|
+
}, ownsFlag: boolean, opened?: {
|
|
69
|
+
[key: string]: unknown;
|
|
70
|
+
}) => {
|
|
71
|
+
[x: string]: unknown;
|
|
72
|
+
};
|
|
73
|
+
refName: string;
|
|
74
|
+
fetch: any;
|
|
75
|
+
cnst: import("akanjs/constant").ConstantModel<string, any, any, any, any, any, import("akanjs/constant").FieldObject, Capitalize<string>, import("akanjs/constant").DefaultOf<any>, import("akanjs/constant").DefaultOf<any>, import("../base.d.ts").GetStateObject<any>, import("../base.d.ts").GetStateObject<any>, import("akanjs/constant").DefaultOf<any>, any, any, any, any, import("../base.d.ts").GetStateObject<any>, import("../base.d.ts").GetStateObject<any>>;
|
|
76
|
+
modelRef: import("akanjs/constant").ConstantCls<any, import("akanjs/constant").FieldObject>;
|
|
77
|
+
slices: {
|
|
78
|
+
sliceName: string;
|
|
79
|
+
keys: {
|
|
80
|
+
slice: string;
|
|
81
|
+
state: {
|
|
82
|
+
defaultModel: string;
|
|
83
|
+
modelInitList: string;
|
|
84
|
+
modelInsight: string;
|
|
85
|
+
modelList: string;
|
|
86
|
+
modelListLoading: string;
|
|
87
|
+
modelInitAt: string;
|
|
88
|
+
modelStaleAt: string;
|
|
89
|
+
lastPageOfModel: string;
|
|
90
|
+
pageOfModel: string;
|
|
91
|
+
limitOfModel: string;
|
|
92
|
+
hasMoreOfModel: string;
|
|
93
|
+
isCumulativeOfModel: string;
|
|
94
|
+
hasInsightOfModel: string;
|
|
95
|
+
queryArgsOfModel: string;
|
|
96
|
+
sortOfModel: string;
|
|
97
|
+
modelSelection: string;
|
|
98
|
+
};
|
|
99
|
+
action: {
|
|
100
|
+
initModel: string;
|
|
101
|
+
refreshModel: string;
|
|
102
|
+
selectModel: string;
|
|
103
|
+
setPageOfModel: string;
|
|
104
|
+
loadMoreOfModel: string;
|
|
105
|
+
setLimitOfModel: string;
|
|
106
|
+
setQueryArgsOfModel: string;
|
|
107
|
+
setSortOfModel: string;
|
|
108
|
+
applyLiveModel: string;
|
|
109
|
+
watchLiveModel: string;
|
|
110
|
+
};
|
|
111
|
+
endpoint: {
|
|
112
|
+
list: string;
|
|
113
|
+
insight: string;
|
|
114
|
+
live: string;
|
|
115
|
+
subscribeLive: string;
|
|
116
|
+
init: string;
|
|
117
|
+
getInit: string;
|
|
118
|
+
initResult: string;
|
|
119
|
+
};
|
|
120
|
+
};
|
|
121
|
+
slice: SerializedSlice;
|
|
122
|
+
}[];
|
|
123
|
+
names: {
|
|
124
|
+
Model: string;
|
|
125
|
+
modelInsight: string;
|
|
126
|
+
modelList: string;
|
|
127
|
+
modelListLoading: string;
|
|
128
|
+
getModel: string;
|
|
129
|
+
loadModel: string;
|
|
130
|
+
loadModelMany: string;
|
|
131
|
+
createModel: string;
|
|
132
|
+
createModelMany: string;
|
|
133
|
+
updateModel: string;
|
|
134
|
+
removeModel: string;
|
|
135
|
+
modelModel: string;
|
|
136
|
+
modelLoader: string;
|
|
137
|
+
modelCache: string;
|
|
138
|
+
modelId: string;
|
|
139
|
+
lightModel: string;
|
|
140
|
+
viewModel: string;
|
|
141
|
+
getModelView: string;
|
|
142
|
+
modelView: string;
|
|
143
|
+
editModel: string;
|
|
144
|
+
getModelEdit: string;
|
|
145
|
+
modelEdit: string;
|
|
146
|
+
modelObj: string;
|
|
147
|
+
modelObjList: string;
|
|
148
|
+
modelObjInsight: string;
|
|
149
|
+
addModelFiles: string;
|
|
150
|
+
mergeModel: string;
|
|
151
|
+
createModelInForm: string;
|
|
152
|
+
updateModelInForm: string;
|
|
153
|
+
checkModelSubmitable: string;
|
|
154
|
+
submitModel: string;
|
|
155
|
+
newModel: string;
|
|
156
|
+
setModel: string;
|
|
157
|
+
resetModel: string;
|
|
158
|
+
invalidateModel: string;
|
|
159
|
+
loadModelFormDraft: string;
|
|
160
|
+
restoreModelFormDraft: string;
|
|
161
|
+
discardModelFormDraft: string;
|
|
162
|
+
writeOnModel: string;
|
|
163
|
+
setViewOfModel: string;
|
|
164
|
+
exportCsvOfModel: string;
|
|
165
|
+
exportJsonOfModel: string;
|
|
166
|
+
model: string;
|
|
167
|
+
modelLoading: string;
|
|
168
|
+
modelForm: string;
|
|
169
|
+
modelFormLoading: string;
|
|
170
|
+
modelFormUploading: string;
|
|
171
|
+
modelSubmit: string;
|
|
172
|
+
modelViewAt: string;
|
|
173
|
+
modelModal: string;
|
|
174
|
+
modelDraft: string;
|
|
175
|
+
modelOperation: string;
|
|
176
|
+
defaultModel: string;
|
|
177
|
+
};
|
|
178
|
+
isUploadingIn: (state: {
|
|
179
|
+
[key: string]: any;
|
|
180
|
+
}) => boolean;
|
|
181
|
+
defaultKeyOf: (sliceName: string) => string;
|
|
182
|
+
staleAtOfSlices: () => {
|
|
183
|
+
[k: string]: Date;
|
|
184
|
+
};
|
|
185
|
+
updatedAtOf: (model: BaseObject) => string | null;
|
|
186
|
+
servedFetch: <T>(key: string) => (...args: any[]) => Promise<T>;
|
|
187
|
+
};
|
|
188
|
+
export type ModelActionContext = ReturnType<typeof modelActionContextOf>;
|
|
189
|
+
export type SliceEntry = ModelActionContext["slices"][number];
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { type BaseObject } from "akanjs/constant";
|
|
2
|
+
import type { EditOption, NewOption } from "./actionOption.d.ts";
|
|
3
|
+
import type { ModelActionContext, ReportingFetchPolicy } from "./modelActionContext.d.ts";
|
|
4
|
+
import type { SetGet } from "./types.d.ts";
|
|
5
|
+
type Full = BaseObject;
|
|
6
|
+
export declare const modelOpenActionsOf: (ctx: ModelActionContext) => {
|
|
7
|
+
[x: string]: ((this: SetGet, partial?: Partial<Full>, { modal, setDefault, sliceName, draftScope }?: NewOption) => void) | ((this: SetGet, modelOrId: Full | string, { modal, onError, draftScope }?: EditOption & ReportingFetchPolicy) => Promise<void>);
|
|
8
|
+
};
|
|
9
|
+
export declare const modelStateActionsOf: (ctx: ModelActionContext) => {
|
|
10
|
+
[x: string]: ((this: SetGet, ...fullOrLightModels: Full[]) => void) | ((this: SetGet, draftScope?: string) => Promise<void>);
|
|
11
|
+
};
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { type GetStateObject } from "akanjs/base";
|
|
2
|
+
import { type BaseObject } from "akanjs/constant";
|
|
3
|
+
import type { CreateOption } from "./actionOption.d.ts";
|
|
4
|
+
import type { ModelActionContext, ReportingFetchPolicy } from "./modelActionContext.d.ts";
|
|
5
|
+
import type { SetGet } from "./types.d.ts";
|
|
6
|
+
type Input = BaseObject;
|
|
7
|
+
type Full = BaseObject;
|
|
8
|
+
export declare const formSaveActionsOf: (ctx: ModelActionContext) => {
|
|
9
|
+
[x: string]: ((this: SetGet, { path, modal, sliceName, onError, onSuccess }?: CreateOption<Full>) => Promise<void>) | ((this: SetGet, disabled?: boolean) => void);
|
|
10
|
+
};
|
|
11
|
+
export declare const modelWriteActionsOf: (ctx: ModelActionContext) => {
|
|
12
|
+
[x: string]: ((this: SetGet, data: GetStateObject<Input>, { path, modal, sliceName, onError, onSuccess }?: CreateOption<Full>) => Promise<void>) | ((this: SetGet, id: string, data: GetStateObject<Input>, { path, modal, onError, onSuccess }?: CreateOption<Full>) => Promise<void>) | ((this: SetGet, id: string, options?: ReportingFetchPolicy & {
|
|
13
|
+
modal?: string | null;
|
|
14
|
+
}) => Promise<void>) | ((this: SetGet, modelOrId: Full | string, data: Partial<Full>, options?: ReportingFetchPolicy) => Promise<void>);
|
|
15
|
+
};
|
|
16
|
+
export {};
|
|
@@ -1,11 +1,8 @@
|
|
|
1
|
+
import { type OpenSeq } from "./openSeq.d.ts";
|
|
1
2
|
import type { SetGet } from "./types.d.ts";
|
|
2
3
|
type StateRecord = {
|
|
3
4
|
[key: string]: unknown;
|
|
4
5
|
};
|
|
5
|
-
export interface OpenSeq {
|
|
6
|
-
open: number;
|
|
7
|
-
form: number;
|
|
8
|
-
}
|
|
9
6
|
interface WriteGuardNames {
|
|
10
7
|
model: string;
|
|
11
8
|
modelForm: string;
|
|
@@ -14,7 +11,7 @@ interface WriteGuardNames {
|
|
|
14
11
|
}
|
|
15
12
|
export declare const makeModelWriteGuard: (names: WriteGuardNames) => {
|
|
16
13
|
openSeqOf: (ctx: SetGet) => OpenSeq;
|
|
17
|
-
markOpened: (ctx: SetGet,
|
|
14
|
+
markOpened: (ctx: SetGet, opens: {
|
|
18
15
|
form: boolean;
|
|
19
16
|
}) => {
|
|
20
17
|
open: number;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { SetGet } from "./types.d.ts";
|
|
2
|
+
export interface OpenSeq {
|
|
3
|
+
open: number;
|
|
4
|
+
form: number;
|
|
5
|
+
}
|
|
6
|
+
type StateOf = Pick<SetGet, "get">;
|
|
7
|
+
export declare const openSeqIn: (store: StateOf, model: string) => OpenSeq;
|
|
8
|
+
export declare const markOpenedIn: (store: StateOf, model: string, { form }: {
|
|
9
|
+
form: boolean;
|
|
10
|
+
}) => {
|
|
11
|
+
open: number;
|
|
12
|
+
form: number;
|
|
13
|
+
};
|
|
14
|
+
export declare const seedOpen: (store: Pick<SetGet, "get" | "set">, model: string, opens: "view" | "form", seed: {
|
|
15
|
+
[key: string]: unknown;
|
|
16
|
+
}) => void;
|
|
17
|
+
export {};
|