@akanjs/devkit 3.2.0-rc.3 → 3.2.0-rc.30
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 +367 -11
- package/DEV_RUNTIME_KNOBS.md +4 -3
- package/README.ko.md +3 -2
- package/README.md +4 -2
- package/akanApp/BackendImportGraph.test.ts +1 -1
- package/akanApp/akanApp.host.test.ts +257 -1
- package/akanApp/akanApp.host.ts +146 -1223
- package/akanApp/akanApp.host.wiring.test.ts +727 -0
- package/akanApp/builderGap.ts +68 -0
- package/akanApp/builderRequestRelay.test.ts +93 -0
- package/akanApp/builderRequestRelay.ts +100 -0
- package/akanApp/builderRssRecycler.ts +182 -0
- package/akanApp/devBackend.ts +392 -0
- package/akanApp/devBuildStatusBoard.ts +128 -0
- package/akanApp/devBuilder.ts +196 -0
- package/akanApp/devHostPolicy.test.ts +11 -11
- package/akanApp/devHostPolicy.ts +2 -4
- package/akanApp/devIdleSuspend.test.ts +221 -0
- package/akanApp/devIdleSuspend.ts +192 -0
- package/akanApp/devIdleSuspend.watcher.test.ts +120 -0
- package/akanApp/devRecycler.test.ts +66 -0
- package/akanApp/devRecycler.ts +305 -0
- package/akanApp/processRss.ts +61 -0
- package/akanConfig/akanConfig.test.ts +24 -1
- package/akanConfig/akanConfig.ts +10 -10
- package/akanConfig/akanWorkspaceConfig.ts +1 -1
- package/akanConfig/productionLockfile.ts +1 -1
- package/apiReport/apiDeclarationPrinter.ts +120 -0
- package/apiReport/apiReport.test.ts +526 -0
- package/apiReport/apiReport.ts +232 -0
- package/apiReport/apiReportDiff.ts +160 -0
- package/apiReport/apiReportPolicy.ts +65 -0
- package/apiReport/apiTargets.ts +311 -0
- package/apiReport/changesetBump.ts +19 -0
- package/{applicationBuildReporter.test.ts → app/applicationBuildReporter.test.ts} +21 -0
- package/{applicationBuildReporter.ts → app/applicationBuildReporter.ts} +10 -49
- package/{applicationBuildRunner.test.ts → app/applicationBuildRunner.test.ts} +74 -7
- package/{applicationBuildRunner.ts → app/applicationBuildRunner.ts} +20 -15
- package/{applicationTestPreload.ts → app/applicationTestPreload.ts} +1 -1
- package/{routeJsBudget.test.ts → app/routeJsBudget.test.ts} +48 -12
- package/{routeJsBudget.ts → app/routeJsBudget.ts} +90 -27
- package/{routeSourceValidator.test.ts → app/routeSourceValidator.test.ts} +17 -0
- package/{routeSourceValidator.ts → app/routeSourceValidator.ts} +5 -1
- package/artifact/implicitRootLayout.test.ts +71 -3
- package/artifact/implicitRootLayout.ts +21 -4
- package/artifact/implicitRootLayoutRender.test.tsx +297 -0
- package/biome.base.json +2 -1
- package/cloud/cloudApi.test.ts +1 -1
- package/cloud/configLock.test.ts +1 -1
- package/cloud/globalConfig.test.ts +1 -1
- package/cloud/globalConfig.ts +1 -1
- package/cloud/updatePackUpload.test.ts +1 -1
- package/codeAgent/agent/AkanCodeEnv.ts +1 -1
- package/codeAgent/agent/akanCodePaths.ts +1 -1
- package/codeAgent/agent/akanSystemPrompt.ts +1 -1
- package/codeAgent/agent/codeAgent.test.ts +1 -1
- package/codeAgent/skills/akan-debug/SKILL.md +10 -3
- package/codeAgent/skills/akan-err/SKILL.md +7 -0
- package/codeAgent/skills/akan-mcp/SKILL.md +14 -2
- package/codeAgent/skills/akan-scaffold/SKILL.md +2 -2
- package/codeAgent/skills/akan-transport/SKILL.md +2 -0
- package/codeAgent/skills/akan-validate/SKILL.md +1 -0
- package/codeAgent/tools/AkanCli.ts +1 -1
- package/codeAgent/tools/AkanToolPack.ts +1 -1
- package/codeAgent/tools/McpClient.ts +28 -6
- package/codeAgent/tools/McpToolPack.ts +1 -1
- package/codeAgent/tools/akanCodePlugins.test.ts +14 -2
- package/commandDecorators/argMeta.ts +4 -0
- package/commandDecorators/cliError.ts +72 -0
- package/commandDecorators/command.ts +165 -91
- package/commandDecorators/commandBuilder.ts +1 -1
- package/commandDecorators/commandDecorators.test.ts +191 -16
- package/commandDecorators/exitCodeError.ts +6 -7
- package/commandDecorators/index.ts +1 -0
- package/commandDecorators/targetMeta.ts +1 -0
- package/commandDecorators/workspaceVersionCheck.test.ts +1 -1
- package/commandDecorators/workspaceVersionCheck.ts +1 -1
- package/context/akanContext.ts +576 -0
- package/context/akanContextInspection.ts +296 -0
- package/{akanMcpContract.test.ts → context/akanMcpContract.test.ts} +1 -1
- package/{akanMcpContract.ts → context/akanMcpContract.ts} +32 -262
- package/context/akanMcpToolError.ts +16 -0
- package/context/doctor/agentGuideCheck.ts +81 -0
- package/context/doctor/configLeftoverCheck.ts +35 -0
- package/context/doctor/doctorFindings.ts +70 -0
- package/context/doctor/generatedFreshness.ts +56 -0
- package/context/doctor/moduleShapeCheck.ts +88 -0
- package/context/doctor/recipeDuplicateCheck.ts +39 -0
- package/context/doctor/recipeIndexCheck.ts +87 -0
- package/context/doctor/rootShapeCheck.ts +55 -0
- package/context/doctor/workflowScope.ts +97 -0
- package/{constantFieldNames.test.ts → context/moduleFieldNames.test.ts} +24 -2
- package/context/moduleFieldNames.ts +25 -0
- package/{recipeScanner.test.ts → context/recipeScanner.test.ts} +1 -1
- package/context/safeRead.ts +9 -0
- package/csrE2e/csrE2eHarness.fixture.ts +1 -1
- package/devkitUtils.test.ts +39 -5
- package/{apiReference.test.ts → docs/apiReference.test.ts} +4 -4
- package/{apiReference.ts → docs/apiReference.ts} +2 -2
- package/docs/errorCodeReference.test.ts +282 -0
- package/docs/errorCodeReference.ts +71 -0
- package/docs/errorCodeScan.ts +551 -0
- package/{frameworkGraph.test.ts → docs/frameworkGraph.test.ts} +1 -1
- package/executors/appExecutor.ts +448 -0
- package/executors/commandExecutionError.ts +53 -0
- package/executors/executor.ts +527 -0
- package/{executors.linkFallback.test.ts → executors/executors.linkFallback.test.ts} +1 -1
- package/{executors.test.ts → executors/executors.test.ts} +76 -15
- package/executors/index.ts +8 -0
- package/executors/libExecutor.ts +23 -0
- package/executors/moduleExecutor.ts +18 -0
- package/executors/pkgExecutor.ts +129 -0
- package/executors/sysExecutor.ts +301 -0
- package/executors/workspaceExecutor.ts +277 -0
- package/frontendBuild/allRoutesBuilder.test.ts +17 -5
- package/frontendBuild/allRoutesBuilder.ts +24 -6
- package/frontendBuild/autoImportSync.test.ts +1 -1
- package/frontendBuild/autoImportSync.ts +1 -1
- package/frontendBuild/buildRouteClient.test.ts +1 -1
- package/frontendBuild/bundleDefine.ts +2 -0
- package/frontendBuild/clientBuildTypes.ts +5 -2
- package/frontendBuild/clientEntriesBundler.test.ts +1 -1
- package/frontendBuild/clientEntryDiscovery.test.ts +28 -0
- package/frontendBuild/clientEntryDiscovery.ts +25 -6
- package/frontendBuild/csrArtifactBuilder.test.ts +1 -1
- package/frontendBuild/csrDevArtifactWriter.ts +1 -1
- package/frontendBuild/cssCompiler.test.ts +1 -1
- package/frontendBuild/devGeneratedIndexSync.test.ts +1 -1
- package/frontendBuild/devGeneratedIndexSync.ts +7 -38
- package/frontendBuild/dictionaryAssetBuilder.test.ts +1 -1
- package/frontendBuild/fontOptimizer.test.ts +1 -1
- package/frontendBuild/fontPruner.test.ts +1 -1
- package/frontendBuild/frontendBuild.test.ts +3 -3
- package/frontendBuild/hmrWatcher.stop.test.ts +63 -0
- package/frontendBuild/hmrWatcher.test.ts +1 -1
- package/frontendBuild/hmrWatcher.ts +22 -1
- package/frontendBuild/mcpAppViewBuilder.test.ts +1 -1
- package/frontendBuild/mcpAppViewBuilder.ts +1 -1
- package/frontendBuild/nativeCore.test.ts +148 -0
- package/frontendBuild/optionalPeers.test.ts +36 -8
- package/frontendBuild/pagesBundleBuilder.test.ts +2 -3
- package/frontendBuild/pagesBundleBuilder.ts +1 -1
- package/frontendBuild/precompressArtifacts.test.ts +1 -1
- package/frontendBuild/precompressArtifacts.ts +1 -1
- package/frontendBuild/serverGraphFile.ts +1 -1
- package/frontendBuild/sourceMtimeIndex.test.ts +1 -1
- package/frontendBuild/ssrBaseArtifactBuilder.test.ts +26 -0
- package/frontendBuild/ssrBaseArtifactBuilder.ts +23 -19
- package/frontendBuild/ssrDevBundler.test.ts +1 -1
- package/frontendBuild/vendorImportScanner.test.ts +25 -4
- package/frontendBuild/vendorImportScanner.ts +25 -10
- package/frontendBuild/vendorNarrowing.test.ts +1 -1
- package/frontendBuild/watchRootResolver.test.ts +1 -1
- package/{agentAssets.test.ts → guideline/agentAssets.test.ts} +1 -1
- package/{agentAssets.ts → guideline/agentAssets.ts} +2 -2
- package/{agentsIndex.test.ts → guideline/agentsIndex.test.ts} +2 -2
- package/{agentsIndex.ts → guideline/agentsIndex.ts} +13 -10
- package/{conventionSet.test.ts → guideline/conventionSet.test.ts} +7 -4
- package/{conventionSet.ts → guideline/conventionSet.ts} +1 -1
- package/{prompter.ts → guideline/prompter.ts} +2 -3
- package/incrementalBuilder/buildBatch.proc.ts +14 -4
- package/incrementalBuilder/buildBatchProtocol.ts +2 -0
- package/incrementalBuilder/buildBatchRunner.test.ts +108 -1
- package/incrementalBuilder/buildBatchRunner.ts +17 -4
- package/incrementalBuilder/builderBoot.ts +106 -0
- package/incrementalBuilder/builderBuildStatus.ts +23 -0
- package/incrementalBuilder/builderChannel.test.ts +1 -1
- package/incrementalBuilder/builderChannel.ts +11 -0
- package/incrementalBuilder/builderGraphPayloads.ts +3 -3
- package/incrementalBuilder/builderLanes.ts +157 -0
- package/incrementalBuilder/builderWatch.ts +213 -0
- package/incrementalBuilder/csrRegistry.ts +234 -0
- package/incrementalBuilder/incrementalBuilder.host.test.ts +30 -1
- package/incrementalBuilder/incrementalBuilder.host.ts +10 -22
- package/incrementalBuilder/incrementalBuilder.proc.test.ts +93 -2
- package/incrementalBuilder/incrementalBuilder.proc.ts +81 -823
- package/incrementalBuilder/ssrRegistry.ts +278 -0
- package/index.ts +22 -22
- package/integration/devStability.integration.test.ts +62 -56
- package/integration/devStabilityHarness.test.ts +1 -1
- package/lint/__fixtures__/no-import-common-err/bad.tsx +13 -0
- package/lint/__fixtures__/no-import-common-err/good.tsx +12 -0
- package/{biomeBase.test.ts → lint/biomeBase.test.ts} +1 -1
- package/lint/gritRules.test.ts +1 -1
- package/{linter.test.ts → lint/linter.test.ts} +1 -1
- package/lint/no-import-common-err.grit +31 -0
- package/lint/no-init-fetch-in-client.grit +1 -1
- package/lint/no-web-only-api-outside-webkit.grit +3 -3
- package/mobile/desktopBin.test.ts +1 -1
- package/mobile/desktopRelease.test.ts +1 -1
- package/mobile/desktopServerStage.test.ts +2 -2
- package/mobile/desktopServerStage.ts +1 -1
- package/mobile/nativeApi.test.ts +1 -1
- package/mobile/nativeApp.test.ts +1 -1
- package/mobile/nativeConfig.test.ts +1 -1
- package/mobile/nativePluginFolders.test.ts +1 -1
- package/mobile/nativePublicEnv.test.ts +1 -1
- package/mobile/nativeWebDir.test.ts +1 -1
- package/mobile/serverBundleSecrets.test.ts +1 -1
- package/mobile/tarWriter.test.ts +1 -1
- package/mobile/updatePackFolder.test.ts +1 -1
- package/package.json +167 -3
- package/packageExports.test.ts +20 -2
- package/piDependencyPins.test.ts +1 -1
- package/pipeline/PipelineDefinition.ts +1 -1
- package/platformTest/IdleWatchedProcess.test.ts +1 -1
- package/platformTest/PlatformTestRun.test.ts +1 -1
- package/platformTest/TestSnapshot.test.ts +1 -1
- package/preview/PreviewView.ts +32 -13
- package/preview/previewView.test.ts +33 -3
- package/{abstractDoc.test.ts → quality/abstractDoc.test.ts} +2 -2
- package/{abstractDoc.ts → quality/abstractDoc.ts} +1 -1
- package/quality/bareErrorScanner.ts +126 -0
- package/{maintainabilityBaseline.test.ts → quality/maintainabilityBaseline.test.ts} +73 -0
- package/{maintainabilityBaseline.ts → quality/maintainabilityBaseline.ts} +97 -9
- package/{maintainabilityContract.test.ts → quality/maintainabilityContract.test.ts} +383 -2
- package/{maintainabilityContract.ts → quality/maintainabilityContract.ts} +151 -29
- package/{maintainabilityExceptionScanner.test.ts → quality/maintainabilityExceptionScanner.test.ts} +15 -1
- package/{maintainabilityExceptionScanner.ts → quality/maintainabilityExceptionScanner.ts} +5 -1
- package/{maintainabilityLimits.ts → quality/maintainabilityLimits.ts} +12 -0
- package/{maintainabilityReport.ts → quality/maintainabilityReport.ts} +20 -3
- package/{qualityScanner.test.ts → quality/qualityScanner.test.ts} +1 -1
- package/{qualityScanner.ts → quality/qualityScanner.ts} +8 -8
- package/{storeAccessScanner.ts → quality/storeAccessScanner.ts} +15 -2
- package/{subspace.test.ts → subspace/subspace.test.ts} +25 -4
- package/{subspace.ts → subspace/subspace.ts} +5 -5
- package/{subspaceClone.ts → subspace/subspaceClone.ts} +8 -8
- package/{subspaceConfig.ts → subspace/subspaceConfig.ts} +5 -1
- package/{testHelpers.ts → test/testHelpers.ts} +37 -1
- package/transforms/barrelAnalyzer.ts +31 -10
- package/transforms/browserDirnamePlugin.test.ts +1 -1
- package/transforms/externalizeFrameworkPlugin.test.ts +1 -1
- package/transforms/mcpAppPageTrimmer.test.ts +1 -1
- package/transforms/pureLazyMarker.test.ts +1 -1
- package/transforms/serverEnvPlugin.test.ts +1 -1
- package/transforms/serverEnvProfile.test.ts +1 -1
- package/transforms/sideEffectImportOrder.test.ts +1 -1
- package/transforms/transforms.test.ts +52 -2
- package/transforms/tsconfigPackageResolver.test.ts +1 -1
- package/{createTunnel.test.ts → tunnel/createTunnel.test.ts} +1 -1
- package/{createTunnel.ts → tunnel/createTunnel.ts} +2 -2
- package/{sshHostKeys.ts → tunnel/sshHostKeys.ts} +2 -2
- package/typecheck/projectTypecheck.test.ts +1 -1
- package/typecheck/projectTypecheck.ts +6 -2
- package/{typeChecker.test.ts → typecheck/typeChecker.test.ts} +1 -1
- package/{typeChecker.ts → typecheck/typeChecker.ts} +1 -1
- package/typecheck/typecheck.proc.ts +4 -3
- package/typecheck/typecheckFailure.ts +7 -2
- package/util/errorReport.ts +66 -0
- package/{jsonFormatter.test.ts → util/jsonFormatter.test.ts} +1 -1
- package/workflow/artifacts.ts +8 -7
- package/workflow/constantSource.ts +187 -0
- package/workflow/dictionarySource.ts +184 -0
- package/workflow/executor.ts +6 -9
- package/workflow/fieldExpression.ts +153 -0
- package/workflow/fieldLabel.ts +61 -0
- package/workflow/fieldOrder.ts +117 -0
- package/workflow/fieldType.ts +93 -0
- package/workflow/guardCatalog.test.ts +1 -1
- package/workflow/index.ts +1 -0
- package/workflow/keyRename.ts +1 -1
- package/workflow/moduleIndex.test.ts +2 -2
- package/workflow/moduleIndex.ts +2 -2
- package/workflow/modulePaths.ts +27 -0
- package/workflow/mutationScaffold.ts +7 -15
- package/workflow/mutationSource.ts +2 -1
- package/workflow/plainName.ts +16 -3
- package/workflow/plan.ts +14 -2
- package/workflow/primitiveReport.ts +78 -0
- package/workflow/rolloutGate.test.ts +1 -1
- package/workflow/rolloutGate.ts +1 -1
- package/workflow/serviceSource.ts +33 -0
- package/workflow/signalSource.ts +96 -0
- package/workflow/source.ts +50 -1105
- package/workflow/sourceAst.ts +30 -0
- package/workflow/sourceImports.ts +105 -0
- package/workflow/sourceText.ts +13 -0
- package/workflow/templateSource.ts +30 -0
- package/workflow/testSource.ts +31 -0
- package/workflow/types.ts +1 -1
- package/workflow/uiPolicy.ts +1 -1
- package/{appSelectionMemory.ts → workspace/appSelectionMemory.ts} +1 -1
- package/{codegenLock.test.ts → workspace/codegenLock.test.ts} +1 -1
- package/{dependencyScanner.test.ts → workspace/dependencyScanner.test.ts} +1 -1
- package/{dependencyScanner.ts → workspace/dependencyScanner.ts} +2 -2
- package/{envSeed.test.ts → workspace/envSeed.test.ts} +2 -2
- package/{envSeed.ts → workspace/envSeed.ts} +1 -1
- package/{libSource.test.ts → workspace/libSource.test.ts} +2 -2
- package/{libSource.ts → workspace/libSource.ts} +1 -1
- package/{scanInfo.ts → workspace/scanInfo.ts} +21 -10
- package/{slicePlanner.test.ts → workspace/slicePlanner.test.ts} +2 -2
- package/{slicePlanner.ts → workspace/slicePlanner.ts} +1 -1
- package/{workspaceGraph.test.ts → workspace/workspaceGraph.test.ts} +1 -1
- package/{workspaceGraph.ts → workspace/workspaceGraph.ts} +1 -1
- package/{workspaceLayout.test.ts → workspace/workspaceLayout.test.ts} +1 -1
- package/{workspaceLayout.ts → workspace/workspaceLayout.ts} +3 -1
- package/akanContext.ts +0 -1084
- package/constantFieldNames.ts +0 -18
- package/executors.ts +0 -1749
- /package/{recipeScanner.ts → context/recipeScanner.ts} +0 -0
- /package/{declarationReader.ts → docs/declarationReader.ts} +0 -0
- /package/{frameworkGraph.ts → docs/frameworkGraph.ts} +0 -0
- /package/{biomeBase.ts → lint/biomeBase.ts} +0 -0
- /package/{linter.ts → lint/linter.ts} +0 -0
- /package/{commentDensityScanner.test.ts → quality/commentDensityScanner.test.ts} +0 -0
- /package/{commentDensityScanner.ts → quality/commentDensityScanner.ts} +0 -0
- /package/{componentSizeScanner.test.ts → quality/componentSizeScanner.test.ts} +0 -0
- /package/{componentSizeScanner.ts → quality/componentSizeScanner.ts} +0 -0
- /package/{componentWriteChainScanner.test.ts → quality/componentWriteChainScanner.test.ts} +0 -0
- /package/{componentWriteChainScanner.ts → quality/componentWriteChainScanner.ts} +0 -0
- /package/{deprecatedCommentScanner.test.ts → quality/deprecatedCommentScanner.test.ts} +0 -0
- /package/{deprecatedCommentScanner.ts → quality/deprecatedCommentScanner.ts} +0 -0
- /package/{endpointReach.test.ts → quality/endpointReach.test.ts} +0 -0
- /package/{endpointReach.ts → quality/endpointReach.ts} +0 -0
- /package/{formSetterScanner.test.ts → quality/formSetterScanner.test.ts} +0 -0
- /package/{formSetterScanner.ts → quality/formSetterScanner.ts} +0 -0
- /package/{kindBranchScanner.test.ts → quality/kindBranchScanner.test.ts} +0 -0
- /package/{kindBranchScanner.ts → quality/kindBranchScanner.ts} +0 -0
- /package/{maintainabilityReport.test.ts → quality/maintainabilityReport.test.ts} +0 -0
- /package/{renderMutationScanner.test.ts → quality/renderMutationScanner.test.ts} +0 -0
- /package/{renderMutationScanner.ts → quality/renderMutationScanner.ts} +0 -0
- /package/{serviceLoopCallScanner.test.ts → quality/serviceLoopCallScanner.test.ts} +0 -0
- /package/{serviceLoopCallScanner.ts → quality/serviceLoopCallScanner.ts} +0 -0
- /package/{signalMutationIndex.test.ts → quality/signalMutationIndex.test.ts} +0 -0
- /package/{signalMutationIndex.ts → quality/signalMutationIndex.ts} +0 -0
- /package/{sourceComments.test.ts → quality/sourceComments.test.ts} +0 -0
- /package/{sourceComments.ts → quality/sourceComments.ts} +0 -0
- /package/{ssrScanner.test.ts → quality/ssrScanner.test.ts} +0 -0
- /package/{ssrScanner.ts → quality/ssrScanner.ts} +0 -0
- /package/{storeAccessScanner.test.ts → quality/storeAccessScanner.test.ts} +0 -0
- /package/{storeSource.ts → quality/storeSource.ts} +0 -0
- /package/{storeWriteScanner.test.ts → quality/storeWriteScanner.test.ts} +0 -0
- /package/{storeWriteScanner.ts → quality/storeWriteScanner.ts} +0 -0
- /package/{structureScanner.test.ts → quality/structureScanner.test.ts} +0 -0
- /package/{structureScanner.ts → quality/structureScanner.ts} +0 -0
- /package/{testOnlyExportScanner.test.ts → quality/testOnlyExportScanner.test.ts} +0 -0
- /package/{testOnlyExportScanner.ts → quality/testOnlyExportScanner.ts} +0 -0
- /package/{writePath.test.ts → quality/writePath.test.ts} +0 -0
- /package/{writePath.ts → quality/writePath.ts} +0 -0
- /package/{writePlacementScanner.test.ts → quality/writePlacementScanner.test.ts} +0 -0
- /package/{writePlacementScanner.ts → quality/writePlacementScanner.ts} +0 -0
- /package/{writingActionIndex.test.ts → quality/writingActionIndex.test.ts} +0 -0
- /package/{writingActionIndex.ts → quality/writingActionIndex.ts} +0 -0
- /package/{subspaceReport.ts → subspace/subspaceReport.ts} +0 -0
- /package/{sshTunnel.ts → tunnel/sshTunnel.ts} +0 -0
- /package/{fileEditor.ts → util/fileEditor.ts} +0 -0
- /package/{fileSys.test.ts → util/fileSys.test.ts} +0 -0
- /package/{fileSys.ts → util/fileSys.ts} +0 -0
- /package/{jsonFormatter.ts → util/jsonFormatter.ts} +0 -0
- /package/{selectModel.ts → util/selectModel.ts} +0 -0
- /package/{semver.test.ts → util/semver.test.ts} +0 -0
- /package/{semver.ts → util/semver.ts} +0 -0
- /package/{shellOnlyEnv.test.ts → util/shellOnlyEnv.test.ts} +0 -0
- /package/{shellOnlyEnv.ts → util/shellOnlyEnv.ts} +0 -0
- /package/{spinner.test.ts → util/spinner.test.ts} +0 -0
- /package/{spinner.ts → util/spinner.ts} +0 -0
- /package/{stripAnsi.ts → util/stripAnsi.ts} +0 -0
- /package/{codegenLock.ts → workspace/codegenLock.ts} +0 -0
- /package/{getRelatedCnsts.ts → workspace/getRelatedCnsts.ts} +0 -0
- /package/{gitRevision.test.ts → workspace/gitRevision.test.ts} +0 -0
- /package/{gitRevision.ts → workspace/gitRevision.ts} +0 -0
- /package/{manifestDependencies.ts → workspace/manifestDependencies.ts} +0 -0
- /package/{packageExportsMap.ts → workspace/packageExportsMap.ts} +0 -0
- /package/{repoIdentity.ts → workspace/repoIdentity.ts} +0 -0
- /package/{types.ts → workspace/types.ts} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,40 @@
|
|
|
4
4
|
|
|
5
5
|
### Minor Changes
|
|
6
6
|
|
|
7
|
+
- e973831: A CLI failure carries a code and the exit status its family takes, so a script branches on either instead of the message.
|
|
8
|
+
|
|
9
|
+
- Exit 2 (`usage`, `unknownTarget`): a flag, argument or command commander refuses, a value outside an option's choices, an argument left out where no terminal can ask for it, a run outside the workspace root, and an app, lib, package or module the workspace does not have. These exited 1 before, except for `akan migrate`, `akan pipeline` and `akan verify <name>`, which already exited 2.
|
|
10
|
+
- Exit 2 (`refused`) stays what it was: a pack that needs a new store build, and a release the Akan Cloud project rejected.
|
|
11
|
+
- Exit 3 (`checkFailed`): `akan verify`, `akan typecheck` and the typecheck of `akan build`, `akan preview` and `akan agent install --check` when they found problems. These exited 1 before.
|
|
12
|
+
- Exit 130 (`interrupted`) for a prompt closed with Ctrl+C, which exited 1.
|
|
13
|
+
- Exit 1 (`failed`, or an `AkanError`'s own code) for anything else, as before.
|
|
14
|
+
- `akan pack-update`, `akan push-update` and `akan register-binary` keep exiting 1 for a usage or unknown-target failure, so their 2 still means only the store-build verdict or the project's refusal. `akan agent` exits 1 for one too, and `akan agent hook` never exits 2, saying on stderr why the hook failed: Claude Code reads a hook's exit 2 as a block.
|
|
15
|
+
|
|
16
|
+
With `--json` or `--format json`, a failure now ends stdout with one line, `{"ok":false,"error":"<message>","code":"<code>"}`, and the message goes to stderr instead of stdout. An NDJSON stream (`akan code --json`, `akan logs --json`) ends with that line too. A command whose own JSON report says it failed, as `akan verify`'s does, adds no line. `akan migrate --json` answers `usage` or `notFound` for a command line or an app it cannot take before the app runs, matching its exit 2.
|
|
17
|
+
|
|
18
|
+
Upgrade: a script that tested for exit 1 after a usage error, a failed check or a closed prompt tests for non-zero, or for 2, 3 and 130. A CI step that branches on exit 2 from the OTA commands needs no change. `@akanjs/devkit/commandDecorators` exports `CliError(code, message, { exitCode })`, `ExitCodeError` is now one coded from its exit status (2 as `refused`, 3 as `checkFailed`), and a target's `usageExitCode` now also sets the exit of a `usage` or `unknownTarget` failure thrown while it runs.
|
|
19
|
+
|
|
20
|
+
- d6b3619: Every `Err` is now one class, `Err` from `akanjs/common`. That covers the one an app's or lib's `lib/dict` builds, the one `useClient` returns, `akanjs/dictionary`'s own, and an error restored off the wire. Each is that class typed with its own dictionary's keys, so `Err.is` and the status classes behave the same in the browser and on the server. `instanceof Err` holds within one copy of the module. A page bundle and the framework each carry one, so check across them with `Err.is`.
|
|
21
|
+
|
|
22
|
+
- **`Err` is an `AkanError`.** `AkanError.is(err)` is true for every `Err`, and `err.forwarded` is true unless it was restored with a `code`, so the request path still sends its `toJSON()` as it is.
|
|
23
|
+
- **A restored failure that carries a `code` is not `forwarded`.** Such a failure is one its origin server generalized, such as `{ "error": "Forbidden", "code": "fileGrantRefused", "statusCode": 403 }`. The request path generalizes it again, to the same body, and a guard or an auth challenge does not read it as a refusal of its own.
|
|
24
|
+
- **`err.code` is always set.** It is the code a generalized failure's payload carried, or else the code of its status (`notFound`, `conflict`, `badRequest`), so `AkanError.is(err, "notFound")` matches an `Err.NotFound`. `toJSON()` still sends `code` only when the payload carried one, so the wire does not change. `{ ...err }` does change, on the server and the client alike: its `code` was usually `undefined`, and now holds that status code.
|
|
25
|
+
- **A status class tells its own status apart.** `Err.NotFound.is(error)` also requires a `statusCode` of 404, so `Err.NotFound.is(new Err.Conflict(key))` is false; `Err.is` still takes any status. `Err.NotFound.fromJSON(payload)` builds an `Err.NotFound`.
|
|
26
|
+
- **Status classes on a dictionary's `Err` are typed as the full constructor:** `Err.BadRequest`, `Err.Unauthorized`, `Err.Forbidden`, `Err.NotFound` and `Err.Conflict`. So `Err.NotFound.is(...)` and `Err.NotFound.fromJSON(...)` type-check on the server too.
|
|
27
|
+
- **A restore with no error constructor gives an `Err`.** That applies to an HTTP, WebSocket or MCP App bridge restore. It used to give a plain `Error` with the payload's fields copied onto it, so a field the wire does not declare is no longer on the error.
|
|
28
|
+
- **On the client, `String(err)` appends the error's `data`**, as it already did on the server, with secret-named keys masked.
|
|
29
|
+
- **The type exports moved.** `ErrConstructor`, `ErrPayload` and `ErrRestoreOption` come from `akanjs/common`, `akanjs/dictionary` re-exports all three, and `akanjs/client` re-exports `ErrPayload`. `ErrInstance`, `PageErrInstance` and `PageErrConstructor` keep their shapes and are deprecated.
|
|
30
|
+
- **The API explorer shows a failed call's wire body**, the error's `toJSON()`, instead of the error object's own fields.
|
|
31
|
+
- **A new lint rule, `no-import-common-err`, refuses a value import of `Err` from `akanjs/common` in `apps/` and `libs/`.** That class takes any string, so only the `Err` from `lib/dict` or a client entrypoint checks a key against the dictionary. `import type` stays legal.
|
|
32
|
+
|
|
33
|
+
Upgrade:
|
|
34
|
+
|
|
35
|
+
- Replace the types `ErrInstance` and `PageErrInstance` with `Err` from `akanjs/common` (through `import type`), and `PageErrConstructor` with `ErrConstructor`.
|
|
36
|
+
- Code that read `err.code === undefined` to tell whether a restored failure carried a code should read `"code" in err.toJSON()` instead.
|
|
37
|
+
- Code that relied on `Err.NotFound.is(...)` accepting an error of another status should call `Err.is(...)`.
|
|
38
|
+
- A test that replaces `akanjs/base` with `mock.module("akanjs/base", …)` while the real `akanjs/common` loads must include `AkanError` in the mock.
|
|
39
|
+
- Nothing else changes for code that throws and checks `Err` through `lib/dict` or `useClient`.
|
|
40
|
+
|
|
7
41
|
- 29756e1: `akan lint`, `akan lint-all` and `akan verify` now hold each package under a workspace's `pkgs/` to a structure budget, as they already hold apps and libs: a file up to 800 lines, a function up to 150 lines (`akan.size.function`) and a class up to 60 members (`akan.size.class`). Tests and their fixtures (`*.test`, `*.spec`, `*.fixture`, `*.instance` and `*.bench` files, and `test/`, `tests/`, `__tests__/`, `__fixtures__/` and `__mocks__/` folders), `.d.ts` files, re-export barrels and a package's `examples/` are left out, and a package in a git repository is listed through git, so ignored files are never measured. Each package keeps its own `akan.baseline.json`; `akan quality baseline` now seeds one for each package too, `akan quality scan` reports its exceptions, and packing a package that would publish one fails.
|
|
8
42
|
|
|
9
43
|
A baseline only shrinks from the default branch's copy. Where the default branch has none, an app's, lib's or package's baseline may hold only the breaches the default branch's code already has, so a new one starts empty instead of skipping the check. A file's line count no longer includes the newline ending its last line, so a recorded size may drop by one on the next `akan lint`.
|
|
@@ -22,6 +56,56 @@
|
|
|
22
56
|
- **The `akan-service` skill** carries a recipe for pages backed by an external HTTP API: an `adapt()` adapter in `srvkit/` that reads its base URL at boot, a `lib/_<service>` service, a `Public` `query(Any, { nullable: true })` endpoint and its dictionary label, and the page that calls it.
|
|
23
57
|
- **The README's "Inside an existing repository"** runs the creator through `npx -y bun@1.4.4 x …` on a host with only Node and npm, so nothing global is written. It also gives copy-ready `build` and `start` scripts, says a fresh clone builds without a committed env file, and says which environment a `.env`-less build is for and what a deployed host sets instead.
|
|
24
58
|
|
|
59
|
+
- a166716: The agent guide tells a coding agent to finish the task and to write a final message a reader can follow.
|
|
60
|
+
|
|
61
|
+
- `AGENTS.md`'s managed block gains two sections. **Finishing Work**: carry the task to `verify ok`, treat a failing check or a stale generated file as an obstacle to work through (never by silencing the check), ask only when the work cannot go on, and confirm before a push, a deploy or a write to a shared database. **Reporting**: lead with the outcome, name every changed file, give each check's result line, and say what was left undone.
|
|
62
|
+
- A new workspace's `AGENTS.md` asks the agent to finish the task with a small marked workaround while a framework issue is drafted.
|
|
63
|
+
- The `akan-scaffold` skill builds the request without a supporting entity nobody asked for and says why one may be needed, instead of stopping to ask.
|
|
64
|
+
- `akan code` closes a turn that changed files with those files and what `akan_verify` said.
|
|
65
|
+
|
|
66
|
+
- 4538737: `agentService.loop` can now ask the member a question and wait for the answer between runs, the way the in-page chat's `askUser` does.
|
|
67
|
+
|
|
68
|
+
- `ask: true` lists `askUser({ question, choices?, multiple? })`, with the in-page chat's own description and parameters.
|
|
69
|
+
- A call ends the run as `awaiting`, with `question: true` on the event. Calls written before it in the same batch have already run; calls written after it wait for the resume.
|
|
70
|
+
- Put the question to the member over your own transport. Append `{ id, name: "askUser", result }`, or an `error` when they dismiss it, and resume. A resume without the answer parks the call again. A resume without `ask` answers it as an unknown tool.
|
|
71
|
+
- `askUser` never reaches `approve` and counts as no tool call. `untrusted` never sees the answer, which is the member's own input.
|
|
72
|
+
- A call with no question is answered with an error and the run goes on.
|
|
73
|
+
- With `ask: true`, a `clientTools` entry named `askUser` is dropped, and an `allow` naming `askUser` is refused as an invalid argument.
|
|
74
|
+
|
|
75
|
+
The option is new and off by default, so no upgrade step is needed.
|
|
76
|
+
|
|
77
|
+
- dcddea0: `agentService.loop` can now call the tools of a screen the member has open, without running them on the server. The run parks each such call, the way an approval parks one, until the page answers it.
|
|
78
|
+
|
|
79
|
+
- **Server.** `clientTools` takes the definitions the open page sent over the app's own transport. They are listed beside the endpoint tools.
|
|
80
|
+
- They are client input. Each definition is rebuilt from `name`, `description`, `parameters`, `readOnly` and `needsConfirm`. A name an endpoint tool holds is dropped, in a closed toolkit too, and so is `openToolkit`.
|
|
81
|
+
- `approve` is still asked about each call. With no approver, a definition that is not `readOnly` counts as a write, and a `needsConfirm` one is refused.
|
|
82
|
+
- An allowed call ends the run as `awaiting`, with `client: true` on the event. Calls written before it in the same batch have already run; calls written after it wait for the resume.
|
|
83
|
+
- The run never waits on a socket. The app delivers the call to the page, appends the page's result to the stored messages (or its own error when no page answers), and resumes. A resume without that result parks the call again. A resume without `clientTools` answers it as an unknown tool.
|
|
84
|
+
- **Browser.** `AgentClientTools` is new in `use-agentic` and re-exported from `akanjs/ui`, along with the `ToolRunnerHost` and `ToolApprovalRequest` types.
|
|
85
|
+
- `new AgentClientTools(surface?, host?).list()` gives the open screen's tools in the shape `clientTools` takes, each with `readOnly: false`.
|
|
86
|
+
- `run(call)` answers a parked call through the same `ToolRunner` as the in-page chat. A `confirm` still asks through `host.approve` and is refused without one, a card tool needs `host.card`, and the answer is clipped and fenced as the chat's would be.
|
|
87
|
+
|
|
88
|
+
Both are new and optional, so no upgrade step is needed.
|
|
89
|
+
|
|
90
|
+
- 2da2adc: `agentService.loop` takes `toolkits`, so a run over a large catalogue no longer sends every tool definition every round.
|
|
91
|
+
|
|
92
|
+
- **Shape.** `toolkits: { calendar: { description: "Read and edit the org calendar", tools: ["eventListInOrg", "updateEvent"] } }` groups names of `allow`. A tool in no toolkit is the core and is listed every round. `allow` still caps every toolkit.
|
|
93
|
+
- **Opening.** With toolkits set, the run lists one more tool, `openToolkit({ name })`. Its description names each toolkit that has a tool the account may see, with its `description`. The call is answered inside the loop with `{ opened, tools }`, and those tools are listed from the next round on. It never reaches `approve` or `untrusted`, and it does not count toward `budget.toolCalls`.
|
|
94
|
+
- **Refusals.** A call to a tool whose toolkit is closed is answered with an error that names the toolkit to open, with code `toolkitClosed`. An unknown toolkit name gets code `unknownToolkit`. A tool outside `allow` is still an unknown tool.
|
|
95
|
+
- **Resume and compaction.** A resumed run reopens every toolkit a stored `openToolkit` call opened without an error. A compaction summary now carries `toolkits`, which is new and optional on `AgentWireMessage`. Store messages whole, as you already do for `tainted`.
|
|
96
|
+
- **Validation.** A malformed `toolkits`, or an `allow` that names a tool `openToolkit` while toolkits are set, is an `error` before any model call.
|
|
97
|
+
|
|
98
|
+
`toolkits` is optional and changes nothing for a run without it, so no upgrade step is needed.
|
|
99
|
+
|
|
100
|
+
- 6ffb8ef: `mcp: "agent"` keeps an entry off `/mcp` and leaves it to the in-process agent. `AgentToolsRole`'s `listAs` and `callAs`, and so `agentService.loop`, still list and run it. `/mcp` neither lists nor runs it, and `listingCost` leaves it out. An app whose `/mcp` listing is near its size budget can now give a server agent more tools without growing that listing.
|
|
101
|
+
|
|
102
|
+
- **Where it goes.** It goes wherever `mcp: false` goes: an endpoint, a slice's `init()`, the bare `slice()` value, or one key of its map (`mcp: { cru: "agent" }`). It is curation, not authorization. Guards, person-only guards (`static agents = false`), `readOnly` and `setMcp({ excludeSignals, excludeEndpoints })` still apply to both catalogues, and HTTP is unchanged.
|
|
103
|
+
- **Lib slices.** An app slice that declares no `mcp` map now keeps the narrowest value its lib slices set: `false`, then `"agent"`, then listed.
|
|
104
|
+
- **MCP Apps.** A rendered view may still call an `mcp: "agent"` entry, as it may call an `mcp: false` one.
|
|
105
|
+
- **Types.** `McpShelf` (`boolean | "agent"`) and `narrowestMcpShelf` are new in `akanjs/common`. `SerializedSignalShelf` is new in `akanjs/signal`. `McpDocumentOptions` and `McpExposureOption` gain `agent`.
|
|
106
|
+
|
|
107
|
+
Upgrade: code that reads `mcp` (an endpoint's `signalOption.mcp`, `SliceCls.mcp`, a serialized endpoint's `mcp` or a serialized signal's `mcp` map) to decide whether an entry is on `/mcp` must test for listed, `(mcp ?? true) === true`. A check of `mcp !== false`, or a truthiness test, now lets `"agent"` through as listed. A workspace's copied `libs/shared` `AccountMiddleware` had exactly that check, which let an MCP client's OAuth token reach an `mcp: "agent"` endpoint over HTTP, so port its fix. Code that only declares `mcp: false` or `mcp: true` needs no change.
|
|
108
|
+
|
|
25
109
|
- 61fbd7d: `get_graph` takes `since`, a git revision, and returns the Change Map: the Akan Graph of what changed since HEAD forked from that revision, working tree and untracked files included. Every node, field and edge is marked `added`, `removed` or `changed`. The unchanged nodes a changed one calls, or is called by, stay in as context, and `unmapped` lists the changed files under `apps/` or `libs/` that no node covers, each marked the same way. `since: "HEAD"` maps uncommitted work only. Files `.gitignore` covers stay out, a renamed file reads as removed and added, and a CRLF checkout of an unchanged file reads as unchanged. A revision git does not know returns a `graph-since-unknown` diagnostic, and so does one HEAD shares no commit with (a shallow clone, say) instead of comparing with its tip. A revision that starts with `-` also returns it and never reaches git.
|
|
26
110
|
|
|
27
111
|
- **`AkanGraphDiff.between(base, head)`** in `@akanjs/language` diffs two graphs. `index.graph(readText, { digests: true })` gives each member, query, component and field a hash of its body text, so an edit inside a method, or to a field's options, marks it changed and moving it does not.
|
|
@@ -87,6 +171,21 @@
|
|
|
87
171
|
- **`internal`, `adaptor` and `plugs`** join `AkanGraphNodeKind` and `AkanGraphEdgeKind` in `akanjs/common`.
|
|
88
172
|
- **`FileFacts.internals` and `FileFacts.adaptors`** in `@akanjs/language`, with `ServiceClassFact.plugs`; `AkanIndex.setFile` also reads non-test files that call `adapt` or `dangerouslyAdapt`.
|
|
89
173
|
|
|
174
|
+
- 882e976: The Akan Graph takes a lib's named re-export of a package class only along the chain it walks from the plug's import path, the same chain its `export *` walk follows. The forms it reads are `export { Stripe } from "stripe-sdk"`, `export { default as PayPal } from "paypal-sdk"` and `import { TossClient } from "toss-sdk"; export { TossClient as Toss }`. A plug `Stripe` imported from `@libs/shared/srvkit` follows that folder's index and the modules the index exports. It also follows a relative named re-export (`export { Wise } from "./vendors/wise"`) and an `export *` into another folder or lib (`export * from "../common/square"`, `export * from "@libs/util/srvkit"`). A re-export the chain does not reach no longer claims the plug. Examples are `libs/shared/webkit/stray.ts`, a file in a subfolder whose committed index does not export it, and `srvkit/stripe.helper.ts`, which the generated barrel skips.
|
|
175
|
+
|
|
176
|
+
A facet folder (`ui`, `webkit`, `srvkit`, `common`, `plugin`) with no index on disk is read as the barrel `akan sync` writes. The generated barrels are gitignored, so this is every facet in a Change Map. As a result, a plug gets the same id in the graph view and in the Change Map, with or without `akan sync`. The folder scans that stood in for a missing barrel are gone. The barrel rule (which files and folders, the naming rule, and Biome's sort order) now lives in `akanjs/common` as `facetBarrelOf`, `facetBarrelNamesOf`, `compareExportNames` and `barrelFacetDirs`. The facet index template, the dev server's index sync and the graph all share it, and `akan sync` writes the same bytes as before.
|
|
177
|
+
|
|
178
|
+
A package `export *` on the chain is refused only for a name that a module along the chain declares. A declaration elsewhere in the imported lib no longer blocks it. Two re-exports that name the same package through different paths (`"stripe-sdk"`, `"stripe-sdk/server"`) are one adaptor. Guards still find a named re-export anywhere in the lib, as before. A guard reached through an `export *` reads a missing facet barrel the same way, so the Change Map locates `guard:libs/util:Admin` behind `libs/shared/srvkit/util.ts: export * from "@libs/util/srvkit"` as the graph view does.
|
|
179
|
+
|
|
180
|
+
Ids that change for a saved graph or a Change Map base:
|
|
181
|
+
|
|
182
|
+
- In a Change Map, a guard reached through an `export *` in a facet folder with no index is the guard the graph view links, where it was the unlocated `guard:<lib>:<Name>`.
|
|
183
|
+
- A plug whose name the lib re-exports from a package only off the import's chain is the unlocated `adaptor:<lib>:<Name>`, where it was `adaptor:<that package>:<Name>`.
|
|
184
|
+
- A plug reached through a relative named re-export, or through an `export *` into another lib, is `adaptor:<package>:<Name>` where it could be the unlocated `adaptor:<lib>:<Name>`.
|
|
185
|
+
- A plug whose name two modules along the chain re-export from different packages is the unlocated `adaptor:<lib>:<Name>`, as TypeScript drops a name two `export *` share, where it was the first file's package.
|
|
186
|
+
- A plug a chain's sole package `export *` reaches is `adaptor:<package>:<Name>` even when the lib declares `<Name>` off the chain, where it was the unlocated `adaptor:<lib>:<Name>`.
|
|
187
|
+
- An owner can have several same-name adaptors. With no index in the import's facet folder, a plug of one of them follows the generated barrel. It used to take the first adaptor under the folder. Through an import path that is neither a module nor a facet folder, the plug is the unlocated `adaptor:<owner>:<Name>`, where it was the first adaptor.
|
|
188
|
+
|
|
90
189
|
- bb40785: The Akan Graph maps `page/`. Each route file is a `route` node named by its URL pattern after the locale (`route:apps/demo:/memo/:memoId`, groups dropped as the router drops them), and each `_layout.tsx` is a `layout` node keyed by its folder (`layout:apps/demo:/(app)`, `root` for a `rootLayout()`). A `wraps` edge runs from each layout to the routes and layouts directly inside it, located at the wrapped file. A route or layout whose default export runs `.guard()` reads `guard` and links each function its guard calls that the file imports or declares: `.guard(() => signedIn())` reaches `signedIn` in `@libs/shared/webkit`, with its location and the comment above it, and a function declared in the page itself is keyed by that file (`guard:apps/demo:page/pin.tsx#isOwn`). A call to anything else (`Boolean`, akanjs's `redirect`, a package's `dayjs`) is looked through, a helper handed to a guard (`isOwn(isId(id))`) is not a guard, and an imported guard is looked up under its import path first. A layout's guard gates every route it wraps; the routes themselves do not repeat it, so a guard added to a layout marks only that layout changed in the Change Map. A route's default export, or the const it names (`const route = page()…; export default route`), is the route node itself, so the slices and actions a page uses hang off its URL. `_overrides.tsx` and the git-ignored `page/(libs)/` links are left out; a lib's own pages are its routes. A route's digest covers its whole file, so the Change Map marks an edited page changed instead of listing it as unmapped.
|
|
91
190
|
|
|
92
191
|
An unscoped `get_graph` still answers a graph of up to 600 nodes whole. Past that, it first drops the routes and layouts that neither changed nor use a change, and the route-only guards they leave unlinked, before it asks for a scope; an `app` or `module` scope brings them back. Studio's first column reads "Pages & components".
|
|
@@ -131,13 +230,48 @@
|
|
|
131
230
|
- The dev builder draws the graph on request through a new `build-graph` builder RPC, and keeps it until the next save.
|
|
132
231
|
- It sits behind the same gate as the other `/_akan` devtools routes, and `akan tunnel` / `akan start --share` refuse it.
|
|
133
232
|
|
|
233
|
+
- 2d3b958: `ApiReportPolicy.check` counts a changeset that a branch adds in place of a similar one it deletes. git's rename detection paired the two, so the added changeset was not listed and its `minor` bump did not satisfy the check.
|
|
234
|
+
- 2d5d659: The API break check (`bun run api:report --base`) no longer asks for a `minor` changeset when an inferred type's union members or object members only moved. The checker orders them by when it first met each one, so a refactor that changes which file is checked first reordered them without changing the type. Reordered overloads still count as a change.
|
|
235
|
+
- 465ccb9: `@akanjs/devkit/apiReport/apiReport` renders a package's public API, one report per entry point, from its declaration emit. The akanjs repository now commits that report for `akanjs` and checks it in CI: a removed export or a changed declaration needs a `minor` changeset that says how to upgrade.
|
|
236
|
+
- 222c7df: `akan lint` holds `server/`, `service/` and `signal/` of the `akanjs` package to the bare built-in `Error`s they construct or extend today (`akan.error.bare-error`): its `akan.baseline.json` records them per file and holds their total, so moving one between files passes and a new one anywhere fails. A change that removes one must lower the section too: `akan lint --no-fix` fails while the recorded total is above the code's, and `akan verify akanjs` or `akan lint akanjs` lowers it. No other package or workspace is measured by it. A baseline committed before a rule is added now adopts that rule with the debt its code held at the fork point.
|
|
237
|
+
|
|
238
|
+
A generated `errorCodes` guideline lists every code a framework error carries, with its status, whether it is forwarded, and whether the caller's JSON carries it; the `akan-err` skill ships it as a reference.
|
|
239
|
+
|
|
240
|
+
- d12f556: The barrel-import rewrite maps a name that a barrel re-exports by name from another barrel (`export { migration } from "./migration"`) to the file that declares it, as it already did through `export *`. It used to stop at the inner barrel, so a page that imported one name loaded every module behind it.
|
|
241
|
+
- f3fc71a: `akan start` no longer logs `[BarrelAnalyzer] ERROR scan failed: Parse error` over and over. The message came from each app's and lib's generated `lib/useClient.ts`.
|
|
242
|
+
|
|
243
|
+
- The barrel analyzer now reads a module that calls a `with { type: "macro" }` import. Bun's `Transpiler.scan` used to throw on such a module, so the analyzer skipped it.
|
|
244
|
+
- Imports rewritten from the generated `client` barrels were already correct, so the output stays the same.
|
|
245
|
+
- A file that still fails to scan is now named in the log line.
|
|
246
|
+
|
|
247
|
+
No upgrade step is needed.
|
|
248
|
+
|
|
249
|
+
- a480576: A file moved since the fork point keeps its `akan.baseline.json` entries, whether it was moved with `git mv` or a plain rename. The growth check reads the committed entries under the path git pairs the file with, and `--fix` rewrites the working entries there, so moving a recorded file no longer fails as new debt. A move that also rewrote more than half the file, or left a file at the old path, still reads as new, since git no longer sees it as a move.
|
|
250
|
+
- 1b04784: The dev build batch worker now waits for the runner to take its result before exiting, so a result can't be lost however fast the worker finishes. In the tests, workers that exited within milliseconds of starting could lose everything they sent and be reported as crashed.
|
|
251
|
+
- 7311978: The dev builder now uses a build batch's result once the worker has sent it, and ends a worker that is still running half a second later. Before, if the release never reached the worker, as may happen with Bun on Windows, each batch waited up to 5 s for the worker to exit before its result was used.
|
|
134
252
|
- 0504209: `akan build <app> --env <env>` builds for an environment other than the workspace `.env`'s, the way the desktop and mobile builds already do. Before, the shell's `AKAN_PUBLIC_ENV` lost to the `.env`, so a new workspace could only build `local` without editing it. The local-build notice, the image guard and the README now say what a `local` build changes in a built server: no endpoint rate limits, and local defaults for Redis and the database mode. They no longer say the dev routes are served, which a built server never does.
|
|
135
253
|
- bf872ce: A variable the shell sets now outranks the workspace `.env` when `akan` builds or runs an app, as dotenv and Bun's own `.env` loading do: `AKAN_PUBLIC_ENV=main akan build <app>` builds `main` where the `.env` says `local`. The order is `--env` (for `AKAN_PUBLIC_ENV`), then the process environment (the shell, and the `.env.local` and `.env.<NODE_ENV>` Bun loads into it), then the `.env`, then the defaults; an empty export counts as unset. The bundles, the bundled server env, `akan.env.json` and the Dockerfile still take one set of values. Where an exported value outranks the `.env`, `akan build` now warns with both values instead of the old warning that listed the values it ignored, and the server-env message, the `--env` help, the local-build notice, the README and the CLI reference state the new order.
|
|
136
254
|
|
|
137
255
|
**Behavior change:** where the shell exports a value the workspace `.env` also sets, such as `AKAN_PUBLIC_ENV`, `AKAN_PUBLIC_REPO_NAME` or `AKAN_PUBLIC_SERVE_DOMAIN`, `akan` now takes the shell's. Unset it, or match the `.env`, to build what you built before.
|
|
138
256
|
|
|
257
|
+
- af7c411: The five child-process restart loops now share one restart schedule, `RestartSchedule` from `akanjs/common`: the gateway's replicas, the RSC worker, the incremental builder, and `akan start`'s backend and builder recovery. It counts failed restarts, waits before the next one and cancels a pending one on stop. Each loop keeps its own delays (200ms–30s for the RSC worker, 2s–60s for `akan start`'s builder recovery, 1s–30s for the rest), its own give-up rule and its own log lines.
|
|
258
|
+
|
|
259
|
+
Two stop races in those loops are fixed:
|
|
260
|
+
|
|
261
|
+
- A replica whose restart timer had fired no longer respawns after the gateway stops.
|
|
262
|
+
- A builder `akan start` was still creating or booting when it stopped is now stopped too, instead of being started or retried after its ready timeout.
|
|
263
|
+
|
|
264
|
+
In `@akanjs/devkit`, `shouldAbandonBackendRecovery` is replaced by `backendRecoveryPolicy`, which gives up after five failed backend restarts as before.
|
|
265
|
+
|
|
266
|
+
- 9134033: A failed command prints the errors inside an AggregateError, not just its message.
|
|
267
|
+
|
|
268
|
+
- A `Bun.build` failure thrown as `new AggregateError(result.logs, "…")` printed only that message. An app plugin's `syncAssets` hook is one place that throws it, and there `akan sync` printed only `[licenseNotices] server graph failed` and dropped the `Could not resolve` lines that named the cause. The CLI now prints up to 20 inner errors under the message, then `…and N more`, then the `cause` chain. Bun build and resolve logs keep their `file:line:col`, and everything prints last, where a tail of the output keeps it.
|
|
269
|
+
- Any failed command's error now prints its `cause` chain as `Caused by:` lines, an AggregateError or not. A cause or an inner error that loops back on itself prints `[circular]` and ends there.
|
|
270
|
+
- `--json` is unchanged: its `error` field stays the one-line message.
|
|
271
|
+
- `akan build`, `typecheck` and `verify` already printed inner errors. They now stop at the same 20.
|
|
272
|
+
|
|
139
273
|
- e65172d: The CLI refreshes a cloud sign-in once less than an hour, or half the token's lifetime, is left, whichever is shorter. Before, a token that lived an hour or less read as due the moment it arrived, so every command rotated the refresh token and then called the cloud unsigned. Any unexpired token is now sent with the request, except the refresh call, which carries none. `akan login` signs in again when a session is due for refresh and has no refresh token left.
|
|
140
|
-
- c3b5b3c:
|
|
274
|
+
- c3b5b3c: The framework no longer puts `@akanjs/native/core` on a web page. `isNativeApp()` and the other host checks read the platform the shell writes before the bundle runs, and a native shell still starts core with the page. A file that imports `akanjs/client/native` statically still brings core to every page that reaches it. On the minimal app this takes 15 KB raw (5.6 KB brotli) off the vendor floor and 20 KB raw (6.6 KB brotli) off every route entry. `akan build` also resolves the `production` export condition for the browser, SSR-client, CSR and MCP App view bundles, so a package such as Lexical ships its production build alone. On the minimal app the Agent editor chunk drops from 91 KB to 63 KB brotli. `akan start` is unchanged.
|
|
141
275
|
- 6d5b544: A database service now has `create<Model>Many(rows)`. It creates the rows on the same path as `create<Model>`: `_preCreate` and `_postCreate`, the document's save and create hooks, and the live and pubsub events each row's commit fires. Every row's `_preCreate` and document pre hooks run first, so a check there that queries the table does not see the batch's own rows. The rows are then written in one transaction, joining the caller's when one is open, with one multi-row INSERT per 500 rows instead of one statement per row; if the database refuses one row, none is written. Every row's `_postCreate` runs once the transaction commits, as `create<Model>`'s runs once its row is stored, so a `_postCreate` that throws leaves the rows written. A service that already declares a method of that name, itself or in a lib service it extends, keeps its own at runtime, but its signature no longer typechecks against the generated one: rename it.
|
|
142
276
|
|
|
143
277
|
A store can list actions in `static silent = ["refreshToken"] satisfies (keyof UserStore)[]`. When a silent action fails, it shows no toast and logs at verbose instead of error. It still rejects with the original error, so a background write such as a token refresh is awaited by its caller, which handles the failure. Generated actions can be listed, and a store built on a lib store keeps the lib's silent actions. A name in `static silent` that is not an action of the store is reported when the store registers.
|
|
@@ -164,8 +298,22 @@
|
|
|
164
298
|
- **Git.** When git has no identity configured, as in many containers and CI images, the first commit is made as `Akan.js <noreply@akanjs.com>` instead of failing; once `user.name` and `user.email` are set, `git commit --amend --reset-author` makes it yours. In a folder another git repository tracks, the scaffold no longer runs `git init`, which made the outer repository record a gitlink instead of the files, and it commits nothing there: the new files are left for you to commit in that repository. A folder that repository ignores, as `app/` or `app/*` does, still gets its own repository and commit.
|
|
165
299
|
- **`@akanjs/devkit`**: `applyTemplate` takes `dryRun` to list the files a template would write without writing them, and `WorkspaceExecutor.commit` takes an `identity` to commit under.
|
|
166
300
|
|
|
301
|
+
- 82d62b1: A CSR bundle and each MCP App view no longer carry the route-level boundary, which only a server render draws. The generated root layout's `LevelBoundary` export is now undefined in a CSR build, which MCP App views share, so their `import * as root` of the layout no longer keeps it. In `akan build minimal --fast` each MCP App view and the CSR `index.html` are about 0.45KB smaller raw. A server render is unchanged.
|
|
167
302
|
- 1870fcd: `akan verify` adds a `fix:` line to a module file's two-parent import that names the layer barrel to import from instead, such as `import from "@apps/<app>/common"`. The lint message itself now points at the layer barrel too.
|
|
168
|
-
-
|
|
303
|
+
- 5691327: `setErrorConstructor` on `FetchClient`, `HttpClient` and `WsClient`, `HttpClientOptions.ErrorCls` and `FetchClient.build`'s `Err` option are deprecated. Every dictionary's `Err` is `akanjs/common`'s `Err`, which a restored error already is, so they change nothing. They keep working. A generated `lib/sig.ts` no longer calls `fetch.setErrorConstructor(Err)`, and a generated `lib/useClient.ts` no longer passes `{ Err: pageProto.Err }`; `akan sync` rewrites both. No upgrade step is needed.
|
|
304
|
+
- 7311978: The dev server's verbose log now names the route of each page request it holds while the builder restarts, for example `holding build-route /:lang/second until the builder is ready (2 waiting)`.
|
|
305
|
+
- db414ba: Subspace sync passes the repository and branch to `git clone`, `fetch` and `push` after `--`, so neither can be read as a git option, and `subspace` config refuses a repo starting with `-`. The store-access scanner's form-setter check and the convention and AGENTS.md readers no longer backtrack quadratically on a long name or a long run of spaces.
|
|
306
|
+
- 7c39aea: The 82 source files at the root of `@akanjs/devkit` now sit in folders by concern:
|
|
307
|
+
|
|
308
|
+
- `quality/`: the maintainability gate and its scanners
|
|
309
|
+
- `context/`: `akan context` and the MCP contract
|
|
310
|
+
- `guideline/`: guidelines and the files `akan agent install` writes
|
|
311
|
+
- `app/` (the app build runner and reporter, the route JS budget, route source checks and the signal test preload), `workspace/`, `docs/`, `subspace/`, `tunnel/` and `util/`, and `test/` for the shared test helpers
|
|
312
|
+
- `lint/`, `typecheck/` and `executors/`, which already existed (`executors.ts` is now `executors/index.ts`)
|
|
313
|
+
|
|
314
|
+
Each old root subpath (`@akanjs/devkit/scanInfo`, `@akanjs/devkit/workspaceLayout.ts`, …) is an explicit entry in `exports` pointing at the file's new place, so existing imports keep working. Those aliases are deprecated and go away in the next minor; import from the folder path instead (`@akanjs/devkit/workspace/scanInfo`). The package root now holds only the type barrel, and a test keeps it that way.
|
|
315
|
+
|
|
316
|
+
- 76ab8d4: `akan doctor` exits with code 1 when its report says `"status": "failed"`, in text or JSON, with or without `--strict`, and for `--ios`, so the `agent:doctor` script (`akan doctor --strict --format json`) or a CI step fails on it. Before, it always exited 0. The full report still prints on stdout. A warning never changes the exit code: `--strict` still only decides which conventions count as errors, today a missing module abstract. Doctor's `dictionary-label-missing` now reads both a constant's fields and its dictionary's labels from their syntax, ignoring comments and strings. A field that appears only in a comment no longer asks for a label: a new `--sample` workspace no longer warns about `task`'s `priority`, `tags`, `assignee` and `completedAt` or `workHistory`'s `actor` and `previousStatus`, which its constants suggest only in comments. A label that exists only in a comment, or a `name:` inside a string, no longer counts, so a field whose label is commented out now warns.
|
|
169
317
|
- 245d318: A font declared on a root layout now gets its metric-adjusted fallback faces: `@font-face` rules named `"<font> fallback"` that draw a local system font with `size-adjust`, `ascent-override` and `descent-override` matched to the web font. The variable `--font-<name>` already named that family, but the build never wrote it, because fontaine's `readMetrics` takes a URL and returned nothing for the file path it was given. While a web font loaded (`font-display: swap`), text drew in the browser's default font, usually a serif, and moved when the web font arrived. The metrics are read from the source font, not the subset, so a subset without Latin letters (`subsets: ["ks-x-1001"]`, or only `subsetText`) still sizes the fallback correctly. A font whose metrics cannot be read keeps its face and gets no fallback, as before. Set `adjustFontFallback: false` on a font to keep the old output. Cached font output from `akan start` is regenerated once.
|
|
170
318
|
- 6f6cc2a: A fresh clone of a workspace now builds and starts after `bun install` alone. The env files that hold secrets stay gitignored, so a clone has none of them: before, `akan typecheck`, `akan build` and `akan verify` failed with `Cannot find module './env.server.local'`, and with no `.env` the CLI picked the `debug` environment, so `akan build` stopped asking for `AKAN_PUBLIC_REPO_NAME` and `AKAN_PUBLIC_SERVE_DOMAIN`.
|
|
171
319
|
|
|
@@ -175,6 +323,10 @@
|
|
|
175
323
|
|
|
176
324
|
**For an existing workspace** nothing is required. To give a fresh clone values other than the empty defaults, commit an `env/env.server.example.ts` (and `env.client.example.ts`) without secrets in it; in an older workspace, add `!**/env.client.example.ts` to `.gitignore` for the client one. If you link env files into a new worktree, link them before the first `akan` command there, or replace the defaults it wrote.
|
|
177
325
|
|
|
326
|
+
- 668a52d: Listing an app's or lib's modules (`SysExecutor.getModules`, and the constant-file readers built on it) no longer fails with `ENOENT` when the process runs outside the workspace root, and skips a dangling symlink instead of rejecting.
|
|
327
|
+
- fa42f4e: A dev server about to idle-suspend now decides again once its idle watcher has started, and stays awake if a builder request or builder message came in while the watcher was starting, or if the builder or backend stopped being ready. It used to release the builder anyway, so a `build-graph` or route request sent in that window waited for the next wake or failed. A dev file watcher stopped in the middle of a scan no longer reports what that scan found, which the next idle wake used to replay as a stale change.
|
|
328
|
+
- fd2c575: A dev server that stops no longer re-arms its idle-suspend timer or keeps a file watcher running. A wake that settles after the stop, a builder message or relayed request that arrives after it, and an idle watcher that finishes starting after it each used to re-arm the timer, report the host awake, or leave the watcher open. A request that reaches a host stopped while suspended is now refused at once instead of being held for a wake that never comes.
|
|
329
|
+
- 7311978: A dev server waking from idle suspend now applies every save made while it was suspended, including one its idle watcher was still scanning when a request woke it. Such a save used to be dropped, so an `akan.config.ts` change made just before a page request kept the old config until the next config save.
|
|
178
330
|
- e2b809a: The typecheck behind `akan typecheck`, `akan verify` and `akan build` now uses its incremental cache. It wrote a `.tsbuildinfo` on every run, then checked every file again anyway, so a run with nothing changed cost as much as the first: about 8 seconds on a 2,400-file project. Now a run re-checks only the files that changed and the files they affect, and reads the rest from the cache. The same project's second run takes about 1.2 seconds. The diagnostics are the same, in the same order, as a full check: options, global, syntax, type and declaration errors, an edited file's new errors and the errors it causes in files that import it. `--clean` still clears the cache first.
|
|
179
331
|
- bf28968: An app can now serve its default locale at unprefixed paths. Set `i18n.localePrefix` to `"as-needed"` in `akan.config.ts`, and `/books/OL45804W` is the English page itself. Before, every page lived under `/<locale>/…`, and an unprefixed path answered with a 307 to the locale the browser asked for. An app with one language, or with URLs fixed from outside (OAuth callbacks, QR codes, links in mail, a migrated site), could only meet them with raw `<a href>`s, which reloaded the whole page and went through that 307 on every click.
|
|
180
332
|
|
|
@@ -203,7 +355,8 @@
|
|
|
203
355
|
- **A narrowed build fails when route code imports a name its facet does not export**, and names the missing names. Before, the page threw a `SyntaxError` in the browser.
|
|
204
356
|
|
|
205
357
|
- 4561152: The skill examples now use one neutral domain, books from a public read-only API: a `BookApi` adapter in `srvkit/`, a `lib/_openlibrary/` service with a `book` query, `fetch.book(id)` and `/books/[id]` pages. This covers the `akan-service` external-API recipe, the `akan-page` API summary, the `akanApi` import block, the `config` rule's `localePrefix` example and the README's as-needed path. The recipes teach the same steps as before.
|
|
206
|
-
- 53eb6f1: A command whose app-or-lib target is left out no longer stops at a prompt error when stdin is not a terminal, as in a coding agent's shell or CI. In a workspace with a single app, lib or package, `akan sync`, `akan lint`, `akan test` and `akan create-module <name>` run on it and say so on stderr, so a new workspace's `bun run sync`, `bun run lint` and `bun run test` work there. Otherwise every target command (app, lib, package, module) exits at once with the valid targets and the line to rerun, such as `akan sync <app-or-lib>`. A
|
|
358
|
+
- 53eb6f1: A command whose app-or-lib target is left out no longer stops at a prompt error when stdin is not a terminal, as in a coding agent's shell or CI. In a workspace with a single app, lib or package, `akan sync`, `akan lint`, `akan test` and `akan create-module <name>` run on it and say so on stderr, so a new workspace's `bun run sync`, `bun run lint` and `bun run test` work there. Otherwise every target command (app, lib, package, module) exits at once with the valid targets and the line to rerun, such as `akan sync <app-or-lib>`. A terminal is asked as before.
|
|
359
|
+
- 44149b1: Without a terminal, a command that deletes nothing now takes the workspace's only library, package or module when none is named, as it already did for the only app or lib, and names it on stderr: `No lib named, so this runs on 'util', the only one in this workspace: akan sync-library util`. This covers `sync-library`, `sync-package`, `build-package`, `verify-dist-package`, `create-view`, `create-unit`, `create-template` and `create-crud-page`. Before, each refused and asked for the target to be named. The remove commands still never take one they were not given. A terminal is still asked, even when there is only one choice.
|
|
207
360
|
- b24fef3: An app that draws no Akan UI component now builds and runs without the UI's optional peers. Before, `akan build` failed with `Could not resolve: "react-icons/ai"` or `"react-spring"` in an app that imported nothing from `akanjs/ui`: the System UI every root layout mounts drew react-icons glyphs and reached the model, list and dialog components through the `Load` and `Button` modules, and the CSR build, on by default, bundled the whole `akanjs/ui` barrel.
|
|
208
361
|
|
|
209
362
|
**Upgrade note.** A workspace can drop `react-spring`, `@react-spring/web`, `@use-gesture/react`, `react-refresh`, `scheduler` and `tailwind-scrollbar` from its `package.json`, unless its own code imports them. `akanjs` now depends on `@react-spring/web`, `@use-gesture/react`, `react-refresh`, `scheduler` and `tailwind-scrollbar` itself, because the System UI, the dev runtime and `akanjs/ui/styles.css` always use them, and nothing uses `react-spring` any more. New workspaces no longer list them. A workspace whose own code keeps `react-spring` or `@react-spring/web` must move it to major 10: an older one installs a second copy under `akanjs`, and a spring value the app makes no longer typechecks on an `animated.*` element from `akanjs/ui`.
|
|
@@ -215,28 +368,82 @@
|
|
|
215
368
|
- **The CSR build and its MCP App views** rewrite `akanjs/ui` imports to the components a file names, as the SSR route builds already did, so a page that imports `Link` no longer bundles every component.
|
|
216
369
|
- **Animations use `@react-spring/web`** instead of the `react-spring` umbrella package, which also installed the native, three.js, konva and zdog renderers.
|
|
217
370
|
|
|
371
|
+
- b516497: `akan create-package --name` takes `name` or `@scope/name`, each part lowercase letters, digits, `-`, `.` and `_` starting with a letter or digit, and refuses anything else before it touches a file: `"../x" is no package name; use name or @scope/name, each of lowercase letters, digits, -, . and _, starting with a letter or digit`. Before, `--name ../x` wrote `x/` beside `pkgs/` and added it to the root `tsconfig.json`. `akan create-ui`, `add-field` and `add-enum-field` refuse a `--module` that is not a module name with a `primitive-input-invalid` diagnostic in their report, as they already reported a missing one. Before, `create-ui --module ../x` wrote its component into the app root, and `add-field --module ../x` looked for the constant and dictionary outside the module folder. `plainNameProblem` returns the message `assertPlainName` throws, and `assertPackageName` sits beside it in `@akanjs/devkit/workflow/plainName`.
|
|
218
372
|
- 58b7329: `akan create-scalar`, `remove-scalar`, `create-module`, `create-service`, `create-application`, `create-library`, `install-library` and `create-workspace --app` refuse a name that is not one plain path segment before they touch a file, such as `"../.." is no scalar name; use letters, digits, - and _, starting with a letter`. Before, the name went into the path unchecked: `akan remove-scalar ../.. <app>` deleted `apps/<app>` and exited 0, and the create commands wrote their files outside `lib/`, `apps/` or `libs/`. A scalar, module or service name is checked as a workflow's `module` input already was, an app or lib name as its `app` input; both checks now live in `@akanjs/devkit/workflow/plainName`, with `assertPlainName`.
|
|
373
|
+
- 4e0a38e: A page preview starts a new browser when the one before it died. Bun refuses to start a new browser until a later event-loop turn has reaped the dead one. `akan preview` opens its pages back to back when the app's log socket does not answer. In that case, if Chrome died during one page, every page after it failed at once with `Failed to spawn Chrome (set BUN_CHROME_PATH, …)`. Now a preview whose browser fails to start for any reason other than running out of `startTimeoutMs` waits 100 ms and tries the start once more. A browser that cannot start at all still fails in about 100 ms, now with its own error, such as `Chrome process closed the pipe`.
|
|
219
374
|
- b4b8f85: `akan preview` and the code agent's page preview give a browser that died or was closed the full `startTimeoutMs` (120 s by default) for its next start. Before, after one page had run out of the start bound, a browser that then died while another page waited for it stayed marked as slow to start. The next page started a fresh browser within only its own `timeoutMs` (60 s for `akan preview`, 30 s for the code agent's check).
|
|
220
375
|
- 686e0b8: `akan preview` and the code agent's page preview bound a page only once the browser is up. Before, a process's first page shared its `timeoutMs` with starting the browser. On a cold machine where Chrome took longer than that to start, the first page failed as `Timed out loading …; the dev server may be rebuilding or stuck.`
|
|
221
376
|
|
|
222
377
|
Starting the browser now has its own bound of 120 s, `startTimeoutMs` on `PreviewView.probe`. Running out of it reads `Timed out starting the <engine> browser after 120 s.`, where the engine is `chrome` or `webkit`. A browser that misses its bound may still come up late, so later pages in that process try again, but each waits only its own `timeoutMs` for the browser. Once the browser answers, the full bound applies again. So a browser that never starts holds the first page for 120 s, where before it held it for `timeoutMs` (60 s for `akan preview`, 30 s for the code agent's check).
|
|
223
378
|
|
|
224
|
-
- eefd9cb: `akan preview <app> /_akan/studio` opens Studio instead of a 404. Preview added the default locale to every path, and the server routes `/_akan/*` without one, so `/en/_akan/studio` matched no page. A path under `/_akan`, `/__csr`, `/__rsc`, `/.well-known` or the app's API prefix, a file the app's `public/` holds, and the server's own `/favicon.ico`, `/robots.txt`,
|
|
379
|
+
- eefd9cb: `akan preview <app> /_akan/studio` opens Studio instead of a 404. Preview added the default locale to every path, and the server routes `/_akan/*` without one, so `/en/_akan/studio` matched no page. A path under `/_akan`, `/__csr`, `/__rsc`, `/.well-known` or the app's API prefix, a file the app's `public/` holds, and the server's own `/favicon.ico`, `/robots.txt`, `/sitemap.xml` (at the root only, the one place the server answers it) and `manifest.webmanifest` now open as written: no locale, and no CSR boot query under `--csr`. Every other path, including one that already starts with a locale or ends in a dotted segment such as `/release/1.2.3`, is a page and gets the default locale as before. The `akan-debug` skill and the `akan preview` reference say so.
|
|
380
|
+
- 01ca04b: `akan preview` opens `/openapi.json` and `/mcp` as written, as the server mounts them outside `/:lang`; before, they got the default locale and opened a 404 page. `/mcp` answers only `POST`, so its preview fails with 405, and the docs say preview cannot check it. A full URL (`http://localhost:<port>/oauth/token`) now opens its path and query with no locale and no CSR boot query, so an endpoint mounted outside the API prefix can be opened; before, a full URL was taken by its path and given the locale. Preview always stays on the app's dev server, for a path that starts with `//` too, and notes a full URL that names another server. `localhost`, `127.0.0.1` and `0.0.0.0` on the dev port, which `akan start` binds, are the dev server and get no note; `*.localhost`, which can name a sub-route host, still gets one. A full URL's scheme matches in any case (`HTTP://…`). `--csr` prints a note naming each path it opens without the CSR boot instead of dropping the flag silently. A page `--changed` finds opens as a page even at a server route's path such as `/openapi.json`, under the same locale rule as a typed page, and a trailing slash names the same page, so `/en` and `/en/` open once. A path that ends in a slash outside the framework's prefix routes is a page, as the server reads it: `/openapi.json/` or `/logo.png/` misses its exact route and the locale proxy redirects it. Two paths that would write one screenshot open once, such as `/board?akanMobileTarget=preview` and `/board` under `--csr`, or `?a=1&&b=2` and `?a=1&b=2`, and a note names the path that folded; the `--csr` note names only the rows that open. A screenshot's file name carries the page's query and a short hash of the query as sent, a path that is not plain lower-case words carries a hash of the path, and a long path or query is cut with a hash, so `/a/b` and `/a-b`, `?a=b+c` and `?a=b%20c`, or `/_akan/studio?view=runtime` and `?view=signals` no longer overwrite one another and a long query no longer fails the page. The `akan-debug` skill, `akan preview --help` and the `akan preview` reference state which paths open as written.
|
|
225
381
|
- b101fcf: `akan remove-application`, `remove-library`, `remove-package`, `remove-module` and `remove-scalar` no longer delete a target they picked themselves. Left out, or named but not in the workspace, the target is refused in a terminal or not, with the choices and the line to rerun, such as `` Missing app: this command deletes files and never picks its target, so rerun it as `akan remove-application <app>` (choices: pokedex). `` Before, `akan remove-application` in a one-app workspace removed `apps/<app>` without asking, and without a terminal `akan remove-scalar <name>` removed the scalar from the only app or lib. A terminal is no longer offered a select for these commands. Other commands still take the only app, or the only app or lib without a terminal, as before. A command declares this with `destructive: true` on its target.
|
|
382
|
+
- 44149b1: `akan remove-module` now removes a service module named exactly, as in `akan remove-module pokedex:_billing` for `apps/pokedex/lib/_billing`. Before, no command could remove a service module: `remove-module` left out every `lib/_<name>` folder and refused one by name with `Invalid module name: _billing`. A service module left out or misnamed gets the same refusal as any target of a remove command, and its choices now list the service modules. `create-view`, `create-unit`, `create-template` and `create-crud-page` still take only a model module. A command opts in to service modules by taking `ModuleOrService` instead of `Module`.
|
|
226
383
|
- 4fcf44f: A new `rename-key` workflow renames a slice key or a Filter query key everywhere it is spelled. That covers the key itself, every name derived from it (`initMemoInPublic`, `memoListInPublic`, `queryByName`) in the app and every lib, and its module dictionary entry. It is the same rename the editor extension's F2 runs, so agents get it through `plan_workflow` / `apply_workflow` and the CLI through `akan workflow plan rename-key --app <app> --module <module> --slice <key> --to <newKey>` (or `--query <key>`). The plan lists each file it will change. A use that could also be another model's is left alone, and `akan verify` then reports it.
|
|
384
|
+
- 9a2a8c9: The build refuses a `LevelBoundary` or `McpAppRoot` export on an app's root layout: `page/_layout.tsx`, or a grouped or base-path root layout. Akan.js defines both on the root layout it generates and reads neither from an app's layout, so such an export was silently ignored. The error names the export and the file and says why. Remove the export; it never took effect.
|
|
385
|
+
|
|
386
|
+
`akanjs/common` exports `GENERATED_ROOT_LAYOUT_EXPORTS`, the set of those names.
|
|
387
|
+
|
|
388
|
+
- 9a2a8c9: A root layout whose own route level fails after the page has started streaming now draws the route-level notice ("This page could not be loaded." with "Try again") instead of blanking the page. That covers an app's `page/_layout.tsx`, or a grouped root layout, that fails below its own `.loading()`, and a component in it that suspends and then fails.
|
|
389
|
+
|
|
390
|
+
- The generated root layout renders the boundary inside `System.Provider`, around the app's root layout. The provider stays, with the bridge that starts the router, so "Try again" refreshes the page. The notice takes the place of the whole root layout, its header and navigation included.
|
|
391
|
+
- Only a server render gets it. A CSR bundle renders the root layout as before, and an MCP App view does not render the root layout's body.
|
|
392
|
+
- A failure before the first byte is answered as before, since the server runs no error boundary. So is a redirect or not-found the root layout raises; after the first byte the boundary draws no notice for one.
|
|
393
|
+
- The page's markup and its `useId` values are unchanged. Its inline payload gains one wrapper.
|
|
394
|
+
|
|
395
|
+
- 627dde4: The route JS budget stops failing deploy builds: a plain `akan build` reports an overage, `akan build --check-budget` fails on it, and CI runs that for `apps/minimal` and `apps/akan`, which now commit their `akan.budget.json`. The rc npm publish, which calls CI, skips that job, so an app's budget never holds a release.
|
|
396
|
+
|
|
397
|
+
- **Report by default:** a plain `akan build`, the one a deploy runs, prints a route over its entry or with none, or an unreadable `akan.budget.json`, as a warning under the route table and passes, as `akan verify` does. `--quiet` drops the rest of the summary but still prints the warning.
|
|
398
|
+
- **`--check-budget`** fails the build on an overage, a route with no entry (a new page records its entry with `--update-budget` in the same change), an unreadable file, or an app with no file, naming every overage and missing entry in one failure.
|
|
399
|
+
- **`--raise-budget`** re-records every route at its measured size and names the entries it raised, for the change that grows a route on purpose. An overage now names it with the app's own name, along with the file and section to edit by hand. `--check-budget`, `--update-budget` and `--raise-budget` exclude each other.
|
|
400
|
+
- **`System` counts as the SSR shell:** the generated root layout imports `System` whole because it serves SSR pages, the CSR shell and MCP App views. The measure now reads that import as `System/SSR.tsx` and leaves out `System`'s CSR and MCP App providers wherever an app imports `System`, since no server page renders them; every client entry is still built. On `apps/minimal` the median route drops from 342KB to 307.5KB brotli and the largest, `/:lang/explore`, from 499.1KB to 473.3KB. On `apps/akan` most routes drop about 1KB, because their other client entries load the providers' dependencies anyway.
|
|
401
|
+
|
|
227
402
|
- 9a9e1fa: A server page from `akan build` now preloads its client modules from `<head>`, so a cold load stops waiting on chains of imports.
|
|
228
403
|
|
|
229
404
|
- **What is preloaded:** the rsc client and the chunks it imports, the chunks every client reference row (`I` row) in the shell's flight names, and the importmap vendors those chunks import, each with its own chunks. A client URL that only the page's own text carries is never preloaded. Before, only the rsc client and the locale dictionary were preloaded. The browser found the rest one import level at a time, after the document finished.
|
|
230
|
-
- **Measured on `apps/minimal`:** `/en/explore` preloads
|
|
405
|
+
- **Measured on `apps/minimal`:** `/en/explore` preloads 64 modules and its flight names 37 client chunks, all of them preloaded. `/en/lab/buttons` preloads 165 for 137. Preloading every client component each route's page and layouts import would have meant 274 modules for `/en/explore`, so the preloads follow the flight instead.
|
|
231
406
|
- **A boundary that resolves after the shell** still loads its chunks when its flight rows arrive. `akan start` preloads nothing new, because a dev page loads its client code from the SSR dev registry.
|
|
232
407
|
- `routes-manifest.json` carries the preload table as `modulePreloads`: the runtime chunks, each vendor's chunks, and the vendors each browser chunk imports.
|
|
233
408
|
|
|
234
|
-
- 9a9e1fa: `akan build` measures the JavaScript each server route loads, and
|
|
235
|
-
|
|
236
|
-
- **The measure:** the runtime, every client module statically reachable from the route's page and layouts, and their vendors, counted in the brotli bytes the server sends. A chunk loaded by a dynamic `import()` is left out, and so is the locale dictionary. A new `Measuring route JS` step names the largest route, and the summary lists the ten largest with their brotli and raw sizes. On `apps/minimal` the largest is `/:lang/explore` at
|
|
237
|
-
- **The budget:** `akan build <app> --update-budget` writes `apps/<app>/akan.budget.json` with the environment it built for and one `routeJsBrotliKB` entry per route. After that,
|
|
238
|
-
- **Where it fails:** `akan build
|
|
239
|
-
- **Opt-in:** an app without the file gets the report and nothing fails. A route without an entry is reported,
|
|
409
|
+
- 9a9e1fa: `akan build` measures the JavaScript each server route loads, and reports a route that outgrows the budget the app commits; `akan build --check-budget` fails on it.
|
|
410
|
+
|
|
411
|
+
- **The measure:** the runtime, every client module statically reachable from the route's page and layouts, and their vendors, counted in the brotli bytes the server sends. A chunk loaded by a dynamic `import()` is left out, and so is the locale dictionary. A new `Measuring route JS` step names the largest route, and the summary lists the ten largest with their brotli and raw sizes. On `apps/minimal` the largest is `/:lang/explore` at 473.3KB brotli (1.2MB raw).
|
|
412
|
+
- **The budget:** `akan build <app> --update-budget` writes `apps/<app>/akan.budget.json` with the environment it built for and one `routeJsBrotliKB` entry per route. After that, a route that passes its entry by more than the larger of 1% and 4KB, as the bundle size gate allows, is an overage, named with its bytes and its limit. The slack absorbs the `AKAN_PUBLIC_*` values a build inlines, so a budget recorded for one environment holds for another, and an overage says when the file was recorded for another one. The update adds a new route, lowers an entry its route now fits under and drops a route that is gone. It never raises an entry: `--raise-budget` or a hand edit does, in the change that grows the route.
|
|
413
|
+
- **Where it fails:** only `akan build --check-budget`, on an overage, a route with no entry, an unreadable file or a missing one. A plain `akan build` warns of each but a missing file under its route table, and `--update-budget` rewrites an unreadable file. `akan verify` warns of each route over its entry or with none and of an unreadable file, one line each, but never fails on them. A mobile or desktop build skips the step.
|
|
414
|
+
- **Opt-in:** an app without the file gets the report and nothing fails, unless `--check-budget` asks for it. A route without an entry is reported, and fails only `--check-budget`. `akan sync` accepts `akan.budget.json` at an app root.
|
|
415
|
+
|
|
416
|
+
- af133d7: A route level whose server render fails after the page has started streaming now draws a notice ("This page could not be loaded.") with a "Try again" button in its own place, and the layouts above it stay. Before, the browser rethrew the error with no error boundary above it, so React unmounted the whole page (production error #441, a blank screen). That covered a page or layout below a `.loading()` that throws, and a fetch handle field that reaches no `Load.*` when the server refuses it: awaited in a component below the page, rendered as a child, or `use()`-d by a client component outside `Load.*`.
|
|
417
|
+
|
|
418
|
+
- The generated root layout exports `LevelBoundary`, and server rendering puts it around every route level below that root layout, inside the level's Suspense. The notice is the one a failed level already draws in a CSR app. "Try again" calls `router.refresh()`, and the page's next payload renders the level again.
|
|
419
|
+
- The root layout's own level and any `_overrides` level above it get no boundary: the root layout renders `System.Provider`, which starts the router, so a notice at or above it would have no router to retry with. The generated root layout bounds its own content inside `System.Provider` instead.
|
|
420
|
+
- A not-found or redirect raised below the route after the page started streaming renders nothing in that level's place, as the host answers it.
|
|
421
|
+
- An error that fails a level before the first byte has left still gets the nearest layout's `.error()` and its status, since React's server renderer runs no error boundary. The page's markup is the same as before. Its inline payload gains the boundary's client reference and one wrapper per level, and its head gains a modulepreload for the boundary.
|
|
422
|
+
- **Propagation change:** an error the server streamed now stops at the nearest route level. An error boundary an app put above a layout's `children` no longer sees it. An error thrown while the browser renders a client component carries no digest and propagates as before, so render bugs still surface.
|
|
423
|
+
- **Reporting change:** React now logs a streamed error it caught with `console.error` instead of `reportError`. Window `error` listeners, error trackers that hook them, and the dev HMR client's report no longer see it, and an app has no hook to change the notice. One case still reaches them on a first document load: if the level suspends when React retries it in the browser, for example on a client chunk still loading, React also passes its own recoverable error to `reportError` (#419 in production), not the original error. The server still logs each error, and `akan preview` still reports the page as FAIL.
|
|
424
|
+
- `akanjs/client` exports `isRouteControl(error)`, true for the not-found and redirect digests that both `Load.*` and the route level draw nothing for.
|
|
425
|
+
- What still differs from a refusal before the first byte: such a field takes the notice in place of its whole level, not the layout's `.error()`, and the page answers 200. Hand it to a `Load.*` to keep the rest of the level, or await the handle for `.error()`.
|
|
426
|
+
|
|
427
|
+
- 9055634: Partial RSC commit can now patch a real page, and it patches cleanly. It is still off by default behind `AKAN_PUBLIC_RSC_PARTIAL_COMMIT=1`. With the flag on:
|
|
428
|
+
|
|
429
|
+
- **Which pages render their head through `AkanRouteHead`.** Every page whose head is plain `title`, `meta` and `link` tags now renders it through a client component instead of plain head tags. That way any page can be the one a patch starts from. Patches still only land on pages that set `.config({ rscPatchHeadSafe: true })`.
|
|
430
|
+
- **A plain `.head()` is its own head snapshot.** A page no longer needs a hand-written snapshot. A head with anything else, such as a script or a component, keeps the full render.
|
|
431
|
+
- **React renders the head.** The old patch swapped `<head>` nodes behind React's back. That left a stale or broken head after the next full navigation or a back navigation.
|
|
432
|
+
- **A patch carries only the page's part of the head.** The layouts' part stays on the client, under the layouts the patch keeps. The page's part travels in the `X-Akan-Rsc-Patch-Head-Snapshot` header, which is now capped at 2 KB encoded, down from 12 KB. A larger page head renders whole, and the server logs that once per route.
|
|
433
|
+
- The cap leaves room under nginx's default 4 KB `proxy_buffer_size`, but it doesn't guarantee a fit: router state, trace headers and `Set-Cookie` share that buffer.
|
|
434
|
+
- The docs pages' part is about 1.1 KB, against about 5.7 KB for their whole head.
|
|
435
|
+
- **The layouts a patch keeps follow the new page.** `usePathCtx()` under an SSR page gives the patched page's path, pathname and query, so a menu's active item and a pager move with it.
|
|
436
|
+
- **A full commit after a patch goes straight to the new page's head, path and body.** It no longer shows the last full page for a frame first.
|
|
437
|
+
- **A patch falls back to a full render when the kept layouts would be wrong:**
|
|
438
|
+
- another route group's layout sits at the same URL prefix (`(guest)/account/login` to `(member)/account/settings`);
|
|
439
|
+
- the layouts' head would be different for the target, for example a layout `.head()` that reads a search arg. The router state carries a key of the layouts head its page rendered (`headKey`), and the server compares it with the target's. The key changes together with the rest of the router state, so a navigation started while the previous page is still committing sends that page's key;
|
|
440
|
+
- a route param differs (`/en` to `/ko`);
|
|
441
|
+
- a frame setting differs, such as `transition`;
|
|
442
|
+
- the page navigated from has no patchable head;
|
|
443
|
+
- its frame cannot be resolved.
|
|
444
|
+
- **A client built without the flag no longer asks for patches it cannot apply.** Before, a server running with the flag answered such a client with patches, and every sibling navigation made a second request. Such a client leaves the head key out of the router state it sends.
|
|
445
|
+
- **A refused head-safe patch runs each `.head()` once.** When a patch is refused after its head resolved, the full render reuses that head. Before, it ran every `.head()` a second time.
|
|
446
|
+
- **`@akanjs/devkit`: the SSR runtime manifest keeps every client export of the segment outlet module.** Before, it kept only one.
|
|
240
447
|
|
|
241
448
|
- 27440aa: A production build now runs without Docker: `cd dist/apps/<app> && bun main.js` serves the app with no env set. Until now the env the built server needs (the app and repo names, the serve domain, locales, route prefixes, database modes and the rest) existed only as `ENV` lines in the generated Dockerfile. On a host without the image, such as a PaaS or a test harness, the server stopped at boot with `getEnv() cannot run at build time` unless a start script copied every value by hand.
|
|
242
449
|
|
|
@@ -293,12 +500,26 @@
|
|
|
293
500
|
- **A public env value holding a private key is refused** when the native build records its `AKAN_PUBLIC_*` values, as names with `SECRET`, `TOKEN`, `PASSWORD`, `PRIVATE` or `CREDENTIAL` already were.
|
|
294
501
|
- **akan-native only warns about `'unsafe-inline'` in `script-src`.** Inline styles under `style-src 'unsafe-inline'` no longer produce a warning; inline scripts are still left unhashed when `script-src` allows them.
|
|
295
502
|
|
|
503
|
+
- db5b284: An app using the `shared` and `util` libraries no longer loads `@akanjs/native/core` on its web pages. Their stores imported `akanjs/client/native` for `isNativeShell()` and for the push installation id. That put core and every native plugin wrapper on every page. Native SSO and `usePushNotification` now load the plugin they call on first use inside a shell. The `useCamera`, `useGeoLocation` and `usePurchase` hooks in `akanjs/webkit`, which `shared`'s `Field` and `User.Template` reach, import their plugin and the few core exports they use dynamically, when first called; inside a shell `useCamera` still reads the camera permission at mount. On the minimal app with `shared` merged into its store:
|
|
504
|
+
|
|
505
|
+
- a Link route drops from 148.7 KB raw (38.5 KB brotli) to 101.5 KB raw (23.3 KB brotli);
|
|
506
|
+
- a route drawing `Field` drops from 416.6 KB (113.8 KB brotli) to 370.2 KB (99.8 KB brotli);
|
|
507
|
+
- a route drawing `User.Template` drops from 526.8 KB (140.2 KB brotli) to 481.2 KB (126.3 KB brotli).
|
|
508
|
+
|
|
509
|
+
The runtime guideline and the `no-web-only-api-outside-webkit` message now name `akanjs/client` for `isNativeApp()`, and the native subpaths for push and haptics.
|
|
510
|
+
|
|
296
511
|
- 5e08722: A coding agent now finds the imports and signatures a first app needs in its skills, instead of reading the akanjs sources.
|
|
297
512
|
|
|
298
513
|
- **The `akan-service` and `akan-page` recipes** start each file with its import lines, and the `akan-service` rules say what `serverMode: "batch"` does: the module, endpoints included, mounts only in a `batch` or `all` process, so a page-facing service leaves it off.
|
|
299
514
|
- **A new `akanApi` guideline** lists every import path and the exact signatures of the route stages, `router`, `Link`, `serve`, `adapt`, the endpoint builders, `SignalOption`, `serviceDictionary`, and the keys of `akan.config.ts` with the `web` and `i18n` shapes. It is generated from the akanjs types of the same release, and a test fails when the two drift apart. `akan agent install` ships it as a reference of both skills, and `get_guideline` / `akan guideline show akanApi` print it.
|
|
300
515
|
- **`ServiceOptions.serverMode`** carries a doc comment, so an editor shows the same explanation on hover.
|
|
301
516
|
|
|
517
|
+
- 6bb1610: Internal: the dev host (`AkanAppHost`) runs the backend, the builder, idle suspend, RSS recycling and dev-plan restarts through one collaborator each instead of one 126-member class. Its public members, start and stop order, restart timing and messages are unchanged.
|
|
518
|
+
- b7b141a: Internal: `akan doctor` runs one check class per family under `context/doctor/` (`rootShapeCheck.ts`, `agentGuideCheck.ts`, `configLeftoverCheck.ts`, `moduleShapeCheck.ts`, `recipeDuplicateCheck.ts`, `recipeIndexCheck.ts`, collected by `doctorFindings.ts` and scoped by `workflowScope.ts` and `generatedFreshness.ts`), and `inspect_akan_context` answers each request type through `AkanContextInspection` in `context/akanContextInspection.ts`. The doctor's diagnostics, their order, codes, severities and repair actions, the `akan context` output and every MCP answer are unchanged, and `akanContext.ts` and `akanMcpContract.ts` export the same names.
|
|
519
|
+
- 158c507: Internal: `ApplicationCommand` in `application/application.command.ts` now declares its commands through one helper per family (`workspaceTargets`, `migrationTargets`, `inspectTargets`, `buildAndTestTargets`, `nativeBuildTargets`, `startTargets`, `releaseTargets`, `updateTargets`, `databaseTargets`) instead of one 530-line builder. Every command, alias, option, default and `--help` line is unchanged, in the same order. `@akanjs/devkit/commandDecorators` now exports `CommandBuilderContext`, the type such a helper takes.
|
|
520
|
+
- 7aad7c1: `executors.ts` is split into one file per class under `executors/` and re-exports the same names, so every import of `@akanjs/devkit/executors` and the root barrel is unchanged. Each file under `executors/` also loads on its own: `akanConfig` and `scanInfo` import the `SysExecutor` subclasses when they use them, so no import order loads a subclass before its base.
|
|
521
|
+
- 34b9822: Internal: the dev builder process (`IncrementalBuilder`) runs its work lanes, the CSR and SSR dev registries, the file watcher and boot recovery through one collaborator each, in `builderLanes.ts`, `csrRegistry.ts`, `ssrRegistry.ts`, `builderWatch.ts`, `builderBoot.ts` and `builderBuildStatus.ts`, instead of one 90-member class. Behaviour is unchanged: the same messages are sent in the same order, and route builds, recycling at the memory ceiling and degraded-boot recovery work as before.
|
|
522
|
+
- 382a4c2: Internal: the workflow engine's source-editing helpers in `workflow/source.ts` are split by what they edit into `constantSource.ts`, `dictionarySource.ts`, `serviceSource.ts`, `signalSource.ts`, `templateSource.ts`, `testSource.ts`, `sourceImports.ts`, `fieldExpression.ts`, `fieldLabel.ts`, `fieldOrder.ts`, `modulePaths.ts`, `primitiveReport.ts` and `sourceText.ts`, with the shared AST lookups in `sourceAst.ts`. `workflow/source.ts` re-exports the same names, so `@akanjs/devkit/workflow` and every scaffold and `akan workflow` edit behave as before.
|
|
302
523
|
- 58f1c64: A route's client code no longer carries the UI of every module in the app and in each lib its store merges.
|
|
303
524
|
|
|
304
525
|
- **Bootstrap.** Each route's `"use client"` entry, every generated root layout and the SSR dev registry start with `import "@apps/<app>/lib/useClient"` and `import "@apps/<app>/lib/st"`, which load the client runtime and the store. They used to import `@apps/<app>/client` bare, and that bundled the whole barrel.
|
|
@@ -321,6 +542,44 @@
|
|
|
321
542
|
- A UI file that reads another UI file's export at its top level, through an import cycle, can now find it uninitialised and throw a TDZ error. Move that read into the component.
|
|
322
543
|
- Generated module `index.ts` files only collect namespaces, so they are unaffected.
|
|
323
544
|
|
|
545
|
+
- 94d3673: Akan Studio lands on the Runtime view when `akan start`'s builder is stopped, not only when there is none or it never answers.
|
|
546
|
+
|
|
547
|
+
- **The dev host marks a reply no builder answered.** A builder request the dev host answers itself carries `kind: "unavailable"`: the builder is stopped, not started yet, failed to start, or exited or was stopped before answering. A failure the builder reports, such as a broken build, carries no kind and reads as before.
|
|
548
|
+
- **`BuilderRpc.isUnavailable(error)`** tells such a failure apart, as `BuilderRpc.isTimeout` does for a request that times out. A bare, empty or unknown `/_akan/studio` view then lands on Runtime, and a view asked for by name still answers 503 with the reason.
|
|
549
|
+
- **Mixed versions keep working.** A server reading a reply from an older dev host, with no kind, answers 503 as before, and an older server ignores the new field.
|
|
550
|
+
|
|
551
|
+
- 3b7247e: A failed tool call now names a code a client or a model can branch on, beside the text it already sent, which is unchanged. No upgrade step is needed: `AgentWireToolResult` and `use-agentic`'s `ToolCallResult` only gain an optional `code`, and `akanjs/common` adds `MCP_FAILURE_META`, `McpFailure` and `FailureCode`.
|
|
552
|
+
|
|
553
|
+
Every code is a bounded token, a dictionary key (`<module>.error.<key>`) or one camelCase identifier, never prose, so no text can pass for one.
|
|
554
|
+
|
|
555
|
+
- **An app's `/mcp`:**
|
|
556
|
+
- A tool error carries `_meta["akanjs/failure"]: { code, statusCode }`, beside the server's own `_meta` for a 2026-07-28 client. The code is the one an HTTP caller gets:
|
|
557
|
+
- a domain `Err` by its dictionary key, such as `base.error.documentNotFound`;
|
|
558
|
+
- an `AkanError` by its code, such as `invalidArgument` for an argument the call got wrong;
|
|
559
|
+
- a guard's 401 or 403 by its status alone (`unauthorized`, `forbidden`);
|
|
560
|
+
- a 5xx by the dictionary key or code token its HTTP answer carries, else by its status (`internalError`, `serviceUnavailable`). Its text is redacted but its code is not, and the code comes from the error's own JSON when that carries one, which can be a third-party library's.
|
|
561
|
+
- A JSON-RPC error carries `data.code`, which tells apart what `-32602` covers:
|
|
562
|
+
- `unknownTool`, `unknownPrompt` (an unlisted page prompt included) and `unknownResource`;
|
|
563
|
+
- `invalidArgument` for bad arguments or a missing tool name, prompt name or resource uri;
|
|
564
|
+
- a refused screen's `forbidden` or `notFound`.
|
|
565
|
+
A rate-limited call names `tooManyRequests` and the catch-all names `internalError`.
|
|
566
|
+
- An MCP Apps view's call that fails without a domain `Err` restores as an error with that status and code, where it used to be a plain `Error`. A tool the view itself serves to the host names its code in the same `_meta` entry, without a `statusCode`.
|
|
567
|
+
- **`akan mcp`:** a tool error carries the same `_meta["akanjs/failure"]`, with one of these codes:
|
|
568
|
+
- `unknownTool` for a name no mode lists;
|
|
569
|
+
- `toolUnavailable` for a tool outside the server's mode;
|
|
570
|
+
- `invalidArgument` for a missing argument, an unknown guideline name, or a workflow path outside `.akan/workflows/`;
|
|
571
|
+
- `toolFailed` for anything else, with `statusCode` 500. A coded `AkanError` keeps its own code.
|
|
572
|
+
- **The code agent:** an MCP server's tool result keeps the code it named, from `_meta["akanjs/failure"]` or a JSON-RPC error's `data.code`, in the call's `details`.
|
|
573
|
+
- **The in-page agent:** a `toolResults` entry whose tool threw carries `code` beside `error` (see `use-agentic`'s WIRE.md): a dictionary `Err`'s key, else the thrown error's own `code`. A `taint: "source"` tool's result carries none, since its code would travel outside the page-content fence. The bundled Anthropic and OpenAI adaptors send `code` to the model inside the tool result, beside `error`.
|
|
574
|
+
|
|
575
|
+
- 44149b1: A module named in a library that lacks it, such as `akan create-view util:nope`, is refused at once, as one named in an app is. Before, it fell through to the module picker in a terminal, and without one it failed as if no module had been named. Both are now refused, terminal or not, with the modules there are and the line to rerun: `` Unknown module 'util:nope': util has no such module, so rerun it as `akan create-view <sys:module>` (choices: pokedex:card, util:photo). `` An app's used to say only `Invalid module name: nope`.
|
|
576
|
+
- 0d7294c: Narrowed vendor entries hold up during a rolling deploy and on very large builds.
|
|
577
|
+
|
|
578
|
+
- **A route chunk that fails to load during a rolling deploy now loads its page as a document.** A document from the new build can get a page from a replica the deploy has not reached yet, and that page's chunks can import a name the document's narrowed vendor entries lack. Before, the page broke, and React's Flight client kept the failed load, so retrying in the tab failed the same way. Now, if a navigation to another page has not committed, the tab loads its target as a document, which brings a matching import map. If the page is already on screen (a refresh of it counts), the tab reloads it at its current address, fragment and any later query-only change included, and only when the error is a module link or resolve error and the browser is online. A network, ad-blocker or evaluation error leaves the page in place. Only chunks that the latest page navigation's response imports count. The document's own chunks, an overtaken navigation's and a replaced response's do not trigger it. The exception is a refresh of the same page that imports a chunk the document is still loading, which takes that chunk over. Each chunk starts at most one document load per tab, so a chunk that always fails shows its error instead of reloading in a loop. While one document load is under way, another failure does not start a second; the page's next navigation, or its return from the back-forward cache, ends that wait. This applies to `akan build` output only.
|
|
579
|
+
- **A document fallback to the address the tab already shows now reloads it.** A failed refresh, or a back or forward move to a URL with a `#fragment`, fell back with `location.replace` to that same URL, which only scrolls to the fragment and loads nothing. It now calls `location.reload()`.
|
|
580
|
+
- **`akan build` fails when the vendor scan cannot find a route's client entry**, and names the entry. Before, a build that wrote its route bundles somewhere the scan did not look narrowed every vendor entry to nothing. The build passed, and pages threw in the browser.
|
|
581
|
+
- **The vendor scan no longer overflows the stack on large minified chunks.** A function body of about 20,000 statements, which a minifier folds into one comma chain, used to fail `akan build` with `Maximum call stack size exceeded`.
|
|
582
|
+
|
|
324
583
|
- bd4d45a: `akan verify` now fixes or explains three lint failures that were costly to resolve by hand.
|
|
325
584
|
|
|
326
585
|
- **A daisyUI component class your own CSS defines is no longer refused.**
|
|
@@ -334,17 +593,38 @@
|
|
|
334
593
|
- The rule's own rewrite is removed. Under `--unsafe` it renamed a `#field` where it was called but not where it was declared.
|
|
335
594
|
- **A raw `Error` in an `srvkit/` adapter names its fix.** `akan verify` prints the `Err` import path from that file, and where the key goes: the app's or lib's own service dictionary, `lib/_<name>/<name>.dictionary.ts`, as `<name>.error.<key>`.
|
|
336
595
|
|
|
596
|
+
- d4d84c6: `akan workflow validate` exits 0 when the only failures left are known baseline blockers (`overallStatus` `passed-with-baseline-blockers`); any other failed validation still exits 1. Over MCP, a passing `apply_workflow` dry run names `apply_workflow` with the same `planPath` and no `dryRun` as `next`, where it named `run_validation`, which had nothing to validate. A failed `akan workflow apply` reports no generated files queued for sync, no recommended validation command and no `akan verify` next action, and a failed field, mutation or slice write (`akan add-field` and its siblings) lists no generated file, validation command or next action; both used to list them as if the write had passed. With `-o json`, `akan workflow plan`, `apply`, `validate` and `report` print only the JSON report on stdout and send their log lines (`File Create:`, sync's warnings) to stderr; `create-module` and `create-scalar` applies used to print them before the report, so stdout did not parse. The text output is unchanged. `add-field` (the workflow and `akan add-field`) imports the type it writes: a scalar of the target from `../__scalar/<scalar>/<scalar>.constant`, a model from `../<model>/<model>.constant`, and `ID`, `Any` and the other `akanjs/base` types from `akanjs/base`, where it imported only `Int` and `Float` and wrote `field(Address)` with no import. A type that is not built in, not imported by the constant and not a scalar or model of the target is refused with `primitive-field-type-unknown`, at plan time and again at apply, before anything is written.
|
|
337
597
|
- d2b2291: A failed workflow no longer reports success to its caller. `akan workflow plan` exits 1 when the plan has an error, `akan workflow apply` when the apply or its `--dry-run` fails, and `akan workflow validate` when its status is `failed` (which includes `passed-with-baseline-blockers`); all three exited 0 before. A dry run of a plan with an error, such as `add-field --type Number`, reports `failed` and lists no changed or generated files, where it used to list the plan's edits under "Automatically Modified". Over MCP, `plan_workflow` names `apply_workflow` in `next` and `approval.canApplyWith` only for a plan without an error, and `apply_workflow` names `run_validation` only when the apply did not fail; a refused plan also drops its "apply this plan" and "validate the apply report" recommendations. The workflows that write into an existing module (`add-field`, `add-enum-field`, `add-mutation`, `add-slice`, `create-ui`, `rename-key`) now refuse a service module, or any folder without its `<module>.constant.ts`, at plan time and again at apply. The `workflow-module-not-database` error lists the target's database modules and points at `create-module`, and for a field at `create-scalar`. Before, `add-field` on a service module passed its plan and dry run and failed only at apply, and `create-ui` wrote a misnamed `_<service>.View.tsx` into it. The `workflow-module-missing` error now lists only database modules too, says a name that matches a service module (with or without its `_`) is one instead of asking "Did you mean \_<service>?", and points at another app or library only when it holds a database module of that name.
|
|
338
598
|
- adcdf3b: `akan workflow plan` and the `plan_workflow` MCP tool refuse a module the target app or library lacks, for every workflow that writes into an existing module (`add-field`, `add-enum-field`, `add-mutation`, `add-slice`, `create-ui`, `rename-key`). The `workflow-module-missing` error names the module, lists the modules the target has, and points at the module whose name differs only in case or by a leading `_`, at a scalar of that name, or at the app or library that holds it; only when none exists does it point at `create-module`. Before, the plan passed and its dry run reported `passed`. `add-mutation` used to plan a missing module with a warning so that a `create-module` plan could precede it; it now refuses too, so plan it after applying `create-module`. Every workflow now refuses an unknown `app` at plan time, listing the workspace's apps and libraries. `apply` and `--dry-run` check the target again before anything else, so a plan written earlier for a module that is gone fails instead of passing. `plan_workflow` now inspects the MCP server's workspace rather than the process directory.
|
|
599
|
+
- Updated dependencies [bd198af]
|
|
600
|
+
- Updated dependencies [ba81635]
|
|
339
601
|
- Updated dependencies [bc792ab]
|
|
602
|
+
- Updated dependencies [4538737]
|
|
603
|
+
- Updated dependencies [dcddea0]
|
|
604
|
+
- Updated dependencies [3ebf990]
|
|
605
|
+
- Updated dependencies [2da2adc]
|
|
606
|
+
- Updated dependencies [e9a2c7f]
|
|
607
|
+
- Updated dependencies [6ffb8ef]
|
|
608
|
+
- Updated dependencies [6fc8a60]
|
|
609
|
+
- Updated dependencies [f5d1e63]
|
|
610
|
+
- Updated dependencies [cc59b93]
|
|
611
|
+
- Updated dependencies [278f8e4]
|
|
612
|
+
- Updated dependencies [eb88032]
|
|
613
|
+
- Updated dependencies [31f7039]
|
|
614
|
+
- Updated dependencies [8c70603]
|
|
340
615
|
- Updated dependencies [61fbd7d]
|
|
341
616
|
- Updated dependencies [b3f85fa]
|
|
342
617
|
- Updated dependencies [a707354]
|
|
343
618
|
- Updated dependencies [4d61170]
|
|
619
|
+
- Updated dependencies [20b6a6c]
|
|
620
|
+
- Updated dependencies [1ef031b]
|
|
344
621
|
- Updated dependencies [c723713]
|
|
345
622
|
- Updated dependencies [0351ad4]
|
|
346
623
|
- Updated dependencies [ba417c6]
|
|
624
|
+
- Updated dependencies [485f707]
|
|
625
|
+
- Updated dependencies [882e976]
|
|
347
626
|
- Updated dependencies [bb40785]
|
|
627
|
+
- Updated dependencies [11c7ac2]
|
|
348
628
|
- Updated dependencies [d2bd9b7]
|
|
349
629
|
- Updated dependencies [b391491]
|
|
350
630
|
- Updated dependencies [2d357d6]
|
|
@@ -355,35 +635,86 @@
|
|
|
355
635
|
- Updated dependencies [ddd3d96]
|
|
356
636
|
- Updated dependencies [3f231a7]
|
|
357
637
|
- Updated dependencies [96f9ff6]
|
|
638
|
+
- Updated dependencies [0a81afa]
|
|
639
|
+
- Updated dependencies [d988c56]
|
|
640
|
+
- Updated dependencies [af7c411]
|
|
641
|
+
- Updated dependencies [6d449b1]
|
|
358
642
|
- Updated dependencies [1ebc57a]
|
|
359
643
|
- Updated dependencies [c3b5b3c]
|
|
644
|
+
- Updated dependencies [dcb7e61]
|
|
360
645
|
- Updated dependencies [6d5b544]
|
|
646
|
+
- Updated dependencies [ca67c2c]
|
|
647
|
+
- Updated dependencies [73f8830]
|
|
648
|
+
- Updated dependencies [5691327]
|
|
649
|
+
- Updated dependencies [14134d3]
|
|
361
650
|
- Updated dependencies [958f175]
|
|
362
651
|
- Updated dependencies [9f30e93]
|
|
652
|
+
- Updated dependencies [ad09fac]
|
|
653
|
+
- Updated dependencies [ae045d8]
|
|
363
654
|
- Updated dependencies [d9eaacc]
|
|
655
|
+
- Updated dependencies [d79a206]
|
|
364
656
|
- Updated dependencies [d9eaacc]
|
|
657
|
+
- Updated dependencies [0e5db0a]
|
|
365
658
|
- Updated dependencies [c334caf]
|
|
659
|
+
- Updated dependencies [170be15]
|
|
660
|
+
- Updated dependencies [d9f5ad5]
|
|
661
|
+
- Updated dependencies [f314eba]
|
|
366
662
|
- Updated dependencies [e143263]
|
|
367
663
|
- Updated dependencies [e4f7876]
|
|
368
664
|
- Updated dependencies [cb0fd5b]
|
|
665
|
+
- Updated dependencies [4a4c62b]
|
|
666
|
+
- Updated dependencies [f7be62b]
|
|
667
|
+
- Updated dependencies [24dcb1e]
|
|
668
|
+
- Updated dependencies [256b6e3]
|
|
369
669
|
- Updated dependencies [c48d780]
|
|
370
670
|
- Updated dependencies [3537448]
|
|
371
671
|
- Updated dependencies [c882491]
|
|
372
672
|
- Updated dependencies [f3def22]
|
|
373
673
|
- Updated dependencies [8424863]
|
|
374
674
|
- Updated dependencies [bf28968]
|
|
675
|
+
- Updated dependencies [dfc3564]
|
|
676
|
+
- Updated dependencies [24dcb1e]
|
|
677
|
+
- Updated dependencies [d12f556]
|
|
375
678
|
- Updated dependencies [9b5bcee]
|
|
376
679
|
- Updated dependencies [4561152]
|
|
377
680
|
- Updated dependencies [73e833b]
|
|
681
|
+
- Updated dependencies [d6b3619]
|
|
682
|
+
- Updated dependencies [6cdfb73]
|
|
378
683
|
- Updated dependencies [b24fef3]
|
|
684
|
+
- Updated dependencies [465ccb9]
|
|
685
|
+
- Updated dependencies [513e48d]
|
|
686
|
+
- Updated dependencies [1a43215]
|
|
379
687
|
- Updated dependencies [5cd1fc3]
|
|
380
688
|
- Updated dependencies [f47cc82]
|
|
689
|
+
- Updated dependencies [cf5eeff]
|
|
690
|
+
- Updated dependencies [228b6d7]
|
|
691
|
+
- Updated dependencies [6b3b4e4]
|
|
692
|
+
- Updated dependencies [7f0de74]
|
|
381
693
|
- Updated dependencies [1f93507]
|
|
382
694
|
- Updated dependencies [5d3cb3e]
|
|
695
|
+
- Updated dependencies [ad4571f]
|
|
696
|
+
- Updated dependencies [5757156]
|
|
697
|
+
- Updated dependencies [fd125b0]
|
|
698
|
+
- Updated dependencies [9a2a8c9]
|
|
383
699
|
- Updated dependencies [9a9e1fa]
|
|
700
|
+
- Updated dependencies [ce90ad0]
|
|
701
|
+
- Updated dependencies [af133d7]
|
|
702
|
+
- Updated dependencies [463fd1e]
|
|
703
|
+
- Updated dependencies [f8de6a7]
|
|
704
|
+
- Updated dependencies [1ed9f6a]
|
|
705
|
+
- Updated dependencies [0c83204]
|
|
706
|
+
- Updated dependencies [b0ccf6f]
|
|
707
|
+
- Updated dependencies [7836476]
|
|
708
|
+
- Updated dependencies [9055634]
|
|
709
|
+
- Updated dependencies [5cd3bc2]
|
|
384
710
|
- Updated dependencies [3537448]
|
|
711
|
+
- Updated dependencies [a373d51]
|
|
712
|
+
- Updated dependencies [99e3fd8]
|
|
713
|
+
- Updated dependencies [c723e7a]
|
|
385
714
|
- Updated dependencies [6c3a303]
|
|
715
|
+
- Updated dependencies [eadb12a]
|
|
386
716
|
- Updated dependencies [27440aa]
|
|
717
|
+
- Updated dependencies [bc5fdb0]
|
|
387
718
|
- Updated dependencies [e3de9ef]
|
|
388
719
|
- Updated dependencies [e3de9ef]
|
|
389
720
|
- Updated dependencies [e3de9ef]
|
|
@@ -391,15 +722,40 @@
|
|
|
391
722
|
- Updated dependencies [e3de9ef]
|
|
392
723
|
- Updated dependencies [e3de9ef]
|
|
393
724
|
- Updated dependencies [e3de9ef]
|
|
725
|
+
- Updated dependencies [ce35811]
|
|
726
|
+
- Updated dependencies [463fd1e]
|
|
727
|
+
- Updated dependencies [f923ffb]
|
|
728
|
+
- Updated dependencies [802bffe]
|
|
394
729
|
- Updated dependencies [99fda20]
|
|
730
|
+
- Updated dependencies [db5b284]
|
|
395
731
|
- Updated dependencies [5e08722]
|
|
732
|
+
- Updated dependencies [2bf769f]
|
|
733
|
+
- Updated dependencies [6d96075]
|
|
734
|
+
- Updated dependencies [a12577f]
|
|
735
|
+
- Updated dependencies [8e24168]
|
|
736
|
+
- Updated dependencies [48b8050]
|
|
737
|
+
- Updated dependencies [cf12100]
|
|
738
|
+
- Updated dependencies [966b5f2]
|
|
739
|
+
- Updated dependencies [2728800]
|
|
740
|
+
- Updated dependencies [91ccf38]
|
|
741
|
+
- Updated dependencies [c2af76a]
|
|
396
742
|
- Updated dependencies [df32c46]
|
|
397
743
|
- Updated dependencies [5f809e8]
|
|
744
|
+
- Updated dependencies [fd125b0]
|
|
745
|
+
- Updated dependencies [a5c476a]
|
|
398
746
|
- Updated dependencies [76705dd]
|
|
399
747
|
- Updated dependencies [206bb69]
|
|
748
|
+
- Updated dependencies [170be15]
|
|
749
|
+
- Updated dependencies [cfe50cb]
|
|
750
|
+
- Updated dependencies [94d3673]
|
|
400
751
|
- Updated dependencies [e4c7e5c]
|
|
401
752
|
- Updated dependencies [6291fec]
|
|
753
|
+
- Updated dependencies [3d1d448]
|
|
402
754
|
- Updated dependencies [0c480c6]
|
|
755
|
+
- Updated dependencies [3b7247e]
|
|
756
|
+
- Updated dependencies [e4c3009]
|
|
757
|
+
- Updated dependencies [0d7294c]
|
|
758
|
+
- Updated dependencies [e323d6c]
|
|
403
759
|
- Updated dependencies [d9eaacc]
|
|
404
760
|
- akanjs@3.2.0
|
|
405
761
|
- @akanjs/language@3.2.0
|