@akanjs/cli 3.1.1-rc.15 → 3.1.1-rc.17

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 (120) hide show
  1. package/.build-stamp +1 -1
  2. package/{CodeAgent-gtwn7tmb.js → CodeAgent-fbcq8vks.js} +2 -2
  3. package/{CodeTui-v941fqdh.js → CodeTui-0626gxqd.js} +1 -1
  4. package/TunnelShare-2p24xxza.js +14 -0
  5. package/agent.command-hpza0pg9.js +46 -0
  6. package/akanCode.js +5 -3
  7. package/{application.command-j1reb9p1.js → application.command-3a7q1hs2.js} +11 -10
  8. package/{applicationBuildRunner-w20x63mz.js → applicationBuildRunner-s7yt71j4.js} +6 -5
  9. package/buildBatch.proc.js +6 -6
  10. package/{cloud.command-zd2mfkm0.js → cloud.command-4vg0pcea.js} +15 -14
  11. package/cloud.script-nkmeyhet.js +25 -0
  12. package/{code.command-dyet4xn6.js → code.command-fbntb67p.js} +6 -6
  13. package/commandManifest.json +1 -1
  14. package/{context.command-79gxczm4.js → context.command-31rm54v0.js} +18 -17
  15. package/context.runner-w01a32ph.js +26 -0
  16. package/{guideline.command-xwkskvky.js → guideline.command-cv3by2ng.js} +3 -3
  17. package/guidelines/conventions/core.md +104 -0
  18. package/guidelines/conventions/rules/app.md +83 -0
  19. package/guidelines/conventions/rules/auth.md +45 -0
  20. package/guidelines/conventions/rules/config.md +56 -0
  21. package/guidelines/conventions/rules/constant.md +24 -0
  22. package/guidelines/conventions/rules/gates.md +31 -0
  23. package/guidelines/conventions/rules/layer.md +25 -0
  24. package/guidelines/conventions/rules/migration.md +27 -0
  25. package/guidelines/conventions/rules/module.md +90 -0
  26. package/guidelines/conventions/rules/page.md +56 -0
  27. package/guidelines/conventions/rules/sensitive.md +16 -0
  28. package/guidelines/conventions/rules/server.md +86 -0
  29. package/guidelines/conventions/rules/ssr.md +47 -0
  30. package/guidelines/conventions/rules/style.md +43 -0
  31. package/guidelines/conventions/rules/test.md +34 -0
  32. package/guidelines/conventions/rules/ts.md +95 -0
  33. package/guidelines/conventions/rules/tsx.md +75 -0
  34. package/guidelines/mcpRule/mcpRule.instruction.md +1 -1
  35. package/guidelines/workspaceRecipes/workspaceRecipes.instruction.md +3 -3
  36. package/incrementalBuilder.proc.js +6 -6
  37. package/{index-pqdz7rat.js → index-05nxx4m5.js} +952 -47
  38. package/{index-41d3zx66.js → index-0ht91675.js} +37 -59
  39. package/{index-cz9g85xh.js → index-0zwznvv1.js} +1 -1
  40. package/{index-7ktk2hnz.js → index-0zyatd10.js} +2 -2
  41. package/{index-8jb5ep2e.js → index-12kzwak1.js} +3 -3
  42. package/{index-yknrmkmt.js → index-1dhf8ymv.js} +2 -2
  43. package/{index-qmeh0s05.js → index-3gccwenr.js} +2 -2
  44. package/{index-hdzjaq7s.js → index-3txrjt6n.js} +2 -2
  45. package/{index-tzzs52h0.js → index-57q1ayd2.js} +18 -1240
  46. package/index-5kh9scvs.js +514 -0
  47. package/index-5n5hds19.js +1246 -0
  48. package/{index-pc9ps0hx.js → index-6269mf2s.js} +10 -9
  49. package/{index-1e2955yd.js → index-64g9fsjy.js} +43 -12
  50. package/index-7zeb5r1p.js +653 -0
  51. package/{index-kr62ph5a.js → index-8s8b4eba.js} +45 -4
  52. package/{index-wvvwdzfw.js → index-922k2zwq.js} +3 -3
  53. package/{index-brpk7gd8.js → index-9ndw5d8j.js} +7 -7
  54. package/{index-xeh7m2j5.js → index-et6ce601.js} +1 -1
  55. package/{index-jtydvvq7.js → index-f5adsa58.js} +4 -4
  56. package/index-fbewhg4g.js +590 -0
  57. package/{index-7abjzny1.js → index-hm7x0c11.js} +33 -37
  58. package/{index-rshwdv9w.js → index-hvv5rnaq.js} +2 -2
  59. package/index-jje9qzyq.js +27 -0
  60. package/index-js1gj6f6.js +410 -0
  61. package/{index-2qzzp0c9.js → index-kjrvwzav.js} +3 -3
  62. package/index-m5n3ka0p.js +18 -0
  63. package/index-m6r88hhr.js +3582 -0
  64. package/{index-4rwfh2de.js → index-mt0wa941.js} +4 -4
  65. package/{index-553xyb55.js → index-mwj9q2ya.js} +1 -1
  66. package/{index-5nd1wtkv.js → index-p6x5b7hr.js} +1 -1
  67. package/index-r2wedvqn.js +138 -0
  68. package/{index-ygy8c12j.js → index-rvynj5gz.js} +1 -1
  69. package/{index-nmy1rana.js → index-tdv66eah.js} +4 -4
  70. package/{index-8rvwgd1r.js → index-w134p86k.js} +1 -1
  71. package/{index-jjd97ya6.js → index-wfczhj1z.js} +14 -36
  72. package/{index-dy0jx9ay.js → index-wwe9rsrx.js} +14 -0
  73. package/{index-kbbyzs6j.js → index-x5ecanqh.js} +2 -2
  74. package/{index-ch1sv7ke.js → index-zre4m2ce.js} +9 -21
  75. package/index.js +23 -22
  76. package/{library.command-td8t85kb.js → library.command-sh70fyvy.js} +3 -3
  77. package/{localRegistry.command-jx9zkmxf.js → localRegistry.command-2nbyy84d.js} +17 -14
  78. package/{module.command-j70mqgpp.js → module.command-n0bmtzwy.js} +5 -5
  79. package/{package.command-1b1v6k5v.js → package.command-7h9r51bz.js} +3 -3
  80. package/package.json +2 -2
  81. package/{page.command-m31w2tsz.js → page.command-vjtpfbb1.js} +3 -3
  82. package/{pipeline.command-q7b8wy55.js → pipeline.command-c93se3ar.js} +2 -2
  83. package/{primitive.command-4zrbhkb9.js → primitive.command-a3075qp2.js} +6 -6
  84. package/{projectTypecheck-synx6qff.js → projectTypecheck-sf9xwaga.js} +1 -1
  85. package/{prompter-76k56b37.js → prompter-hgcta8pb.js} +1 -1
  86. package/quality.command-dw1y9hmy.js +76 -0
  87. package/{repair.command-98n6zxg7.js → repair.command-tg57d8yt.js} +5 -5
  88. package/{scalar.command-rak5pjk3.js → scalar.command-cwzge353.js} +4 -4
  89. package/skills/akan-agent/SKILL.md +36 -0
  90. package/skills/akan-debug/SKILL.md +3 -3
  91. package/skills/akan-deps/SKILL.md +1 -2
  92. package/skills/akan-mcp/SKILL.md +40 -0
  93. package/skills/akan-page/SKILL.md +44 -0
  94. package/skills/akan-query/SKILL.md +38 -0
  95. package/skills/akan-runtime/SKILL.md +40 -0
  96. package/skills/akan-scaffold/SKILL.md +16 -6
  97. package/skills/akan-transport/SKILL.md +40 -0
  98. package/skills/akan-validate/SKILL.md +13 -11
  99. package/{subspace.command-ej0rk116.js → subspace.command-3h03c7kc.js} +8 -8
  100. package/templates/workspaceRoot/.gitignore.template +3 -0
  101. package/templates/workspaceRoot/AGENTS.md.template +4 -10
  102. package/{tunnel.command-kdx3amrc.js → tunnel.command-czaz6ys4.js} +7 -7
  103. package/{typeChecker-px49mezc.js → typeChecker-j2jdnqsr.js} +1 -1
  104. package/typecheck.proc.js +6 -1
  105. package/verify.command-nzwhtz71.js +91 -0
  106. package/{workflow.command-gffk9nj9.js → workflow.command-srhky88x.js} +47 -13
  107. package/workspace.command-9stchcd2.js +262 -0
  108. package/TunnelShare-26ty9skr.js +0 -14
  109. package/agent.command-h82gepwn.js +0 -25
  110. package/cloud.script-vdj8ymch.js +0 -24
  111. package/context.runner-ejag7mhr.js +0 -25
  112. package/guidelines/conventions/conventions.instruction.md +0 -617
  113. package/guidelines/workspaceOnboarding/workspaceOnboarding.instruction.md +0 -291
  114. package/index-6pzt55w3.js +0 -279
  115. package/index-y5m4j2w6.js +0 -856
  116. package/index-zzvvc845.js +0 -74
  117. package/quality.command-cy0pgqjz.js +0 -1478
  118. package/templates/workspaceRoot/docs/AI-DEVELOPMENT.md.template +0 -69
  119. package/templates/workspaceRoot/docs/GENERATED.md.template +0 -55
  120. package/workspace.command-097hv6n1.js +0 -521
@@ -1,13 +1,13 @@
1
1
  // @bun
2
2
  import {
3
3
  AppExecutor
4
- } from "./index-1e2955yd.js";
4
+ } from "./index-64g9fsjy.js";
5
5
  import {
6
6
  jsonText,
7
7
  createWorkflowBaselineSummary,
8
8
  buildAkanModuleContextIndex,
9
9
  toolingRolloutGate
10
- } from "./index-pqdz7rat.js";
10
+ } from "./index-05nxx4m5.js";
11
11
  import {
12
12
  buildResourceList,
13
13
  codexMcpConfigPath,
@@ -17,29 +17,29 @@ import {
17
17
  upsertCodexMcpServerBlock,
18
18
  renderDoctorText,
19
19
  AkanContextAnalyzer
20
- } from "./index-kr62ph5a.js";
20
+ } from "./index-8s8b4eba.js";
21
21
  import {
22
22
  runner
23
- } from "./index-qmeh0s05.js";
23
+ } from "./index-3gccwenr.js";
24
24
  import {
25
25
  NativeApp
26
- } from "./index-2qzzp0c9.js";
26
+ } from "./index-kjrvwzav.js";
27
27
  import {
28
28
  isPlaceholderAppId
29
- } from "./index-8rvwgd1r.js";
29
+ } from "./index-w134p86k.js";
30
30
  import {
31
31
  getMobileTargets,
32
32
  appIdsOf
33
33
  } from "./index-m9jj544v.js";
34
34
  import {
35
35
  Prompter2
36
- } from "./index-zzvvc845.js";
36
+ } from "./index-r2wedvqn.js";
37
37
  import {
38
38
  RepairRunner
39
- } from "./index-wvvwdzfw.js";
39
+ } from "./index-922k2zwq.js";
40
40
  import {
41
41
  WorkflowRunner
42
- } from "./index-y5m4j2w6.js";
42
+ } from "./index-js1gj6f6.js";
43
43
 
44
44
  // pkgs/@akanjs/devkit/akanMcpContract.ts
45
45
  import path from "path";
@@ -948,6 +948,7 @@ ${payload}`);
948
948
  "create-ui": "`akan create-ui --app <app-or-lib> --module <module> --surface <view|unit|template> --format json` creates one UI surface and returns a primitive write report.",
949
949
  "add-field": "`akan add-field --app <app-or-lib> --module <module> --field <field> --type <String|Boolean|Date|Int|Float|scalar> --format json` updates source constant/dictionary files. Use Int or Float for numeric fields, not Number.",
950
950
  "add-enum-field": "`akan add-enum-field --app <app-or-lib> --module <module> --field <field> --values a,b --format json` adds an enum field to source constant/dictionary files without editing generated files.",
951
+ verify: "`akan verify [<app-or-lib-or-pkg>]` syncs, lints, typechecks and fast-builds what git reports as changed in one run, printing one line per problem; run it instead of lint, typecheck and build in turn.",
951
952
  sync: "`akan sync <app-or-lib>` refreshes generated Akan files from source conventions.",
952
953
  lint: "`akan lint <app-or-lib-or-pkg>` runs Biome linting after preparing generated files.",
953
954
  typecheck: "`akan typecheck <app-or-lib>` typechecks an app or a library after preparing generated files, its tests and specs included (`--tests false` to leave them out; a build does).",
@@ -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}
@@ -2292,6 +2292,7 @@ var appRootAllowedFiles = new Set([
2292
2292
  "AGENTS.md",
2293
2293
  "CLAUDE.md",
2294
2294
  "akan.app.json",
2295
+ "akan.baseline.json",
2295
2296
  "akan.config.ts",
2296
2297
  "client.ts",
2297
2298
  "main.ts",
@@ -2320,6 +2321,7 @@ var libRootAllowedFiles = new Set([
2320
2321
  "AGENTS.md",
2321
2322
  "CLAUDE.md",
2322
2323
  "README.md",
2324
+ "akan.baseline.json",
2323
2325
  "akan.config.ts",
2324
2326
  "akan.lib.json",
2325
2327
  "client.ts",
@@ -2862,6 +2864,18 @@ class Spinner {
2862
2864
  import { mkdir as mkdir2, rm as rm3 } from "fs/promises";
2863
2865
  import path12 from "path";
2864
2866
 
2867
+ // pkgs/@akanjs/devkit/typecheck/typecheckFailure.ts
2868
+ class TypecheckFailure extends Error {
2869
+ records;
2870
+ constructor(records) {
2871
+ super(records.slice(0, 20).map((record) => `${record.file ?? "-"}:${record.line}:${record.col} ${record.code} ${record.message}`).join(`
2872
+ `) || "Typecheck failed");
2873
+ this.records = records;
2874
+ this.name = "TypecheckFailure";
2875
+ }
2876
+ }
2877
+
2878
+ // pkgs/@akanjs/devkit/typecheck/projectTypecheck.ts
2865
2879
  class ProjectTypecheck2 {
2866
2880
  projectDir;
2867
2881
  workspaceRoot;
@@ -2876,7 +2890,7 @@ class ProjectTypecheck2 {
2876
2890
  get typecheckDir() {
2877
2891
  return path12.join(this.projectDir, ".akan", "typecheck");
2878
2892
  }
2879
- async run(entries, { clean = false, incremental = true, tests = false } = {}) {
2893
+ async run(entries, { clean = false, incremental = true, tests = false, report = "pretty" } = {}) {
2880
2894
  const name = tests ? "tsconfig.tests" : "tsconfig";
2881
2895
  await mkdir2(this.typecheckDir, { recursive: true });
2882
2896
  const tsconfig = {
@@ -2891,13 +2905,18 @@ class ProjectTypecheck2 {
2891
2905
  `);
2892
2906
  if (clean)
2893
2907
  await rm3(path12.join(this.typecheckDir, `${name}.tsbuildinfo`), { force: true });
2894
- await this.#check(tsconfigPath);
2908
+ await this.check(tsconfigPath, report);
2895
2909
  return tsconfigPath;
2896
2910
  }
2897
- async#check(tsconfigPath) {
2911
+ async check(tsconfigPath, report = "pretty") {
2898
2912
  const proc = Bun.spawn([process.execPath, await ProjectTypecheck2.workerEntry(this.workspaceRoot)], {
2899
2913
  cwd: this.workspaceRoot,
2900
- env: { ...this.env, AKAN_COMMAND_TYPE: "typecheck", AKAN_TYPECHECK_TSCONFIG: tsconfigPath },
2914
+ env: {
2915
+ ...this.env,
2916
+ AKAN_COMMAND_TYPE: "typecheck",
2917
+ AKAN_TYPECHECK_TSCONFIG: tsconfigPath,
2918
+ ...report === "records" ? { AKAN_TYPECHECK_FORMAT: "json", AKAN_TYPECHECK_ROOT: this.workspaceRoot } : {}
2919
+ },
2901
2920
  stdout: "pipe",
2902
2921
  stderr: "pipe"
2903
2922
  });
@@ -2906,8 +2925,20 @@ class ProjectTypecheck2 {
2906
2925
  new Response(proc.stderr).text(),
2907
2926
  proc.exited
2908
2927
  ]);
2909
- if (exitCode !== 0)
2910
- throw new Error((stderr || stdout).trim() || `Typecheck failed with exit code ${exitCode}`);
2928
+ if (exitCode === 0)
2929
+ return;
2930
+ const records = report === "records" ? ProjectTypecheck2.#parseRecords(stdout) : null;
2931
+ if (records?.length)
2932
+ throw new TypecheckFailure(records);
2933
+ throw new Error((stderr || stdout).trim() || `Typecheck failed with exit code ${exitCode}`);
2934
+ }
2935
+ static #parseRecords(stdout) {
2936
+ try {
2937
+ const parsed = JSON.parse(stdout);
2938
+ return Array.isArray(parsed) ? parsed : null;
2939
+ } catch {
2940
+ return null;
2941
+ }
2911
2942
  }
2912
2943
  static async workerEntry(workspaceRoot) {
2913
2944
  const candidates = [
@@ -3360,7 +3391,7 @@ class Executor {
3360
3391
  }
3361
3392
  }
3362
3393
  async getTypeChecker() {
3363
- const { TypeChecker } = await import("./typeChecker-px49mezc.js");
3394
+ const { TypeChecker } = await import("./typeChecker-j2jdnqsr.js");
3364
3395
  this.typeChecker ??= new TypeChecker(this);
3365
3396
  return this.typeChecker;
3366
3397
  }
@@ -4326,4 +4357,4 @@ class ModuleExecutor extends Executor {
4326
4357
  }
4327
4358
  }
4328
4359
 
4329
- 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 };
4360
+ 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 };