akanjs 3.2.0-rc.2 → 3.2.0-rc.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/ARCHITECTURE.md +3 -3
- package/CHANGELOG.md +105 -1
- package/client/csrTypes.ts +13 -1
- package/client/frameConfig.ts +4 -2
- package/client/route/RouteHead.ts +11 -2
- package/client/router.ts +8 -4
- package/client/rscNavigation.ts +2 -3
- package/client/rscRoutePatch.ts +42 -0
- package/common/akanGraph.ts +1 -1
- package/common/types.ts +5 -0
- package/dictionary/base.dictionary.ts +1 -0
- package/fetch/client/fetchClient.ts +11 -16
- package/fetch/client/fetchHandle.ts +11 -1
- package/fetch/client/inflightQueries.ts +17 -0
- package/fetch/index.ts +1 -0
- package/fetch/staleReads.ts +27 -0
- package/fetch/streamedRead.ts +23 -0
- package/package.json +1 -1
- package/server/akanServer.ts +1 -1
- package/server/artifact/builderRpc.ts +22 -7
- package/server/artifact/ipcTypes.ts +9 -3
- package/server/devtools/README.md +4 -3
- package/server/devtools/devtoolsRouter.ts +9 -5
- package/server/devtools/studio/studioRoute.ts +18 -11
- package/server/head.tsx +4 -19
- package/server/routeElementComposer.tsx +86 -3
- package/server/routeState.ts +5 -1
- package/server/routeTreeBuilder.ts +1 -0
- package/server/rscClient.tsx +118 -21
- package/server/rscClientChunks.ts +62 -0
- package/server/rscClientFetch.ts +6 -1
- package/server/rscHeadPatch.ts +17 -56
- package/server/rscParkedRedirect.ts +23 -0
- package/server/rscPatchPlanner.ts +220 -0
- package/server/rscPrefetchCache.ts +39 -17
- package/server/rscResponse.ts +78 -0
- package/server/rscSegmentOutlet.tsx +24 -5
- package/server/rscSegmentOutletReference.ts +10 -12
- package/server/rscWorker.tsx +109 -154
- package/server/rscWorkerCache.ts +56 -0
- package/server/rscWorkerHost.ts +6 -8
- package/server/ssrTypes.ts +9 -0
- package/server/webRouter.ts +12 -89
- package/store/action.ts +282 -299
- package/store/actionErrorKey.ts +9 -0
- package/store/draftFlush.ts +5 -0
- package/store/draftStore.ts +2 -0
- package/store/formDrafts.ts +115 -0
- package/store/modelListPatch.ts +53 -0
- package/store/modelWriteGuard.ts +91 -0
- package/store/rootStore.ts +2 -0
- package/store/storeInstance.ts +9 -10
- package/store/uploadPoll.ts +52 -0
- package/store/withSelector.ts +6 -4
- package/types/client/csrTypes.d.ts +13 -1
- package/types/client/route/RouteHead.d.ts +5 -1
- package/types/client/router.d.ts +3 -2
- package/types/client/rscNavigation.d.ts +2 -2
- package/types/client/rscRoutePatch.d.ts +22 -0
- package/types/common/akanGraph.d.ts +1 -1
- package/types/common/types.d.ts +5 -0
- package/types/dictionary/base.dictionary.d.ts +1 -1
- package/types/dictionary/dictionary.d.ts +8 -8
- package/types/fetch/client/fetchHandle.d.ts +1 -0
- package/types/fetch/client/inflightQueries.d.ts +2 -0
- package/types/fetch/index.d.ts +1 -0
- package/types/fetch/staleReads.d.ts +8 -0
- package/types/fetch/streamedRead.d.ts +8 -0
- package/types/server/artifact/builderRpc.d.ts +8 -0
- package/types/server/artifact/ipcTypes.d.ts +8 -0
- package/types/server/devtools/devtoolsRouter.d.ts +4 -1
- package/types/server/devtools/studio/studioRoute.d.ts +2 -1
- package/types/server/head.d.ts +2 -2
- package/types/server/logging/rotatingLogWriter.d.ts +1 -1
- package/types/server/routeElementComposer.d.ts +24 -1
- package/types/server/routeState.d.ts +2 -0
- package/types/server/rscClient.d.ts +1 -0
- package/types/server/rscClientChunks.d.ts +10 -0
- package/types/server/rscHeadPatch.d.ts +5 -4
- package/types/server/rscParkedRedirect.d.ts +12 -0
- package/types/server/rscPatchPlanner.d.ts +49 -0
- package/types/server/rscPrefetchCache.d.ts +2 -2
- package/types/server/rscResponse.d.ts +9 -0
- package/types/server/rscSegmentOutlet.d.ts +5 -0
- package/types/server/rscSegmentOutletReference.d.ts +2 -1
- package/types/server/rscWorkerCache.d.ts +33 -1
- package/types/server/rscWorkerHost.d.ts +2 -6
- package/types/server/ssrTypes.d.ts +8 -0
- package/types/server/webRouter.d.ts +1 -7
- package/types/store/action.d.ts +10 -6
- package/types/store/actionErrorKey.d.ts +1 -0
- package/types/store/baseSt.d.ts +1 -295
- package/types/store/draftFlush.d.ts +4 -0
- package/types/store/formDrafts.d.ts +21 -0
- package/types/store/modelListPatch.d.ts +34 -0
- package/types/store/modelWriteGuard.d.ts +45 -0
- package/types/store/rootStore.d.ts +6 -0
- package/types/store/uploadPoll.d.ts +16 -0
- package/types/store/withSelector.d.ts +1 -1
- package/types/ui/Link/inputModality.d.ts +5 -0
- package/types/ui/Link/viewportPrefetch.d.ts +4 -0
- package/types/ui/Load/Edit_Client.d.ts +2 -0
- package/types/ui/Load/Pagination.d.ts +4 -1
- package/types/ui/Load/Stream.d.ts +7 -1
- package/types/ui/Load/StreamBoundary.d.ts +20 -0
- package/types/ui/Load/Units.d.ts +2 -0
- package/types/ui/Load/View.d.ts +2 -0
- package/types/webkit/nativeCore.d.ts +1 -0
- package/types/webkit/nativePurchase.d.ts +2 -1
- package/types/webkit/useFrameRuntime.d.ts +1 -0
- package/types/webkit/useGeoLocation.d.ts +1 -1
- package/types/webkit/usePurchase.d.ts +1 -1
- package/types/webkit/useTransitionStore.d.ts +1 -0
- package/ui/Button.tsx +1 -0
- package/ui/Link/inputModality.ts +21 -0
- package/ui/Link/prefetchIntent.ts +7 -25
- package/ui/Link/viewportPrefetch.ts +30 -0
- package/ui/Load/Edit_Client.tsx +7 -1
- package/ui/Load/Pagination.tsx +10 -2
- package/ui/Load/Stream.tsx +24 -4
- package/ui/Load/StreamBoundary.tsx +70 -0
- package/ui/Load/Units.tsx +3 -0
- package/ui/Load/View.tsx +3 -0
- package/ui/System/Client.tsx +28 -7
- package/webkit/nativeCore.ts +1 -0
- package/webkit/nativePurchase.ts +6 -3
- package/webkit/useCamera.tsx +22 -21
- package/webkit/useGeoLocation.tsx +4 -1
- package/webkit/usePurchase.tsx +4 -2
- package/webkit/useTransitionStore.ts +13 -0
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import type { AgentEndpoint, AgentTurn, BaseEndpoint } from "akanjs/signal";
|
|
2
2
|
export declare const dictionary: {
|
|
3
|
-
base: import("./locale.d.ts").DictModule<import("./locale.d.ts").ServiceTranslatorKey<"base", BaseEndpoint, "error" | "unauthorized" | "edit" | "ok" | "retry" | "approve" | "view" | "remove" | "skip" | "success" | "password" | "save" | "refresh" | "agent" | "stop" | "connecting" | "send" | "cancel" | "copy" | "createModel" | "updateModel" | "removeModel" | "somethingWrong" | "connected" | "serverDisconnected" | "refreshing" | "tryReconnecting" | "serverHasProblem" | "checkServerStatus" | "cameraPromptHeader" | "cameraPromptPhoto" | "cameraPromptPicture" | "cameraPromptCancel" | "failed" | "processing" | "processed" | "noData" | "invalidValueError" | "emailInvalidError" | "phoneInvalidError" | "pageLoadFailed" | "pageNotFound" | "goBack" | "agentIntro" | "agentPlaceholder" | "agentClear" | "agentQuestion" | "agentToolCard" | "agentAnswer" | "agentListen" | "agentVoiceFailed" | "agentAttach" | "agentAttachRemove" | "agentAttachReading" | "agentReferenceRemove" | "agentReferenceFailed" | "agentAttachTooLarge" | "agentAttachUnsupported" | "agentAttachDuplicate" | "agentAttachTooMany" | "agentAttachTooMuch" | "agentAnswerNeeded" | "agentQueue" | "agentQueuePlaceholder" | "agentQueued" | "agentQueueEdit" | "agentQueueCancel" | "agentToolDone" | "agentToolFailed" | "agentToolRunning" | "agentToolResult" | "agentTokens" | "agentTokensOf" | "agentCompactsAt" | "agentSummarizing" | "agentContinue" | "agentKeepGoing" | "agentCmdNew" | "agentCmdRetry" | "agentCmdCompact" | "agentCmdCopy" | "agentCmdHelp" | "agentCmdTools" | "agentHelpIntro" | "agentHelpNote" | "agentNothingToRetry" | "agentNothingToCompact" | "agentCompacted" | "agentSummary" | "agentBusy" | "agentCopied" | "agentCopyFailed" | "agentToolsHead" | "agentToolsState" | "decline" | "confirmClose" | "textTooShortError" | "textTooLongError" | "selectTooShortError" | "selectTooLongError" | "numberTooSmallError" | "numberTooBigError" | "passwordNotMatchError" | "selectDateError" | "priceUnit" | "passwordConfirm" | "noOptions" | "noSelection" | "addModel" | "createSuccess" | "updateSuccess" | "removeSuccess" | "sureToRemove" | "irreversibleOps" | "typeNameToRemove" | "yesRemove" | "removeMsg" | "confirmMsg" | "perPage" | "cardView" | "tableView" | "exportCsv" | "exportJson" | "actions" | "draftConflict" | "draftApplied" | "draftRestore" | "draftDiscard" | "draftStartOver" | "new">, "base.error.documentNotFound" | "base.error.gatewayTimeout" | "base.error.payloadTooLarge" | "base.error.tooManyRequests" | "base.error.serverUnavailable" | "base.error.serverUnreachable" | "base.error.idempotencyInFlight" | "base.error.unexpectedResponse" | "base.error.mutationInApp" | "base.error.mutationInRender" | "base.error.immutableField" | "base.error.invalidArgument" | "base.error.requiredArgument" | "base.error.invalidField" | "base.error.relationNotFound" | "base.error.endpointClosed" | "base.error.readOnlyDeployment">;
|
|
3
|
+
base: import("./locale.d.ts").DictModule<import("./locale.d.ts").ServiceTranslatorKey<"base", BaseEndpoint, "error" | "unauthorized" | "edit" | "ok" | "retry" | "approve" | "view" | "remove" | "skip" | "success" | "password" | "save" | "refresh" | "agent" | "stop" | "connecting" | "send" | "cancel" | "copy" | "createModel" | "updateModel" | "removeModel" | "somethingWrong" | "connected" | "serverDisconnected" | "refreshing" | "tryReconnecting" | "serverHasProblem" | "checkServerStatus" | "cameraPromptHeader" | "cameraPromptPhoto" | "cameraPromptPicture" | "cameraPromptCancel" | "failed" | "processing" | "processed" | "noData" | "invalidValueError" | "emailInvalidError" | "phoneInvalidError" | "pageLoadFailed" | "loadFailed" | "pageNotFound" | "goBack" | "agentIntro" | "agentPlaceholder" | "agentClear" | "agentQuestion" | "agentToolCard" | "agentAnswer" | "agentListen" | "agentVoiceFailed" | "agentAttach" | "agentAttachRemove" | "agentAttachReading" | "agentReferenceRemove" | "agentReferenceFailed" | "agentAttachTooLarge" | "agentAttachUnsupported" | "agentAttachDuplicate" | "agentAttachTooMany" | "agentAttachTooMuch" | "agentAnswerNeeded" | "agentQueue" | "agentQueuePlaceholder" | "agentQueued" | "agentQueueEdit" | "agentQueueCancel" | "agentToolDone" | "agentToolFailed" | "agentToolRunning" | "agentToolResult" | "agentTokens" | "agentTokensOf" | "agentCompactsAt" | "agentSummarizing" | "agentContinue" | "agentKeepGoing" | "agentCmdNew" | "agentCmdRetry" | "agentCmdCompact" | "agentCmdCopy" | "agentCmdHelp" | "agentCmdTools" | "agentHelpIntro" | "agentHelpNote" | "agentNothingToRetry" | "agentNothingToCompact" | "agentCompacted" | "agentSummary" | "agentBusy" | "agentCopied" | "agentCopyFailed" | "agentToolsHead" | "agentToolsState" | "decline" | "confirmClose" | "textTooShortError" | "textTooLongError" | "selectTooShortError" | "selectTooLongError" | "numberTooSmallError" | "numberTooBigError" | "passwordNotMatchError" | "selectDateError" | "priceUnit" | "passwordConfirm" | "noOptions" | "noSelection" | "addModel" | "createSuccess" | "updateSuccess" | "removeSuccess" | "sureToRemove" | "irreversibleOps" | "typeNameToRemove" | "yesRemove" | "removeMsg" | "confirmMsg" | "perPage" | "cardView" | "tableView" | "exportCsv" | "exportJson" | "actions" | "draftConflict" | "draftApplied" | "draftRestore" | "draftDiscard" | "draftStartOver" | "new">, "base.error.documentNotFound" | "base.error.gatewayTimeout" | "base.error.payloadTooLarge" | "base.error.tooManyRequests" | "base.error.serverUnavailable" | "base.error.serverUnreachable" | "base.error.idempotencyInFlight" | "base.error.unexpectedResponse" | "base.error.mutationInApp" | "base.error.mutationInRender" | "base.error.immutableField" | "base.error.invalidArgument" | "base.error.requiredArgument" | "base.error.invalidField" | "base.error.relationNotFound" | "base.error.endpointClosed" | "base.error.readOnlyDeployment">;
|
|
4
4
|
agentTurn: import("./locale.d.ts").DictModule<import("./locale.d.ts").ScalarTranslatorKey<"agentTurn", AgentTurn, never> | `agentStop.${string}` | `agentStop.${string}.desc`, never>;
|
|
5
5
|
agent: import("./locale.d.ts").DictModule<import("./locale.d.ts").ServiceTranslatorKey<"agent", AgentEndpoint, never>, "agent.error.llmUnavailable" | "agent.error.llmRequestFailed" | "agent.error.contextOverflow" | "agent.error.quotaExceeded" | "agent.error.requestRefused">;
|
|
6
6
|
};
|
|
7
|
-
export declare const Err: import("./trans.d.ts").ErrConstructor<"base.error.documentNotFound" | "base.error.gatewayTimeout" | "base.error.payloadTooLarge" | "base.error.tooManyRequests" | "base.error.serverUnavailable" | "base.error.serverUnreachable" | "base.error.idempotencyInFlight" | "base.error.unexpectedResponse" | "base.error.mutationInApp" | "base.error.mutationInRender" | "base.error.immutableField" | "base.error.invalidArgument" | "base.error.requiredArgument" | "base.error.invalidField" | "base.error.relationNotFound" | "base.error.endpointClosed" | "base.error.readOnlyDeployment" | "agent.error.llmUnavailable" | "agent.error.llmRequestFailed" | "agent.error.contextOverflow" | "agent.error.quotaExceeded" | "agent.error.requestRefused">, translate: (lang: "en" | "ko" | (string & {}) | "zhChs" | "zhCht" | "ja", key: import("./locale.d.ts").ServiceTranslatorKey<"base", BaseEndpoint, "error" | "unauthorized" | "edit" | "ok" | "retry" | "approve" | "view" | "remove" | "skip" | "success" | "password" | "save" | "refresh" | "agent" | "stop" | "connecting" | "send" | "cancel" | "copy" | "createModel" | "updateModel" | "removeModel" | "somethingWrong" | "connected" | "serverDisconnected" | "refreshing" | "tryReconnecting" | "serverHasProblem" | "checkServerStatus" | "cameraPromptHeader" | "cameraPromptPhoto" | "cameraPromptPicture" | "cameraPromptCancel" | "failed" | "processing" | "processed" | "noData" | "invalidValueError" | "emailInvalidError" | "phoneInvalidError" | "pageLoadFailed" | "pageNotFound" | "goBack" | "agentIntro" | "agentPlaceholder" | "agentClear" | "agentQuestion" | "agentToolCard" | "agentAnswer" | "agentListen" | "agentVoiceFailed" | "agentAttach" | "agentAttachRemove" | "agentAttachReading" | "agentReferenceRemove" | "agentReferenceFailed" | "agentAttachTooLarge" | "agentAttachUnsupported" | "agentAttachDuplicate" | "agentAttachTooMany" | "agentAttachTooMuch" | "agentAnswerNeeded" | "agentQueue" | "agentQueuePlaceholder" | "agentQueued" | "agentQueueEdit" | "agentQueueCancel" | "agentToolDone" | "agentToolFailed" | "agentToolRunning" | "agentToolResult" | "agentTokens" | "agentTokensOf" | "agentCompactsAt" | "agentSummarizing" | "agentContinue" | "agentKeepGoing" | "agentCmdNew" | "agentCmdRetry" | "agentCmdCompact" | "agentCmdCopy" | "agentCmdHelp" | "agentCmdTools" | "agentHelpIntro" | "agentHelpNote" | "agentNothingToRetry" | "agentNothingToCompact" | "agentCompacted" | "agentSummary" | "agentBusy" | "agentCopied" | "agentCopyFailed" | "agentToolsHead" | "agentToolsState" | "decline" | "confirmClose" | "textTooShortError" | "textTooLongError" | "selectTooShortError" | "selectTooLongError" | "numberTooSmallError" | "numberTooBigError" | "passwordNotMatchError" | "selectDateError" | "priceUnit" | "passwordConfirm" | "noOptions" | "noSelection" | "addModel" | "createSuccess" | "updateSuccess" | "removeSuccess" | "sureToRemove" | "irreversibleOps" | "typeNameToRemove" | "yesRemove" | "removeMsg" | "confirmMsg" | "perPage" | "cardView" | "tableView" | "exportCsv" | "exportJson" | "actions" | "draftConflict" | "draftApplied" | "draftRestore" | "draftDiscard" | "draftStartOver" | "new"> | import("./locale.d.ts").ScalarTranslatorKey<"agentTurn", AgentTurn, never> | `agentStop.${string}` | `agentStop.${string}.desc` | import("./locale.d.ts").ServiceTranslatorKey<"agent", AgentEndpoint, never>, data?: import("./trans.d.ts").TranslationData) => string, msg: {
|
|
8
|
-
error: (key: import("./locale.d.ts").ServiceTranslatorKey<"base", BaseEndpoint, "error" | "unauthorized" | "edit" | "ok" | "retry" | "approve" | "view" | "remove" | "skip" | "success" | "password" | "save" | "refresh" | "agent" | "stop" | "connecting" | "send" | "cancel" | "copy" | "createModel" | "updateModel" | "removeModel" | "somethingWrong" | "connected" | "serverDisconnected" | "refreshing" | "tryReconnecting" | "serverHasProblem" | "checkServerStatus" | "cameraPromptHeader" | "cameraPromptPhoto" | "cameraPromptPicture" | "cameraPromptCancel" | "failed" | "processing" | "processed" | "noData" | "invalidValueError" | "emailInvalidError" | "phoneInvalidError" | "pageLoadFailed" | "pageNotFound" | "goBack" | "agentIntro" | "agentPlaceholder" | "agentClear" | "agentQuestion" | "agentToolCard" | "agentAnswer" | "agentListen" | "agentVoiceFailed" | "agentAttach" | "agentAttachRemove" | "agentAttachReading" | "agentReferenceRemove" | "agentReferenceFailed" | "agentAttachTooLarge" | "agentAttachUnsupported" | "agentAttachDuplicate" | "agentAttachTooMany" | "agentAttachTooMuch" | "agentAnswerNeeded" | "agentQueue" | "agentQueuePlaceholder" | "agentQueued" | "agentQueueEdit" | "agentQueueCancel" | "agentToolDone" | "agentToolFailed" | "agentToolRunning" | "agentToolResult" | "agentTokens" | "agentTokensOf" | "agentCompactsAt" | "agentSummarizing" | "agentContinue" | "agentKeepGoing" | "agentCmdNew" | "agentCmdRetry" | "agentCmdCompact" | "agentCmdCopy" | "agentCmdHelp" | "agentCmdTools" | "agentHelpIntro" | "agentHelpNote" | "agentNothingToRetry" | "agentNothingToCompact" | "agentCompacted" | "agentSummary" | "agentBusy" | "agentCopied" | "agentCopyFailed" | "agentToolsHead" | "agentToolsState" | "decline" | "confirmClose" | "textTooShortError" | "textTooLongError" | "selectTooShortError" | "selectTooLongError" | "numberTooSmallError" | "numberTooBigError" | "passwordNotMatchError" | "selectDateError" | "priceUnit" | "passwordConfirm" | "noOptions" | "noSelection" | "addModel" | "createSuccess" | "updateSuccess" | "removeSuccess" | "sureToRemove" | "irreversibleOps" | "typeNameToRemove" | "yesRemove" | "removeMsg" | "confirmMsg" | "perPage" | "cardView" | "tableView" | "exportCsv" | "exportJson" | "actions" | "draftConflict" | "draftApplied" | "draftRestore" | "draftDiscard" | "draftStartOver" | "new"> | import("./locale.d.ts").ScalarTranslatorKey<"agentTurn", AgentTurn, never> | `agentStop.${string}` | `agentStop.${string}.desc` | import("./locale.d.ts").ServiceTranslatorKey<"agent", AgentEndpoint, never>, option?: import("./trans.d.ts").TransMessageOption) => void;
|
|
9
|
-
info: (key: import("./locale.d.ts").ServiceTranslatorKey<"base", BaseEndpoint, "error" | "unauthorized" | "edit" | "ok" | "retry" | "approve" | "view" | "remove" | "skip" | "success" | "password" | "save" | "refresh" | "agent" | "stop" | "connecting" | "send" | "cancel" | "copy" | "createModel" | "updateModel" | "removeModel" | "somethingWrong" | "connected" | "serverDisconnected" | "refreshing" | "tryReconnecting" | "serverHasProblem" | "checkServerStatus" | "cameraPromptHeader" | "cameraPromptPhoto" | "cameraPromptPicture" | "cameraPromptCancel" | "failed" | "processing" | "processed" | "noData" | "invalidValueError" | "emailInvalidError" | "phoneInvalidError" | "pageLoadFailed" | "pageNotFound" | "goBack" | "agentIntro" | "agentPlaceholder" | "agentClear" | "agentQuestion" | "agentToolCard" | "agentAnswer" | "agentListen" | "agentVoiceFailed" | "agentAttach" | "agentAttachRemove" | "agentAttachReading" | "agentReferenceRemove" | "agentReferenceFailed" | "agentAttachTooLarge" | "agentAttachUnsupported" | "agentAttachDuplicate" | "agentAttachTooMany" | "agentAttachTooMuch" | "agentAnswerNeeded" | "agentQueue" | "agentQueuePlaceholder" | "agentQueued" | "agentQueueEdit" | "agentQueueCancel" | "agentToolDone" | "agentToolFailed" | "agentToolRunning" | "agentToolResult" | "agentTokens" | "agentTokensOf" | "agentCompactsAt" | "agentSummarizing" | "agentContinue" | "agentKeepGoing" | "agentCmdNew" | "agentCmdRetry" | "agentCmdCompact" | "agentCmdCopy" | "agentCmdHelp" | "agentCmdTools" | "agentHelpIntro" | "agentHelpNote" | "agentNothingToRetry" | "agentNothingToCompact" | "agentCompacted" | "agentSummary" | "agentBusy" | "agentCopied" | "agentCopyFailed" | "agentToolsHead" | "agentToolsState" | "decline" | "confirmClose" | "textTooShortError" | "textTooLongError" | "selectTooShortError" | "selectTooLongError" | "numberTooSmallError" | "numberTooBigError" | "passwordNotMatchError" | "selectDateError" | "priceUnit" | "passwordConfirm" | "noOptions" | "noSelection" | "addModel" | "createSuccess" | "updateSuccess" | "removeSuccess" | "sureToRemove" | "irreversibleOps" | "typeNameToRemove" | "yesRemove" | "removeMsg" | "confirmMsg" | "perPage" | "cardView" | "tableView" | "exportCsv" | "exportJson" | "actions" | "draftConflict" | "draftApplied" | "draftRestore" | "draftDiscard" | "draftStartOver" | "new"> | import("./locale.d.ts").ScalarTranslatorKey<"agentTurn", AgentTurn, never> | `agentStop.${string}` | `agentStop.${string}.desc` | import("./locale.d.ts").ServiceTranslatorKey<"agent", AgentEndpoint, never>, option?: import("./trans.d.ts").TransMessageOption) => void;
|
|
10
|
-
warning: (key: import("./locale.d.ts").ServiceTranslatorKey<"base", BaseEndpoint, "error" | "unauthorized" | "edit" | "ok" | "retry" | "approve" | "view" | "remove" | "skip" | "success" | "password" | "save" | "refresh" | "agent" | "stop" | "connecting" | "send" | "cancel" | "copy" | "createModel" | "updateModel" | "removeModel" | "somethingWrong" | "connected" | "serverDisconnected" | "refreshing" | "tryReconnecting" | "serverHasProblem" | "checkServerStatus" | "cameraPromptHeader" | "cameraPromptPhoto" | "cameraPromptPicture" | "cameraPromptCancel" | "failed" | "processing" | "processed" | "noData" | "invalidValueError" | "emailInvalidError" | "phoneInvalidError" | "pageLoadFailed" | "pageNotFound" | "goBack" | "agentIntro" | "agentPlaceholder" | "agentClear" | "agentQuestion" | "agentToolCard" | "agentAnswer" | "agentListen" | "agentVoiceFailed" | "agentAttach" | "agentAttachRemove" | "agentAttachReading" | "agentReferenceRemove" | "agentReferenceFailed" | "agentAttachTooLarge" | "agentAttachUnsupported" | "agentAttachDuplicate" | "agentAttachTooMany" | "agentAttachTooMuch" | "agentAnswerNeeded" | "agentQueue" | "agentQueuePlaceholder" | "agentQueued" | "agentQueueEdit" | "agentQueueCancel" | "agentToolDone" | "agentToolFailed" | "agentToolRunning" | "agentToolResult" | "agentTokens" | "agentTokensOf" | "agentCompactsAt" | "agentSummarizing" | "agentContinue" | "agentKeepGoing" | "agentCmdNew" | "agentCmdRetry" | "agentCmdCompact" | "agentCmdCopy" | "agentCmdHelp" | "agentCmdTools" | "agentHelpIntro" | "agentHelpNote" | "agentNothingToRetry" | "agentNothingToCompact" | "agentCompacted" | "agentSummary" | "agentBusy" | "agentCopied" | "agentCopyFailed" | "agentToolsHead" | "agentToolsState" | "decline" | "confirmClose" | "textTooShortError" | "textTooLongError" | "selectTooShortError" | "selectTooLongError" | "numberTooSmallError" | "numberTooBigError" | "passwordNotMatchError" | "selectDateError" | "priceUnit" | "passwordConfirm" | "noOptions" | "noSelection" | "addModel" | "createSuccess" | "updateSuccess" | "removeSuccess" | "sureToRemove" | "irreversibleOps" | "typeNameToRemove" | "yesRemove" | "removeMsg" | "confirmMsg" | "perPage" | "cardView" | "tableView" | "exportCsv" | "exportJson" | "actions" | "draftConflict" | "draftApplied" | "draftRestore" | "draftDiscard" | "draftStartOver" | "new"> | import("./locale.d.ts").ScalarTranslatorKey<"agentTurn", AgentTurn, never> | `agentStop.${string}` | `agentStop.${string}.desc` | import("./locale.d.ts").ServiceTranslatorKey<"agent", AgentEndpoint, never>, option?: import("./trans.d.ts").TransMessageOption) => void;
|
|
11
|
-
success: (key: import("./locale.d.ts").ServiceTranslatorKey<"base", BaseEndpoint, "error" | "unauthorized" | "edit" | "ok" | "retry" | "approve" | "view" | "remove" | "skip" | "success" | "password" | "save" | "refresh" | "agent" | "stop" | "connecting" | "send" | "cancel" | "copy" | "createModel" | "updateModel" | "removeModel" | "somethingWrong" | "connected" | "serverDisconnected" | "refreshing" | "tryReconnecting" | "serverHasProblem" | "checkServerStatus" | "cameraPromptHeader" | "cameraPromptPhoto" | "cameraPromptPicture" | "cameraPromptCancel" | "failed" | "processing" | "processed" | "noData" | "invalidValueError" | "emailInvalidError" | "phoneInvalidError" | "pageLoadFailed" | "pageNotFound" | "goBack" | "agentIntro" | "agentPlaceholder" | "agentClear" | "agentQuestion" | "agentToolCard" | "agentAnswer" | "agentListen" | "agentVoiceFailed" | "agentAttach" | "agentAttachRemove" | "agentAttachReading" | "agentReferenceRemove" | "agentReferenceFailed" | "agentAttachTooLarge" | "agentAttachUnsupported" | "agentAttachDuplicate" | "agentAttachTooMany" | "agentAttachTooMuch" | "agentAnswerNeeded" | "agentQueue" | "agentQueuePlaceholder" | "agentQueued" | "agentQueueEdit" | "agentQueueCancel" | "agentToolDone" | "agentToolFailed" | "agentToolRunning" | "agentToolResult" | "agentTokens" | "agentTokensOf" | "agentCompactsAt" | "agentSummarizing" | "agentContinue" | "agentKeepGoing" | "agentCmdNew" | "agentCmdRetry" | "agentCmdCompact" | "agentCmdCopy" | "agentCmdHelp" | "agentCmdTools" | "agentHelpIntro" | "agentHelpNote" | "agentNothingToRetry" | "agentNothingToCompact" | "agentCompacted" | "agentSummary" | "agentBusy" | "agentCopied" | "agentCopyFailed" | "agentToolsHead" | "agentToolsState" | "decline" | "confirmClose" | "textTooShortError" | "textTooLongError" | "selectTooShortError" | "selectTooLongError" | "numberTooSmallError" | "numberTooBigError" | "passwordNotMatchError" | "selectDateError" | "priceUnit" | "passwordConfirm" | "noOptions" | "noSelection" | "addModel" | "createSuccess" | "updateSuccess" | "removeSuccess" | "sureToRemove" | "irreversibleOps" | "typeNameToRemove" | "yesRemove" | "removeMsg" | "confirmMsg" | "perPage" | "cardView" | "tableView" | "exportCsv" | "exportJson" | "actions" | "draftConflict" | "draftApplied" | "draftRestore" | "draftDiscard" | "draftStartOver" | "new"> | import("./locale.d.ts").ScalarTranslatorKey<"agentTurn", AgentTurn, never> | `agentStop.${string}` | `agentStop.${string}.desc` | import("./locale.d.ts").ServiceTranslatorKey<"agent", AgentEndpoint, never>, option?: import("./trans.d.ts").TransMessageOption) => void;
|
|
12
|
-
loading: (key: import("./locale.d.ts").ServiceTranslatorKey<"base", BaseEndpoint, "error" | "unauthorized" | "edit" | "ok" | "retry" | "approve" | "view" | "remove" | "skip" | "success" | "password" | "save" | "refresh" | "agent" | "stop" | "connecting" | "send" | "cancel" | "copy" | "createModel" | "updateModel" | "removeModel" | "somethingWrong" | "connected" | "serverDisconnected" | "refreshing" | "tryReconnecting" | "serverHasProblem" | "checkServerStatus" | "cameraPromptHeader" | "cameraPromptPhoto" | "cameraPromptPicture" | "cameraPromptCancel" | "failed" | "processing" | "processed" | "noData" | "invalidValueError" | "emailInvalidError" | "phoneInvalidError" | "pageLoadFailed" | "pageNotFound" | "goBack" | "agentIntro" | "agentPlaceholder" | "agentClear" | "agentQuestion" | "agentToolCard" | "agentAnswer" | "agentListen" | "agentVoiceFailed" | "agentAttach" | "agentAttachRemove" | "agentAttachReading" | "agentReferenceRemove" | "agentReferenceFailed" | "agentAttachTooLarge" | "agentAttachUnsupported" | "agentAttachDuplicate" | "agentAttachTooMany" | "agentAttachTooMuch" | "agentAnswerNeeded" | "agentQueue" | "agentQueuePlaceholder" | "agentQueued" | "agentQueueEdit" | "agentQueueCancel" | "agentToolDone" | "agentToolFailed" | "agentToolRunning" | "agentToolResult" | "agentTokens" | "agentTokensOf" | "agentCompactsAt" | "agentSummarizing" | "agentContinue" | "agentKeepGoing" | "agentCmdNew" | "agentCmdRetry" | "agentCmdCompact" | "agentCmdCopy" | "agentCmdHelp" | "agentCmdTools" | "agentHelpIntro" | "agentHelpNote" | "agentNothingToRetry" | "agentNothingToCompact" | "agentCompacted" | "agentSummary" | "agentBusy" | "agentCopied" | "agentCopyFailed" | "agentToolsHead" | "agentToolsState" | "decline" | "confirmClose" | "textTooShortError" | "textTooLongError" | "selectTooShortError" | "selectTooLongError" | "numberTooSmallError" | "numberTooBigError" | "passwordNotMatchError" | "selectDateError" | "priceUnit" | "passwordConfirm" | "noOptions" | "noSelection" | "addModel" | "createSuccess" | "updateSuccess" | "removeSuccess" | "sureToRemove" | "irreversibleOps" | "typeNameToRemove" | "yesRemove" | "removeMsg" | "confirmMsg" | "perPage" | "cardView" | "tableView" | "exportCsv" | "exportJson" | "actions" | "draftConflict" | "draftApplied" | "draftRestore" | "draftDiscard" | "draftStartOver" | "new"> | import("./locale.d.ts").ScalarTranslatorKey<"agentTurn", AgentTurn, never> | `agentStop.${string}` | `agentStop.${string}.desc` | import("./locale.d.ts").ServiceTranslatorKey<"agent", AgentEndpoint, never>, option?: import("./trans.d.ts").TransMessageOption) => void;
|
|
13
|
-
}, getDictionary: (lang: "en" | "ko" | (string & {}) | "zhChs" | "zhCht" | "ja") => object, getAllDictionary: () => import("./trans.d.ts").RootDictionary, __Dict_Key__: import("./locale.d.ts").ServiceTranslatorKey<"base", BaseEndpoint, "error" | "unauthorized" | "edit" | "ok" | "retry" | "approve" | "view" | "remove" | "skip" | "success" | "password" | "save" | "refresh" | "agent" | "stop" | "connecting" | "send" | "cancel" | "copy" | "createModel" | "updateModel" | "removeModel" | "somethingWrong" | "connected" | "serverDisconnected" | "refreshing" | "tryReconnecting" | "serverHasProblem" | "checkServerStatus" | "cameraPromptHeader" | "cameraPromptPhoto" | "cameraPromptPicture" | "cameraPromptCancel" | "failed" | "processing" | "processed" | "noData" | "invalidValueError" | "emailInvalidError" | "phoneInvalidError" | "pageLoadFailed" | "pageNotFound" | "goBack" | "agentIntro" | "agentPlaceholder" | "agentClear" | "agentQuestion" | "agentToolCard" | "agentAnswer" | "agentListen" | "agentVoiceFailed" | "agentAttach" | "agentAttachRemove" | "agentAttachReading" | "agentReferenceRemove" | "agentReferenceFailed" | "agentAttachTooLarge" | "agentAttachUnsupported" | "agentAttachDuplicate" | "agentAttachTooMany" | "agentAttachTooMuch" | "agentAnswerNeeded" | "agentQueue" | "agentQueuePlaceholder" | "agentQueued" | "agentQueueEdit" | "agentQueueCancel" | "agentToolDone" | "agentToolFailed" | "agentToolRunning" | "agentToolResult" | "agentTokens" | "agentTokensOf" | "agentCompactsAt" | "agentSummarizing" | "agentContinue" | "agentKeepGoing" | "agentCmdNew" | "agentCmdRetry" | "agentCmdCompact" | "agentCmdCopy" | "agentCmdHelp" | "agentCmdTools" | "agentHelpIntro" | "agentHelpNote" | "agentNothingToRetry" | "agentNothingToCompact" | "agentCompacted" | "agentSummary" | "agentBusy" | "agentCopied" | "agentCopyFailed" | "agentToolsHead" | "agentToolsState" | "decline" | "confirmClose" | "textTooShortError" | "textTooLongError" | "selectTooShortError" | "selectTooLongError" | "numberTooSmallError" | "numberTooBigError" | "passwordNotMatchError" | "selectDateError" | "priceUnit" | "passwordConfirm" | "noOptions" | "noSelection" | "addModel" | "createSuccess" | "updateSuccess" | "removeSuccess" | "sureToRemove" | "irreversibleOps" | "typeNameToRemove" | "yesRemove" | "removeMsg" | "confirmMsg" | "perPage" | "cardView" | "tableView" | "exportCsv" | "exportJson" | "actions" | "draftConflict" | "draftApplied" | "draftRestore" | "draftDiscard" | "draftStartOver" | "new"> | import("./locale.d.ts").ScalarTranslatorKey<"agentTurn", AgentTurn, never> | `agentStop.${string}` | `agentStop.${string}.desc` | import("./locale.d.ts").ServiceTranslatorKey<"agent", AgentEndpoint, never>, __Error_Key__: "base.error.documentNotFound" | "base.error.gatewayTimeout" | "base.error.payloadTooLarge" | "base.error.tooManyRequests" | "base.error.serverUnavailable" | "base.error.serverUnreachable" | "base.error.idempotencyInFlight" | "base.error.unexpectedResponse" | "base.error.mutationInApp" | "base.error.mutationInRender" | "base.error.immutableField" | "base.error.invalidArgument" | "base.error.requiredArgument" | "base.error.invalidField" | "base.error.relationNotFound" | "base.error.endpointClosed" | "base.error.readOnlyDeployment" | "agent.error.llmUnavailable" | "agent.error.llmRequestFailed" | "agent.error.contextOverflow" | "agent.error.quotaExceeded" | "agent.error.requestRefused";
|
|
7
|
+
export declare const Err: import("./trans.d.ts").ErrConstructor<"base.error.documentNotFound" | "base.error.gatewayTimeout" | "base.error.payloadTooLarge" | "base.error.tooManyRequests" | "base.error.serverUnavailable" | "base.error.serverUnreachable" | "base.error.idempotencyInFlight" | "base.error.unexpectedResponse" | "base.error.mutationInApp" | "base.error.mutationInRender" | "base.error.immutableField" | "base.error.invalidArgument" | "base.error.requiredArgument" | "base.error.invalidField" | "base.error.relationNotFound" | "base.error.endpointClosed" | "base.error.readOnlyDeployment" | "agent.error.llmUnavailable" | "agent.error.llmRequestFailed" | "agent.error.contextOverflow" | "agent.error.quotaExceeded" | "agent.error.requestRefused">, translate: (lang: "en" | "ko" | (string & {}) | "zhChs" | "zhCht" | "ja", key: import("./locale.d.ts").ServiceTranslatorKey<"base", BaseEndpoint, "error" | "unauthorized" | "edit" | "ok" | "retry" | "approve" | "view" | "remove" | "skip" | "success" | "password" | "save" | "refresh" | "agent" | "stop" | "connecting" | "send" | "cancel" | "copy" | "createModel" | "updateModel" | "removeModel" | "somethingWrong" | "connected" | "serverDisconnected" | "refreshing" | "tryReconnecting" | "serverHasProblem" | "checkServerStatus" | "cameraPromptHeader" | "cameraPromptPhoto" | "cameraPromptPicture" | "cameraPromptCancel" | "failed" | "processing" | "processed" | "noData" | "invalidValueError" | "emailInvalidError" | "phoneInvalidError" | "pageLoadFailed" | "loadFailed" | "pageNotFound" | "goBack" | "agentIntro" | "agentPlaceholder" | "agentClear" | "agentQuestion" | "agentToolCard" | "agentAnswer" | "agentListen" | "agentVoiceFailed" | "agentAttach" | "agentAttachRemove" | "agentAttachReading" | "agentReferenceRemove" | "agentReferenceFailed" | "agentAttachTooLarge" | "agentAttachUnsupported" | "agentAttachDuplicate" | "agentAttachTooMany" | "agentAttachTooMuch" | "agentAnswerNeeded" | "agentQueue" | "agentQueuePlaceholder" | "agentQueued" | "agentQueueEdit" | "agentQueueCancel" | "agentToolDone" | "agentToolFailed" | "agentToolRunning" | "agentToolResult" | "agentTokens" | "agentTokensOf" | "agentCompactsAt" | "agentSummarizing" | "agentContinue" | "agentKeepGoing" | "agentCmdNew" | "agentCmdRetry" | "agentCmdCompact" | "agentCmdCopy" | "agentCmdHelp" | "agentCmdTools" | "agentHelpIntro" | "agentHelpNote" | "agentNothingToRetry" | "agentNothingToCompact" | "agentCompacted" | "agentSummary" | "agentBusy" | "agentCopied" | "agentCopyFailed" | "agentToolsHead" | "agentToolsState" | "decline" | "confirmClose" | "textTooShortError" | "textTooLongError" | "selectTooShortError" | "selectTooLongError" | "numberTooSmallError" | "numberTooBigError" | "passwordNotMatchError" | "selectDateError" | "priceUnit" | "passwordConfirm" | "noOptions" | "noSelection" | "addModel" | "createSuccess" | "updateSuccess" | "removeSuccess" | "sureToRemove" | "irreversibleOps" | "typeNameToRemove" | "yesRemove" | "removeMsg" | "confirmMsg" | "perPage" | "cardView" | "tableView" | "exportCsv" | "exportJson" | "actions" | "draftConflict" | "draftApplied" | "draftRestore" | "draftDiscard" | "draftStartOver" | "new"> | import("./locale.d.ts").ScalarTranslatorKey<"agentTurn", AgentTurn, never> | `agentStop.${string}` | `agentStop.${string}.desc` | import("./locale.d.ts").ServiceTranslatorKey<"agent", AgentEndpoint, never>, data?: import("./trans.d.ts").TranslationData) => string, msg: {
|
|
8
|
+
error: (key: import("./locale.d.ts").ServiceTranslatorKey<"base", BaseEndpoint, "error" | "unauthorized" | "edit" | "ok" | "retry" | "approve" | "view" | "remove" | "skip" | "success" | "password" | "save" | "refresh" | "agent" | "stop" | "connecting" | "send" | "cancel" | "copy" | "createModel" | "updateModel" | "removeModel" | "somethingWrong" | "connected" | "serverDisconnected" | "refreshing" | "tryReconnecting" | "serverHasProblem" | "checkServerStatus" | "cameraPromptHeader" | "cameraPromptPhoto" | "cameraPromptPicture" | "cameraPromptCancel" | "failed" | "processing" | "processed" | "noData" | "invalidValueError" | "emailInvalidError" | "phoneInvalidError" | "pageLoadFailed" | "loadFailed" | "pageNotFound" | "goBack" | "agentIntro" | "agentPlaceholder" | "agentClear" | "agentQuestion" | "agentToolCard" | "agentAnswer" | "agentListen" | "agentVoiceFailed" | "agentAttach" | "agentAttachRemove" | "agentAttachReading" | "agentReferenceRemove" | "agentReferenceFailed" | "agentAttachTooLarge" | "agentAttachUnsupported" | "agentAttachDuplicate" | "agentAttachTooMany" | "agentAttachTooMuch" | "agentAnswerNeeded" | "agentQueue" | "agentQueuePlaceholder" | "agentQueued" | "agentQueueEdit" | "agentQueueCancel" | "agentToolDone" | "agentToolFailed" | "agentToolRunning" | "agentToolResult" | "agentTokens" | "agentTokensOf" | "agentCompactsAt" | "agentSummarizing" | "agentContinue" | "agentKeepGoing" | "agentCmdNew" | "agentCmdRetry" | "agentCmdCompact" | "agentCmdCopy" | "agentCmdHelp" | "agentCmdTools" | "agentHelpIntro" | "agentHelpNote" | "agentNothingToRetry" | "agentNothingToCompact" | "agentCompacted" | "agentSummary" | "agentBusy" | "agentCopied" | "agentCopyFailed" | "agentToolsHead" | "agentToolsState" | "decline" | "confirmClose" | "textTooShortError" | "textTooLongError" | "selectTooShortError" | "selectTooLongError" | "numberTooSmallError" | "numberTooBigError" | "passwordNotMatchError" | "selectDateError" | "priceUnit" | "passwordConfirm" | "noOptions" | "noSelection" | "addModel" | "createSuccess" | "updateSuccess" | "removeSuccess" | "sureToRemove" | "irreversibleOps" | "typeNameToRemove" | "yesRemove" | "removeMsg" | "confirmMsg" | "perPage" | "cardView" | "tableView" | "exportCsv" | "exportJson" | "actions" | "draftConflict" | "draftApplied" | "draftRestore" | "draftDiscard" | "draftStartOver" | "new"> | import("./locale.d.ts").ScalarTranslatorKey<"agentTurn", AgentTurn, never> | `agentStop.${string}` | `agentStop.${string}.desc` | import("./locale.d.ts").ServiceTranslatorKey<"agent", AgentEndpoint, never>, option?: import("./trans.d.ts").TransMessageOption) => void;
|
|
9
|
+
info: (key: import("./locale.d.ts").ServiceTranslatorKey<"base", BaseEndpoint, "error" | "unauthorized" | "edit" | "ok" | "retry" | "approve" | "view" | "remove" | "skip" | "success" | "password" | "save" | "refresh" | "agent" | "stop" | "connecting" | "send" | "cancel" | "copy" | "createModel" | "updateModel" | "removeModel" | "somethingWrong" | "connected" | "serverDisconnected" | "refreshing" | "tryReconnecting" | "serverHasProblem" | "checkServerStatus" | "cameraPromptHeader" | "cameraPromptPhoto" | "cameraPromptPicture" | "cameraPromptCancel" | "failed" | "processing" | "processed" | "noData" | "invalidValueError" | "emailInvalidError" | "phoneInvalidError" | "pageLoadFailed" | "loadFailed" | "pageNotFound" | "goBack" | "agentIntro" | "agentPlaceholder" | "agentClear" | "agentQuestion" | "agentToolCard" | "agentAnswer" | "agentListen" | "agentVoiceFailed" | "agentAttach" | "agentAttachRemove" | "agentAttachReading" | "agentReferenceRemove" | "agentReferenceFailed" | "agentAttachTooLarge" | "agentAttachUnsupported" | "agentAttachDuplicate" | "agentAttachTooMany" | "agentAttachTooMuch" | "agentAnswerNeeded" | "agentQueue" | "agentQueuePlaceholder" | "agentQueued" | "agentQueueEdit" | "agentQueueCancel" | "agentToolDone" | "agentToolFailed" | "agentToolRunning" | "agentToolResult" | "agentTokens" | "agentTokensOf" | "agentCompactsAt" | "agentSummarizing" | "agentContinue" | "agentKeepGoing" | "agentCmdNew" | "agentCmdRetry" | "agentCmdCompact" | "agentCmdCopy" | "agentCmdHelp" | "agentCmdTools" | "agentHelpIntro" | "agentHelpNote" | "agentNothingToRetry" | "agentNothingToCompact" | "agentCompacted" | "agentSummary" | "agentBusy" | "agentCopied" | "agentCopyFailed" | "agentToolsHead" | "agentToolsState" | "decline" | "confirmClose" | "textTooShortError" | "textTooLongError" | "selectTooShortError" | "selectTooLongError" | "numberTooSmallError" | "numberTooBigError" | "passwordNotMatchError" | "selectDateError" | "priceUnit" | "passwordConfirm" | "noOptions" | "noSelection" | "addModel" | "createSuccess" | "updateSuccess" | "removeSuccess" | "sureToRemove" | "irreversibleOps" | "typeNameToRemove" | "yesRemove" | "removeMsg" | "confirmMsg" | "perPage" | "cardView" | "tableView" | "exportCsv" | "exportJson" | "actions" | "draftConflict" | "draftApplied" | "draftRestore" | "draftDiscard" | "draftStartOver" | "new"> | import("./locale.d.ts").ScalarTranslatorKey<"agentTurn", AgentTurn, never> | `agentStop.${string}` | `agentStop.${string}.desc` | import("./locale.d.ts").ServiceTranslatorKey<"agent", AgentEndpoint, never>, option?: import("./trans.d.ts").TransMessageOption) => void;
|
|
10
|
+
warning: (key: import("./locale.d.ts").ServiceTranslatorKey<"base", BaseEndpoint, "error" | "unauthorized" | "edit" | "ok" | "retry" | "approve" | "view" | "remove" | "skip" | "success" | "password" | "save" | "refresh" | "agent" | "stop" | "connecting" | "send" | "cancel" | "copy" | "createModel" | "updateModel" | "removeModel" | "somethingWrong" | "connected" | "serverDisconnected" | "refreshing" | "tryReconnecting" | "serverHasProblem" | "checkServerStatus" | "cameraPromptHeader" | "cameraPromptPhoto" | "cameraPromptPicture" | "cameraPromptCancel" | "failed" | "processing" | "processed" | "noData" | "invalidValueError" | "emailInvalidError" | "phoneInvalidError" | "pageLoadFailed" | "loadFailed" | "pageNotFound" | "goBack" | "agentIntro" | "agentPlaceholder" | "agentClear" | "agentQuestion" | "agentToolCard" | "agentAnswer" | "agentListen" | "agentVoiceFailed" | "agentAttach" | "agentAttachRemove" | "agentAttachReading" | "agentReferenceRemove" | "agentReferenceFailed" | "agentAttachTooLarge" | "agentAttachUnsupported" | "agentAttachDuplicate" | "agentAttachTooMany" | "agentAttachTooMuch" | "agentAnswerNeeded" | "agentQueue" | "agentQueuePlaceholder" | "agentQueued" | "agentQueueEdit" | "agentQueueCancel" | "agentToolDone" | "agentToolFailed" | "agentToolRunning" | "agentToolResult" | "agentTokens" | "agentTokensOf" | "agentCompactsAt" | "agentSummarizing" | "agentContinue" | "agentKeepGoing" | "agentCmdNew" | "agentCmdRetry" | "agentCmdCompact" | "agentCmdCopy" | "agentCmdHelp" | "agentCmdTools" | "agentHelpIntro" | "agentHelpNote" | "agentNothingToRetry" | "agentNothingToCompact" | "agentCompacted" | "agentSummary" | "agentBusy" | "agentCopied" | "agentCopyFailed" | "agentToolsHead" | "agentToolsState" | "decline" | "confirmClose" | "textTooShortError" | "textTooLongError" | "selectTooShortError" | "selectTooLongError" | "numberTooSmallError" | "numberTooBigError" | "passwordNotMatchError" | "selectDateError" | "priceUnit" | "passwordConfirm" | "noOptions" | "noSelection" | "addModel" | "createSuccess" | "updateSuccess" | "removeSuccess" | "sureToRemove" | "irreversibleOps" | "typeNameToRemove" | "yesRemove" | "removeMsg" | "confirmMsg" | "perPage" | "cardView" | "tableView" | "exportCsv" | "exportJson" | "actions" | "draftConflict" | "draftApplied" | "draftRestore" | "draftDiscard" | "draftStartOver" | "new"> | import("./locale.d.ts").ScalarTranslatorKey<"agentTurn", AgentTurn, never> | `agentStop.${string}` | `agentStop.${string}.desc` | import("./locale.d.ts").ServiceTranslatorKey<"agent", AgentEndpoint, never>, option?: import("./trans.d.ts").TransMessageOption) => void;
|
|
11
|
+
success: (key: import("./locale.d.ts").ServiceTranslatorKey<"base", BaseEndpoint, "error" | "unauthorized" | "edit" | "ok" | "retry" | "approve" | "view" | "remove" | "skip" | "success" | "password" | "save" | "refresh" | "agent" | "stop" | "connecting" | "send" | "cancel" | "copy" | "createModel" | "updateModel" | "removeModel" | "somethingWrong" | "connected" | "serverDisconnected" | "refreshing" | "tryReconnecting" | "serverHasProblem" | "checkServerStatus" | "cameraPromptHeader" | "cameraPromptPhoto" | "cameraPromptPicture" | "cameraPromptCancel" | "failed" | "processing" | "processed" | "noData" | "invalidValueError" | "emailInvalidError" | "phoneInvalidError" | "pageLoadFailed" | "loadFailed" | "pageNotFound" | "goBack" | "agentIntro" | "agentPlaceholder" | "agentClear" | "agentQuestion" | "agentToolCard" | "agentAnswer" | "agentListen" | "agentVoiceFailed" | "agentAttach" | "agentAttachRemove" | "agentAttachReading" | "agentReferenceRemove" | "agentReferenceFailed" | "agentAttachTooLarge" | "agentAttachUnsupported" | "agentAttachDuplicate" | "agentAttachTooMany" | "agentAttachTooMuch" | "agentAnswerNeeded" | "agentQueue" | "agentQueuePlaceholder" | "agentQueued" | "agentQueueEdit" | "agentQueueCancel" | "agentToolDone" | "agentToolFailed" | "agentToolRunning" | "agentToolResult" | "agentTokens" | "agentTokensOf" | "agentCompactsAt" | "agentSummarizing" | "agentContinue" | "agentKeepGoing" | "agentCmdNew" | "agentCmdRetry" | "agentCmdCompact" | "agentCmdCopy" | "agentCmdHelp" | "agentCmdTools" | "agentHelpIntro" | "agentHelpNote" | "agentNothingToRetry" | "agentNothingToCompact" | "agentCompacted" | "agentSummary" | "agentBusy" | "agentCopied" | "agentCopyFailed" | "agentToolsHead" | "agentToolsState" | "decline" | "confirmClose" | "textTooShortError" | "textTooLongError" | "selectTooShortError" | "selectTooLongError" | "numberTooSmallError" | "numberTooBigError" | "passwordNotMatchError" | "selectDateError" | "priceUnit" | "passwordConfirm" | "noOptions" | "noSelection" | "addModel" | "createSuccess" | "updateSuccess" | "removeSuccess" | "sureToRemove" | "irreversibleOps" | "typeNameToRemove" | "yesRemove" | "removeMsg" | "confirmMsg" | "perPage" | "cardView" | "tableView" | "exportCsv" | "exportJson" | "actions" | "draftConflict" | "draftApplied" | "draftRestore" | "draftDiscard" | "draftStartOver" | "new"> | import("./locale.d.ts").ScalarTranslatorKey<"agentTurn", AgentTurn, never> | `agentStop.${string}` | `agentStop.${string}.desc` | import("./locale.d.ts").ServiceTranslatorKey<"agent", AgentEndpoint, never>, option?: import("./trans.d.ts").TransMessageOption) => void;
|
|
12
|
+
loading: (key: import("./locale.d.ts").ServiceTranslatorKey<"base", BaseEndpoint, "error" | "unauthorized" | "edit" | "ok" | "retry" | "approve" | "view" | "remove" | "skip" | "success" | "password" | "save" | "refresh" | "agent" | "stop" | "connecting" | "send" | "cancel" | "copy" | "createModel" | "updateModel" | "removeModel" | "somethingWrong" | "connected" | "serverDisconnected" | "refreshing" | "tryReconnecting" | "serverHasProblem" | "checkServerStatus" | "cameraPromptHeader" | "cameraPromptPhoto" | "cameraPromptPicture" | "cameraPromptCancel" | "failed" | "processing" | "processed" | "noData" | "invalidValueError" | "emailInvalidError" | "phoneInvalidError" | "pageLoadFailed" | "loadFailed" | "pageNotFound" | "goBack" | "agentIntro" | "agentPlaceholder" | "agentClear" | "agentQuestion" | "agentToolCard" | "agentAnswer" | "agentListen" | "agentVoiceFailed" | "agentAttach" | "agentAttachRemove" | "agentAttachReading" | "agentReferenceRemove" | "agentReferenceFailed" | "agentAttachTooLarge" | "agentAttachUnsupported" | "agentAttachDuplicate" | "agentAttachTooMany" | "agentAttachTooMuch" | "agentAnswerNeeded" | "agentQueue" | "agentQueuePlaceholder" | "agentQueued" | "agentQueueEdit" | "agentQueueCancel" | "agentToolDone" | "agentToolFailed" | "agentToolRunning" | "agentToolResult" | "agentTokens" | "agentTokensOf" | "agentCompactsAt" | "agentSummarizing" | "agentContinue" | "agentKeepGoing" | "agentCmdNew" | "agentCmdRetry" | "agentCmdCompact" | "agentCmdCopy" | "agentCmdHelp" | "agentCmdTools" | "agentHelpIntro" | "agentHelpNote" | "agentNothingToRetry" | "agentNothingToCompact" | "agentCompacted" | "agentSummary" | "agentBusy" | "agentCopied" | "agentCopyFailed" | "agentToolsHead" | "agentToolsState" | "decline" | "confirmClose" | "textTooShortError" | "textTooLongError" | "selectTooShortError" | "selectTooLongError" | "numberTooSmallError" | "numberTooBigError" | "passwordNotMatchError" | "selectDateError" | "priceUnit" | "passwordConfirm" | "noOptions" | "noSelection" | "addModel" | "createSuccess" | "updateSuccess" | "removeSuccess" | "sureToRemove" | "irreversibleOps" | "typeNameToRemove" | "yesRemove" | "removeMsg" | "confirmMsg" | "perPage" | "cardView" | "tableView" | "exportCsv" | "exportJson" | "actions" | "draftConflict" | "draftApplied" | "draftRestore" | "draftDiscard" | "draftStartOver" | "new"> | import("./locale.d.ts").ScalarTranslatorKey<"agentTurn", AgentTurn, never> | `agentStop.${string}` | `agentStop.${string}.desc` | import("./locale.d.ts").ServiceTranslatorKey<"agent", AgentEndpoint, never>, option?: import("./trans.d.ts").TransMessageOption) => void;
|
|
13
|
+
}, getDictionary: (lang: "en" | "ko" | (string & {}) | "zhChs" | "zhCht" | "ja") => object, getAllDictionary: () => import("./trans.d.ts").RootDictionary, __Dict_Key__: import("./locale.d.ts").ServiceTranslatorKey<"base", BaseEndpoint, "error" | "unauthorized" | "edit" | "ok" | "retry" | "approve" | "view" | "remove" | "skip" | "success" | "password" | "save" | "refresh" | "agent" | "stop" | "connecting" | "send" | "cancel" | "copy" | "createModel" | "updateModel" | "removeModel" | "somethingWrong" | "connected" | "serverDisconnected" | "refreshing" | "tryReconnecting" | "serverHasProblem" | "checkServerStatus" | "cameraPromptHeader" | "cameraPromptPhoto" | "cameraPromptPicture" | "cameraPromptCancel" | "failed" | "processing" | "processed" | "noData" | "invalidValueError" | "emailInvalidError" | "phoneInvalidError" | "pageLoadFailed" | "loadFailed" | "pageNotFound" | "goBack" | "agentIntro" | "agentPlaceholder" | "agentClear" | "agentQuestion" | "agentToolCard" | "agentAnswer" | "agentListen" | "agentVoiceFailed" | "agentAttach" | "agentAttachRemove" | "agentAttachReading" | "agentReferenceRemove" | "agentReferenceFailed" | "agentAttachTooLarge" | "agentAttachUnsupported" | "agentAttachDuplicate" | "agentAttachTooMany" | "agentAttachTooMuch" | "agentAnswerNeeded" | "agentQueue" | "agentQueuePlaceholder" | "agentQueued" | "agentQueueEdit" | "agentQueueCancel" | "agentToolDone" | "agentToolFailed" | "agentToolRunning" | "agentToolResult" | "agentTokens" | "agentTokensOf" | "agentCompactsAt" | "agentSummarizing" | "agentContinue" | "agentKeepGoing" | "agentCmdNew" | "agentCmdRetry" | "agentCmdCompact" | "agentCmdCopy" | "agentCmdHelp" | "agentCmdTools" | "agentHelpIntro" | "agentHelpNote" | "agentNothingToRetry" | "agentNothingToCompact" | "agentCompacted" | "agentSummary" | "agentBusy" | "agentCopied" | "agentCopyFailed" | "agentToolsHead" | "agentToolsState" | "decline" | "confirmClose" | "textTooShortError" | "textTooLongError" | "selectTooShortError" | "selectTooLongError" | "numberTooSmallError" | "numberTooBigError" | "passwordNotMatchError" | "selectDateError" | "priceUnit" | "passwordConfirm" | "noOptions" | "noSelection" | "addModel" | "createSuccess" | "updateSuccess" | "removeSuccess" | "sureToRemove" | "irreversibleOps" | "typeNameToRemove" | "yesRemove" | "removeMsg" | "confirmMsg" | "perPage" | "cardView" | "tableView" | "exportCsv" | "exportJson" | "actions" | "draftConflict" | "draftApplied" | "draftRestore" | "draftDiscard" | "draftStartOver" | "new"> | import("./locale.d.ts").ScalarTranslatorKey<"agentTurn", AgentTurn, never> | `agentStop.${string}` | `agentStop.${string}.desc` | import("./locale.d.ts").ServiceTranslatorKey<"agent", AgentEndpoint, never>, __Error_Key__: "base.error.documentNotFound" | "base.error.gatewayTimeout" | "base.error.payloadTooLarge" | "base.error.tooManyRequests" | "base.error.serverUnavailable" | "base.error.serverUnreachable" | "base.error.idempotencyInFlight" | "base.error.unexpectedResponse" | "base.error.mutationInApp" | "base.error.mutationInRender" | "base.error.immutableField" | "base.error.invalidArgument" | "base.error.requiredArgument" | "base.error.invalidField" | "base.error.relationNotFound" | "base.error.endpointClosed" | "base.error.readOnlyDeployment" | "agent.error.llmUnavailable" | "agent.error.llmRequestFailed" | "agent.error.contextOverflow" | "agent.error.quotaExceeded" | "agent.error.requestRefused";
|
|
@@ -3,6 +3,7 @@ type FieldFactories<Handle> = {
|
|
|
3
3
|
};
|
|
4
4
|
/** Awaitable as the shape a helper always gave, and destructurable into one promise per field. */
|
|
5
5
|
export declare class FetchHandle {
|
|
6
|
+
#private;
|
|
6
7
|
/**
|
|
7
8
|
* Each of `requests` gets a swallowing handler, so a field nobody reads cannot surface as an unhandled rejection;
|
|
8
9
|
* `fields` factories are memoized on first read.
|
|
@@ -3,4 +3,6 @@ export declare class InflightQueries {
|
|
|
3
3
|
constructor(copy: (value: unknown) => unknown);
|
|
4
4
|
claim<T>(key: string, start: (signal: AbortSignal) => Promise<T>, signal?: AbortSignal): Promise<T>;
|
|
5
5
|
detach(): void;
|
|
6
|
+
forget(): void;
|
|
7
|
+
writing<T>(write: () => Promise<T>, keepsReads?: boolean): Promise<T>;
|
|
6
8
|
}
|
package/types/fetch/index.d.ts
CHANGED
|
@@ -13,6 +13,12 @@ export interface BuilderRpcEventHandlers {
|
|
|
13
13
|
onSsrUpdated?: (update: SsrUpdatedPayload) => void;
|
|
14
14
|
onBuildStatus?: (status: DevBuildStatus) => void;
|
|
15
15
|
}
|
|
16
|
+
export interface BuilderRpcTimeout extends Error {
|
|
17
|
+
timeoutMs: number;
|
|
18
|
+
}
|
|
19
|
+
export interface BuilderRpcUnavailable extends Error {
|
|
20
|
+
kind: "unavailable";
|
|
21
|
+
}
|
|
16
22
|
/** One per backend process: subscribes to the IPC channel on construction and unsubscribes on `dispose()`. */
|
|
17
23
|
export declare class BuilderRpc {
|
|
18
24
|
#private;
|
|
@@ -33,5 +39,7 @@ export declare class BuilderRpc {
|
|
|
33
39
|
buildGraph(): Promise<BuildGraphPayload>;
|
|
34
40
|
buildChanges(since: string | null): Promise<BuildChangesPayload>;
|
|
35
41
|
buildFramework(): Promise<BuildFrameworkPayload>;
|
|
42
|
+
static isTimeout(error: unknown): error is BuilderRpcTimeout;
|
|
43
|
+
static isUnavailable(error: unknown): error is BuilderRpcUnavailable;
|
|
36
44
|
dispose(): void;
|
|
37
45
|
}
|
|
@@ -63,6 +63,11 @@ export type BuilderReq = {
|
|
|
63
63
|
knownEntries: string[];
|
|
64
64
|
generation?: number;
|
|
65
65
|
};
|
|
66
|
+
/**
|
|
67
|
+
* Only the dev host writes it, on a reply no builder answered (stopped, not started, gone mid-request); a builder's own
|
|
68
|
+
* failure has none. Optional, so a dev host and a server released before it still talk to ones released after.
|
|
69
|
+
*/
|
|
70
|
+
export type BuilderFailureKind = "unavailable";
|
|
66
71
|
export type BuilderRes = {
|
|
67
72
|
type: "build-route-res";
|
|
68
73
|
id: number;
|
|
@@ -73,6 +78,7 @@ export type BuilderRes = {
|
|
|
73
78
|
id: number;
|
|
74
79
|
ok: false;
|
|
75
80
|
error: string;
|
|
81
|
+
kind?: BuilderFailureKind;
|
|
76
82
|
};
|
|
77
83
|
/**
|
|
78
84
|
* Sent by the first `/__csr` or `?csr=true` request (a device WebView in mobile dev) to arm the lazy dev CSR build.
|
|
@@ -93,6 +99,7 @@ export type BuilderCsrRes = {
|
|
|
93
99
|
id: number;
|
|
94
100
|
ok: false;
|
|
95
101
|
error: string;
|
|
102
|
+
kind?: BuilderFailureKind;
|
|
96
103
|
};
|
|
97
104
|
export interface BuildGraphPayload {
|
|
98
105
|
workspaceRoot: string;
|
|
@@ -128,6 +135,7 @@ export type BuilderGraphRes = {
|
|
|
128
135
|
id: number;
|
|
129
136
|
ok: false;
|
|
130
137
|
error: string;
|
|
138
|
+
kind?: BuilderFailureKind;
|
|
131
139
|
};
|
|
132
140
|
/** Drain and exit (the only way bundler memory returns to the OS); draining, not killing, keeps a rebuild whole. */
|
|
133
141
|
export type BuilderControl = {
|
|
@@ -11,6 +11,7 @@ export interface DevtoolsRouterContext {
|
|
|
11
11
|
prefix: string;
|
|
12
12
|
websocketPrefix: string;
|
|
13
13
|
openapi: boolean;
|
|
14
|
+
web?: boolean;
|
|
14
15
|
getStatus: () => string;
|
|
15
16
|
buildGraph?: () => Promise<BuildGraphPayload | null>;
|
|
16
17
|
buildChanges?: (since: string | null) => Promise<BuildChangesPayload | null>;
|
|
@@ -23,7 +24,9 @@ export declare class DevtoolsRouter {
|
|
|
23
24
|
static readonly logger: Logger;
|
|
24
25
|
/** A local dev runtime only, unless `AKAN_DEVTOOLS` ("true"/"1", "false"/"0") overrides it, e.g. to debug a deployed env. */
|
|
25
26
|
static isEnabled(env: BaseEnv): boolean;
|
|
26
|
-
static buildsFrom(
|
|
27
|
+
static buildsFrom(webRouter: {
|
|
28
|
+
readonly builderRpc: BuilderRpc | null;
|
|
29
|
+
} | null): Pick<DevtoolsRouterContext, "web" | "buildGraph" | "buildChanges" | "buildFramework">;
|
|
27
30
|
constructor(context: DevtoolsRouterContext);
|
|
28
31
|
createRoutes(): HttpRoutes;
|
|
29
32
|
}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { Logger } from "akanjs/common";
|
|
2
|
-
import type
|
|
2
|
+
import { type BuildChangesPayload, type BuildFrameworkPayload, type BuildGraphPayload } from "../../artifact.d.ts";
|
|
3
3
|
import { type StudioQuery } from "./studioDocument.d.ts";
|
|
4
4
|
import type { StudioRuntimePayload } from "./studioRuntimeGraph.d.ts";
|
|
5
5
|
export interface StudioRouteContext {
|
|
6
6
|
basePath: string;
|
|
7
7
|
appName: string;
|
|
8
|
+
web: boolean;
|
|
8
9
|
buildGraph: (() => Promise<BuildGraphPayload | null>) | null;
|
|
9
10
|
buildChanges: ((since: string | null) => Promise<BuildChangesPayload | null>) | null;
|
|
10
11
|
buildFramework: (() => Promise<BuildFrameworkPayload | null>) | null;
|
package/types/server/head.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { ResolvedHead, ResolveHeadResult } from "akanjs/client";
|
|
2
2
|
import { type AkanHeadSnapshotV1 } from "./routeState.d.ts";
|
|
3
3
|
export declare function createAkanLocaleAlternateHeadSnapshot(languages: Record<string, string>): AkanHeadSnapshotV1;
|
|
4
4
|
export declare function mergeAkanHeadSnapshots(...snapshots: Array<AkanHeadSnapshotV1 | null | undefined>): AkanHeadSnapshotV1 | undefined;
|
|
5
|
-
export declare function
|
|
5
|
+
export declare function akanHeadSnapshotKey(snapshot: AkanHeadSnapshotV1): string;
|
|
6
6
|
export declare function resolveHeadResult(value: ResolveHeadResult): ResolvedHead;
|
|
@@ -19,5 +19,5 @@ export declare class RotatingLogWriter {
|
|
|
19
19
|
static sanitizeFilePart(value: string): string;
|
|
20
20
|
write(processKey: string, chunk: string): void;
|
|
21
21
|
close(): Promise<void>;
|
|
22
|
-
static fileMode(value?: string | undefined, warn?: typeof RotatingLogWriter.__#
|
|
22
|
+
static fileMode(value?: string | undefined, warn?: typeof RotatingLogWriter.__#130@#defaultWarn): number;
|
|
23
23
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Head, LayoutFallbackRoute, PathRoute, ResolvedHead, RouteRender } from "akanjs/client";
|
|
1
|
+
import type { Head, LayoutFallbackRoute, PathRoute, ResolvedHead, ResolveHeadResult, RouteRender } from "akanjs/client";
|
|
2
2
|
import { type ReactElement, type ReactNode } from "react";
|
|
3
3
|
import type { FallbackHead } from "./fallbackHead.d.ts";
|
|
4
4
|
import { RouteShellGate } from "./routeShellGate.d.ts";
|
|
@@ -12,8 +12,14 @@ export interface RouteNotFoundInPlace {
|
|
|
12
12
|
/** The document head still to be written, which then carries the not-found view's head tags and `noindex`. */
|
|
13
13
|
head?: FallbackHead;
|
|
14
14
|
}
|
|
15
|
+
export interface AdmittedNotFoundFallback {
|
|
16
|
+
route: LayoutFallbackRoute;
|
|
17
|
+
params: Record<string, string>;
|
|
18
|
+
searchParams: Record<string, string | string[]>;
|
|
19
|
+
}
|
|
15
20
|
export declare class RouteElementComposer {
|
|
16
21
|
#private;
|
|
22
|
+
static streamed(error: unknown): boolean;
|
|
17
23
|
static resolveSsrFramePathRoute({ pathRoute, basePath, }: {
|
|
18
24
|
pathRoute: PathRoute;
|
|
19
25
|
basePath?: string | null;
|
|
@@ -39,11 +45,19 @@ export declare class RouteElementComposer {
|
|
|
39
45
|
params: Record<string, string>;
|
|
40
46
|
searchParams: Record<string, string | string[]>;
|
|
41
47
|
}): Promise<void>;
|
|
48
|
+
static prefetchVerdict(match: {
|
|
49
|
+
pathRoute: PathRoute;
|
|
50
|
+
params: Record<string, string>;
|
|
51
|
+
} | null, notFoundFallback: AdmittedNotFoundFallback | null, searchParams: Record<string, string | string[]>): Promise<"refused" | "admitted" | "unchecked">;
|
|
42
52
|
static fallbackRouteOf<Route extends LayoutFallbackRoute>(route: Route, error: unknown): Route | LayoutFallbackRoute;
|
|
43
53
|
static admittedFallbackOf(route: LayoutFallbackRoute, props: {
|
|
44
54
|
params: Record<string, string>;
|
|
45
55
|
searchParams: Record<string, string | string[]>;
|
|
46
56
|
}): Promise<LayoutFallbackRoute>;
|
|
57
|
+
static admitNotFoundFallback(matched: {
|
|
58
|
+
fallbackRoute: LayoutFallbackRoute;
|
|
59
|
+
params: Record<string, string>;
|
|
60
|
+
} | null, searchParams: Record<string, string | string[]>): Promise<AdmittedNotFoundFallback | null>;
|
|
47
61
|
static composeSuffix({ pathRoute, params, searchParams, patchStartIndex, navKey, notFound, }: {
|
|
48
62
|
pathRoute: PathRoute;
|
|
49
63
|
params: Record<string, string>;
|
|
@@ -63,6 +77,15 @@ export declare class RouteElementComposer {
|
|
|
63
77
|
params: Record<string, string>;
|
|
64
78
|
searchParams: Record<string, string[] | string>;
|
|
65
79
|
}): Promise<ResolvedHead>;
|
|
80
|
+
static resolveHeadLayers({ pathRoute, params, searchParams, }: {
|
|
81
|
+
pathRoute: PathRoute;
|
|
82
|
+
params: Record<string, string>;
|
|
83
|
+
searchParams: Record<string, string[] | string>;
|
|
84
|
+
}): Promise<{
|
|
85
|
+
head: ResolvedHead;
|
|
86
|
+
layouts: ResolveHeadResult;
|
|
87
|
+
page: ResolveHeadResult;
|
|
88
|
+
}>;
|
|
66
89
|
static composeFallback({ kind, route, params, searchParams, pathname, error, digest, gate, head, }: {
|
|
67
90
|
kind: "not-found" | "error";
|
|
68
91
|
route: PathRoute | LayoutFallbackRoute;
|
|
@@ -27,6 +27,8 @@ export interface AkanRouterStateV1 {
|
|
|
27
27
|
href: string;
|
|
28
28
|
routeId: string;
|
|
29
29
|
segments: AkanRouteSegmentState[];
|
|
30
|
+
/** Key of the layouts' head the page rendered in a route head; a head-safe patch keeps that head, so needs a match. */
|
|
31
|
+
headKey?: string;
|
|
30
32
|
}
|
|
31
33
|
export type AkanHeadSnapshotTag = "title" | "meta" | "link";
|
|
32
34
|
export interface AkanHeadSnapshotNode {
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export interface ChunkNavigation {
|
|
2
|
+
navId: number;
|
|
3
|
+
href: string;
|
|
4
|
+
replace: () => boolean;
|
|
5
|
+
}
|
|
6
|
+
export declare function recordChunksOf(stream: ReadableStream<Uint8Array>, navigation: ChunkNavigation): ReadableStream<Uint8Array>;
|
|
7
|
+
export declare const navigationOfChunk: (chunkId: string) => ChunkNavigation | undefined;
|
|
8
|
+
export declare const isLinkFailure: (error: unknown) => boolean;
|
|
9
|
+
export declare function claimChunkReload(chunkId: string): boolean;
|
|
10
|
+
export declare const isBuildBundle: () => boolean;
|
|
@@ -1,12 +1,13 @@
|
|
|
1
|
+
import { type RscRoutePatch } from "../client/rscRoutePatch.d.ts";
|
|
1
2
|
import type { AkanHeadSnapshotV1 } from "./routeState.d.ts";
|
|
2
3
|
import type { AkanSegmentPatchFailureReason } from "./rscNavigationState.d.ts";
|
|
3
4
|
export interface PreparedAkanHeadSnapshotPatch {
|
|
4
|
-
|
|
5
|
-
|
|
5
|
+
previous: RscRoutePatch | null;
|
|
6
|
+
next: RscRoutePatch;
|
|
6
7
|
}
|
|
7
8
|
export declare function getAkanHeadSnapshotPatchFailureReason(snapshot: AkanHeadSnapshotV1): Extract<AkanSegmentPatchFailureReason, "head-missing" | "head-invalid"> | null;
|
|
8
9
|
export declare function canApplyAkanHeadSnapshotPatch(snapshot: AkanHeadSnapshotV1): boolean;
|
|
9
|
-
export declare function prepareAkanHeadSnapshotPatch(snapshot: AkanHeadSnapshotV1): PreparedAkanHeadSnapshotPatch | null;
|
|
10
|
+
export declare function prepareAkanHeadSnapshotPatch(snapshot: AkanHeadSnapshotV1, href: string): PreparedAkanHeadSnapshotPatch | null;
|
|
10
11
|
export declare function commitPreparedAkanHeadSnapshotPatch(prepared: PreparedAkanHeadSnapshotPatch): boolean;
|
|
11
12
|
export declare function rollbackPreparedAkanHeadSnapshotPatch(prepared: PreparedAkanHeadSnapshotPatch): void;
|
|
12
|
-
export declare function applyAkanHeadSnapshotPatch(snapshot: AkanHeadSnapshotV1): boolean;
|
|
13
|
+
export declare function applyAkanHeadSnapshotPatch(snapshot: AkanHeadSnapshotV1, href: string): boolean;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
interface ParkedRedirect<Node> {
|
|
2
|
+
node: Node;
|
|
3
|
+
location: string;
|
|
4
|
+
replace: boolean;
|
|
5
|
+
}
|
|
6
|
+
export declare class RscParkedRedirect<Node> {
|
|
7
|
+
#private;
|
|
8
|
+
park(redirect: ParkedRedirect<Node>): void;
|
|
9
|
+
clear(): void;
|
|
10
|
+
resume(stillShown: (node: Node) => boolean, navigate: (location: string, replace: boolean) => void): void;
|
|
11
|
+
}
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import type { PathRoute } from "akanjs/client";
|
|
2
|
+
import type { Logger } from "akanjs/common";
|
|
3
|
+
import type { ReactNode } from "react";
|
|
4
|
+
import { RouteElementComposer } from "./routeElementComposer.d.ts";
|
|
5
|
+
import { type AkanHeadSnapshotV1, type AkanRouterStateV1, type AkanRscPatchDecision, readAkanRouterStateRequest } from "./routeState.d.ts";
|
|
6
|
+
type RouteHeadLayers = Awaited<ReturnType<typeof RouteElementComposer.resolveHeadLayers>>;
|
|
7
|
+
type RouteMatch = {
|
|
8
|
+
pathRoute: PathRoute;
|
|
9
|
+
params: Record<string, string>;
|
|
10
|
+
};
|
|
11
|
+
type SearchParams = Record<string, string | string[]>;
|
|
12
|
+
export interface RouteHeadSnapshots {
|
|
13
|
+
layouts: AkanHeadSnapshotV1;
|
|
14
|
+
layoutsKey: string;
|
|
15
|
+
page: AkanHeadSnapshotV1;
|
|
16
|
+
}
|
|
17
|
+
export interface ResolvedRouteHead {
|
|
18
|
+
layers: RouteHeadLayers;
|
|
19
|
+
snapshots?: RouteHeadSnapshots;
|
|
20
|
+
}
|
|
21
|
+
export interface RscPatchPlan {
|
|
22
|
+
targetRouterState: AkanRouterStateV1 | null;
|
|
23
|
+
currentRouterState: ReturnType<typeof readAkanRouterStateRequest>;
|
|
24
|
+
decision: AkanRscPatchDecision;
|
|
25
|
+
/** Resolved once the route's guards admitted a head-safe patch; the render reuses it rather than run it again. */
|
|
26
|
+
admittedHead?: ResolvedRouteHead;
|
|
27
|
+
}
|
|
28
|
+
interface RscPatchPlannerProps {
|
|
29
|
+
logger: Logger;
|
|
30
|
+
routes: () => PathRoute[];
|
|
31
|
+
buildId: () => number;
|
|
32
|
+
basePathOf: (url: URL) => string | null;
|
|
33
|
+
localeAlternatesOf: (url: URL) => Record<string, string>;
|
|
34
|
+
defaultHead: () => ReactNode;
|
|
35
|
+
}
|
|
36
|
+
export declare class RscPatchPlanner {
|
|
37
|
+
#private;
|
|
38
|
+
constructor(props: RscPatchPlannerProps);
|
|
39
|
+
static routeStateWith(state: AkanRouterStateV1 | null, headKey: string | undefined): AkanRouterStateV1 | null;
|
|
40
|
+
plan({ request, url, match, searchParams, admitted, }: {
|
|
41
|
+
request: Request;
|
|
42
|
+
url: URL;
|
|
43
|
+
match: RouteMatch | null;
|
|
44
|
+
searchParams: SearchParams;
|
|
45
|
+
admitted?: boolean;
|
|
46
|
+
}): Promise<RscPatchPlan>;
|
|
47
|
+
resolveHead(url: URL, pathRoute: PathRoute, params: Record<string, string>, searchParams: SearchParams): Promise<ResolvedRouteHead>;
|
|
48
|
+
}
|
|
49
|
+
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import type { PrefetchPriority } from "../client/rscNavigation.d.ts";
|
|
2
2
|
export interface RscPrefetched {
|
|
3
3
|
response: Promise<Response | null>;
|
|
4
4
|
fresh: boolean;
|
|
@@ -23,7 +23,7 @@ export declare class RscPrefetchCache {
|
|
|
23
23
|
get activeCount(): number;
|
|
24
24
|
get queuedCount(): number;
|
|
25
25
|
has(href: string, account: string): boolean;
|
|
26
|
-
request(href: string, account: string, priority?:
|
|
26
|
+
request(href: string, account: string, priority?: PrefetchPriority): () => void;
|
|
27
27
|
take(href: string, account: string, signal?: AbortSignal): RscPrefetched | null;
|
|
28
28
|
prune(): void;
|
|
29
29
|
clear(): void;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { RscRedirectMethod, RscRedirectStatus, RscRenderResult } from "./rscWorkerHost.d.ts";
|
|
2
|
+
export declare function createRscRedirectResponse(location: string, method: RscRedirectMethod, status?: RscRedirectStatus): Response;
|
|
3
|
+
export declare function createRscStreamResponse(stream: BodyInit, status?: number): Response;
|
|
4
|
+
export declare function createRscNotFoundFallbackResponse(): Response;
|
|
5
|
+
export declare function createRscNavigationStreamResponse(result: Extract<RscRenderResult, {
|
|
6
|
+
type: "stream";
|
|
7
|
+
}>, { explain }?: {
|
|
8
|
+
explain?: boolean;
|
|
9
|
+
}): Promise<Response>;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { type ReactNode } from "react";
|
|
2
|
+
import type { AkanHeadSnapshotV1 } from "./routeState.d.ts";
|
|
2
3
|
type RscSegmentThenable = PromiseLike<ReactNode>;
|
|
3
4
|
interface RscSegmentOutletStore {
|
|
4
5
|
entries: Map<string, RscSegmentThenable>;
|
|
@@ -14,4 +15,8 @@ export declare function AkanSegmentOutlet({ segmentKey, children }: {
|
|
|
14
15
|
segmentKey: string;
|
|
15
16
|
children: ReactNode;
|
|
16
17
|
}): ReactNode;
|
|
18
|
+
export declare function AkanRouteHead({ layouts, page }: {
|
|
19
|
+
layouts: AkanHeadSnapshotV1;
|
|
20
|
+
page: AkanHeadSnapshotV1;
|
|
21
|
+
}): ReactNode;
|
|
17
22
|
export {};
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
import type { AkanSegmentOutlet } from "./rscSegmentOutlet.d.ts";
|
|
1
|
+
import type { AkanRouteHead, AkanSegmentOutlet } from "./rscSegmentOutlet.d.ts";
|
|
2
2
|
export declare const AkanSegmentOutletReference: typeof AkanSegmentOutlet;
|
|
3
|
+
export declare const AkanRouteHeadReference: typeof AkanRouteHead;
|
|
@@ -14,6 +14,8 @@ export interface CachedRscResult {
|
|
|
14
14
|
ssrBlocking?: boolean;
|
|
15
15
|
cacheState: RouteCacheRenderState;
|
|
16
16
|
patch?: CachedRscPatchMetadata;
|
|
17
|
+
/** Key of the layouts' head the page renders in its route head, named in the router state a replay sends. */
|
|
18
|
+
routeHeadKey?: string;
|
|
17
19
|
}
|
|
18
20
|
export interface CachedRscPatchMetadata {
|
|
19
21
|
targetRouterState: AkanRouterStateV1;
|
|
@@ -24,6 +26,31 @@ export interface RscPatchCacheKeyInput {
|
|
|
24
26
|
targetRouterState: AkanRouterStateV1;
|
|
25
27
|
patch: AkanRscPatchMetadata;
|
|
26
28
|
}
|
|
29
|
+
export interface RscWorkerTraceContext {
|
|
30
|
+
navId: string;
|
|
31
|
+
pathname: string;
|
|
32
|
+
routeId: string;
|
|
33
|
+
routerStateReason?: string;
|
|
34
|
+
cacheKey?: string;
|
|
35
|
+
cacheReason?: string;
|
|
36
|
+
routeState: AkanRouterStateV1 | null;
|
|
37
|
+
}
|
|
38
|
+
export declare function rscWorkerTraceBaseOf(context: RscWorkerTraceContext): (decision: AkanRscPatchDecision, cacheKey?: string | undefined, routeState?: AkanRouterStateV1 | null) => {
|
|
39
|
+
cacheReason?: string | undefined;
|
|
40
|
+
cacheKeyHash?: string | undefined;
|
|
41
|
+
routeState?: string | undefined;
|
|
42
|
+
patchStartIndex?: number | undefined;
|
|
43
|
+
patchSegmentPath?: string | undefined;
|
|
44
|
+
patchStartSegment?: string | undefined;
|
|
45
|
+
patchHeadSafe?: boolean | undefined;
|
|
46
|
+
patchHeadSnapshot?: string | undefined;
|
|
47
|
+
navId: string;
|
|
48
|
+
pathname: string;
|
|
49
|
+
routeId: string;
|
|
50
|
+
partial: "patch" | "full" | "fallback";
|
|
51
|
+
partialReason: string | undefined;
|
|
52
|
+
partialCommonPrefixLength: number;
|
|
53
|
+
};
|
|
27
54
|
export declare function createRscPatchCacheEntry({ baseEntry, targetRouterState, patch }: RscPatchCacheKeyInput): {
|
|
28
55
|
key: string;
|
|
29
56
|
ttl: number;
|
|
@@ -95,9 +122,14 @@ export declare function replayCachedRscResult(input: {
|
|
|
95
122
|
isCancelled: () => boolean;
|
|
96
123
|
yieldToHost?: () => Promise<void>;
|
|
97
124
|
}): Promise<boolean>;
|
|
98
|
-
export declare function resolveAkanRscHeadSafePatchDecision({ partialCommitEnabled, patchDecision, pageConfig, headSnapshot, }: {
|
|
125
|
+
export declare function resolveAkanRscHeadSafePatchDecision({ partialCommitEnabled, patchDecision, pageConfig, routeHeadMounted, frameChange, headSnapshot, layoutsHeadChanged, }: {
|
|
99
126
|
partialCommitEnabled: boolean;
|
|
100
127
|
patchDecision: AkanRscPatchDecision;
|
|
101
128
|
pageConfig?: PageConfig;
|
|
129
|
+
/** Whether the page the patch leaves from shows its head through `AkanRouteHead`, the only head a patch can swap. */
|
|
130
|
+
routeHeadMounted?: boolean;
|
|
131
|
+
frameChange?: "params-changed" | "layouts-changed" | "page-state-changed" | "frame-unknown";
|
|
102
132
|
headSnapshot?: AkanHeadSnapshotV1;
|
|
133
|
+
/** Whether the target's layouts head differs from the one the page left from shows, which a patch would keep. */
|
|
134
|
+
layoutsHeadChanged?: boolean;
|
|
103
135
|
}): AkanRscPatchDecision;
|
|
@@ -4,7 +4,7 @@ import type { AkanMetricsReport } from "akanjs/service";
|
|
|
4
4
|
import type { PagePromptEntry, PagePromptRun, PagePromptRunInput, PagePromptVisibleInput } from "../signal/mcp/pagePrompt.d.ts";
|
|
5
5
|
import type { ClientManifest } from "./artifact.d.ts";
|
|
6
6
|
import type { RouteCacheInvalidation, RouteCacheRenderState } from "./cachePolicy.d.ts";
|
|
7
|
-
import type { RscTraceMetadata, SsrLateControl } from "./ssrTypes.d.ts";
|
|
7
|
+
import type { RscRenderOptions, RscTraceMetadata, SsrLateControl } from "./ssrTypes.d.ts";
|
|
8
8
|
import type { BaseBuildArtifact, CssAsset } from "./types.d.ts";
|
|
9
9
|
export interface RscPending {
|
|
10
10
|
onChunk: (data: Uint8Array) => void;
|
|
@@ -88,11 +88,7 @@ export declare class RscWorker {
|
|
|
88
88
|
constructor(artifact: BaseBuildArtifact, { failBeforeReady }?: {
|
|
89
89
|
failBeforeReady?: boolean;
|
|
90
90
|
});
|
|
91
|
-
renderWithMeta(req: Request, options?:
|
|
92
|
-
clientManifest?: ClientManifest;
|
|
93
|
-
signal?: AbortSignal;
|
|
94
|
-
clientIp?: string | null;
|
|
95
|
-
}): Promise<RscRenderResult>;
|
|
91
|
+
renderWithMeta(req: Request, options?: RscRenderOptions): Promise<RscRenderResult>;
|
|
96
92
|
listPagePrompts(): Promise<PagePromptEntry[]>;
|
|
97
93
|
runPagePrompt(input: PagePromptRunInput): Promise<PagePromptRun>;
|
|
98
94
|
visiblePagePrompts(input: PagePromptVisibleInput): Promise<string[]>;
|