@akanjs/cli 3.1.1-rc.8 → 3.1.1

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 (184) hide show
  1. package/.build-stamp +1 -1
  2. package/CodeAgent-35wnb7w5.js +9 -0
  3. package/{CodeTui-rqxarxsn.js → CodeTui-h6yz2kvq.js} +1 -1
  4. package/TunnelShare-xyjpa7gx.js +14 -0
  5. package/agent.command-3r4jsck8.js +46 -0
  6. package/akanCode.js +10 -6
  7. package/{application.command-14xsthcr.js → application.command-g7xv6ad0.js} +46 -13
  8. package/{applicationBuildRunner-t2r84sz6.js → applicationBuildRunner-qvjnhr9j.js} +9 -6
  9. package/buildBatch.proc.js +6 -6
  10. package/{cloud.command-rmw1kcf1.js → cloud.command-6ebygmhw.js} +17 -15
  11. package/cloud.script-0s1jybd5.js +26 -0
  12. package/{code.command-719k3e9q.js → code.command-mpkm2emr.js} +6 -6
  13. package/commandManifest.json +1 -1
  14. package/{context.command-c4t4z1vy.js → context.command-svdh6b2w.js} +18 -17
  15. package/context.runner-ch0z3a8g.js +26 -0
  16. package/{devTui-q7k7bakd.js → devTui-evr3b35y.js} +1 -1
  17. package/{guideline.command-snh85ctf.js → guideline.command-qwp3tnjx.js} +3 -3
  18. package/guidelines/conventions/core.md +106 -0
  19. package/guidelines/conventions/rules/app.md +83 -0
  20. package/guidelines/conventions/rules/auth.md +45 -0
  21. package/guidelines/conventions/rules/config.md +56 -0
  22. package/guidelines/conventions/rules/constant.md +24 -0
  23. package/guidelines/conventions/rules/gates.md +31 -0
  24. package/guidelines/conventions/rules/layer.md +25 -0
  25. package/guidelines/conventions/rules/migration.md +27 -0
  26. package/guidelines/conventions/rules/module.md +90 -0
  27. package/guidelines/conventions/rules/page.md +56 -0
  28. package/guidelines/conventions/rules/sensitive.md +16 -0
  29. package/guidelines/conventions/rules/server.md +86 -0
  30. package/guidelines/conventions/rules/ssr.md +47 -0
  31. package/guidelines/conventions/rules/style.md +43 -0
  32. package/guidelines/conventions/rules/test.md +34 -0
  33. package/guidelines/conventions/rules/ts.md +95 -0
  34. package/guidelines/conventions/rules/tsx.md +75 -0
  35. package/guidelines/mcpRule/mcpRule.instruction.md +1 -1
  36. package/guidelines/pageRule/pageRule.instruction.md +4 -3
  37. package/guidelines/queryRule/queryRule.instruction.md +4 -0
  38. package/guidelines/workspaceRecipes/workspaceRecipes.instruction.md +3 -3
  39. package/incrementalBuilder.proc.js +6 -6
  40. package/{index-pcwzkdqb.js → index-1p0qbq3m.js} +1 -1
  41. package/{index-xb8809yb.js → index-1shvxzt0.js} +3 -3
  42. package/{index-8w76g4rm.js → index-266dewjs.js} +11 -11
  43. package/{index-5max10jx.js → index-3yz30c07.js} +72 -53
  44. package/{index-xjf5j657.js → index-4mj92tsh.js} +952 -47
  45. package/index-4pdts00b.js +1604 -0
  46. package/{index-42j4a8zq.js → index-8559hsz4.js} +4 -3
  47. package/{index-wcej7g4z.js → index-8scw1pjk.js} +93 -23
  48. package/{index-5phjb48k.js → index-96wzdhfh.js} +74 -233
  49. package/index-9bv479q5.js +1 -0
  50. package/index-9rvcs76p.js +653 -0
  51. package/index-am36s3jh.js +3582 -0
  52. package/index-b8c289dx.js +444 -0
  53. package/{index-espk51ah.js → index-dd44g6vz.js} +3 -3
  54. package/{index-3wypz6xj.js → index-eja64h28.js} +7 -3
  55. package/index-fbewhg4g.js +590 -0
  56. package/index-jje9qzyq.js +27 -0
  57. package/{index-j9vyj3dj.js → index-k5jbcxyh.js} +3 -3
  58. package/{index-hmmv2cah.js → index-ksfgqq1x.js} +1 -1
  59. package/index-m5n3ka0p.js +18 -0
  60. package/{index-5nd1wtkv.js → index-p6x5b7hr.js} +1 -1
  61. package/{index-0p37cz91.js → index-payhwt51.js} +21 -29
  62. package/{index-myc22sgv.js → index-qkkdhjm6.js} +5 -4
  63. package/{index-74tjjsnc.js → index-qxzrp5xt.js} +33 -37
  64. package/{index-zrte51fn.js → index-r0k3ham2.js} +4 -4
  65. package/{index-hmt54t45.js → index-r2w2eh93.js} +4 -4
  66. package/index-r2wedvqn.js +138 -0
  67. package/{index-skk9zc1x.js → index-rnphv731.js} +2 -2
  68. package/{index-pa3c2mb8.js → index-s6da8ta9.js} +82 -1227
  69. package/index-tenw3mah.js +225 -0
  70. package/{index-31es1yev.js → index-tgt2fnd6.js} +107 -6
  71. package/{index-8ap5z1n5.js → index-vxmy1p4f.js} +16 -36
  72. package/{index-mdqr41sp.js → index-w4k2ragk.js} +7 -7
  73. package/{index-qd5km521.js → index-w7q6h97v.js} +1 -1
  74. package/{index-dy0jx9ay.js → index-wwe9rsrx.js} +14 -0
  75. package/{index-2xcc2ax5.js → index-xq543a5y.js} +2 -2
  76. package/{index-0fz95kxe.js → index-xqgwjz7a.js} +1 -1
  77. package/{index-40brg4px.js → index-xxfy1jp2.js} +4 -4
  78. package/{index-905qdgqp.js → index-z4b84y6k.js} +1 -1
  79. package/index-zcf6k8a5.js +410 -0
  80. package/index.js +23 -22
  81. package/{library.command-gycrwhf1.js → library.command-2853y6mk.js} +3 -3
  82. package/{localRegistry.command-2t3fghje.js → localRegistry.command-76ds31p4.js} +19 -15
  83. package/{module.command-v6hgs1bc.js → module.command-yfnb0abs.js} +5 -5
  84. package/{package.command-shzpcfph.js → package.command-d9s86hp9.js} +3 -3
  85. package/package.json +2 -2
  86. package/{page.command-ptxn5kqk.js → page.command-6a8a8rd1.js} +3 -3
  87. package/{pipeline.command-zz31pgax.js → pipeline.command-rt3rwd2z.js} +2 -2
  88. package/{primitive.command-a1vse91z.js → primitive.command-emcebgrq.js} +6 -6
  89. package/{projectTypecheck-2ztky9cf.js → projectTypecheck-51m7eh1f.js} +1 -1
  90. package/{prompter-76k56b37.js → prompter-hgcta8pb.js} +1 -1
  91. package/quality.command-xtrk0n3x.js +76 -0
  92. package/{repair.command-cvazbz99.js → repair.command-51szxnxx.js} +5 -5
  93. package/{routeSourceValidator-6jd0q6r6.js → routeSourceValidator-4h947v7c.js} +13 -3
  94. package/{scalar.command-0acvyp26.js → scalar.command-8qv27t82.js} +4 -4
  95. package/skills/akan-agent/SKILL.md +36 -0
  96. package/skills/akan-code/SKILL.md +1 -0
  97. package/skills/akan-debug/SKILL.md +40 -6
  98. package/skills/akan-deps/SKILL.md +1 -2
  99. package/skills/akan-mcp/SKILL.md +40 -0
  100. package/skills/akan-page/SKILL.md +44 -0
  101. package/skills/akan-query/SKILL.md +38 -0
  102. package/skills/akan-runtime/SKILL.md +40 -0
  103. package/skills/akan-scaffold/SKILL.md +16 -6
  104. package/skills/akan-transport/SKILL.md +40 -0
  105. package/skills/akan-validate/SKILL.md +13 -11
  106. package/{subspace.command-kvxmyxtf.js → subspace.command-pn56pnh8.js} +8 -8
  107. package/templates/__scalar/__model__/__model__.constant.ts +3 -5
  108. package/templates/__scalar/__model__/__model__.dictionary.ts +6 -5
  109. package/templates/__scalar/__model__/__model__.document.ts +3 -3
  110. package/templates/app/akan.config.ts +2 -3
  111. package/templates/app/env/env.client.ts +2 -4
  112. package/templates/app/env/env.client.type.ts +2 -3
  113. package/templates/app/env/env.server.ts +2 -3
  114. package/templates/app/lib/___appName__/__appName__.dictionary.ts +1 -2
  115. package/templates/app/lib/___appName__/__appName__.service.ts +3 -3
  116. package/templates/app/lib/___appName__/__appName__.signal.ts +5 -5
  117. package/templates/app/lib/___appName__/__appName__.store.ts +4 -6
  118. package/templates/app/lib/option.ts +2 -3
  119. package/templates/app/main.ts +2 -4
  120. package/templates/app/page/_index.tsx +3 -3
  121. package/templates/app/page/_layout.tsx +13 -10
  122. package/templates/appSample/lib/__scalar/workHistory/workHistory.constant.ts +1 -5
  123. package/templates/appSample/lib/__scalar/workHistory/workHistory.dictionary.ts +1 -1
  124. package/templates/appSample/lib/_noti/noti.signal.ts +1 -1
  125. package/templates/appSample/lib/task/Task.Template.tsx +2 -1
  126. package/templates/appSample/lib/task/Task.Unit.tsx +3 -2
  127. package/templates/appSample/lib/task/Task.Util.tsx +16 -4
  128. package/templates/appSample/lib/task/task.constant.ts +1 -5
  129. package/templates/appSample/lib/task/task.dictionary.ts +2 -8
  130. package/templates/appSample/lib/task/task.document.ts +1 -1
  131. package/templates/appSample/page/task/_index.tsx +2 -1
  132. package/templates/appSample/page/task/new.tsx +2 -1
  133. package/templates/appSample/ui/QuantityControl.tsx +5 -9
  134. package/templates/biomeForm.ts +144 -0
  135. package/templates/crudPages/[__model__Id]/edit/page.tsx +3 -3
  136. package/templates/crudPages/[__model__Id]/page.tsx +5 -5
  137. package/templates/crudPages/new/page.tsx +4 -3
  138. package/templates/crudPages/page.tsx +3 -3
  139. package/templates/crudSinglePage/page.tsx +9 -5
  140. package/templates/libRoot/akan.config.ts +2 -3
  141. package/templates/libRoot/lib/___libName__/__libName__.dictionary.ts +1 -2
  142. package/templates/libRoot/lib/___libName__/__libName__.service.ts +5 -4
  143. package/templates/libRoot/lib/___libName__/__libName__.signal.ts +6 -5
  144. package/templates/libRoot/lib/___libName__/__libName__.store.ts +5 -6
  145. package/templates/libRoot/lib/option.ts +1 -2
  146. package/templates/module/__Model__.Template.tsx +11 -10
  147. package/templates/module/__Model__.Unit.tsx +18 -5
  148. package/templates/module/__Model__.Util.tsx +9 -7
  149. package/templates/module/__Model__.View.tsx +9 -6
  150. package/templates/module/__Model__.Zone.tsx +25 -17
  151. package/templates/module/__model__.constant.ts +8 -9
  152. package/templates/module/__model__.dictionary.ts +16 -17
  153. package/templates/module/__model__.document.ts +6 -8
  154. package/templates/module/__model__.service.ts +3 -3
  155. package/templates/module/__model__.signal.ts +11 -10
  156. package/templates/module/__model__.store.ts +3 -5
  157. package/templates/service/__model__.dictionary.ts +6 -5
  158. package/templates/service/__model__.service.ts +3 -3
  159. package/templates/service/__model__.signal.ts +5 -4
  160. package/templates/service/__model__.store.ts +3 -5
  161. package/templates/workspaceRoot/.gitignore.template +3 -0
  162. package/templates/workspaceRoot/.vscode/settings.json.template +21 -21
  163. package/templates/workspaceRoot/AGENTS.md.template +4 -10
  164. package/{tunnel.command-kxv0ddmp.js → tunnel.command-q2h0j2en.js} +7 -7
  165. package/{typeChecker-px49mezc.js → typeChecker-j2jdnqsr.js} +1 -1
  166. package/typecheck.proc.js +6 -1
  167. package/verify.command-z1dsbmrt.js +91 -0
  168. package/{workflow.command-abb1d5xy.js → workflow.command-r3y67jeq.js} +47 -13
  169. package/workspace.command-t2f0xsrw.js +263 -0
  170. package/CodeAgent-3sy7kjgj.js +0 -9
  171. package/TunnelShare-2ef94kha.js +0 -14
  172. package/agent.command-ydftceda.js +0 -25
  173. package/cloud.script-v1ysyerg.js +0 -24
  174. package/context.runner-qb15sjf8.js +0 -25
  175. package/guidelines/conventions/conventions.instruction.md +0 -617
  176. package/guidelines/workspaceOnboarding/workspaceOnboarding.instruction.md +0 -291
  177. package/index-4vgbysa0.js +0 -279
  178. package/index-7md2g9vw.js +0 -6
  179. package/index-b70zct19.js +0 -856
  180. package/index-zzvvc845.js +0 -74
  181. package/quality.command-ah8qcakd.js +0 -1478
  182. package/templates/workspaceRoot/docs/AI-DEVELOPMENT.md.template +0 -69
  183. package/templates/workspaceRoot/docs/GENERATED.md.template +0 -55
  184. package/workspace.command-tsc99yec.js +0 -521
@@ -2,13 +2,13 @@
2
2
  import {
3
3
  runner,
4
4
  script
5
- } from "./index-3wypz6xj.js";
5
+ } from "./index-eja64h28.js";
6
6
  import {
7
7
  FileSys2
8
8
  } from "./index-52w0fvh8.js";
9
9
  import {
10
10
  PkgExecutor
11
- } from "./index-wcej7g4z.js";
11
+ } from "./index-8scw1pjk.js";
12
12
  import {
13
13
  TypeScriptDependencyScanner2
14
14
  } from "./index-tvehn2sp.js";
@@ -233,7 +233,8 @@ class PackageRunner extends runner("package") {
233
233
  const specifierPattern = new RegExp(`["'](${alternatives.join("|")})((?:/[^"'\\s]*)?)["']`, "g");
234
234
  const glob = new Bun.Glob(PackageRunner.#scannableDistFiles);
235
235
  const imports = new Map;
236
- for await (const relative of glob.scan({ cwd: distPath })) {
236
+ for await (const scanned of glob.scan({ cwd: distPath })) {
237
+ const relative = scanned.split(path2.sep).join("/");
237
238
  if (relative.includes("node_modules/") || relative.endsWith(".d.ts"))
238
239
  continue;
239
240
  if (/\.(test|spec)\.[a-z]+$/.test(relative))
@@ -123,16 +123,16 @@ var renderScopeAgentBlock = (scope, recipes) => {
123
123
  const scopePath = `${scope.type}s/${scope.name}`;
124
124
  const intro = `## Recipes In Scope
125
125
 
126
- UI recipes importable from \`${scopePath}\` code, **in addition to** the framework recipes indexed in the root
127
- \`AGENTS.md\` \`## Recipes\`. Same contract: import by exact name, then \`<name>(variants?, className?)\` \u2014 the second
126
+ UI recipes importable from \`${scopePath}\` code, **in addition to** the framework recipes indexed in
127
+ \`.claude/rules/akan/style.md\`. Same contract: import by exact name, then \`<name>(variants?, className?)\` \u2014 the second
128
128
  arg merges internally and takes an array too, so never wrap it in \`cn()\`. \`*\` marks the default, \`key?\` is a
129
129
  boolean flag. Do not guess recipe names or import paths; this index is regenerated by \`akan sync ${scope.name}\`
130
130
  and verified by \`akan lint ${scope.name}\`.`;
131
131
  if (recipes.length === 0) {
132
132
  return `${intro}
133
133
 
134
- No scope recipes yet. Before inlining a repeated surface (card, box, tile, \u2026), reuse a framework recipe from the
135
- root \`AGENTS.md\` or author one as \`${scopePath}/ui/Recipe/<name>.ts\` (one recipe per file, re-exported from that
134
+ No scope recipes yet. Before inlining a repeated surface (card, box, tile, \u2026), reuse a framework recipe from
135
+ \`.claude/rules/akan/style.md\` or author one as \`${scopePath}/ui/Recipe/<name>.ts\` (one recipe per file, re-exported from that
136
136
  folder's \`index.ts\`) \u2014 see the \`recipeRule\` guideline.`;
137
137
  }
138
138
  return `${intro}
@@ -1115,7 +1115,15 @@ CMD [${command.map((c) => `"${c}"`).join(",")}]`;
1115
1115
  static get akanVersion() {
1116
1116
  return getAkanPackageJson().version;
1117
1117
  }
1118
+ static #registryPins(pins) {
1119
+ if (!pins)
1120
+ return;
1121
+ const kept = Object.entries(pins).filter(([, spec]) => !/^(?:file:|link:|workspace:|portal:|[./~])/.test(spec));
1122
+ return kept.length ? Object.fromEntries(kept) : undefined;
1123
+ }
1118
1124
  getProductionPackageJson(data = {}) {
1125
+ const overrides = AkanAppConfig.#registryPins(this.rootPackageJson.overrides);
1126
+ const resolutions = AkanAppConfig.#registryPins(this.rootPackageJson.resolutions);
1119
1127
  return {
1120
1128
  name: this.app.name,
1121
1129
  description: this.app.name,
@@ -1126,6 +1134,8 @@ CMD [${command.map((c) => `"${c}"`).join(",")}]`;
1126
1134
  this.#resolveProductionDependencyVersion(lib)
1127
1135
  ])),
1128
1136
  ...this.trustedDependencies.length ? { trustedDependencies: this.trustedDependencies } : {},
1137
+ ...overrides ? { overrides } : {},
1138
+ ...resolutions ? { resolutions } : {},
1129
1139
  ...data
1130
1140
  };
1131
1141
  }
@@ -2090,20 +2100,41 @@ ${errorText}, ${warningText} found`];
2090
2100
  if (resolved.length === 0)
2091
2101
  return { fixed: [] };
2092
2102
  const before = new Map(resolved.map((filePath) => [filePath, readFileSync(filePath, "utf8")]));
2093
- await this.#runBiome([
2094
- "check",
2095
- "--write",
2096
- "--reporter=json",
2097
- "--max-diagnostics=none",
2098
- "--no-errors-on-unmatched",
2099
- "--config-path",
2100
- this.configPath,
2101
- ...resolved.map((filePath) => this.#toBiomePath(filePath))
2102
- ]);
2103
+ const biomePaths = resolved.map((filePath) => this.#toBiomePath(filePath));
2104
+ for (const batch of Linter.batchArgs(biomePaths, Linter.#pathArgsBudget))
2105
+ await this.#runBiome([
2106
+ "check",
2107
+ "--write",
2108
+ "--reporter=json",
2109
+ "--max-diagnostics=none",
2110
+ "--no-errors-on-unmatched",
2111
+ "--config-path",
2112
+ this.configPath,
2113
+ ...batch
2114
+ ]);
2103
2115
  return {
2104
2116
  fixed: resolved.filter((filePath) => readFileSync(filePath, "utf8") !== before.get(filePath))
2105
2117
  };
2106
2118
  }
2119
+ static #pathArgsBudget = 24000;
2120
+ static batchArgs(args, budget) {
2121
+ const batches = [];
2122
+ let batch = [];
2123
+ let length = 0;
2124
+ for (const arg of args) {
2125
+ const cost = arg.length + 3;
2126
+ if (batch.length > 0 && length + cost > budget) {
2127
+ batches.push(batch);
2128
+ batch = [];
2129
+ length = 0;
2130
+ }
2131
+ batch.push(arg);
2132
+ length += cost;
2133
+ }
2134
+ if (batch.length > 0)
2135
+ batches.push(batch);
2136
+ return batches;
2137
+ }
2107
2138
  async getConfigForFile(filePath) {
2108
2139
  const resolvedFilePath = this.#resolveFilePath(filePath);
2109
2140
  if (!existsSync2(resolvedFilePath))
@@ -2282,6 +2313,7 @@ var appRootAllowedFiles = new Set([
2282
2313
  "AGENTS.md",
2283
2314
  "CLAUDE.md",
2284
2315
  "akan.app.json",
2316
+ "akan.baseline.json",
2285
2317
  "akan.config.ts",
2286
2318
  "client.ts",
2287
2319
  "main.ts",
@@ -2310,6 +2342,7 @@ var libRootAllowedFiles = new Set([
2310
2342
  "AGENTS.md",
2311
2343
  "CLAUDE.md",
2312
2344
  "README.md",
2345
+ "akan.baseline.json",
2313
2346
  "akan.config.ts",
2314
2347
  "akan.lib.json",
2315
2348
  "client.ts",
@@ -2852,6 +2885,18 @@ class Spinner {
2852
2885
  import { mkdir as mkdir2, rm as rm3 } from "fs/promises";
2853
2886
  import path12 from "path";
2854
2887
 
2888
+ // pkgs/@akanjs/devkit/typecheck/typecheckFailure.ts
2889
+ class TypecheckFailure extends Error {
2890
+ records;
2891
+ constructor(records) {
2892
+ super(records.slice(0, 20).map((record) => `${record.file ?? "-"}:${record.line}:${record.col} ${record.code} ${record.message}`).join(`
2893
+ `) || "Typecheck failed");
2894
+ this.records = records;
2895
+ this.name = "TypecheckFailure";
2896
+ }
2897
+ }
2898
+
2899
+ // pkgs/@akanjs/devkit/typecheck/projectTypecheck.ts
2855
2900
  class ProjectTypecheck2 {
2856
2901
  projectDir;
2857
2902
  workspaceRoot;
@@ -2866,7 +2911,7 @@ class ProjectTypecheck2 {
2866
2911
  get typecheckDir() {
2867
2912
  return path12.join(this.projectDir, ".akan", "typecheck");
2868
2913
  }
2869
- async run(entries, { clean = false, incremental = true, tests = false } = {}) {
2914
+ async run(entries, { clean = false, incremental = true, tests = false, report = "pretty" } = {}) {
2870
2915
  const name = tests ? "tsconfig.tests" : "tsconfig";
2871
2916
  await mkdir2(this.typecheckDir, { recursive: true });
2872
2917
  const tsconfig = {
@@ -2881,13 +2926,18 @@ class ProjectTypecheck2 {
2881
2926
  `);
2882
2927
  if (clean)
2883
2928
  await rm3(path12.join(this.typecheckDir, `${name}.tsbuildinfo`), { force: true });
2884
- await this.#check(tsconfigPath);
2929
+ await this.check(tsconfigPath, report);
2885
2930
  return tsconfigPath;
2886
2931
  }
2887
- async#check(tsconfigPath) {
2932
+ async check(tsconfigPath, report = "pretty") {
2888
2933
  const proc = Bun.spawn([process.execPath, await ProjectTypecheck2.workerEntry(this.workspaceRoot)], {
2889
2934
  cwd: this.workspaceRoot,
2890
- env: { ...this.env, AKAN_COMMAND_TYPE: "typecheck", AKAN_TYPECHECK_TSCONFIG: tsconfigPath },
2935
+ env: {
2936
+ ...this.env,
2937
+ AKAN_COMMAND_TYPE: "typecheck",
2938
+ AKAN_TYPECHECK_TSCONFIG: tsconfigPath,
2939
+ ...report === "records" ? { AKAN_TYPECHECK_FORMAT: "json", AKAN_TYPECHECK_ROOT: this.workspaceRoot } : {}
2940
+ },
2891
2941
  stdout: "pipe",
2892
2942
  stderr: "pipe"
2893
2943
  });
@@ -2896,8 +2946,20 @@ class ProjectTypecheck2 {
2896
2946
  new Response(proc.stderr).text(),
2897
2947
  proc.exited
2898
2948
  ]);
2899
- if (exitCode !== 0)
2900
- throw new Error((stderr || stdout).trim() || `Typecheck failed with exit code ${exitCode}`);
2949
+ if (exitCode === 0)
2950
+ return;
2951
+ const records = report === "records" ? ProjectTypecheck2.#parseRecords(stdout) : null;
2952
+ if (records?.length)
2953
+ throw new TypecheckFailure(records);
2954
+ throw new Error((stderr || stdout).trim() || `Typecheck failed with exit code ${exitCode}`);
2955
+ }
2956
+ static #parseRecords(stdout) {
2957
+ try {
2958
+ const parsed = JSON.parse(stdout);
2959
+ return Array.isArray(parsed) ? parsed : null;
2960
+ } catch {
2961
+ return null;
2962
+ }
2901
2963
  }
2902
2964
  static async workerEntry(workspaceRoot) {
2903
2965
  const candidates = [
@@ -3350,7 +3412,7 @@ class Executor {
3350
3412
  }
3351
3413
  }
3352
3414
  async getTypeChecker() {
3353
- const { TypeChecker } = await import("./typeChecker-px49mezc.js");
3415
+ const { TypeChecker } = await import("./typeChecker-j2jdnqsr.js");
3354
3416
  this.typeChecker ??= new TypeChecker(this);
3355
3417
  return this.typeChecker;
3356
3418
  }
@@ -3789,7 +3851,7 @@ class SysExecutor extends Executor {
3789
3851
  class AppExecutor extends SysExecutor {
3790
3852
  static #routeSourceValidator = null;
3791
3853
  static async#getRouteSourceValidator() {
3792
- AppExecutor.#routeSourceValidator ??= (await import("./routeSourceValidator-6jd0q6r6.js")).RouteSourceValidator;
3854
+ AppExecutor.#routeSourceValidator ??= (await import("./routeSourceValidator-4h947v7c.js")).RouteSourceValidator;
3793
3855
  return AppExecutor.#routeSourceValidator;
3794
3856
  }
3795
3857
  dist;
@@ -3919,6 +3981,7 @@ class AppExecutor extends SysExecutor {
3919
3981
  return this.#akanConfig;
3920
3982
  }
3921
3983
  #pageKeys = null;
3984
+ #routeSources = [];
3922
3985
  #excludeDevOnlyPages = false;
3923
3986
  async getPageKeys({ refresh } = {}) {
3924
3987
  if (this.#pageKeys && !refresh)
@@ -3930,6 +3993,7 @@ class AppExecutor extends SysExecutor {
3930
3993
  const devOnlyKeys = new Set;
3931
3994
  const devOnlyDirs = [];
3932
3995
  const pageRoots = await this.getPageRoots();
3996
+ const routeSources = [];
3933
3997
  const libKeyPrefixes = pageRoots.map((root) => root.keyPrefix).filter(Boolean);
3934
3998
  for (const root of pageRoots) {
3935
3999
  if (!await FileSys2.dirExists(root.dir))
@@ -3979,6 +4043,7 @@ class AppExecutor extends SysExecutor {
3979
4043
  rootLayout: isRootLayout,
3980
4044
  pattern: parsed.pattern
3981
4045
  });
4046
+ routeSources.push({ key, absPath, info });
3982
4047
  if (info.devOnly) {
3983
4048
  devOnlyKeys.add(key);
3984
4049
  if (parsed.kind === "layout")
@@ -3989,9 +4054,14 @@ class AppExecutor extends SysExecutor {
3989
4054
  }
3990
4055
  }
3991
4056
  pageKeys.sort((a, b) => a < b ? -1 : a > b ? 1 : 0);
4057
+ this.#routeSources = routeSources.sort((a, b) => a.key < b.key ? -1 : a.key > b.key ? 1 : 0);
3992
4058
  this.#pageKeys = this.#excludeDevOnlyPages ? this.#dropDevOnlyPages(pageKeys, devOnlyKeys, devOnlyDirs) : pageKeys;
3993
4059
  return this.#pageKeys;
3994
4060
  }
4061
+ async getRouteSources({ refresh } = {}) {
4062
+ await this.getPageKeys({ refresh });
4063
+ return this.#routeSources;
4064
+ }
3995
4065
  #dropDevOnlyPages(pageKeys, devOnlyKeys, devOnlyDirs) {
3996
4066
  if (!devOnlyKeys.size)
3997
4067
  return pageKeys;
@@ -4316,4 +4386,4 @@ class ModuleExecutor extends Executor {
4316
4386
  }
4317
4387
  }
4318
4388
 
4319
- export { AGENT_BLOCK_START, AGENT_BLOCK_END, stampBlockVersion, extractBlockVersion, readDevkitVersion, upsertAgentBlock, extractAgentBlock, renderRecipeEntries, collectScopeRecipeSources, renderScopeAgentBlock, CLAUDE_COMMENT_RULE, binPlatforms, ServerEnvProfile, AkanAppConfig, AkanWorkspaceConfig, AsyncDefaultExportDetector, resolveSsrPageEntriesForApp, CodegenLock, Linter, LibSource, formatLibStatuses, rootAllowedFiles, rootAllowedDirs, isAllowedLibFacetRootFile, libFacetRootHintOf, barrelFacetDirs, facetIndexShadowOf, rootEntryHintOf, isScannedRootEntry, AppInfo, Spinner, ProjectTypecheck2, CommandExecutionError, Executor, WorkspaceExecutor, SysExecutor, AppExecutor, LibExecutor, PkgExecutor, ModuleExecutor };
4389
+ export { AGENT_BLOCK_START, AGENT_BLOCK_END, stampBlockVersion, extractBlockVersion, readDevkitVersion, upsertAgentBlock, extractAgentBlock, renderRecipeEntries, collectScopeRecipeSources, renderScopeAgentBlock, CLAUDE_COMMENT_RULE, binPlatforms, ServerEnvProfile, AkanAppConfig, AkanWorkspaceConfig, AsyncDefaultExportDetector, resolveSsrPageEntriesForApp, CodegenLock, JsonFormatter, parseBiomeReport, Linter, LibSource, formatLibStatuses, rootAllowedFiles, rootAllowedDirs, isAllowedLibFacetRootFile, libFacetRootHintOf, barrelFacetDirs, facetIndexShadowOf, rootEntryHintOf, isScannedRootEntry, AppInfo, Spinner, TypecheckFailure, ProjectTypecheck2, CommandExecutionError, Executor, WorkspaceExecutor, SysExecutor, AppExecutor, LibExecutor, PkgExecutor, ModuleExecutor };