akanjs 3.0.2 → 3.1.0-rc.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +26 -0
- package/base/baseEnv.ts +0 -4
- package/base/primitiveRegistry.ts +2 -2
- package/client/cookie.ts +5 -1
- package/client/csrLocation.ts +122 -0
- package/client/csrTypes.ts +32 -4
- package/client/device.ts +2 -1
- package/client/frameConfig.ts +78 -7
- package/client/index.ts +3 -0
- package/client/makePageProto.tsx +3 -2
- package/client/native/external-view.ts +1 -0
- package/client/route/RootLayoutDefinition.ts +7 -1
- package/client/route/RouteHead.ts +108 -0
- package/client/route/index.ts +1 -0
- package/client/router.ts +36 -23
- package/client/rscNavigation.ts +8 -2
- package/client/viewportMeta.ts +60 -0
- package/client/webManifest.ts +18 -0
- package/common/Logger.ts +7 -2
- package/common/PipelineNames.ts +31 -0
- package/common/PipelinePattern.ts +70 -0
- package/common/PipelinePlanSchema.ts +490 -0
- package/common/backoff.ts +14 -0
- package/common/index.ts +39 -0
- package/common/pipelinePlan.ts +259 -0
- package/common/routeConvention.ts +1 -0
- package/common/types.ts +17 -0
- package/constant/constantRegistry.ts +26 -6
- package/dictionary/base.dictionary.ts +8 -0
- package/dictionary/trans.ts +9 -1
- package/document/into.ts +5 -0
- package/fetch/client/fetchClient.ts +135 -31
- package/fetch/client/httpClient.ts +45 -0
- package/fetch/client/wsClient.ts +125 -16
- package/fetch/fetchType/buildFetch.type.ts +1 -0
- package/index.ts +243 -10
- package/package.json +1 -5
- package/server/akanApp.ts +5 -2
- package/server/akanServer.ts +44 -8
- package/server/artifact/builderRpc.ts +8 -3
- package/server/artifact/ipcTypes.ts +5 -2
- package/server/di/diLifecycle.ts +39 -3
- package/server/di/utils.ts +28 -1
- package/server/ed25519Key.ts +48 -0
- package/server/index.ts +1 -0
- package/server/machine/index.ts +2 -0
- package/server/machine/machineAccount.ts +27 -0
- package/server/machine/machineToken.ts +151 -0
- package/server/mcp/McpApps.ts +256 -0
- package/server/mcp/McpDispatcher.ts +31 -7
- package/server/mcp/McpRouter.ts +209 -46
- package/server/ops/opsToken.ts +3 -10
- package/server/resolver/database.resolver.ts +3 -0
- package/server/resolver/signal.resolver.ts +40 -3
- package/server/routeElementComposer.tsx +78 -2
- package/server/routeState.ts +6 -0
- package/server/routeTreeBuilder.ts +26 -9
- package/server/routing/apiRouter.ts +6 -3
- package/server/routing/roomReplay.ts +88 -0
- package/server/rscClient.tsx +53 -8
- package/server/rscWorker.tsx +141 -27
- package/server/rscWorkerHost.ts +18 -5
- package/server/sitemap.ts +14 -0
- package/server/ssrFromRscRenderer.tsx +12 -6
- package/server/ssrTypes.ts +3 -1
- package/server/systemPageDocument.tsx +38 -30
- package/server/types.tsx +2 -0
- package/server/webRouter.ts +74 -5
- package/service/injectInfo.ts +9 -1
- package/service/ipcTypes.ts +2 -1
- package/service/predefinedAdaptor/database.adaptor.ts +1 -146
- package/service/predefinedAdaptor/queue.adaptor.ts +44 -6
- package/service/predefinedAdaptor/queueBackoff.ts +12 -0
- package/service/predefinedAdaptor/solidQueue.adaptor.ts +17 -13
- package/service/predefinedAdaptor/sql/SqlDocumentStore.ts +44 -2
- package/service/predefinedAdaptor/sql/dialect/postgres.ts +3 -0
- package/service/predefinedAdaptor/sql/dialect/sqlite.ts +5 -2
- package/service/predefinedAdaptor/sql/search/fts5.ts +1 -1
- package/service/predefinedAdaptor/sql/types.ts +8 -6
- package/service/predefinedAdaptor/sql/values.ts +0 -23
- package/service/serve.ts +5 -1
- package/signal/agent.signal.ts +1 -1
- package/signal/base.signal.ts +2 -2
- package/signal/endpointIdempotency.ts +53 -0
- package/signal/internalArg.ts +14 -0
- package/signal/mcp/McpDocument.ts +38 -1
- package/signal/mcp/mcpProtocol.ts +18 -0
- package/signal/signalContext.ts +58 -30
- package/signal/signalRegistry.ts +14 -4
- package/signal/types.ts +18 -3
- package/store/agent/StoreSurfaceSource.ts +1 -1
- package/store/agentic/StToolBuilder.ts +3 -0
- package/test/conformance.ts +9 -33
- package/types/base/baseEnv.d.ts +0 -4
- package/types/base/primitiveRegistry.d.ts +1 -1
- package/types/client/csrLocation.d.ts +32 -0
- package/types/client/csrTypes.d.ts +40 -4
- package/types/client/frameConfig.d.ts +14 -2
- package/types/client/index.d.ts +3 -0
- package/types/client/native/external-view.d.ts +1 -0
- package/types/client/route/RootLayoutDefinition.d.ts +2 -1
- package/types/client/route/RouteHead.d.ts +13 -0
- package/types/client/route/index.d.ts +1 -0
- package/types/client/router.d.ts +6 -0
- package/types/client/rscNavigation.d.ts +4 -0
- package/types/client/viewportMeta.d.ts +18 -0
- package/types/client/webManifest.d.ts +4 -0
- package/types/common/PipelineNames.d.ts +6 -0
- package/types/common/PipelinePattern.d.ts +14 -0
- package/types/common/PipelinePlanSchema.d.ts +9 -0
- package/types/common/backoff.d.ts +10 -0
- package/types/common/index.d.ts +5 -0
- package/types/common/pipelinePlan.d.ts +224 -0
- package/types/common/types.d.ts +16 -0
- package/types/constant/constantRegistry.d.ts +5 -2
- package/types/dictionary/base.dictionary.d.ts +1 -1
- package/types/dictionary/dictionary.d.ts +8 -8
- package/types/document/into.d.ts +9 -0
- package/types/fetch/client/fetchClient.d.ts +31 -4
- package/types/fetch/client/httpClient.d.ts +8 -0
- package/types/fetch/client/wsClient.d.ts +26 -2
- package/types/fetch/fetchType/buildFetch.type.d.ts +1 -0
- package/types/index.d.ts +230 -9
- package/types/server/akanServer.d.ts +16 -1
- package/types/server/artifact/builderRpc.d.ts +7 -2
- package/types/server/artifact/ipcTypes.d.ts +5 -1
- package/types/server/di/utils.d.ts +1 -0
- package/types/server/ed25519Key.d.ts +13 -0
- package/types/server/index.d.ts +1 -0
- package/types/server/machine/index.d.ts +2 -0
- package/types/server/machine/machineAccount.d.ts +5 -0
- package/types/server/machine/machineToken.d.ts +29 -0
- package/types/server/machine.d.ts +1 -0
- package/types/server/mcp/McpApps.d.ts +50 -0
- package/types/server/mcp/McpDispatcher.d.ts +4 -1
- package/types/server/mcp/McpRouter.d.ts +4 -0
- package/types/server/resolver/signal.resolver.d.ts +2 -1
- package/types/server/routeElementComposer.d.ts +24 -4
- package/types/server/routeState.d.ts +4 -1
- package/types/server/routing/roomReplay.d.ts +24 -0
- package/types/server/rscWorkerHost.d.ts +5 -2
- package/types/server/sitemap.d.ts +2 -0
- package/types/server/ssrFromRscRenderer.d.ts +3 -3
- package/types/server/ssrTypes.d.ts +4 -1
- package/types/server/systemPageDocument.d.ts +2 -0
- package/types/server/types.d.ts +4 -1
- package/types/server/webRouter.d.ts +3 -1
- package/types/service/ipcTypes.d.ts +2 -0
- package/types/service/predefinedAdaptor/database.adaptor.d.ts +1 -24
- package/types/service/predefinedAdaptor/queue.adaptor.d.ts +10 -3
- package/types/service/predefinedAdaptor/queueBackoff.d.ts +4 -0
- package/types/service/predefinedAdaptor/solidQueue.adaptor.d.ts +3 -3
- package/types/service/predefinedAdaptor/sql/SqlDocumentStore.d.ts +6 -1
- package/types/service/predefinedAdaptor/sql/dialect/postgres.d.ts +1 -0
- package/types/service/predefinedAdaptor/sql/dialect/sqlite.d.ts +1 -0
- package/types/service/predefinedAdaptor/sql/search/fts5.d.ts +1 -1
- package/types/service/predefinedAdaptor/sql/types.d.ts +9 -5
- package/types/service/predefinedAdaptor/sql/values.d.ts +0 -3
- package/types/service/serve.d.ts +3 -0
- package/types/signal/endpointIdempotency.d.ts +7 -0
- package/types/signal/internalArg.d.ts +10 -0
- package/types/signal/mcp/McpDocument.d.ts +8 -0
- package/types/signal/mcp/mcpProtocol.d.ts +17 -0
- package/types/signal/signalContext.d.ts +5 -3
- package/types/signal/signalRegistry.d.ts +4 -4
- package/types/signal/types.d.ts +21 -1
- package/types/store/agentic/StToolBuilder.d.ts +2 -0
- package/types/test/conformance.d.ts +7 -10
- package/types/ui/Agent/Chat.d.ts +5 -1
- package/types/ui/Agent/EmbedApproval.d.ts +1 -0
- package/types/ui/Agent/index.d.ts +3 -0
- package/types/ui/Agent/useKeyboardFrame.d.ts +2 -0
- package/types/ui/Agent/useScreenActions.d.ts +18 -0
- package/types/ui/BottomSheet.d.ts +1 -0
- package/types/ui/Constant/Doc.d.ts +11 -17
- package/types/ui/Constant/index.d.ts +7 -2
- package/types/ui/Constant/schemaDoc.d.ts +11 -0
- package/types/ui/Dialog/Modal.d.ts +6 -1
- package/types/ui/Dialog/index.d.ts +1 -1
- package/types/ui/Dialog/modalSurface.d.ts +12 -0
- package/types/ui/Layout/BottomTab.d.ts +11 -2
- package/types/ui/Layout/FrameSlotFallback.d.ts +9 -0
- package/types/ui/Layout/Navbar.d.ts +4 -1
- package/types/ui/Layout/TopInset.d.ts +1 -1
- package/types/ui/Layout/index.d.ts +3 -3
- package/types/ui/Link/Action.d.ts +5 -1
- package/types/ui/Link/Anchor.d.ts +5 -3
- package/types/ui/Link/activePath.d.ts +13 -0
- package/types/ui/Link/index.d.ts +1 -1
- package/types/ui/Modal.d.ts +6 -1
- package/types/ui/Model/EditModal.d.ts +6 -1
- package/types/ui/Model/New.d.ts +6 -1
- package/types/ui/Model/ViewEditModal.d.ts +6 -1
- package/types/ui/Model/ViewModal.d.ts +6 -1
- package/types/ui/Model/newFormOrigin.d.ts +7 -0
- package/types/ui/Portal.d.ts +3 -1
- package/types/ui/Reference/origin.d.ts +12 -0
- package/types/ui/Signal/Doc.d.ts +23 -18
- package/types/ui/Signal/Listener.d.ts +2 -6
- package/types/ui/Signal/Object.d.ts +6 -10
- package/types/ui/Signal/Response.d.ts +3 -6
- package/types/ui/Signal/RestApi.d.ts +11 -15
- package/types/ui/Signal/WebSocket.d.ts +11 -21
- package/types/ui/Signal/endpointEntries.d.ts +8 -0
- package/types/ui/Signal/index.d.ts +35 -12
- package/types/ui/Signal/signalText.d.ts +178 -0
- package/types/ui/System/CSR.d.ts +2 -2
- package/types/ui/System/Client.d.ts +4 -3
- package/types/ui/System/Common.d.ts +27 -6
- package/types/ui/System/SSR.d.ts +6 -6
- package/types/ui/Tooltip.d.ts +4 -2
- package/types/ui/index.d.ts +2 -1
- package/types/ui/overlayLayer.d.ts +6 -0
- package/types/ui/overlayPosition.d.ts +17 -0
- package/types/vendor/@akanjs/native/packages/cli/src/api.d.ts +14 -3
- package/types/vendor/@akanjs/native/packages/cli/src/commands/update.d.ts +1 -1
- package/types/vendor/@akanjs/native/packages/cli/src/config.d.ts +30 -5
- package/types/vendor/@akanjs/native/packages/cli/src/lib/compat.d.ts +8 -0
- package/types/vendor/@akanjs/native/packages/cli/src/lib/desktop-server.d.ts +5 -0
- package/types/vendor/@akanjs/native/packages/cli/src/lib/distribution.d.ts +22 -0
- package/types/vendor/@akanjs/native/packages/cli/src/lib/project.d.ts +4 -0
- package/types/vendor/@akanjs/native/packages/cli/src/lib/publish.d.ts +16 -10
- package/types/vendor/@akanjs/native/packages/cli/src/lib/updates.d.ts +51 -7
- package/types/vendor/@akanjs/native/packages/cli/src/lib/vectors.d.ts +1 -1
- package/types/vendor/@akanjs/native/packages/cli/src/platforms/windows-installer.d.ts +7 -0
- package/types/vendor/@akanjs/native/packages/cli/src/platforms/windows.d.ts +5 -0
- package/types/vendor/@akanjs/native/packages/core/src/kernel.d.ts +36 -0
- package/types/vendor/@akanjs/native/packages/desktop/src/plugin.d.ts +2 -0
- package/types/vendor/@akanjs/native/packages/desktop/src/server.d.ts +11 -0
- package/types/vendor/@akanjs/native/plugins/external-view/src/desktop.d.ts +17 -0
- package/types/vendor/@akanjs/native/plugins/external-view/src/index.d.ts +132 -0
- package/types/vendor/@akanjs/native/plugins/external-view/src.d.ts +1 -0
- package/types/vendor/@akanjs/native/plugins/updates/src/index.d.ts +8 -0
- package/types/vendor/@akanjs/native/plugins/window/src/desktop.d.ts +4 -1
- package/types/vendor/@akanjs/native/plugins/window/src/index.d.ts +49 -0
- package/types/vendor/use-agentic/types.d.ts +2 -0
- package/types/webkit/CsrStack.d.ts +1 -1
- package/types/webkit/McpAppAgent.d.ts +14 -0
- package/types/webkit/McpAppApprovals.d.ts +8 -0
- package/types/webkit/McpAppBridge.d.ts +101 -0
- package/types/webkit/McpAppView.d.ts +21 -0
- package/types/webkit/index.d.ts +1 -0
- package/types/webkit/useLocation.d.ts +1 -1
- package/types/webkit/useVisualViewportFrame.d.ts +13 -0
- package/ui/Agent/Chat.tsx +29 -10
- package/ui/Agent/Composer.tsx +2 -1
- package/ui/Agent/EmbedApproval.tsx +17 -0
- package/ui/Agent/RichInput.tsx +1 -1
- package/ui/Agent/index.ts +2 -0
- package/ui/Agent/useKeyboardFrame.ts +10 -0
- package/ui/Agent/useScreenActions.ts +45 -0
- package/ui/BottomSheet.tsx +82 -53
- package/ui/Constant/Doc.tsx +113 -60
- package/ui/Constant/index.ts +2 -2
- package/ui/Constant/schemaDoc.ts +86 -26
- package/ui/Dialog/LegacyModal.tsx +53 -52
- package/ui/Dialog/Modal.tsx +93 -49
- package/ui/Dialog/modalSurface.ts +61 -0
- package/ui/DragAction.tsx +1 -1
- package/ui/DraggableList.tsx +1 -1
- package/ui/Dropdown.tsx +4 -6
- package/ui/KeyboardAvoiding.tsx +1 -1
- package/ui/Layout/BottomInset.tsx +20 -14
- package/ui/Layout/BottomTab.tsx +42 -16
- package/ui/Layout/FrameSlotFallback.tsx +59 -0
- package/ui/Layout/Navbar.tsx +37 -11
- package/ui/Layout/Sider.tsx +1 -1
- package/ui/Layout/TopInset.tsx +15 -14
- package/ui/Link/Action.tsx +15 -5
- package/ui/Link/Anchor.tsx +25 -13
- package/ui/Link/activePath.ts +25 -0
- package/ui/Link/index.tsx +1 -1
- package/ui/Load/Pagination.tsx +1 -1
- package/ui/Load/Units.tsx +1 -1
- package/ui/Loading/ProgressBar.tsx +1 -1
- package/ui/Modal.tsx +9 -0
- package/ui/Model/EditModal.tsx +16 -1
- package/ui/Model/New.tsx +25 -2
- package/ui/Model/NewWrapper_Client.tsx +2 -0
- package/ui/Model/ViewEditModal.tsx +9 -0
- package/ui/Model/ViewModal.tsx +16 -1
- package/ui/Model/newFormOrigin.ts +45 -0
- package/ui/Popconfirm.tsx +5 -7
- package/ui/Portal.tsx +4 -7
- package/ui/Reference/origin.ts +31 -0
- package/ui/ScreenNavigator.tsx +1 -1
- package/ui/Select.tsx +2 -7
- package/ui/Signal/Arg.tsx +2 -2
- package/ui/Signal/Doc.tsx +125 -63
- package/ui/Signal/Endpoint.tsx +11 -10
- package/ui/Signal/Listener.tsx +7 -10
- package/ui/Signal/Object.tsx +7 -14
- package/ui/Signal/Response.tsx +24 -24
- package/ui/Signal/RestApi.tsx +63 -52
- package/ui/Signal/WebSocket.tsx +65 -72
- package/ui/Signal/endpointEntries.ts +25 -0
- package/ui/Signal/index.ts +23 -6
- package/ui/Signal/signalText.ts +59 -0
- package/ui/System/CSR.tsx +34 -8
- package/ui/System/Client.tsx +36 -5
- package/ui/System/Common.tsx +76 -32
- package/ui/System/SSR.tsx +73 -31
- package/ui/Toast.tsx +1 -1
- package/ui/Tooltip.tsx +84 -30
- package/ui/index.ts +11 -1
- package/ui/overlayLayer.ts +25 -2
- package/ui/overlayPosition.ts +90 -0
- package/ui/recipe/inputRecipe.ts +8 -1
- package/ui/styles.css +152 -0
- package/vendor/@akanjs/native/native/android/src/com/akanjs/runtime/AkanNativeActivity.kt +22 -2
- package/vendor/@akanjs/native/native/android/src/com/akanjs/runtime/AkanNativeKernel.kt +37 -0
- package/vendor/@akanjs/native/native/android/src/com/akanjs/runtime/AkanNativeUpdateReports.kt +169 -0
- package/vendor/@akanjs/native/native/android/src/com/akanjs/runtime/AkanNativeUpdates.kt +110 -38
- package/vendor/@akanjs/native/native/android/src/com/akanjs/runtime/AkanNativeVectors.kt +20 -0
- package/vendor/@akanjs/native/native/desktop/Cargo.lock +16 -16
- package/vendor/@akanjs/native/native/desktop/src/external.rs +651 -0
- package/vendor/@akanjs/native/native/desktop/src/json.rs +23 -0
- package/vendor/@akanjs/native/native/desktop/src/lib.rs +228 -5
- package/vendor/@akanjs/native/native/ios/Sources/AkanNativeApp.swift +2 -1
- package/vendor/@akanjs/native/native/ios/Sources/AkanNativeKernel.swift +47 -1
- package/vendor/@akanjs/native/native/ios/Sources/AkanNativeUpdateReports.swift +145 -0
- package/vendor/@akanjs/native/native/ios/Sources/AkanNativeUpdates.swift +112 -43
- package/vendor/@akanjs/native/native/ios/Sources/AkanNativeVectors.swift +18 -0
- package/vendor/@akanjs/native/native/ios/Sources/AkanNativeViewController.swift +24 -2
- package/vendor/@akanjs/native/packages/cli/src/api.ts +22 -6
- package/vendor/@akanjs/native/packages/cli/src/commands/build.ts +24 -8
- package/vendor/@akanjs/native/packages/cli/src/commands/update.ts +11 -9
- package/vendor/@akanjs/native/packages/cli/src/config.ts +35 -7
- package/vendor/@akanjs/native/packages/cli/src/lib/compat.ts +2 -0
- package/vendor/@akanjs/native/packages/cli/src/lib/configkeys.ts +6 -4
- package/vendor/@akanjs/native/packages/cli/src/lib/desktop-server.ts +11 -1
- package/vendor/@akanjs/native/packages/cli/src/lib/distribution.ts +73 -0
- package/vendor/@akanjs/native/packages/cli/src/lib/project.ts +15 -3
- package/vendor/@akanjs/native/packages/cli/src/lib/publish.ts +70 -23
- package/vendor/@akanjs/native/packages/cli/src/lib/updates.ts +159 -23
- package/vendor/@akanjs/native/packages/cli/src/lib/vectors.ts +2 -0
- package/vendor/@akanjs/native/packages/cli/src/platforms/android.ts +9 -4
- package/vendor/@akanjs/native/packages/cli/src/platforms/desktop-update.ts +1 -1
- package/vendor/@akanjs/native/packages/cli/src/platforms/desktop.ts +4 -2
- package/vendor/@akanjs/native/packages/cli/src/platforms/ios.ts +9 -4
- package/vendor/@akanjs/native/packages/cli/src/platforms/windows-installer.ts +25 -11
- package/vendor/@akanjs/native/packages/cli/src/platforms/windows.ts +14 -3
- package/vendor/@akanjs/native/packages/core/src/kernel.ts +49 -0
- package/vendor/@akanjs/native/packages/core/vectors/updates.json +31 -0
- package/vendor/@akanjs/native/packages/desktop/src/main.ts +3 -0
- package/vendor/@akanjs/native/packages/desktop/src/plugin.ts +2 -0
- package/vendor/@akanjs/native/packages/desktop/src/server.ts +70 -6
- package/vendor/@akanjs/native/plugins/external-view/native-plugin.json +23 -0
- package/vendor/@akanjs/native/plugins/external-view/src/desktop.ts +321 -0
- package/vendor/@akanjs/native/plugins/external-view/src/index.ts +106 -0
- package/vendor/@akanjs/native/plugins/updates/android/UpdatesPlugin.kt +133 -41
- package/vendor/@akanjs/native/plugins/updates/ios/UpdatesPlugin.swift +101 -36
- package/vendor/@akanjs/native/plugins/updates/native-plugin.json +4 -2
- package/vendor/@akanjs/native/plugins/updates/src/desktop.ts +15 -1
- package/vendor/@akanjs/native/plugins/updates/src/index.ts +7 -1
- package/vendor/@akanjs/native/plugins/window/native-plugin.json +4 -0
- package/vendor/@akanjs/native/plugins/window/src/desktop.ts +68 -1
- package/vendor/@akanjs/native/plugins/window/src/index.ts +47 -0
- package/vendor/use-agentic/ToolRunner.ts +8 -1
- package/vendor/use-agentic/types.ts +2 -0
- package/webkit/CsrRouteTable.ts +1 -0
- package/webkit/CsrStack.ts +9 -2
- package/webkit/McpAppAgent.ts +138 -0
- package/webkit/McpAppApprovals.ts +56 -0
- package/webkit/McpAppBridge.ts +291 -0
- package/webkit/McpAppView.ts +258 -0
- package/webkit/bootCsr.tsx +54 -5
- package/webkit/index.ts +1 -0
- package/webkit/useCsrValues.ts +16 -10
- package/webkit/useFrameRuntime.ts +10 -1
- package/webkit/useLocation.ts +4 -3
- package/webkit/useVisualViewportFrame.tsx +52 -0
- package/service/predefinedAdaptor/sql/driver/libsql.ts +0 -45
- package/types/service/predefinedAdaptor/sql/driver/libsql.d.ts +0 -20
- package/types/ui/Agent/useKeyboardInset.d.ts +0 -1
- package/types/ui/ServerPortal.d.ts +0 -15
- package/ui/Agent/useKeyboardInset.ts +0 -19
- package/ui/ServerPortal.tsx +0 -49
package/signal/types.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { DefaultPrimitiveName, UnCls } from "akanjs/base";
|
|
2
|
-
import type { ServiceModel } from "akanjs/service";
|
|
2
|
+
import type { AkanJob, ServiceModel } from "akanjs/service";
|
|
3
3
|
import type { RateLimitBudget } from "./endpointRateLimit";
|
|
4
4
|
import type { GuardCls } from "./guard";
|
|
5
5
|
import type { MiddlewareCls } from "./middleware";
|
|
@@ -89,6 +89,11 @@ export interface SignalOption<Response = any, Nullable extends boolean = false,
|
|
|
89
89
|
* it. Losing the race does not stop the handler, which runs to completion with nobody holding its result.
|
|
90
90
|
*/
|
|
91
91
|
timeout?: number;
|
|
92
|
+
/**
|
|
93
|
+
* A `process` job that failed its last attempt, with `this` the internal: the dead letter, called once per job on
|
|
94
|
+
* whichever queue ran it. Throwing from it is logged and changes nothing.
|
|
95
|
+
*/
|
|
96
|
+
onFailed?: (this: any, job: AkanJob, error: unknown) => Promise<void> | void;
|
|
92
97
|
partial?: _Key[] | readonly _Key[];
|
|
93
98
|
/**
|
|
94
99
|
* Milliseconds to reuse the answer, keyed by endpoint and arguments; unset caches nothing. Only a `query` with no
|
|
@@ -191,6 +196,8 @@ export interface SerializedSignal {
|
|
|
191
196
|
crud?: SerializedSignalMcp;
|
|
192
197
|
/** Which generated CRUD verbs a person-only guard protects, by the same verb map; only the `false` keys travel. */
|
|
193
198
|
agents?: SerializedSignalMcp;
|
|
199
|
+
/** The app or lib that registered the signal, first registrant first: an app extending a lib module reads `["shared", "sceny"]`. */
|
|
200
|
+
origin?: string[];
|
|
194
201
|
}
|
|
195
202
|
|
|
196
203
|
/** Keyed by generated verb, mirroring the `guards` map `slice()` takes. The root slice's own flag rides on `slice[""]`. */
|
|
@@ -203,7 +210,10 @@ export interface SerializedSignalMcp {
|
|
|
203
210
|
|
|
204
211
|
export type SignalType = "restapi" | "websocket";
|
|
205
212
|
|
|
206
|
-
|
|
213
|
+
/** Where a client's copy of a room stands: the numbering it came from, and the last frame it took. */
|
|
214
|
+
export type WebsocketRoomCursor = { epoch: string; seq: number };
|
|
215
|
+
/** `since` asks a resubscribe to send what was published after it, if the server still can. */
|
|
216
|
+
export type WebsocketReqData = { key: string; data: unknown[]; subscribe?: boolean; since?: WebsocketRoomCursor };
|
|
207
217
|
export type WebsocketMessageData = { type: "msg"; key: string; data: object | object[] };
|
|
208
218
|
/**
|
|
209
219
|
* `op` is relative to the room, not the database: a row edited out of a filter is `leave` there and `enter` where it
|
|
@@ -224,7 +234,12 @@ export type WebsocketSubscribeAck = {
|
|
|
224
234
|
roomId: string;
|
|
225
235
|
requestRoomId: string;
|
|
226
236
|
subscribe: boolean;
|
|
237
|
+
/** The room's numbering at the subscribe, when the server numbers its frames. */
|
|
238
|
+
cursor?: WebsocketRoomCursor;
|
|
239
|
+
/** Answering `since`: `true` when every frame after it was sent ahead of this ack, `false` for a gap. */
|
|
240
|
+
replayed?: boolean;
|
|
227
241
|
};
|
|
228
|
-
|
|
242
|
+
/** `seq` numbers the frames one server process delivers for a room, one apart. */
|
|
243
|
+
export type WebsocketPublishData = { type: "pub"; roomId: string; data: object | object[]; seq?: number };
|
|
229
244
|
export type WebsocketAuthAck = { type: "auth"; revokedRooms: string[] };
|
|
230
245
|
export type WebsocketResData = WebsocketMessageData | WebsocketSubscribeAck | WebsocketPublishData | WebsocketAuthAck;
|
|
@@ -52,8 +52,8 @@ export class StoreSurfaceSource implements SurfaceSource {
|
|
|
52
52
|
: "path must be an internal path starting with /.",
|
|
53
53
|
run: async (args) => {
|
|
54
54
|
const path = String(args.path);
|
|
55
|
-
router.push(path);
|
|
56
55
|
try {
|
|
56
|
+
router.push(path);
|
|
57
57
|
await router.navigation();
|
|
58
58
|
} catch {
|
|
59
59
|
throw new Error(
|
|
@@ -33,6 +33,8 @@ export interface StToolMeta {
|
|
|
33
33
|
settle?: boolean;
|
|
34
34
|
confirm?: ToolConfirm;
|
|
35
35
|
guard?: ToolGuard;
|
|
36
|
+
/** What a person reads for this action in a command palette, in their language (an `l()` result); never the model. */
|
|
37
|
+
label?: string;
|
|
36
38
|
}
|
|
37
39
|
|
|
38
40
|
/** A scalar, an enum, or one array level of either. */
|
|
@@ -141,6 +143,7 @@ export class StToolBuilder<Args extends unknown[] = []> {
|
|
|
141
143
|
description: spec.desc,
|
|
142
144
|
settle: spec.meta.settle,
|
|
143
145
|
parameters: StToolBuilder.parametersOf(spec.args),
|
|
146
|
+
label: () => live.current.meta.label,
|
|
144
147
|
|
|
145
148
|
...(spec.meta.confirm === undefined && !name.startsWith("remove")
|
|
146
149
|
? {}
|
package/test/conformance.ts
CHANGED
|
@@ -4,7 +4,6 @@ import path from "node:path";
|
|
|
4
4
|
import {
|
|
5
5
|
DEFAULT_TOKENIZER,
|
|
6
6
|
getSolidConfig,
|
|
7
|
-
LibsqlDatabase,
|
|
8
7
|
PostgresDatabase,
|
|
9
8
|
PostgresDialect,
|
|
10
9
|
RedisCache,
|
|
@@ -16,12 +15,11 @@ import {
|
|
|
16
15
|
SqliteDialect,
|
|
17
16
|
} from "akanjs/service";
|
|
18
17
|
|
|
19
|
-
type ConformanceBackend = "redis" | "postgres"
|
|
18
|
+
type ConformanceBackend = "redis" | "postgres";
|
|
20
19
|
|
|
21
20
|
export type ConformanceCacheKind = "solid" | "redis";
|
|
22
21
|
|
|
23
|
-
|
|
24
|
-
export type SqlDriverKind = "sqlite" | "libsql" | "postgres" | "libsqlRemote";
|
|
22
|
+
export type SqlDriverKind = "sqlite" | "postgres";
|
|
25
23
|
|
|
26
24
|
export interface SqlDriverOptions {
|
|
27
25
|
insight?: boolean;
|
|
@@ -31,7 +29,7 @@ export interface SqlDriverOptions {
|
|
|
31
29
|
|
|
32
30
|
export interface SqlDriver {
|
|
33
31
|
kind: SqlDriverKind;
|
|
34
|
-
database: SqliteDatabase |
|
|
32
|
+
database: SqliteDatabase | PostgresDatabase;
|
|
35
33
|
dialect: SqlDialect;
|
|
36
34
|
/** A new adaptor on the same storage — what a process restart sees, so only what was committed. */
|
|
37
35
|
restart: () => Promise<SqlDriver>;
|
|
@@ -45,10 +43,9 @@ export interface SqlDriver {
|
|
|
45
43
|
const backendEnvNames = {
|
|
46
44
|
redis: "AKAN_TEST_REDIS_URL",
|
|
47
45
|
postgres: "AKAN_TEST_POSTGRES_URL",
|
|
48
|
-
libsql: "AKAN_TEST_LIBSQL_URL",
|
|
49
46
|
} as const;
|
|
50
47
|
|
|
51
|
-
/** `bun run testConformance` (`infra/test/compose.yaml`) sets
|
|
48
|
+
/** `bun run testConformance` (`infra/test/compose.yaml`) sets both backends; plain `bun test` runs SQLite. */
|
|
52
49
|
export class ConformanceEnv {
|
|
53
50
|
static readonly #announced = new Set<string>();
|
|
54
51
|
/** Where a deployment points an app at its data. A test that hands its storage in has these cleared first. */
|
|
@@ -56,9 +53,6 @@ export class ConformanceEnv {
|
|
|
56
53
|
"AKAN_DATABASE_MODES",
|
|
57
54
|
"AKAN_SOLID_DB_PATH",
|
|
58
55
|
"SQLITE_DATABASE_PATH",
|
|
59
|
-
"LIBSQL_URL",
|
|
60
|
-
"LIBSQL_URI",
|
|
61
|
-
"LIBSQL_AUTH_TOKEN",
|
|
62
56
|
"POSTGRES_URL",
|
|
63
57
|
"POSTGRES_URI",
|
|
64
58
|
"POSTGRES_HOST",
|
|
@@ -199,24 +193,12 @@ export class ConformanceEnv {
|
|
|
199
193
|
}
|
|
200
194
|
|
|
201
195
|
/** The local drivers always, and each remote one whose backend the suite can reach. */
|
|
202
|
-
static sqlDrivers(suite: string
|
|
196
|
+
static sqlDrivers(suite: string): SqlDriverKind[] {
|
|
203
197
|
const kinds: SqlDriverKind[] = ["sqlite"];
|
|
204
|
-
if (ConformanceEnv.#hasLibsqlBinding(suite)) kinds.push("libsql");
|
|
205
198
|
if (ConformanceEnv.has(suite, "postgres")) kinds.push("postgres");
|
|
206
|
-
if (remote && ConformanceEnv.has(suite, "libsql")) kinds.push("libsqlRemote");
|
|
207
199
|
return kinds;
|
|
208
200
|
}
|
|
209
201
|
|
|
210
|
-
static #hasLibsqlBinding(suite: string) {
|
|
211
|
-
if (process.platform !== "win32" || process.arch !== "arm64") return true;
|
|
212
|
-
const key = `${suite}:libsql-binding`;
|
|
213
|
-
if (!ConformanceEnv.#announced.has(key)) {
|
|
214
|
-
ConformanceEnv.#announced.add(key);
|
|
215
|
-
console.info(`[conformance] ${suite}: local libsql cases skipped — libsql publishes no win32-arm64 binding`);
|
|
216
|
-
}
|
|
217
|
-
return false;
|
|
218
|
-
}
|
|
219
|
-
|
|
220
202
|
/**
|
|
221
203
|
* The real adaptor, initialised as the DI container would, on storage nothing else sees. `insight` gives Postgres a
|
|
222
204
|
* login role for `InsightQuery`; `memory` puts SQLite in memory, as `TestServer` does.
|
|
@@ -229,14 +211,12 @@ export class ConformanceEnv {
|
|
|
229
211
|
kind: SqlDriverKind,
|
|
230
212
|
{ insight = false, memory = false, search: searchConfig }: SqlDriverOptions,
|
|
231
213
|
): Promise<{ config: object; remove: () => Promise<void> }> {
|
|
232
|
-
const search = { enabled:
|
|
214
|
+
const search = { enabled: true, tokenizer: DEFAULT_TOKENIZER, ...searchConfig };
|
|
233
215
|
if (kind === "postgres") {
|
|
234
216
|
const { url, insightUrl, drop } = await ConformanceEnv.postgresSchema("akan_sql", { insight });
|
|
235
217
|
return { config: { url, insightUrl, search }, remove: drop };
|
|
236
218
|
}
|
|
237
|
-
if (
|
|
238
|
-
return { config: { url: ConformanceEnv.url("libsql"), search }, remove: async () => undefined };
|
|
239
|
-
if (kind === "sqlite" && memory)
|
|
219
|
+
if (memory)
|
|
240
220
|
return {
|
|
241
221
|
config: { filePath: ":memory:", journalMode: "MEMORY", synchronous: "OFF", foreignKeys: true, search },
|
|
242
222
|
remove: async () => undefined,
|
|
@@ -244,10 +224,7 @@ export class ConformanceEnv {
|
|
|
244
224
|
const { dir, remove } = await ConformanceEnv.tempDir(`akan-${kind}`);
|
|
245
225
|
const filePath = path.join(dir, "conformance.db");
|
|
246
226
|
return {
|
|
247
|
-
config:
|
|
248
|
-
kind === "sqlite"
|
|
249
|
-
? { filePath, journalMode: "WAL", busyTimeoutMs: 5000, synchronous: "NORMAL", foreignKeys: true, search }
|
|
250
|
-
: { url: `file:${filePath}`, search },
|
|
227
|
+
config: { filePath, journalMode: "WAL", busyTimeoutMs: 5000, synchronous: "NORMAL", foreignKeys: true, search },
|
|
251
228
|
remove,
|
|
252
229
|
};
|
|
253
230
|
}
|
|
@@ -262,8 +239,7 @@ export class ConformanceEnv {
|
|
|
262
239
|
storage: { config: object; remove: () => Promise<void> },
|
|
263
240
|
): Promise<SqlDriver> {
|
|
264
241
|
const scheduler = new Scheduler();
|
|
265
|
-
const database =
|
|
266
|
-
kind === "postgres" ? new PostgresDatabase() : kind === "sqlite" ? new SqliteDatabase() : new LibsqlDatabase();
|
|
242
|
+
const database = kind === "postgres" ? new PostgresDatabase() : new SqliteDatabase();
|
|
267
243
|
Object.assign(database, { scheduler, config: storage.config });
|
|
268
244
|
await database.onInit();
|
|
269
245
|
const shutdown = async () => {
|
package/types/base/baseEnv.d.ts
CHANGED
|
@@ -152,7 +152,7 @@ declare global {
|
|
|
152
152
|
[CLIENT_VALUE]: Dayjs;
|
|
153
153
|
[DEFAULT_VALUE]: Dayjs;
|
|
154
154
|
[PURIFIED_VALUE]: Dayjs;
|
|
155
|
-
[EXAMPLE_VALUE]:
|
|
155
|
+
[EXAMPLE_VALUE]: Dayjs;
|
|
156
156
|
validate(value: Date): boolean;
|
|
157
157
|
parseValue(input: Date): Dayjs;
|
|
158
158
|
serializeValue(value: Dayjs | Date): Date;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
export interface CsrMemoryOwner {
|
|
2
|
+
leave: (href: string) => void;
|
|
3
|
+
reload: () => void;
|
|
4
|
+
}
|
|
5
|
+
declare global {
|
|
6
|
+
var __AKAN_CSR_LOCATION__: CsrLocation | undefined;
|
|
7
|
+
var __AKAN_EMBED__: {
|
|
8
|
+
kind: "mcp-app";
|
|
9
|
+
origin?: string;
|
|
10
|
+
account?: Record<string, unknown> | null;
|
|
11
|
+
} | undefined;
|
|
12
|
+
}
|
|
13
|
+
export declare class CsrLocation {
|
|
14
|
+
#private;
|
|
15
|
+
get isMemory(): boolean;
|
|
16
|
+
/** The owner takes what a document load would do, which a view cannot: it has no document to load in its place. */
|
|
17
|
+
useMemory(href: string, owner: CsrMemoryOwner): void;
|
|
18
|
+
/** Path, search and hash, without the origin. */
|
|
19
|
+
get href(): string;
|
|
20
|
+
get pathname(): string;
|
|
21
|
+
get search(): string;
|
|
22
|
+
get hash(): string;
|
|
23
|
+
get state(): unknown;
|
|
24
|
+
/** `href` as a route reads it: an absolute URL on this document's origin loses the origin, anything else is kept. */
|
|
25
|
+
strip(href: string): string;
|
|
26
|
+
push(state: unknown, href: string): void;
|
|
27
|
+
replace(state: unknown, href?: string): void;
|
|
28
|
+
back(): void;
|
|
29
|
+
assign(href: string): void;
|
|
30
|
+
reload(): void;
|
|
31
|
+
}
|
|
32
|
+
export declare const csrLocation: CsrLocation;
|
|
@@ -14,13 +14,22 @@ export type PageSafeAreaConfig = boolean | "top" | "bottom" | {
|
|
|
14
14
|
/** `"stream"` flushes the shell (`Loading` included) then streams; a redirect in suspended content becomes a client one.
|
|
15
15
|
* `"block"` buffers the whole document, so an error in slow content can still render a clean error page. */
|
|
16
16
|
export type SsrRenderMode = "stream" | "block";
|
|
17
|
+
/** Px per Tailwind breakpoint (sm 40rem, md 48rem, lg 64rem, xl 80rem, 2xl 96rem), each from its own width up. */
|
|
18
|
+
export interface ResponsiveInset {
|
|
19
|
+
base: number;
|
|
20
|
+
sm?: number;
|
|
21
|
+
md?: number;
|
|
22
|
+
lg?: number;
|
|
23
|
+
xl?: number;
|
|
24
|
+
"2xl"?: number;
|
|
25
|
+
}
|
|
17
26
|
export interface PageConfig {
|
|
18
27
|
transition?: TransitionType;
|
|
19
28
|
safeArea?: PageSafeAreaConfig;
|
|
20
|
-
/** Top chrome reservation in px. Use true for the default 48px reservation. */
|
|
21
|
-
topInset?: number | boolean;
|
|
22
|
-
/** Bottom chrome reservation in px. Use true for the default 48px reservation. */
|
|
23
|
-
bottomInset?: number | boolean;
|
|
29
|
+
/** Top chrome reservation in px, or px per breakpoint. Use true for the default 48px reservation. */
|
|
30
|
+
topInset?: number | boolean | ResponsiveInset;
|
|
31
|
+
/** Bottom chrome reservation in px, or px per breakpoint. Use true for the default 48px reservation. */
|
|
32
|
+
bottomInset?: number | boolean | ResponsiveInset;
|
|
24
33
|
gesture?: boolean;
|
|
25
34
|
cache?: boolean;
|
|
26
35
|
/** Initial full-document SSR strategy. Defaults to `"stream"`. */
|
|
@@ -39,6 +48,16 @@ export interface CsrState {
|
|
|
39
48
|
bottomSafeArea: number;
|
|
40
49
|
topInset: number;
|
|
41
50
|
bottomInset: number;
|
|
51
|
+
/** The declared per-breakpoint insets; `topInset`/`bottomInset` hold their value at the width they resolved at. */
|
|
52
|
+
responsiveInset?: {
|
|
53
|
+
top: ResponsiveInset;
|
|
54
|
+
bottom: ResponsiveInset;
|
|
55
|
+
};
|
|
56
|
+
/** Web only: the sides whose safe area `env(safe-area-inset-*)` measures, since a browser tells script nothing. */
|
|
57
|
+
safeAreaEnv?: {
|
|
58
|
+
top: boolean;
|
|
59
|
+
bottom: boolean;
|
|
60
|
+
};
|
|
42
61
|
gesture: boolean;
|
|
43
62
|
cache: boolean;
|
|
44
63
|
ssr: SsrRenderMode;
|
|
@@ -111,13 +130,29 @@ export interface RouteRender {
|
|
|
111
130
|
resolveNotFound?: () => PromiseOrObject<LayoutNotFoundRender | undefined>;
|
|
112
131
|
resolveError?: () => PromiseOrObject<LayoutErrorRender | undefined>;
|
|
113
132
|
resolveHead?: ResolveHead;
|
|
133
|
+
/** Parses the declared args without rendering, so a path value the type refuses answers not-found before any byte. */
|
|
134
|
+
checkArgs?: (props: PageProps) => Promise<void>;
|
|
114
135
|
getPageConfig?: () => PromiseOrObject<PageConfig | undefined>;
|
|
115
136
|
getLayoutPageConfig?: () => PromiseOrObject<PageConfig | undefined>;
|
|
116
137
|
/** A root layout's `theme`, readable before it renders. */
|
|
117
138
|
getLayoutTheme?: () => PromiseOrObject<string | undefined>;
|
|
139
|
+
/** A root layout's `viewport`, readable before it renders: the document shell writes it ahead of the body. */
|
|
140
|
+
getLayoutViewport?: () => PromiseOrObject<RouteViewport | undefined>;
|
|
141
|
+
/** A root layout's `manifest`, which the server answers at the URL its documents link. */
|
|
142
|
+
getLayoutManifest?: () => PromiseOrObject<WebAppManifest | undefined>;
|
|
118
143
|
/** The `page()` chain behind a page render, when it was declared as one — what a page prompt is read off. */
|
|
119
144
|
getRouteDefinition?: () => PromiseOrObject<RouteDefinition | undefined>;
|
|
120
145
|
}
|
|
146
|
+
export interface RouteViewport {
|
|
147
|
+
/** `viewport-fit=cover`: the page runs under the notch and home indicator, and `env(safe-area-inset-*)` measures them. */
|
|
148
|
+
fitCover?: boolean;
|
|
149
|
+
/** What the on-screen keyboard resizes; `resizes-content` shrinks the layout viewport, and `dvh` with it. */
|
|
150
|
+
interactiveWidget?: "resizes-visual" | "resizes-content" | "overlays-content";
|
|
151
|
+
/** The browser chrome's color: one for every theme, or one per theme name the app switches between. */
|
|
152
|
+
themeColor?: string | {
|
|
153
|
+
[theme: string]: string;
|
|
154
|
+
};
|
|
155
|
+
}
|
|
121
156
|
export interface WebAppManifestIcon {
|
|
122
157
|
src: string;
|
|
123
158
|
sizes?: string;
|
|
@@ -161,6 +196,7 @@ export interface LayoutModule {
|
|
|
161
196
|
reconnect?: boolean;
|
|
162
197
|
wsConnect?: boolean;
|
|
163
198
|
layoutStyle?: "mobile" | "web";
|
|
199
|
+
viewport?: RouteViewport;
|
|
164
200
|
Loading?: LayoutLoadingRender;
|
|
165
201
|
NotFound?: LayoutNotFoundRender;
|
|
166
202
|
Error?: LayoutErrorRender;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { PageConfig, PageState } from "./csrTypes.d.ts";
|
|
1
|
+
import type { PageConfig, PageState, ResponsiveInset } from "./csrTypes.d.ts";
|
|
2
2
|
export type DevicePlatform = "ios" | "android" | "web" | (string & {});
|
|
3
3
|
export type SafeAreaInsets = {
|
|
4
4
|
top: number;
|
|
@@ -11,10 +11,22 @@ export interface ResolvePageStateOptions {
|
|
|
11
11
|
platform: DevicePlatform;
|
|
12
12
|
deviceSafeArea: SafeAreaInsets;
|
|
13
13
|
cssSafeArea?: SafeAreaInsets;
|
|
14
|
+
/** The viewport width in px a responsive inset resolves at; left out, it resolves at `base`. */
|
|
15
|
+
width?: number;
|
|
14
16
|
}
|
|
17
|
+
/** Tailwind's default breakpoints in rem, the widths a `ResponsiveInset` keys on. */
|
|
18
|
+
export declare const insetBreakpoints: readonly [readonly ["sm", 40], readonly ["md", 48], readonly ["lg", 64], readonly ["xl", 80], readonly ["2xl", 96]];
|
|
19
|
+
export type InsetBreakpoint = "base" | (typeof insetBreakpoints)[number][0];
|
|
15
20
|
export declare function validatePageConfig(routeKey: string, config?: PageConfig): void;
|
|
21
|
+
export declare const isResponsiveInset: (inset: PageConfig["topInset"]) => inset is ResponsiveInset;
|
|
22
|
+
/** The inset at each breakpoint, each one the nearest declared value at or below it. */
|
|
23
|
+
export declare function insetsByBreakpoint(inset: PageConfig["topInset"]): {
|
|
24
|
+
[bp in InsetBreakpoint]: number;
|
|
25
|
+
};
|
|
26
|
+
/** The inset in force at `width` px, assuming a 16px rem. */
|
|
27
|
+
export declare function insetAt(inset: PageConfig["topInset"], width?: number): number;
|
|
16
28
|
export declare function mergePageConfigs(configChain?: PageConfig[]): PageConfig;
|
|
17
29
|
export declare function getExplicitPageConfigKeys(configChain?: PageConfig[]): Partial<Record<keyof PageConfig, boolean>>;
|
|
18
30
|
export declare const defaultPageState: PageState;
|
|
19
|
-
export declare function resolvePageState({ configChain, path, basePath, platform, deviceSafeArea, cssSafeArea, }: ResolvePageStateOptions): PageState;
|
|
31
|
+
export declare function resolvePageState({ configChain, path, basePath, platform, deviceSafeArea, cssSafeArea, width, }: ResolvePageStateOptions): PageState;
|
|
20
32
|
export declare function readCssSafeAreaInsets(): SafeAreaInsets;
|
package/types/client/index.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ export * from "./clientRuntime.d.ts";
|
|
|
2
2
|
export * from "./cn.d.ts";
|
|
3
3
|
export * from "./cookie.d.ts";
|
|
4
4
|
export * from "./createFont.d.ts";
|
|
5
|
+
export * from "./csrLocation.d.ts";
|
|
5
6
|
export * from "./csrTypes.d.ts";
|
|
6
7
|
export * from "./decorators.d.ts";
|
|
7
8
|
export * from "./device.d.ts";
|
|
@@ -17,3 +18,5 @@ export * from "./storage.d.ts";
|
|
|
17
18
|
export * from "./translator.d.ts";
|
|
18
19
|
export * from "./types.d.ts";
|
|
19
20
|
export * from "./useClient.d.ts";
|
|
21
|
+
export * from "./viewportMeta.d.ts";
|
|
22
|
+
export * from "./webManifest.d.ts";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "../../vendor/@akanjs/native/plugins/external-view/src/index.d.ts";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { LayoutModule, PageModule, WebAppManifest } from "../csrTypes.d.ts";
|
|
1
|
+
import type { LayoutModule, PageModule, RouteViewport, WebAppManifest } from "../csrTypes.d.ts";
|
|
2
2
|
import type { ReactFont } from "../types.d.ts";
|
|
3
3
|
import { LayoutDefinition } from "./LayoutDefinition.d.ts";
|
|
4
4
|
import type { RouteArgsShape, RouteKind } from "./RouteDefinition.d.ts";
|
|
@@ -12,5 +12,6 @@ export declare class RootLayoutDefinition<Args extends RouteArgsShape = Record<n
|
|
|
12
12
|
reconnect(on?: boolean): this;
|
|
13
13
|
wsConnect(on?: boolean): this;
|
|
14
14
|
layoutStyle(style: "mobile" | "web"): this;
|
|
15
|
+
viewport(viewport: RouteViewport): this;
|
|
15
16
|
protected extendModule(module: PageModule & LayoutModule): PageModule & LayoutModule;
|
|
16
17
|
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { type ReactNode } from "react";
|
|
2
|
+
import type { ResolveHeadResult } from "../csrTypes.d.ts";
|
|
3
|
+
type TagProps = Record<string, unknown>;
|
|
4
|
+
/** Merges the `.head()` of every route level, root first: a deeper level takes over each singleton tag it writes. */
|
|
5
|
+
export declare class RouteHead {
|
|
6
|
+
#private;
|
|
7
|
+
static merge(levels: ResolveHeadResult[]): ResolveHeadResult;
|
|
8
|
+
/** What makes two tags the same tag; `null` for one that never replaces another. */
|
|
9
|
+
static keyOf(tag: string, props: TagProps): string | null;
|
|
10
|
+
/** `merge` for plain JSX heads, root first. */
|
|
11
|
+
static mergeNodes(nodes: ReactNode[]): ReactNode;
|
|
12
|
+
}
|
|
13
|
+
export {};
|
|
@@ -2,6 +2,7 @@ export * from "./LayoutDefinition.d.ts";
|
|
|
2
2
|
export * from "./PageDefinition.d.ts";
|
|
3
3
|
export * from "./RootLayoutDefinition.d.ts";
|
|
4
4
|
export * from "./RouteDefinition.d.ts";
|
|
5
|
+
export * from "./RouteHead.d.ts";
|
|
5
6
|
export * from "./resolveRouteModule.d.ts";
|
|
6
7
|
export * from "./routeArgs.d.ts";
|
|
7
8
|
export * from "./routeBuilders.d.ts";
|
package/types/client/router.d.ts
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
export interface RouteOptions {
|
|
2
2
|
scrollToTop?: boolean;
|
|
3
|
+
/**
|
|
4
|
+
* Writes the URL and the store's path and search params without asking the server for the page, as for `?peek=`;
|
|
5
|
+
* honoured only when the path stays the same. A server component reading `.search()` sees it at the next full
|
|
6
|
+
* navigation.
|
|
7
|
+
*/
|
|
8
|
+
shallow?: boolean;
|
|
3
9
|
}
|
|
4
10
|
export interface RouteManifest {
|
|
5
11
|
routes: string[];
|
|
@@ -7,6 +7,8 @@ declare global {
|
|
|
7
7
|
var __AKAN_RSC_NAVIGATE__: ((href: string, options?: {
|
|
8
8
|
replace?: boolean;
|
|
9
9
|
scrollToTop?: boolean;
|
|
10
|
+
shallow?: boolean;
|
|
11
|
+
pop?: boolean;
|
|
10
12
|
}) => Promise<void>) | undefined;
|
|
11
13
|
var __AKAN_DEV_SYNC_NAVIGATION__: ((href: string, kind: "push" | "replace" | "back" | "pop") => void) | undefined;
|
|
12
14
|
var __AKAN_DEV_SYNC_NAVIGATION_APPLYING__: boolean | undefined;
|
|
@@ -18,6 +20,7 @@ export declare const isRscNavigationFromCache: () => boolean;
|
|
|
18
20
|
export declare const navigateRsc: (href: string, options?: {
|
|
19
21
|
replace?: boolean;
|
|
20
22
|
scrollToTop?: boolean;
|
|
23
|
+
shallow?: boolean;
|
|
21
24
|
}) => Promise<void> | undefined;
|
|
22
25
|
export declare const refreshRsc: () => Promise<void> | undefined;
|
|
23
26
|
export declare const useRscNavigation: () => {
|
|
@@ -26,5 +29,6 @@ export declare const useRscNavigation: () => {
|
|
|
26
29
|
navigate: (href: string, options?: {
|
|
27
30
|
replace?: boolean;
|
|
28
31
|
scrollToTop?: boolean;
|
|
32
|
+
shallow?: boolean;
|
|
29
33
|
}) => Promise<void> | undefined;
|
|
30
34
|
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { RouteViewport } from "./csrTypes.d.ts";
|
|
2
|
+
export interface ThemeColorTag {
|
|
3
|
+
content: string;
|
|
4
|
+
media?: string;
|
|
5
|
+
}
|
|
6
|
+
/** Turns a root layout's `.viewport()` into the `viewport` and `theme-color` meta tags every document shell writes. */
|
|
7
|
+
export declare class ViewportMeta {
|
|
8
|
+
#private;
|
|
9
|
+
static content(viewport: RouteViewport | undefined, { native }?: {
|
|
10
|
+
native?: boolean;
|
|
11
|
+
}): string;
|
|
12
|
+
/** The request's theme when it is known; otherwise `light`/`dark` follow the OS until the client names the theme. */
|
|
13
|
+
static themeColors(viewport: RouteViewport | undefined, theme?: string): ThemeColorTag[];
|
|
14
|
+
static applyContent(viewport: RouteViewport | undefined, { native }?: {
|
|
15
|
+
native?: boolean;
|
|
16
|
+
}): void;
|
|
17
|
+
static applyThemeColor(viewport: RouteViewport | undefined, theme?: string): void;
|
|
18
|
+
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/** Where an SSR document links its root layout's `.manifest()`; the server answers it from that layout. */
|
|
2
|
+
export declare const webManifestHref: (basePath?: string | null) => string;
|
|
3
|
+
/** A `.manifest()` object in the browser's own snake_case keys, at every depth. */
|
|
4
|
+
export declare const toManifestJson: (value: unknown) => unknown;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The one glob dialect of `when`, shared by the planner (`branch`, `app`) and the executor (`changed`) so both decide
|
|
3
|
+
* alike. `*` is any run without `/`, `**` any run including `/` (and with its `/` also no segment at all), `?` one
|
|
4
|
+
* character but `/`; everything else is literal and case-sensitive. A leading `!` excludes.
|
|
5
|
+
*/
|
|
6
|
+
export declare class PipelinePattern {
|
|
7
|
+
#private;
|
|
8
|
+
/** True when some positive pattern matches (or none is given) and no `!` pattern does. */
|
|
9
|
+
static matches(pattern: string | readonly string[], value: string): boolean;
|
|
10
|
+
/** `changed`: true when at least one of `values` matches. */
|
|
11
|
+
static matchesAny(pattern: string | readonly string[], values: readonly string[]): boolean;
|
|
12
|
+
/** Braces and character classes are refused rather than given a meaning, so no implementation can read them apart. */
|
|
13
|
+
static validate(pattern: string | readonly string[]): string | null;
|
|
14
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { type PipelinePlan, type PipelinePlanResult } from "./pipelinePlan.d.ts";
|
|
2
|
+
/** Strict: an unknown key, kind, action or version is refused, never ignored. Structure only, no executor policy. */
|
|
3
|
+
export declare class PipelinePlanSchema {
|
|
4
|
+
#private;
|
|
5
|
+
/** What an executor reads off `--out`: the size is checked before the text is parsed. */
|
|
6
|
+
static parseText(text: string): PipelinePlanResult;
|
|
7
|
+
static parseResult(value: unknown): PipelinePlanResult;
|
|
8
|
+
static parse(value: unknown): PipelinePlan;
|
|
9
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export interface BackoffPolicy {
|
|
2
|
+
/** The first wait in ms; each attempt in a row doubles it. */
|
|
3
|
+
min?: number;
|
|
4
|
+
max?: number;
|
|
5
|
+
/** The share of each wait drawn at random, 0 to 1, so callers one outage dropped together come back apart. */
|
|
6
|
+
jitter?: number;
|
|
7
|
+
}
|
|
8
|
+
export declare class Backoff {
|
|
9
|
+
static delay(attempt: number, { min, max, jitter }?: BackoffPolicy): number;
|
|
10
|
+
}
|
package/types/common/index.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export { applyMixins, getAllPropertyDescriptors } from "./applyMixins.d.ts";
|
|
2
2
|
export { authTokenKey, cookieHeaderHasAuthToken, isAuthTokenKey, isOwnAuthToken, legacyAuthTokenKey, readAuthToken, } from "./authToken.d.ts";
|
|
3
|
+
export { Backoff, type BackoffPolicy } from "./backoff.d.ts";
|
|
3
4
|
export { CodeAgentClient, type CodeAgentTransport } from "./CodeAgentClient.d.ts";
|
|
4
5
|
export { CodeTranscript, type CodeTranscriptPart } from "./CodeTranscript.d.ts";
|
|
5
6
|
export { capitalize, lowerlize } from "./capitalize.d.ts";
|
|
@@ -28,7 +29,11 @@ export { type Align, MarkdownTable, type TableBlock } from "./markdownTable.d.ts
|
|
|
28
29
|
export { isMcpDescribableArg, type McpExposureEndpoint, type McpExposureOption, mcpBaseVerbOf, mcpHintsOf, mcpRefusalOf, } from "./mcpExposure.d.ts";
|
|
29
30
|
export { deepObjectify, objectify, plainFieldsOf } from "./objectify.d.ts";
|
|
30
31
|
export { pathGet, pathGetLoose, pathSet, toPathSegments } from "./objectPath.d.ts";
|
|
32
|
+
export { PipelineNames } from "./PipelineNames.d.ts";
|
|
33
|
+
export { PipelinePattern } from "./PipelinePattern.d.ts";
|
|
34
|
+
export { PipelinePlanSchema } from "./PipelinePlanSchema.d.ts";
|
|
31
35
|
export { formatPhone, isPhoneNumber } from "./phone.d.ts";
|
|
36
|
+
export { type PipelineActionName, type PipelineDiagnostic, type PipelineMilestone, type PipelineOtaPlatform, type PipelinePlan, type PipelinePlanActionStep, type PipelinePlanAppActionStep, type PipelinePlanContext, type PipelinePlanOtaStep, type PipelinePlanPhase, type PipelinePlanPost, type PipelinePlanResult, type PipelinePlanRetry, type PipelinePlanShellStep, type PipelinePlanSlot, type PipelinePlanSource, type PipelinePlanStage, type PipelinePlanStep, type PipelineSkip, type PipelineTrigger, pipelineActionNames, pipelineActions, pipelineEnvNamePattern, pipelineIdPattern, pipelineMilestones, pipelineOtaPlatforms, pipelinePlanLimits, pipelinePlanSlots, pipelinePlanVersion, pipelineReservedEnv, pipelineRuntimeEnv, pipelineSecretNamePattern, pipelineTriggers, } from "./pipelinePlan.d.ts";
|
|
32
37
|
export { type RouteLayer, RouteLayering } from "./RouteLayering.d.ts";
|
|
33
38
|
export { randomPick, randomPicks } from "./randomPick.d.ts";
|
|
34
39
|
export { hostFromRequest, isJsonContentType, originFromRequest } from "./requestOrigin.d.ts";
|