@akanjs/devkit 3.2.0-rc.9 → 3.3.0-rc.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (341) hide show
  1. package/CHANGELOG.md +57 -516
  2. package/DEV_RUNTIME_KNOBS.md +4 -3
  3. package/README.ko.md +3 -2
  4. package/README.md +4 -2
  5. package/akanApp/BackendImportGraph.test.ts +1 -1
  6. package/akanApp/akanApp.host.test.ts +132 -3
  7. package/akanApp/akanApp.host.ts +146 -1216
  8. package/akanApp/akanApp.host.wiring.test.ts +727 -0
  9. package/akanApp/builderGap.ts +68 -0
  10. package/akanApp/builderRequestRelay.test.ts +93 -0
  11. package/akanApp/builderRequestRelay.ts +100 -0
  12. package/akanApp/builderRssRecycler.ts +182 -0
  13. package/akanApp/devBackend.ts +392 -0
  14. package/akanApp/devBuildStatusBoard.ts +128 -0
  15. package/akanApp/devBuilder.ts +196 -0
  16. package/akanApp/devIdleSuspend.test.ts +221 -0
  17. package/akanApp/devIdleSuspend.ts +192 -0
  18. package/akanApp/devIdleSuspend.watcher.test.ts +120 -0
  19. package/akanApp/devRecycler.test.ts +66 -0
  20. package/akanApp/devRecycler.ts +305 -0
  21. package/akanApp/processRss.ts +61 -0
  22. package/akanConfig/akanConfig.test.ts +45 -17
  23. package/akanConfig/akanConfig.ts +10 -10
  24. package/akanConfig/akanWorkspaceConfig.ts +1 -1
  25. package/akanConfig/productionLockfile.ts +1 -1
  26. package/apiReport/apiReport.test.ts +34 -3
  27. package/apiReport/apiReportDiff.ts +35 -1
  28. package/apiReport/apiReportPolicy.ts +3 -2
  29. package/{applicationBuildReporter.ts → app/applicationBuildReporter.ts} +2 -49
  30. package/{applicationBuildRunner.test.ts → app/applicationBuildRunner.test.ts} +71 -8
  31. package/{applicationBuildRunner.ts → app/applicationBuildRunner.ts} +60 -21
  32. package/{applicationTestPreload.ts → app/applicationTestPreload.ts} +1 -1
  33. package/{routeJsBudget.test.ts → app/routeJsBudget.test.ts} +17 -1
  34. package/{routeJsBudget.ts → app/routeJsBudget.ts} +9 -3
  35. package/{routeSourceValidator.test.ts → app/routeSourceValidator.test.ts} +17 -0
  36. package/{routeSourceValidator.ts → app/routeSourceValidator.ts} +5 -1
  37. package/artifact/implicitRootLayout.test.ts +71 -3
  38. package/artifact/implicitRootLayout.ts +9 -3
  39. package/artifact/implicitRootLayoutRender.test.tsx +297 -0
  40. package/biome.base.json +2 -1
  41. package/cloud/cloudApi.test.ts +1 -1
  42. package/cloud/configLock.test.ts +1 -1
  43. package/cloud/globalConfig.test.ts +1 -1
  44. package/cloud/globalConfig.ts +1 -1
  45. package/cloud/updatePackUpload.test.ts +1 -1
  46. package/codeAgent/agent/AkanCodeEnv.ts +1 -1
  47. package/codeAgent/agent/AkanCodeServices.ts +23 -0
  48. package/codeAgent/agent/akanCodePaths.ts +1 -1
  49. package/codeAgent/agent/akanCodeServices.test.ts +54 -0
  50. package/codeAgent/agent/akanSystemPrompt.ts +1 -1
  51. package/codeAgent/agent/codeAgent.test.ts +1 -1
  52. package/codeAgent/skills/akan-debug/SKILL.md +8 -5
  53. package/codeAgent/skills/akan-err/SKILL.md +7 -0
  54. package/codeAgent/skills/akan-mcp/SKILL.md +19 -1
  55. package/codeAgent/skills/akan-scaffold/SKILL.md +1 -1
  56. package/codeAgent/skills/akan-validate/SKILL.md +3 -3
  57. package/codeAgent/tools/AkanCli.ts +1 -1
  58. package/codeAgent/tools/AkanToolPack.ts +2 -2
  59. package/codeAgent/tools/akanCodePlugins.test.ts +1 -1
  60. package/commandDecorators/command.ts +35 -6
  61. package/commandDecorators/commandBuilder.ts +1 -1
  62. package/commandDecorators/commandDecorators.test.ts +107 -6
  63. package/commandDecorators/targetMeta.ts +2 -0
  64. package/commandDecorators/workspaceVersionCheck.test.ts +70 -1
  65. package/commandDecorators/workspaceVersionCheck.ts +64 -14
  66. package/context/akanContext.ts +576 -0
  67. package/context/akanContextInspection.ts +296 -0
  68. package/{akanMcpContract.test.ts → context/akanMcpContract.test.ts} +1 -1
  69. package/{akanMcpContract.ts → context/akanMcpContract.ts} +16 -256
  70. package/context/doctor/agentGuideCheck.ts +81 -0
  71. package/context/doctor/configLeftoverCheck.ts +35 -0
  72. package/context/doctor/doctorFindings.ts +70 -0
  73. package/context/doctor/generatedFreshness.ts +56 -0
  74. package/context/doctor/moduleShapeCheck.ts +88 -0
  75. package/context/doctor/recipeDuplicateCheck.ts +42 -0
  76. package/context/doctor/recipeIndexCheck.ts +87 -0
  77. package/context/doctor/rootShapeCheck.ts +55 -0
  78. package/context/doctor/workflowScope.ts +97 -0
  79. package/{recipeScanner.test.ts → context/recipeScanner.test.ts} +1 -1
  80. package/context/safeRead.ts +9 -0
  81. package/csrE2e/csrE2eHarness.fixture.ts +1 -1
  82. package/devkitUtils.test.ts +39 -5
  83. package/{apiReference.test.ts → docs/apiReference.test.ts} +4 -4
  84. package/{apiReference.ts → docs/apiReference.ts} +2 -2
  85. package/docs/errorCodeReference.test.ts +282 -0
  86. package/docs/errorCodeReference.ts +71 -0
  87. package/docs/errorCodeScan.ts +551 -0
  88. package/{frameworkGraph.test.ts → docs/frameworkGraph.test.ts} +1 -1
  89. package/executors/appExecutor.ts +448 -0
  90. package/executors/commandExecutionError.ts +53 -0
  91. package/executors/executor.ts +527 -0
  92. package/{executors.linkFallback.test.ts → executors/executors.linkFallback.test.ts} +1 -1
  93. package/{executors.test.ts → executors/executors.test.ts} +76 -15
  94. package/executors/index.ts +8 -0
  95. package/executors/libExecutor.ts +23 -0
  96. package/executors/moduleExecutor.ts +18 -0
  97. package/executors/pkgExecutor.ts +129 -0
  98. package/executors/sysExecutor.ts +301 -0
  99. package/executors/workspaceExecutor.ts +277 -0
  100. package/frontendBuild/allRoutesBuilder.test.ts +1 -1
  101. package/frontendBuild/autoImportSync.test.ts +1 -1
  102. package/frontendBuild/autoImportSync.ts +1 -1
  103. package/frontendBuild/buildRouteClient.test.ts +1 -1
  104. package/frontendBuild/clientEntriesBundler.test.ts +1 -1
  105. package/frontendBuild/csrArtifactBuilder.test.ts +1 -1
  106. package/frontendBuild/csrDevArtifactWriter.ts +1 -1
  107. package/frontendBuild/cssCompiler.test.ts +3 -2
  108. package/frontendBuild/devGeneratedIndexSync.test.ts +1 -1
  109. package/frontendBuild/devGeneratedIndexSync.ts +7 -38
  110. package/frontendBuild/dictionaryAssetBuilder.test.ts +1 -1
  111. package/frontendBuild/fontOptimizer.test.ts +1 -1
  112. package/frontendBuild/fontPruner.test.ts +1 -1
  113. package/frontendBuild/frontendBuild.test.ts +3 -3
  114. package/frontendBuild/hmrWatcher.stop.test.ts +63 -0
  115. package/frontendBuild/hmrWatcher.test.ts +1 -1
  116. package/frontendBuild/hmrWatcher.ts +22 -1
  117. package/frontendBuild/mcpAppViewBuilder.test.ts +1 -1
  118. package/frontendBuild/mcpAppViewBuilder.ts +1 -1
  119. package/frontendBuild/nativeCore.test.ts +1 -1
  120. package/frontendBuild/optionalPeers.test.ts +36 -8
  121. package/frontendBuild/pagesBundleBuilder.test.ts +2 -3
  122. package/frontendBuild/pagesBundleBuilder.ts +1 -1
  123. package/frontendBuild/precompressArtifacts.test.ts +1 -1
  124. package/frontendBuild/precompressArtifacts.ts +19 -6
  125. package/frontendBuild/serverGraphFile.ts +1 -1
  126. package/frontendBuild/sourceMtimeIndex.test.ts +1 -1
  127. package/frontendBuild/ssrDevBundler.test.ts +1 -1
  128. package/frontendBuild/vendorImportScanner.test.ts +1 -1
  129. package/frontendBuild/vendorNarrowing.test.ts +1 -1
  130. package/frontendBuild/watchRootResolver.test.ts +1 -1
  131. package/{agentAssets.test.ts → guideline/agentAssets.test.ts} +1 -1
  132. package/{agentAssets.ts → guideline/agentAssets.ts} +2 -2
  133. package/{agentsIndex.test.ts → guideline/agentsIndex.test.ts} +2 -2
  134. package/{agentsIndex.ts → guideline/agentsIndex.ts} +13 -10
  135. package/{conventionSet.test.ts → guideline/conventionSet.test.ts} +7 -4
  136. package/{conventionSet.ts → guideline/conventionSet.ts} +1 -1
  137. package/{prompter.ts → guideline/prompter.ts} +2 -3
  138. package/incrementalBuilder/buildBatch.proc.ts +14 -4
  139. package/incrementalBuilder/buildBatchProtocol.ts +2 -0
  140. package/incrementalBuilder/buildBatchRunner.test.ts +122 -2
  141. package/incrementalBuilder/buildBatchRunner.ts +17 -4
  142. package/incrementalBuilder/builderBoot.ts +106 -0
  143. package/incrementalBuilder/builderBuildStatus.ts +23 -0
  144. package/incrementalBuilder/builderChannel.test.ts +1 -1
  145. package/incrementalBuilder/builderChannel.ts +11 -0
  146. package/incrementalBuilder/builderGraphPayloads.ts +3 -3
  147. package/incrementalBuilder/builderLanes.ts +157 -0
  148. package/incrementalBuilder/builderWatch.ts +213 -0
  149. package/incrementalBuilder/csrRegistry.ts +234 -0
  150. package/incrementalBuilder/incrementalBuilder.proc.test.ts +101 -7
  151. package/incrementalBuilder/incrementalBuilder.proc.ts +81 -823
  152. package/incrementalBuilder/ssrRegistry.ts +282 -0
  153. package/index.ts +22 -22
  154. package/integration/devStability.integration.test.ts +62 -56
  155. package/integration/devStabilityHarness.test.ts +1 -1
  156. package/lint/__fixtures__/no-import-common-err/bad.tsx +13 -0
  157. package/lint/__fixtures__/no-import-common-err/good.tsx +12 -0
  158. package/{biomeBase.test.ts → lint/biomeBase.test.ts} +1 -1
  159. package/lint/gritRules.test.ts +1 -1
  160. package/{linter.test.ts → lint/linter.test.ts} +1 -1
  161. package/lint/no-import-common-err.grit +31 -0
  162. package/lint/no-init-fetch-in-client.grit +1 -1
  163. package/mobile/desktopBin.test.ts +1 -1
  164. package/mobile/desktopRelease.test.ts +1 -1
  165. package/mobile/desktopServerStage.test.ts +2 -2
  166. package/mobile/desktopServerStage.ts +1 -1
  167. package/mobile/nativeApi.test.ts +1 -1
  168. package/mobile/nativeApp.test.ts +1 -1
  169. package/mobile/nativeConfig.test.ts +1 -1
  170. package/mobile/nativePluginFolders.test.ts +1 -1
  171. package/mobile/nativePublicEnv.test.ts +1 -1
  172. package/mobile/nativeWebDir.test.ts +1 -1
  173. package/mobile/serverBundleSecrets.test.ts +1 -1
  174. package/mobile/tarWriter.test.ts +1 -1
  175. package/mobile/updatePackFolder.test.ts +1 -1
  176. package/package.json +173 -9
  177. package/packageExports.test.ts +20 -2
  178. package/piDependencyPins.test.ts +1 -1
  179. package/pipeline/PipelineDefinition.ts +1 -1
  180. package/platformTest/IdleWatchedProcess.test.ts +1 -1
  181. package/platformTest/LinuxDockerTarget.ts +1 -1
  182. package/platformTest/PlatformTestRun.test.ts +1 -1
  183. package/platformTest/TestSnapshot.test.ts +1 -1
  184. package/platformTest/WindowsSshTarget.ts +1 -1
  185. package/preview/previewView.test.ts +23 -1
  186. package/{abstractDoc.test.ts → quality/abstractDoc.test.ts} +2 -2
  187. package/{abstractDoc.ts → quality/abstractDoc.ts} +1 -1
  188. package/quality/bareErrorScanner.ts +126 -0
  189. package/{maintainabilityBaseline.test.ts → quality/maintainabilityBaseline.test.ts} +73 -0
  190. package/{maintainabilityBaseline.ts → quality/maintainabilityBaseline.ts} +97 -9
  191. package/{maintainabilityContract.test.ts → quality/maintainabilityContract.test.ts} +383 -2
  192. package/{maintainabilityContract.ts → quality/maintainabilityContract.ts} +151 -29
  193. package/{maintainabilityExceptionScanner.test.ts → quality/maintainabilityExceptionScanner.test.ts} +15 -1
  194. package/{maintainabilityExceptionScanner.ts → quality/maintainabilityExceptionScanner.ts} +5 -1
  195. package/{maintainabilityLimits.ts → quality/maintainabilityLimits.ts} +12 -0
  196. package/{maintainabilityReport.ts → quality/maintainabilityReport.ts} +20 -3
  197. package/{qualityScanner.test.ts → quality/qualityScanner.test.ts} +41 -1
  198. package/{qualityScanner.ts → quality/qualityScanner.ts} +25 -91
  199. package/{storeAccessScanner.ts → quality/storeAccessScanner.ts} +15 -2
  200. package/quality/workspaceSourceFiles.ts +82 -0
  201. package/{subspace.test.ts → subspace/subspace.test.ts} +25 -4
  202. package/{subspace.ts → subspace/subspace.ts} +5 -5
  203. package/{subspaceClone.ts → subspace/subspaceClone.ts} +8 -8
  204. package/{subspaceConfig.ts → subspace/subspaceConfig.ts} +5 -1
  205. package/{testHelpers.ts → test/testHelpers.ts} +37 -1
  206. package/transforms/barrelAnalyzer.ts +31 -10
  207. package/transforms/browserDirnamePlugin.test.ts +1 -1
  208. package/transforms/externalizeFrameworkPlugin.test.ts +1 -1
  209. package/transforms/mcpAppPageTrimmer.test.ts +1 -1
  210. package/transforms/pureLazyMarker.test.ts +1 -1
  211. package/transforms/serverEnvPlugin.test.ts +1 -1
  212. package/transforms/serverEnvProfile.test.ts +1 -1
  213. package/transforms/sideEffectImportOrder.test.ts +1 -1
  214. package/transforms/transforms.test.ts +52 -2
  215. package/transforms/tsconfigPackageResolver.test.ts +1 -1
  216. package/{createTunnel.test.ts → tunnel/createTunnel.test.ts} +1 -1
  217. package/{createTunnel.ts → tunnel/createTunnel.ts} +2 -2
  218. package/{sshHostKeys.ts → tunnel/sshHostKeys.ts} +2 -2
  219. package/typecheck/projectTypecheck.test.ts +23 -1
  220. package/typecheck/projectTypecheck.ts +10 -2
  221. package/{typeChecker.test.ts → typecheck/typeChecker.test.ts} +1 -1
  222. package/{typeChecker.ts → typecheck/typeChecker.ts} +5 -4
  223. package/typecheck/typecheck.proc.ts +6 -2
  224. package/typecheck/typecheckFailure.ts +1 -1
  225. package/util/errorReport.ts +66 -0
  226. package/{jsonFormatter.test.ts → util/jsonFormatter.test.ts} +1 -1
  227. package/workflow/constantSource.ts +187 -0
  228. package/workflow/dictionarySource.ts +184 -0
  229. package/workflow/executor.ts +6 -9
  230. package/workflow/fieldExpression.ts +153 -0
  231. package/workflow/fieldLabel.ts +61 -0
  232. package/workflow/fieldOrder.ts +117 -0
  233. package/workflow/fieldType.ts +2 -1
  234. package/workflow/guardCatalog.test.ts +1 -1
  235. package/workflow/keyRename.ts +1 -1
  236. package/workflow/moduleIndex.test.ts +2 -2
  237. package/workflow/moduleIndex.ts +2 -2
  238. package/workflow/modulePaths.ts +27 -0
  239. package/workflow/mutationScaffold.ts +7 -15
  240. package/workflow/mutationSource.ts +2 -1
  241. package/workflow/plan.ts +2 -1
  242. package/workflow/primitiveReport.ts +78 -0
  243. package/workflow/rolloutGate.test.ts +1 -1
  244. package/workflow/rolloutGate.ts +1 -1
  245. package/workflow/serviceSource.ts +33 -0
  246. package/workflow/signalSource.ts +96 -0
  247. package/workflow/source.ts +50 -1100
  248. package/workflow/sourceAst.ts +30 -0
  249. package/workflow/sourceImports.ts +105 -0
  250. package/workflow/sourceText.ts +13 -0
  251. package/workflow/templateSource.ts +30 -0
  252. package/workflow/testSource.ts +31 -0
  253. package/workflow/types.ts +1 -1
  254. package/workflow/uiPolicy.ts +1 -1
  255. package/{appSelectionMemory.ts → workspace/appSelectionMemory.ts} +1 -1
  256. package/{codegenLock.test.ts → workspace/codegenLock.test.ts} +1 -1
  257. package/{dependencyScanner.test.ts → workspace/dependencyScanner.test.ts} +1 -1
  258. package/{dependencyScanner.ts → workspace/dependencyScanner.ts} +2 -2
  259. package/{envSeed.test.ts → workspace/envSeed.test.ts} +2 -2
  260. package/{envSeed.ts → workspace/envSeed.ts} +1 -1
  261. package/{libSource.test.ts → workspace/libSource.test.ts} +2 -2
  262. package/{libSource.ts → workspace/libSource.ts} +1 -1
  263. package/{scanInfo.ts → workspace/scanInfo.ts} +21 -10
  264. package/{slicePlanner.test.ts → workspace/slicePlanner.test.ts} +2 -2
  265. package/{slicePlanner.ts → workspace/slicePlanner.ts} +1 -1
  266. package/{workspaceGraph.test.ts → workspace/workspaceGraph.test.ts} +1 -1
  267. package/{workspaceGraph.ts → workspace/workspaceGraph.ts} +1 -1
  268. package/{workspaceLayout.test.ts → workspace/workspaceLayout.test.ts} +1 -1
  269. package/{workspaceLayout.ts → workspace/workspaceLayout.ts} +3 -1
  270. package/akanContext.ts +0 -1083
  271. package/executors.ts +0 -1749
  272. /package/{applicationBuildReporter.test.ts → app/applicationBuildReporter.test.ts} +0 -0
  273. /package/{akanMcpToolError.ts → context/akanMcpToolError.ts} +0 -0
  274. /package/{moduleFieldNames.test.ts → context/moduleFieldNames.test.ts} +0 -0
  275. /package/{moduleFieldNames.ts → context/moduleFieldNames.ts} +0 -0
  276. /package/{recipeScanner.ts → context/recipeScanner.ts} +0 -0
  277. /package/{declarationReader.ts → docs/declarationReader.ts} +0 -0
  278. /package/{frameworkGraph.ts → docs/frameworkGraph.ts} +0 -0
  279. /package/{biomeBase.ts → lint/biomeBase.ts} +0 -0
  280. /package/{linter.ts → lint/linter.ts} +0 -0
  281. /package/{commentDensityScanner.test.ts → quality/commentDensityScanner.test.ts} +0 -0
  282. /package/{commentDensityScanner.ts → quality/commentDensityScanner.ts} +0 -0
  283. /package/{componentSizeScanner.test.ts → quality/componentSizeScanner.test.ts} +0 -0
  284. /package/{componentSizeScanner.ts → quality/componentSizeScanner.ts} +0 -0
  285. /package/{componentWriteChainScanner.test.ts → quality/componentWriteChainScanner.test.ts} +0 -0
  286. /package/{componentWriteChainScanner.ts → quality/componentWriteChainScanner.ts} +0 -0
  287. /package/{deprecatedCommentScanner.test.ts → quality/deprecatedCommentScanner.test.ts} +0 -0
  288. /package/{deprecatedCommentScanner.ts → quality/deprecatedCommentScanner.ts} +0 -0
  289. /package/{endpointReach.test.ts → quality/endpointReach.test.ts} +0 -0
  290. /package/{endpointReach.ts → quality/endpointReach.ts} +0 -0
  291. /package/{formSetterScanner.test.ts → quality/formSetterScanner.test.ts} +0 -0
  292. /package/{formSetterScanner.ts → quality/formSetterScanner.ts} +0 -0
  293. /package/{kindBranchScanner.test.ts → quality/kindBranchScanner.test.ts} +0 -0
  294. /package/{kindBranchScanner.ts → quality/kindBranchScanner.ts} +0 -0
  295. /package/{maintainabilityReport.test.ts → quality/maintainabilityReport.test.ts} +0 -0
  296. /package/{renderMutationScanner.test.ts → quality/renderMutationScanner.test.ts} +0 -0
  297. /package/{renderMutationScanner.ts → quality/renderMutationScanner.ts} +0 -0
  298. /package/{serviceLoopCallScanner.test.ts → quality/serviceLoopCallScanner.test.ts} +0 -0
  299. /package/{serviceLoopCallScanner.ts → quality/serviceLoopCallScanner.ts} +0 -0
  300. /package/{signalMutationIndex.test.ts → quality/signalMutationIndex.test.ts} +0 -0
  301. /package/{signalMutationIndex.ts → quality/signalMutationIndex.ts} +0 -0
  302. /package/{sourceComments.test.ts → quality/sourceComments.test.ts} +0 -0
  303. /package/{sourceComments.ts → quality/sourceComments.ts} +0 -0
  304. /package/{ssrScanner.test.ts → quality/ssrScanner.test.ts} +0 -0
  305. /package/{ssrScanner.ts → quality/ssrScanner.ts} +0 -0
  306. /package/{storeAccessScanner.test.ts → quality/storeAccessScanner.test.ts} +0 -0
  307. /package/{storeSource.ts → quality/storeSource.ts} +0 -0
  308. /package/{storeWriteScanner.test.ts → quality/storeWriteScanner.test.ts} +0 -0
  309. /package/{storeWriteScanner.ts → quality/storeWriteScanner.ts} +0 -0
  310. /package/{structureScanner.test.ts → quality/structureScanner.test.ts} +0 -0
  311. /package/{structureScanner.ts → quality/structureScanner.ts} +0 -0
  312. /package/{testOnlyExportScanner.test.ts → quality/testOnlyExportScanner.test.ts} +0 -0
  313. /package/{testOnlyExportScanner.ts → quality/testOnlyExportScanner.ts} +0 -0
  314. /package/{writePath.test.ts → quality/writePath.test.ts} +0 -0
  315. /package/{writePath.ts → quality/writePath.ts} +0 -0
  316. /package/{writePlacementScanner.test.ts → quality/writePlacementScanner.test.ts} +0 -0
  317. /package/{writePlacementScanner.ts → quality/writePlacementScanner.ts} +0 -0
  318. /package/{writingActionIndex.test.ts → quality/writingActionIndex.test.ts} +0 -0
  319. /package/{writingActionIndex.ts → quality/writingActionIndex.ts} +0 -0
  320. /package/{subspaceReport.ts → subspace/subspaceReport.ts} +0 -0
  321. /package/{sshTunnel.ts → tunnel/sshTunnel.ts} +0 -0
  322. /package/{fileEditor.ts → util/fileEditor.ts} +0 -0
  323. /package/{fileSys.test.ts → util/fileSys.test.ts} +0 -0
  324. /package/{fileSys.ts → util/fileSys.ts} +0 -0
  325. /package/{jsonFormatter.ts → util/jsonFormatter.ts} +0 -0
  326. /package/{selectModel.ts → util/selectModel.ts} +0 -0
  327. /package/{semver.test.ts → util/semver.test.ts} +0 -0
  328. /package/{semver.ts → util/semver.ts} +0 -0
  329. /package/{shellOnlyEnv.test.ts → util/shellOnlyEnv.test.ts} +0 -0
  330. /package/{shellOnlyEnv.ts → util/shellOnlyEnv.ts} +0 -0
  331. /package/{spinner.test.ts → util/spinner.test.ts} +0 -0
  332. /package/{spinner.ts → util/spinner.ts} +0 -0
  333. /package/{stripAnsi.ts → util/stripAnsi.ts} +0 -0
  334. /package/{codegenLock.ts → workspace/codegenLock.ts} +0 -0
  335. /package/{getRelatedCnsts.ts → workspace/getRelatedCnsts.ts} +0 -0
  336. /package/{gitRevision.test.ts → workspace/gitRevision.test.ts} +0 -0
  337. /package/{gitRevision.ts → workspace/gitRevision.ts} +0 -0
  338. /package/{manifestDependencies.ts → workspace/manifestDependencies.ts} +0 -0
  339. /package/{packageExportsMap.ts → workspace/packageExportsMap.ts} +0 -0
  340. /package/{repoIdentity.ts → workspace/repoIdentity.ts} +0 -0
  341. /package/{types.ts → workspace/types.ts} +0 -0
@@ -11,7 +11,7 @@ language js(typescript, jsx)
11
11
  // closure reaches nothing.
12
12
  //
13
13
  // The client is not missing the load, only this spelling of it: every slice also generates
14
- // `st.do.init<Model><Suffix>` (pkgs/akanjs/store/action.ts), which runs the same two queries and commits
14
+ // `st.do.init<Model><Suffix>` (pkgs/akanjs/store/sliceListActions.ts), which runs the same two queries and commits
15
15
  // them to state.
16
16
  //
17
17
  // Both names are matched by shape, since a lint rule cannot know which slices exist. The generated one is
@@ -2,7 +2,7 @@ import { afterAll, describe, expect, test } from "bun:test";
2
2
  import { mkdirSync, readdirSync, readFileSync, statSync, writeFileSync } from "node:fs";
3
3
  import path from "node:path";
4
4
  import type { AkanBinConfig, BinPlatform } from "../akanConfig";
5
- import { tempDirs } from "../testHelpers";
5
+ import { tempDirs } from "../test/testHelpers";
6
6
  import { DesktopBin } from "./desktopBin";
7
7
 
8
8
  const makeTempRoot = tempDirs("akan-desktop-bin-");
@@ -4,7 +4,7 @@ import { mkdir, readFile, writeFile } from "node:fs/promises";
4
4
  import path from "node:path";
5
5
  import * as nativeApi from "akanjs/native/api";
6
6
  import { AkanAppConfig } from "../akanConfig";
7
- import { tempDirs } from "../testHelpers";
7
+ import { tempDirs } from "../test/testHelpers";
8
8
  import type { DesktopArch } from "./desktopBin";
9
9
  import { DesktopRelease, type SignatureTool } from "./desktopRelease";
10
10
  import type { DesktopPlatform } from "./mobileTarget";
@@ -3,8 +3,8 @@ import { mkdir, writeFile } from "node:fs/promises";
3
3
  import path from "node:path";
4
4
  import { AkanAppConfig } from "../akanConfig";
5
5
  import type { App } from "../commandDecorators";
6
- import { tempDirs, writeText as write } from "../testHelpers";
7
- import type { PackageJson } from "../types";
6
+ import { tempDirs, writeText as write } from "../test/testHelpers";
7
+ import type { PackageJson } from "../workspace/types";
8
8
  import { DesktopServerStage } from "./desktopServerStage";
9
9
  import { NativeApi } from "./nativeApi";
10
10
  import { NativeApp } from "./nativeApp";
@@ -5,7 +5,7 @@ import type { ServerPolicy } from "akanjs/native/api";
5
5
  import { BUILD_ENV_FILE } from "akanjs/server/lifecycle/buildEnv";
6
6
  import type { AkanAppConfig, NativeEnv } from "../akanConfig";
7
7
  import type { App } from "../commandDecorators";
8
- import type { PackageJson } from "../types";
8
+ import type { PackageJson } from "../workspace/types";
9
9
  import { DesktopBin } from "./desktopBin";
10
10
 
11
11
  /** What a desktop build hands the native runtime as `desktop.server`. */
@@ -1,7 +1,7 @@
1
1
  import { describe, expect, test } from "bun:test";
2
2
  import { mkdir, realpath, writeFile } from "node:fs/promises";
3
3
  import path from "node:path";
4
- import { tempDirs } from "../testHelpers";
4
+ import { tempDirs } from "../test/testHelpers";
5
5
  import { NativeApi } from "./nativeApi";
6
6
 
7
7
  const makeTempRoot = tempDirs("akan-native-api-");
@@ -4,7 +4,7 @@ import type { AkanPlugin } from "akanjs";
4
4
  import type { AkanNativeTarget } from "../akanConfig";
5
5
  import type { App } from "../commandDecorators";
6
6
  import { CsrArtifactBuilder } from "../frontendBuild/csrArtifactBuilder";
7
- import { tempDirs, writeText } from "../testHelpers";
7
+ import { tempDirs, writeText } from "../test/testHelpers";
8
8
  import { NativeApp } from "./nativeApp";
9
9
  import { NativeConfig } from "./nativeConfig";
10
10
  import { NativePublicEnv } from "./nativePublicEnv";
@@ -5,7 +5,7 @@ import path from "node:path";
5
5
  import { buildCsp, cspHash, parseCsp } from "../../native/packages/cli/src/lib/csp";
6
6
  import { rewriteDevHtml } from "../../native/packages/cli/src/lib/hmr";
7
7
  import type { AkanNativeTarget } from "../akanConfig";
8
- import { tempDirs } from "../testHelpers";
8
+ import { tempDirs } from "../test/testHelpers";
9
9
  import { NativeApi } from "./nativeApi";
10
10
  import { NativeConfig } from "./nativeConfig";
11
11
 
@@ -2,7 +2,7 @@ import { describe, expect, test } from "bun:test";
2
2
  import { mkdir, writeFile } from "node:fs/promises";
3
3
  import path from "node:path";
4
4
  import type { App } from "../commandDecorators";
5
- import { tempDirs } from "../testHelpers";
5
+ import { tempDirs } from "../test/testHelpers";
6
6
  import { NativePluginFolders } from "./nativePluginFolders";
7
7
 
8
8
  const makeTempRoot = tempDirs("akan-native-plugin-folders-");
@@ -2,7 +2,7 @@ import { afterEach, describe, expect, test } from "bun:test";
2
2
  import { createHash } from "node:crypto";
3
3
  import path from "node:path";
4
4
  import { WorkspaceExecutor } from "../executors";
5
- import { tempDirs, writeText } from "../testHelpers";
5
+ import { tempDirs, writeText } from "../test/testHelpers";
6
6
  import { NativePublicEnv } from "./nativePublicEnv";
7
7
 
8
8
  const makeTempRoot = tempDirs("akan-native-public-env-");
@@ -2,7 +2,7 @@ import { describe, expect, test } from "bun:test";
2
2
  import { mkdir, writeFile } from "node:fs/promises";
3
3
  import path from "node:path";
4
4
  import type { AkanNativeTarget } from "../akanConfig";
5
- import { tempDirs } from "../testHelpers";
5
+ import { tempDirs } from "../test/testHelpers";
6
6
  import { NativeWebDir } from "./nativeWebDir";
7
7
 
8
8
  const makeTempRoot = tempDirs("akan-native-web-");
@@ -1,6 +1,6 @@
1
1
  import { describe, expect, test } from "bun:test";
2
2
  import path from "node:path";
3
- import { tempDirs, writeText as write } from "../testHelpers";
3
+ import { tempDirs, writeText as write } from "../test/testHelpers";
4
4
  import { ServerBundleSecrets } from "./serverBundleSecrets";
5
5
 
6
6
  const makeTempRoot = tempDirs("akan-devkit-server-bundle-secrets-");
@@ -2,7 +2,7 @@ import { describe, expect, test } from "bun:test";
2
2
  import { createHash } from "node:crypto";
3
3
  import { mkdir, readFile } from "node:fs/promises";
4
4
  import path from "node:path";
5
- import { tempDirs } from "../testHelpers";
5
+ import { tempDirs } from "../test/testHelpers";
6
6
  import { TarWriter } from "./tarWriter";
7
7
 
8
8
  const makeDir = tempDirs("akan-tar-writer-");
@@ -1,6 +1,6 @@
1
1
  import { describe, expect, test } from "bun:test";
2
2
  import path from "node:path";
3
- import { tempDirs, writeText } from "../testHelpers";
3
+ import { tempDirs, writeText } from "../test/testHelpers";
4
4
  import { UpdatePackFolder } from "./updatePackFolder";
5
5
 
6
6
  const makeTempRoot = tempDirs("akan-update-pack-");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@akanjs/devkit",
3
- "version": "3.2.0-rc.9",
3
+ "version": "3.3.0-rc.0",
4
4
  "sourceType": "module",
5
5
  "type": "module",
6
6
  "publishConfig": {
@@ -37,20 +37,184 @@
37
37
  "./preview": "./preview/index.ts",
38
38
  "./transforms": "./transforms/index.ts",
39
39
  "./workflow": "./workflow/index.ts",
40
+ "./abstractDoc": "./quality/abstractDoc.ts",
41
+ "./abstractDoc.ts": "./quality/abstractDoc.ts",
42
+ "./agentAssets": "./guideline/agentAssets.ts",
43
+ "./agentAssets.ts": "./guideline/agentAssets.ts",
44
+ "./agentsIndex": "./guideline/agentsIndex.ts",
45
+ "./agentsIndex.ts": "./guideline/agentsIndex.ts",
46
+ "./akanContext": "./context/akanContext.ts",
47
+ "./akanContext.ts": "./context/akanContext.ts",
48
+ "./akanMcpContract": "./context/akanMcpContract.ts",
49
+ "./akanMcpContract.ts": "./context/akanMcpContract.ts",
50
+ "./akanMcpToolError": "./context/akanMcpToolError.ts",
51
+ "./akanMcpToolError.ts": "./context/akanMcpToolError.ts",
52
+ "./apiReference": "./docs/apiReference.ts",
53
+ "./apiReference.ts": "./docs/apiReference.ts",
54
+ "./appSelectionMemory": "./workspace/appSelectionMemory.ts",
55
+ "./appSelectionMemory.ts": "./workspace/appSelectionMemory.ts",
56
+ "./applicationBuildReporter": "./app/applicationBuildReporter.ts",
57
+ "./applicationBuildReporter.ts": "./app/applicationBuildReporter.ts",
58
+ "./applicationBuildRunner": "./app/applicationBuildRunner.ts",
59
+ "./applicationBuildRunner.ts": "./app/applicationBuildRunner.ts",
60
+ "./applicationTestPreload": "./app/applicationTestPreload.ts",
61
+ "./applicationTestPreload.ts": "./app/applicationTestPreload.ts",
62
+ "./bareErrorScanner": "./quality/bareErrorScanner.ts",
63
+ "./bareErrorScanner.ts": "./quality/bareErrorScanner.ts",
64
+ "./biomeBase": "./lint/biomeBase.ts",
65
+ "./biomeBase.ts": "./lint/biomeBase.ts",
66
+ "./codegenLock": "./workspace/codegenLock.ts",
67
+ "./codegenLock.ts": "./workspace/codegenLock.ts",
68
+ "./commentDensityScanner": "./quality/commentDensityScanner.ts",
69
+ "./commentDensityScanner.ts": "./quality/commentDensityScanner.ts",
70
+ "./componentSizeScanner": "./quality/componentSizeScanner.ts",
71
+ "./componentSizeScanner.ts": "./quality/componentSizeScanner.ts",
72
+ "./componentWriteChainScanner": "./quality/componentWriteChainScanner.ts",
73
+ "./componentWriteChainScanner.ts": "./quality/componentWriteChainScanner.ts",
74
+ "./conventionSet": "./guideline/conventionSet.ts",
75
+ "./conventionSet.ts": "./guideline/conventionSet.ts",
76
+ "./createTunnel": "./tunnel/createTunnel.ts",
77
+ "./createTunnel.ts": "./tunnel/createTunnel.ts",
78
+ "./declarationReader": "./docs/declarationReader.ts",
79
+ "./declarationReader.ts": "./docs/declarationReader.ts",
80
+ "./dependencyScanner": "./workspace/dependencyScanner.ts",
81
+ "./dependencyScanner.ts": "./workspace/dependencyScanner.ts",
82
+ "./deprecatedCommentScanner": "./quality/deprecatedCommentScanner.ts",
83
+ "./deprecatedCommentScanner.ts": "./quality/deprecatedCommentScanner.ts",
84
+ "./endpointReach": "./quality/endpointReach.ts",
85
+ "./endpointReach.ts": "./quality/endpointReach.ts",
86
+ "./envSeed": "./workspace/envSeed.ts",
87
+ "./envSeed.ts": "./workspace/envSeed.ts",
88
+ "./errorCodeReference": "./docs/errorCodeReference.ts",
89
+ "./errorCodeReference.ts": "./docs/errorCodeReference.ts",
90
+ "./errorCodeScan": "./docs/errorCodeScan.ts",
91
+ "./errorCodeScan.ts": "./docs/errorCodeScan.ts",
92
+ "./executors": "./executors/index.ts",
93
+ "./executors.ts": "./executors/index.ts",
94
+ "./fileEditor": "./util/fileEditor.ts",
95
+ "./fileEditor.ts": "./util/fileEditor.ts",
96
+ "./fileSys": "./util/fileSys.ts",
97
+ "./fileSys.ts": "./util/fileSys.ts",
98
+ "./formSetterScanner": "./quality/formSetterScanner.ts",
99
+ "./formSetterScanner.ts": "./quality/formSetterScanner.ts",
100
+ "./frameworkGraph": "./docs/frameworkGraph.ts",
101
+ "./frameworkGraph.ts": "./docs/frameworkGraph.ts",
102
+ "./getRelatedCnsts": "./workspace/getRelatedCnsts.ts",
103
+ "./getRelatedCnsts.ts": "./workspace/getRelatedCnsts.ts",
104
+ "./gitRevision": "./workspace/gitRevision.ts",
105
+ "./gitRevision.ts": "./workspace/gitRevision.ts",
106
+ "./jsonFormatter": "./util/jsonFormatter.ts",
107
+ "./jsonFormatter.ts": "./util/jsonFormatter.ts",
108
+ "./kindBranchScanner": "./quality/kindBranchScanner.ts",
109
+ "./kindBranchScanner.ts": "./quality/kindBranchScanner.ts",
110
+ "./libSource": "./workspace/libSource.ts",
111
+ "./libSource.ts": "./workspace/libSource.ts",
112
+ "./linter": "./lint/linter.ts",
113
+ "./linter.ts": "./lint/linter.ts",
114
+ "./maintainabilityBaseline": "./quality/maintainabilityBaseline.ts",
115
+ "./maintainabilityBaseline.ts": "./quality/maintainabilityBaseline.ts",
116
+ "./maintainabilityContract": "./quality/maintainabilityContract.ts",
117
+ "./maintainabilityContract.ts": "./quality/maintainabilityContract.ts",
118
+ "./maintainabilityExceptionScanner": "./quality/maintainabilityExceptionScanner.ts",
119
+ "./maintainabilityExceptionScanner.ts": "./quality/maintainabilityExceptionScanner.ts",
120
+ "./maintainabilityLimits": "./quality/maintainabilityLimits.ts",
121
+ "./maintainabilityLimits.ts": "./quality/maintainabilityLimits.ts",
122
+ "./maintainabilityReport": "./quality/maintainabilityReport.ts",
123
+ "./maintainabilityReport.ts": "./quality/maintainabilityReport.ts",
124
+ "./manifestDependencies": "./workspace/manifestDependencies.ts",
125
+ "./manifestDependencies.ts": "./workspace/manifestDependencies.ts",
126
+ "./moduleFieldNames": "./context/moduleFieldNames.ts",
127
+ "./moduleFieldNames.ts": "./context/moduleFieldNames.ts",
128
+ "./packageExportsMap": "./workspace/packageExportsMap.ts",
129
+ "./packageExportsMap.ts": "./workspace/packageExportsMap.ts",
130
+ "./prompter": "./guideline/prompter.ts",
131
+ "./prompter.ts": "./guideline/prompter.ts",
132
+ "./qualityScanner": "./quality/qualityScanner.ts",
133
+ "./qualityScanner.ts": "./quality/qualityScanner.ts",
134
+ "./recipeScanner": "./context/recipeScanner.ts",
135
+ "./recipeScanner.ts": "./context/recipeScanner.ts",
136
+ "./renderMutationScanner": "./quality/renderMutationScanner.ts",
137
+ "./renderMutationScanner.ts": "./quality/renderMutationScanner.ts",
138
+ "./repoIdentity": "./workspace/repoIdentity.ts",
139
+ "./repoIdentity.ts": "./workspace/repoIdentity.ts",
140
+ "./routeJsBudget": "./app/routeJsBudget.ts",
141
+ "./routeJsBudget.ts": "./app/routeJsBudget.ts",
142
+ "./routeSourceValidator": "./app/routeSourceValidator.ts",
143
+ "./routeSourceValidator.ts": "./app/routeSourceValidator.ts",
144
+ "./scanInfo": "./workspace/scanInfo.ts",
145
+ "./scanInfo.ts": "./workspace/scanInfo.ts",
146
+ "./selectModel": "./util/selectModel.ts",
147
+ "./selectModel.ts": "./util/selectModel.ts",
148
+ "./semver": "./util/semver.ts",
149
+ "./semver.ts": "./util/semver.ts",
150
+ "./serviceLoopCallScanner": "./quality/serviceLoopCallScanner.ts",
151
+ "./serviceLoopCallScanner.ts": "./quality/serviceLoopCallScanner.ts",
152
+ "./shellOnlyEnv": "./util/shellOnlyEnv.ts",
153
+ "./shellOnlyEnv.ts": "./util/shellOnlyEnv.ts",
154
+ "./signalMutationIndex": "./quality/signalMutationIndex.ts",
155
+ "./signalMutationIndex.ts": "./quality/signalMutationIndex.ts",
156
+ "./slicePlanner": "./workspace/slicePlanner.ts",
157
+ "./slicePlanner.ts": "./workspace/slicePlanner.ts",
158
+ "./sourceComments": "./quality/sourceComments.ts",
159
+ "./sourceComments.ts": "./quality/sourceComments.ts",
160
+ "./spinner": "./util/spinner.ts",
161
+ "./spinner.ts": "./util/spinner.ts",
162
+ "./sshHostKeys": "./tunnel/sshHostKeys.ts",
163
+ "./sshHostKeys.ts": "./tunnel/sshHostKeys.ts",
164
+ "./sshTunnel": "./tunnel/sshTunnel.ts",
165
+ "./sshTunnel.ts": "./tunnel/sshTunnel.ts",
166
+ "./ssrScanner": "./quality/ssrScanner.ts",
167
+ "./ssrScanner.ts": "./quality/ssrScanner.ts",
168
+ "./storeAccessScanner": "./quality/storeAccessScanner.ts",
169
+ "./storeAccessScanner.ts": "./quality/storeAccessScanner.ts",
170
+ "./storeSource": "./quality/storeSource.ts",
171
+ "./storeSource.ts": "./quality/storeSource.ts",
172
+ "./storeWriteScanner": "./quality/storeWriteScanner.ts",
173
+ "./storeWriteScanner.ts": "./quality/storeWriteScanner.ts",
174
+ "./stripAnsi": "./util/stripAnsi.ts",
175
+ "./stripAnsi.ts": "./util/stripAnsi.ts",
176
+ "./structureScanner": "./quality/structureScanner.ts",
177
+ "./structureScanner.ts": "./quality/structureScanner.ts",
178
+ "./subspace": "./subspace/subspace.ts",
179
+ "./subspace.ts": "./subspace/subspace.ts",
180
+ "./subspaceClone": "./subspace/subspaceClone.ts",
181
+ "./subspaceClone.ts": "./subspace/subspaceClone.ts",
182
+ "./subspaceConfig": "./subspace/subspaceConfig.ts",
183
+ "./subspaceConfig.ts": "./subspace/subspaceConfig.ts",
184
+ "./subspaceReport": "./subspace/subspaceReport.ts",
185
+ "./subspaceReport.ts": "./subspace/subspaceReport.ts",
186
+ "./testHelpers": "./test/testHelpers.ts",
187
+ "./testHelpers.ts": "./test/testHelpers.ts",
188
+ "./testOnlyExportScanner": "./quality/testOnlyExportScanner.ts",
189
+ "./testOnlyExportScanner.ts": "./quality/testOnlyExportScanner.ts",
190
+ "./typeChecker": "./typecheck/typeChecker.ts",
191
+ "./typeChecker.ts": "./typecheck/typeChecker.ts",
192
+ "./types": "./workspace/types.ts",
193
+ "./types.ts": "./workspace/types.ts",
194
+ "./workspaceGraph": "./workspace/workspaceGraph.ts",
195
+ "./workspaceGraph.ts": "./workspace/workspaceGraph.ts",
196
+ "./workspaceLayout": "./workspace/workspaceLayout.ts",
197
+ "./workspaceLayout.ts": "./workspace/workspaceLayout.ts",
198
+ "./writePath": "./quality/writePath.ts",
199
+ "./writePath.ts": "./quality/writePath.ts",
200
+ "./writePlacementScanner": "./quality/writePlacementScanner.ts",
201
+ "./writePlacementScanner.ts": "./quality/writePlacementScanner.ts",
202
+ "./writingActionIndex": "./quality/writingActionIndex.ts",
203
+ "./writingActionIndex.ts": "./quality/writingActionIndex.ts",
40
204
  "./*.ts": "./*.ts",
41
205
  "./*": "./*.ts"
42
206
  },
43
207
  "dependencies": {
44
- "@akanjs/language": "3.2.0-rc.9",
45
- "@earendil-works/pi-agent-core": "1.3.0",
46
- "@earendil-works/pi-ai": "1.3.0",
47
- "@earendil-works/pi-codemode": "1.3.0",
48
- "@earendil-works/pi-coding-agent": "1.3.0",
49
- "@earendil-works/pi-mcp": "1.3.0",
50
- "@earendil-works/pi-tui": "1.3.0",
208
+ "@akanjs/language": "3.3.0-rc.0",
209
+ "@earendil-works/pi-agent-core": "1.5.2",
210
+ "@earendil-works/pi-ai": "1.5.2",
211
+ "@earendil-works/pi-codemode": "1.5.2",
212
+ "@earendil-works/pi-coding-agent": "1.5.2",
213
+ "@earendil-works/pi-mcp": "1.5.2",
214
+ "@earendil-works/pi-tui": "1.5.2",
51
215
  "@inquirer/prompts": "^8.7.3",
52
216
  "@tailwindcss/node": "^4.3.3",
53
- "akanjs": "3.2.0-rc.9",
217
+ "akanjs": "3.3.0-rc.0",
54
218
  "chalk": "^6.0.1",
55
219
  "commander": "^15.0.0",
56
220
  "dayjs": "^1.11.23",
@@ -1,7 +1,7 @@
1
1
  import { describe, expect, test } from "bun:test";
2
2
  import { existsSync } from "node:fs";
3
3
  import path from "node:path";
4
- import { PackageExportsMap } from "@akanjs/devkit/packageExportsMap";
4
+ import { PackageExportsMap } from "@akanjs/devkit/workspace/packageExportsMap";
5
5
 
6
6
  //? The monorepo resolves subpaths through tsconfig `paths`, which probe extensions; a published consumer goes through
7
7
  //? the exports map, matched exactly — so `"./*": "./*"` passed every test here and broke every installed subpath.
@@ -41,7 +41,9 @@ describe("published exports map", () => {
41
41
 
42
42
  test("covers both facet shapes and keeps explicit extensions intact", () => {
43
43
  // One wildcard cannot serve bare files, directory facets and already-suffixed specifiers (no `.ts.ts`) at once.
44
- expect(exportsMap.resolve("./executors")).toBe("./executors.ts");
44
+ expect(exportsMap.resolve("./executors")).toBe("./executors/index.ts");
45
+ expect(exportsMap.resolve("./fileSys")).toBe("./util/fileSys.ts");
46
+ expect(exportsMap.resolve("./workspaceLayout.ts")).toBe("./workspace/workspaceLayout.ts");
45
47
  expect(exportsMap.resolve("./frontendBuild")).toBe("./frontendBuild/index.ts");
46
48
  expect(exportsMap.resolve("./cloud/cloudApi.ts")).toBe("./cloud/cloudApi.ts");
47
49
  expect(exportsMap.resolve("./package.json")).toBe("./package.json");
@@ -55,4 +57,20 @@ describe("published exports map", () => {
55
57
  );
56
58
  expect(missing).toEqual([]);
57
59
  });
60
+
61
+ test("points every literal entry at a file, so a subpath the root once held still loads from its folder", async () => {
62
+ const manifest = (await Bun.file(path.join(packageDir, "package.json")).json()) as {
63
+ exports: Record<string, unknown>;
64
+ };
65
+ const literals = Object.keys(manifest.exports).filter((subpath) => !subpath.includes("*"));
66
+ expect(literals.length).toBeGreaterThan(100);
67
+ expect(exportsMap.findUnreachable(literals)).toEqual([]);
68
+ });
69
+
70
+ test("keeps every source out of the package root but its type barrel", () => {
71
+ const loose = [...new Bun.Glob("*.{ts,tsx}").scanSync({ cwd: packageDir })].filter(
72
+ (file) => file !== "index.ts" && !file.endsWith(".test.ts"),
73
+ );
74
+ expect(loose).toEqual([]);
75
+ });
58
76
  });
@@ -1,6 +1,6 @@
1
1
  import { describe, expect, test } from "bun:test";
2
2
  import path from "node:path";
3
- import type { PackageJson } from "@akanjs/devkit/types";
3
+ import type { PackageJson } from "@akanjs/devkit/workspace/types";
4
4
 
5
5
  //? PackageRunner re-declares pi's sibling pins because neither our `overrides` nor pi's own ranges reach a
6
6
  //? consumer's install. The source of truth is pi's `dependencies`: since 1.3.0 it pins every sibling exactly, where
@@ -5,8 +5,8 @@ import type { PipelineDiagnostic, PipelinePlanContext, PipelinePlanResult } from
5
5
  import { toError } from "akanjs/common";
6
6
  import { AkanAppConfig, AkanWorkspaceConfig } from "../akanConfig";
7
7
  import { AppExecutor, type WorkspaceExecutor } from "../executors";
8
- import { FileSys } from "../fileSys";
9
8
  import { resolveMobileTargets } from "../mobile/mobileTarget";
9
+ import { FileSys } from "../util/fileSys";
10
10
  import { PipelineCompiler, type PipelineNativeTargets, type PipelineSourceFile } from "./PipelineCompiler";
11
11
 
12
12
  /**
@@ -1,7 +1,7 @@
1
1
  import { describe, expect, test } from "bun:test";
2
2
  import { readFile } from "node:fs/promises";
3
3
  import path from "node:path";
4
- import { tempDirs } from "../testHelpers";
4
+ import { tempDirs } from "../test/testHelpers";
5
5
  import { IdleWatchedProcess } from "./IdleWatchedProcess";
6
6
 
7
7
  const makeRoot = tempDirs("akan-idle-watch-");
@@ -63,7 +63,7 @@ export class LinuxDockerTarget extends PlatformTestTarget {
63
63
  if (started.exitCode !== 0) throw new Error(`docker run failed: ${started.stderr.trim()}`);
64
64
  this.#container = container;
65
65
  const extract = await this.exec(
66
- `tar -xf /io/${path.basename(context.snapshot.tarPath)} -C /w && cp /io-env /w/.env && git -C /w init -q`,
66
+ `tar -xf /io/${path.basename(context.snapshot.tarPath)} -C /w && cp /io-env /w/.env && git -C /w init -q && git -C /w add -A`,
67
67
  path.join(context.logDir, this.platform, "extract.log"),
68
68
  PlatformTestTarget.installIdleMs,
69
69
  );
@@ -1,7 +1,7 @@
1
1
  import { describe, expect, test } from "bun:test";
2
2
  import { writeFile } from "node:fs/promises";
3
3
  import path from "node:path";
4
- import { tempDirs } from "../testHelpers";
4
+ import { tempDirs } from "../test/testHelpers";
5
5
  import { BunTestReport } from "./BunTestReport";
6
6
  import { PlatformTestRun } from "./PlatformTestRun";
7
7
  import type { PackageTestResult, PlatformTestResult } from "./PlatformTestTarget";
@@ -1,7 +1,7 @@
1
1
  import { describe, expect, test } from "bun:test";
2
2
  import { unlink } from "node:fs/promises";
3
3
  import path from "node:path";
4
- import { tempDirs, writeText } from "../testHelpers";
4
+ import { tempDirs, writeText } from "../test/testHelpers";
5
5
  import { TestSnapshot } from "./TestSnapshot";
6
6
 
7
7
  const makeRoot = tempDirs("akan-snapshot-");
@@ -57,7 +57,7 @@ export class WindowsSshTarget extends PlatformTestTarget {
57
57
  if (copied.exitCode !== 0) throw new Error(`scp ${remoteName} failed: ${copied.stderr.trim()}`);
58
58
  }
59
59
  const extract = await this.exec(
60
- "tar -xf ..\\src.tar && copy /Y ..\\env .env >nul && git init -q",
60
+ "tar -xf ..\\src.tar && copy /Y ..\\env .env >nul && git init -q && git add -A",
61
61
  path.join(context.logDir, this.platform, "extract.log"),
62
62
  PlatformTestTarget.installIdleMs,
63
63
  );
@@ -1,4 +1,4 @@
1
- import { describe, expect, test } from "bun:test";
1
+ import { beforeAll, describe, expect, test } from "bun:test";
2
2
  import { chmod, mkdtemp, rm, writeFile } from "node:fs/promises";
3
3
  import { tmpdir } from "node:os";
4
4
  import path from "node:path";
@@ -9,6 +9,21 @@ const serve = (html: string, status = 200) =>
9
9
  Bun.serve({ port: 0, fetch: () => new Response(html, { status, headers: { "content-type": "text/html" } }) });
10
10
 
11
11
  const browserTestMs = PreviewView.startTimeoutMs + 30_000;
12
+ //? Chrome starts once per process and took ~35 s on a cold CI runner: one stuck past this is killed and started again.
13
+ const browserStartDeadlineMs = 45_000;
14
+
15
+ const startBrowser = async () => {
16
+ const open = () =>
17
+ PreviewView.probe("about:blank", { startTimeoutMs: browserStartDeadlineMs, timeoutMs: browserStartDeadlineMs });
18
+ try {
19
+ await open();
20
+ } catch (error) {
21
+ if (!(error instanceof Error) || !error.message.startsWith("Timed out starting")) throw error;
22
+ Bun.WebView.closeAll();
23
+ await Bun.sleep(100);
24
+ await open();
25
+ }
26
+ };
12
27
  const slowChromeRuns = PreviewView.isAvailable("chrome") && process.platform !== "win32";
13
28
 
14
29
  const withSlowChrome = async (body: string, startSeconds = 3) => {
@@ -46,6 +61,13 @@ const withSlowChrome = async (body: string, startSeconds = 3) => {
46
61
  };
47
62
 
48
63
  describe("PreviewView", () => {
64
+ beforeAll(
65
+ async () => {
66
+ if (PreviewView.available) await startBrowser();
67
+ },
68
+ browserStartDeadlineMs * 2 + 5_000,
69
+ );
70
+
49
71
  test("reports whether this Bun build can drive a headless page at all", () => {
50
72
  expect(typeof PreviewView.available).toBe("boolean");
51
73
  });
@@ -1,8 +1,8 @@
1
1
  import { describe, expect, test } from "bun:test";
2
2
  import path from "node:path";
3
+ import { AppExecutor, WorkspaceExecutor } from "../executors";
4
+ import { tempDirs, writeText } from "../test/testHelpers";
3
5
  import { AbstractDoc } from "./abstractDoc";
4
- import { AppExecutor, WorkspaceExecutor } from "./executors";
5
- import { tempDirs, writeText } from "./testHelpers";
6
6
 
7
7
  const makeTempRoot = tempDirs("akan-abstract-doc-");
8
8
 
@@ -1,5 +1,5 @@
1
1
  import path from "node:path";
2
- import type { SysExecutor } from "./executors";
2
+ import type { SysExecutor } from "../executors";
3
3
 
4
4
  export type AbstractKind = "domain" | "service" | "scalar" | "other";
5
5