@akanjs/cli 3.1.1-rc.9 → 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-z5vkm9ea.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-wthg8nn9.js → application.command-g7xv6ad0.js} +44 -11
  8. package/{applicationBuildRunner-t2r84sz6.js → applicationBuildRunner-qvjnhr9j.js} +9 -6
  9. package/buildBatch.proc.js +6 -6
  10. package/{cloud.command-sz11hpre.js → cloud.command-6ebygmhw.js} +17 -15
  11. package/cloud.script-0s1jybd5.js +26 -0
  12. package/{code.command-9h3yrzhe.js → code.command-mpkm2emr.js} +6 -6
  13. package/commandManifest.json +1 -1
  14. package/{context.command-15j9b7c0.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-a58emady.js → index-266dewjs.js} +11 -11
  43. package/{index-bt438yxm.js → index-3yz30c07.js} +5 -4
  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-a5dhqkdr.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-2mwc0g0d.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-6txx6a9p.js → index-payhwt51.js} +21 -29
  62. package/{index-2azahjaw.js → index-qkkdhjm6.js} +2 -2
  63. package/{index-74tjjsnc.js → index-qxzrp5xt.js} +33 -37
  64. package/{index-qfp55x1y.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-9th4gszy.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-55j120r8.js → index-vxmy1p4f.js} +16 -36
  72. package/{index-301pdbzz.js → index-w4k2ragk.js} +7 -7
  73. package/{index-js6geqjn.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-jtd8gaes.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-822qx2bx.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-ycmja19q.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-8d5qs787.js +0 -9
  171. package/TunnelShare-qkm8zp03.js +0 -14
  172. package/agent.command-ydftceda.js +0 -25
  173. package/cloud.script-nqevg5qw.js +0 -24
  174. package/context.runner-8gg030b0.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-qm7cw29v.js +0 -521
@@ -1,4 +1,5 @@
1
1
  import type { AppInfo, LibInfo } from "akanjs";
2
+ import { BiomeForm } from "../biomeForm";
2
3
 
3
4
  interface Dict {
4
5
  Model: string;
@@ -10,25 +11,25 @@ interface Options {
10
11
  sharedGuards?: boolean;
11
12
  }
12
13
  export default function getContent(scanInfo: AppInfo | LibInfo | null, dict: Dict, options: Options = {}) {
14
+ const { Model, model } = dict;
13
15
  // Admin lives in libs/shared; without it root and cru stay None, shut until the app names a guard of its own.
14
16
  const guardImports = options.sharedGuards
15
17
  ? `import { Admin } from "@libs/shared/srvkit";\nimport { endpoint, internal, Public, slice } from "akanjs/signal";`
16
18
  : `import { endpoint, internal, None, Public, slice } from "akanjs/signal";`;
17
19
  const writeGuard = options.sharedGuards ? "Admin" : "None";
18
- return `
19
- ${guardImports}
20
+ const sliceBody = `(init) => ({
21
+ inPublic: init({ guards: [Public] }).exec(function () {
22
+ return this.${model}Service.queryAny();
23
+ }),
24
+ })`;
25
+ return `${guardImports}
20
26
 
21
27
  import * as srv from "../srv";
22
28
 
23
- export class ${dict.Model}Internal extends internal(srv.${dict.model}, ({ interval }) => ({})) {}
29
+ ${BiomeForm.callArgs("", `export class ${Model}Internal extends internal`, [`srv.${model}`, "({ interval }) => ({})"], " {}")}
24
30
 
25
- export class ${dict.Model}Slice extends slice(srv.${dict.model}, { guards: { root: ${writeGuard}, get: Public, cru: ${writeGuard} } }, (init) => ({
26
- inPublic: init({ guards: [Public] })
27
- .exec(function () {
28
- return this.${dict.model}Service.queryAny();
29
- }),
30
- })) {}
31
+ ${BiomeForm.callArgs("", `export class ${Model}Slice extends slice`, [`srv.${model}`, `{ guards: { root: ${writeGuard}, get: Public, cru: ${writeGuard} } }`, sliceBody], " {}")}
31
32
 
32
- export class ${dict.Model}Endpoint extends endpoint(srv.${dict.model}, ({ query, mutation }) => ({})) {}
33
+ ${BiomeForm.callArgs("", `export class ${Model}Endpoint extends endpoint`, [`srv.${model}`, "({ query, mutation }) => ({})"], " {}")}
33
34
  `;
34
35
  }
@@ -1,4 +1,5 @@
1
1
  import type { AppInfo, LibInfo } from "akanjs";
2
+ import { BiomeForm } from "../biomeForm";
2
3
 
3
4
  interface Dict {
4
5
  Model: string;
@@ -6,14 +7,11 @@ interface Dict {
6
7
  sysName: string;
7
8
  }
8
9
  export default function getContent(scanInfo: AppInfo | LibInfo | null, dict: Dict) {
9
- return `
10
- import { store } from "akanjs/store";
10
+ return `import { store } from "akanjs/store";
11
11
 
12
12
  import { sig } from "../useClient";
13
13
 
14
- export class ${dict.Model}Store extends store(sig.${dict.model}, () => ({
15
- // state
16
- })) {
14
+ ${BiomeForm.callArgs("", `export class ${dict.Model}Store extends store`, [`sig.${dict.model}`, "() => ({\n // state\n})"], " {")}
17
15
  // action
18
16
  }
19
17
  `;
@@ -1,18 +1,19 @@
1
1
  import type { AppInfo, LibInfo } from "akanjs";
2
+ import { BiomeForm } from "../biomeForm";
2
3
 
3
4
  interface Dict {
4
5
  Model: string;
5
6
  model: string;
6
7
  }
7
8
  export default function getContent(scanInfo: AppInfo | LibInfo | null, dict: Dict) {
8
- return `
9
- import { modelDictionary } from "akanjs/dictionary";
9
+ const { Model, model } = dict;
10
+ return `import { modelDictionary } from "akanjs/dictionary";
10
11
 
11
- import type { ${dict.Model}Endpoint } from "../sig";
12
+ import type { ${Model}Endpoint } from "../sig";
12
13
 
13
14
  export const dictionary = modelDictionary(["en", "ko"])
14
- .of((t) => t(["${dict.model}", "${dict.model}"]).desc(["${dict.model} description", "${dict.model} 설명"]))
15
- .endpoint<${dict.Model}Endpoint>((fn) => ({}))
15
+ ${BiomeForm.dictionaryOf([model, model], [`${model} description`, `${model} 설명`])}
16
+ .endpoint<${Model}Endpoint>((fn) => ({}))
16
17
  .error({})
17
18
  .translate({});
18
19
  `;
@@ -1,13 +1,13 @@
1
1
  import type { AppInfo, LibInfo } from "akanjs";
2
+ import { BiomeForm } from "../biomeForm";
2
3
 
3
4
  interface Dict {
4
5
  Model: string;
5
6
  model: string;
6
7
  }
7
8
  export default function getContent(scanInfo: AppInfo | LibInfo | null, dict: Dict) {
8
- return `
9
- import { serve } from "akanjs/service";
9
+ return `import { serve } from "akanjs/service";
10
10
 
11
- export class ${dict.Model}Service extends serve("${dict.model}" as const, ({ use, service, env, signal }) => ({})) {}
11
+ ${BiomeForm.callArgs("", `export class ${dict.Model}Service extends serve`, [`"${dict.model}" as const`, "({ use, service, env, signal }) => ({})"], " {}")}
12
12
  `;
13
13
  }
@@ -1,17 +1,18 @@
1
1
  import type { AppInfo, LibInfo } from "akanjs";
2
+ import { BiomeForm } from "../biomeForm";
2
3
 
3
4
  interface Dict {
4
5
  Model: string;
5
6
  model: string;
6
7
  }
7
8
  export default function getContent(scanInfo: AppInfo | LibInfo | null, dict: Dict) {
8
- return `
9
- import { endpoint, internal } from "akanjs/signal";
9
+ const { Model, model } = dict;
10
+ return `import { endpoint, internal } from "akanjs/signal";
10
11
 
11
12
  import * as srv from "../srv";
12
13
 
13
- export class ${dict.Model}Internal extends internal(srv.${dict.model}, () => ({})) {}
14
+ ${BiomeForm.callArgs("", `export class ${Model}Internal extends internal`, [`srv.${model}`, "() => ({})"], " {}")}
14
15
 
15
- export class ${dict.Model}Endpoint extends endpoint(srv.${dict.model}, ({ query, mutation }) => ({})) {}
16
+ ${BiomeForm.callArgs("", `export class ${Model}Endpoint extends endpoint`, [`srv.${model}`, "({ query, mutation }) => ({})"], " {}")}
16
17
  `;
17
18
  }
@@ -1,16 +1,14 @@
1
1
  import type { AppInfo, LibInfo } from "akanjs";
2
+ import { BiomeForm } from "../biomeForm";
2
3
 
3
4
  interface Dict {
4
5
  Model: string;
5
6
  model: string;
6
7
  }
7
8
  export default function getContent(scanInfo: AppInfo | LibInfo | null, dict: Dict) {
8
- return `
9
- import { store } from "akanjs/store";
9
+ return `import { store } from "akanjs/store";
10
10
 
11
- export class ${dict.Model}Store extends store("${dict.model}" as const, () => ({
12
- // state
13
- })) {
11
+ ${BiomeForm.callArgs("", `export class ${dict.Model}Store extends store`, [`"${dict.model}" as const`, "() => ({\n // state\n})"], " {")}
14
12
  // action
15
13
  }
16
14
  `;
@@ -18,6 +18,9 @@ apps/*/scripts
18
18
  **/secrets.*
19
19
  dump
20
20
  local
21
+ .claude/worktrees/
22
+ .claude/settings.local.json
23
+ .claude/scheduled_tasks.lock
21
24
 
22
25
  # Xcode
23
26
  build/
@@ -1,23 +1,23 @@
1
1
  {
2
- "typescript.tsdk": "node_modules/typescript/lib",
3
- "editor.defaultFormatter": "biomejs.biome",
4
- "editor.formatOnSave": true,
5
- "editor.codeActionsOnSave": {
6
- "source.fixAll.biome": "always"
7
- },
8
- "[typescript]": {
9
- "editor.defaultFormatter": "biomejs.biome"
10
- },
11
- "[typescriptreact]": {
12
- "editor.defaultFormatter": "biomejs.biome"
13
- },
14
- "[javascript]": {
15
- "editor.defaultFormatter": "biomejs.biome"
16
- },
17
- "[javascriptreact]": {
18
- "editor.defaultFormatter": "biomejs.biome"
19
- },
20
- "[json]": {
21
- "editor.defaultFormatter": "biomejs.biome"
22
- }
2
+ "typescript.tsdk": "node_modules/typescript/lib",
3
+ "editor.defaultFormatter": "biomejs.biome",
4
+ "editor.formatOnSave": true,
5
+ "editor.codeActionsOnSave": {
6
+ "source.fixAll.biome": "always"
7
+ },
8
+ "[typescript]": {
9
+ "editor.defaultFormatter": "biomejs.biome"
10
+ },
11
+ "[typescriptreact]": {
12
+ "editor.defaultFormatter": "biomejs.biome"
13
+ },
14
+ "[javascript]": {
15
+ "editor.defaultFormatter": "biomejs.biome"
16
+ },
17
+ "[javascriptreact]": {
18
+ "editor.defaultFormatter": "biomejs.biome"
19
+ },
20
+ "[json]": {
21
+ "editor.defaultFormatter": "biomejs.biome"
22
+ }
23
23
  }
@@ -3,9 +3,6 @@
3
3
  This is an Akan.js workspace. Akan is convention-driven: keep business intent in the expected place and let
4
4
  the framework generate the repeated surfaces.
5
5
 
6
- For agent-neutral documentation that Claude Code, Codex, Devin, GitHub Copilot Coding Agent, and other tools can
7
- also read, see `docs/AI-DEVELOPMENT.md` and `docs/GENERATED.md`.
8
-
9
6
  ## Framework Bugs And Feature Requests
10
7
 
11
8
  If you hit an Akan.js bug, or a fix that one framework change would solve more easily than app-level workarounds,
@@ -14,13 +11,10 @@ the user before filing it. Keep any interim workaround small and marked `// TODO
14
11
 
15
12
  ## Generated Context
16
13
 
17
- The section below is regenerated by `akan agent install` (run `bun run setup:agent`). It lists this
18
- workspace's apps, generated files, validation commands, and framework guide. Edit anything outside the
19
- markers freely; content between them is overwritten on the next install.
20
-
21
- It carries the rules only. The reasoning behind each area lives in deep-dive guidelines fetched on demand —
22
- `akan guideline list` names them, `akan guideline show <name>` prints one, and an agent wired to `akan mcp`
23
- calls `get_guideline` instead.
14
+ The section below is regenerated by `akan agent install` (run `bun run setup:agent`), together with the path
15
+ rules in `.claude/rules/akan/` and `.cursor/rules/akan-*.mdc` and the skills in `.claude/skills/` and
16
+ `.agents/skills/`. Edit anything outside the markers freely; content between them is overwritten on the next
17
+ install, and so is a generated file that still carries its `<!-- akan:generated -->` marker.
24
18
 
25
19
  <!-- akan:agent:start -->
26
20
  <!-- Populated by `akan agent install`. Run `bun run setup:agent` to refresh. -->
@@ -4,22 +4,22 @@ import {
4
4
  runner,
5
5
  script,
6
6
  command
7
- } from "./index-3wypz6xj.js";
7
+ } from "./index-eja64h28.js";
8
8
  import"./index-52w0fvh8.js";
9
9
  import {
10
10
  AppExecutor
11
- } from "./index-wcej7g4z.js";
11
+ } from "./index-8scw1pjk.js";
12
12
  import {
13
13
  GlobalConfig,
14
14
  CloudApi
15
- } from "./index-2azahjaw.js";
15
+ } from "./index-qkkdhjm6.js";
16
16
  import"./index-m9jj544v.js";
17
- import"./index-bt438yxm.js";
18
- import"./index-xb8809yb.js";
19
- import"./index-0fz95kxe.js";
17
+ import"./index-3yz30c07.js";
18
+ import"./index-1shvxzt0.js";
19
+ import"./index-xqgwjz7a.js";
20
20
  import {
21
21
  TunnelShare2
22
- } from "./index-2mwc0g0d.js";
22
+ } from "./index-ksfgqq1x.js";
23
23
  import {
24
24
  writeClipboard
25
25
  } from "./index-p6pbz9n5.js";
@@ -1,7 +1,7 @@
1
1
  // @bun
2
2
  import {
3
3
  TypeChecker2
4
- } from "./index-dy0jx9ay.js";
4
+ } from "./index-wwe9rsrx.js";
5
5
  export {
6
6
  TypeChecker2 as TypeChecker
7
7
  };
package/typecheck.proc.js CHANGED
@@ -1,7 +1,7 @@
1
1
  // @bun
2
2
  import {
3
3
  TypeChecker2
4
- } from "./index-dy0jx9ay.js";
4
+ } from "./index-wwe9rsrx.js";
5
5
 
6
6
  // pkgs/@akanjs/devkit/typecheck/typecheck.proc.ts
7
7
  import { Logger } from "akanjs/common";
@@ -26,6 +26,11 @@ try {
26
26
  if (!configPath)
27
27
  throw new Error("AKAN_TYPECHECK_TSCONFIG is required");
28
28
  const result = TypeChecker2.checkProject(configPath);
29
+ if (process.env.AKAN_TYPECHECK_FORMAT === "json") {
30
+ const root = process.env.AKAN_TYPECHECK_ROOT ?? process.cwd();
31
+ process.stdout.write(JSON.stringify(TypeChecker2.toRecords(result.errors, root)));
32
+ process.exit(result.errors.length > 0 ? 1 : 0);
33
+ }
29
34
  if (result.errors.length > 0) {
30
35
  console.error(result.message);
31
36
  process.exit(1);
@@ -0,0 +1,91 @@
1
+ // @bun
2
+ import {
3
+ Workspace,
4
+ script,
5
+ ExitCodeError,
6
+ markCliErrorPrinted,
7
+ command
8
+ } from "./index-eja64h28.js";
9
+ import"./index-52w0fvh8.js";
10
+ import"./index-8scw1pjk.js";
11
+ import {
12
+ ApplicationRunner,
13
+ VerifyScope
14
+ } from "./index-s6da8ta9.js";
15
+ import"./index-p6x5b7hr.js";
16
+ import"./index-3yz30c07.js";
17
+ import"./index-w7q6h97v.js";
18
+ import"./index-m9jj544v.js";
19
+ import"./index-1shvxzt0.js";
20
+ import"./index-xqgwjz7a.js";
21
+ import"./index-62md4dwy.js";
22
+ import {
23
+ WorkspaceRunner
24
+ } from "./index-am36s3jh.js";
25
+ import"./index-hj6w4ka1.js";
26
+ import"./index-fbewhg4g.js";
27
+ import {
28
+ VerifyPipeline,
29
+ VerifyReport
30
+ } from "./index-b8c289dx.js";
31
+ import"./index-1p0qbq3m.js";
32
+
33
+ // pkgs/@akanjs/cli/verify/verify.script.ts
34
+ import path from "path";
35
+ import { Logger } from "akanjs/common";
36
+ class VerifyScript extends script("verify", [WorkspaceRunner, ApplicationRunner]) {
37
+ async verify(workspace, requested, options = {}) {
38
+ const [apps, libs, pkgs] = await workspace.getExecs();
39
+ const names = { apps, libs, pkgs };
40
+ const changes = options.files?.length ? options.files.map((file) => ({ code: " M", file: VerifyScript.#relative(workspace, file) })) : await VerifyScope.changesIn(workspace.workspaceRoot) ?? [];
41
+ const scope = VerifyScope.resolve(changes, names, requested);
42
+ const consoleOutput = Logger.consoleOutput;
43
+ Logger.consoleOutput = false;
44
+ const result = await new VerifyPipeline(workspace, this.workspaceRunner, this.applicationRunner).run(scope, { lintOnly: options.lintOnly, build: options.build }).finally(() => {
45
+ Logger.consoleOutput = consoleOutput;
46
+ });
47
+ Logger.rawLog(options.format === "json" ? VerifyReport.json(result) : VerifyReport.text(result, { max: options.max }));
48
+ if (result.ok)
49
+ return;
50
+ const failure = new ExitCodeError("verify failed", 1);
51
+ markCliErrorPrinted(failure);
52
+ throw failure;
53
+ }
54
+ static #relative(workspace, file) {
55
+ const absolute = path.isAbsolute(file) ? file : path.resolve(workspace.workspaceRoot, file);
56
+ return path.relative(workspace.workspaceRoot, absolute).split(path.sep).join("/");
57
+ }
58
+ }
59
+
60
+ // pkgs/@akanjs/cli/verify/verify.command.ts
61
+ var listOf = (value) => (value ?? "").split(",").map((entry) => entry.trim()).filter(Boolean);
62
+
63
+ class VerifyCommand extends command("verify", [VerifyScript], ({ public: target }) => ({
64
+ verify: target({
65
+ desc: "Sync, lint, typecheck and build what changed, in one run, and print only what failed",
66
+ stdio: true
67
+ }).arg("targets", String, {
68
+ desc: "apps, libraries or packages to verify, comma-separated (default: whatever git reports as changed)",
69
+ nullable: true
70
+ }).option("files", String, {
71
+ flag: "F",
72
+ desc: "verify these files only, comma-separated, instead of the git changes",
73
+ nullable: true
74
+ }).option("lintOnly", Boolean, {
75
+ flag: "l",
76
+ desc: "lint only: skip sync, typecheck, build and the SSR check",
77
+ default: false
78
+ }).option("build", Boolean, { flag: "b", desc: "build the changed apps once lint and typecheck pass", default: true }).option("max", Number, { flag: "m", desc: "diagnostic lines to print, 0 for all", default: 20 }).option("format", String, { flag: "f", desc: "output format", default: "text", enum: ["text", "json"] }).with(Workspace).exec(async function(targets, files, lintOnly, build, max, format, workspace) {
79
+ await this.verifyScript.verify(workspace, listOf(targets), {
80
+ files: listOf(files),
81
+ lintOnly,
82
+ build,
83
+ max,
84
+ format: format === "json" ? "json" : "text"
85
+ });
86
+ })
87
+ })) {
88
+ }
89
+ export {
90
+ VerifyCommand
91
+ };
@@ -3,20 +3,21 @@ import {
3
3
  Workspace,
4
4
  script,
5
5
  command
6
- } from "./index-3wypz6xj.js";
6
+ } from "./index-eja64h28.js";
7
7
  import"./index-52w0fvh8.js";
8
- import"./index-wcej7g4z.js";
8
+ import"./index-8scw1pjk.js";
9
9
  import"./index-hj6w4ka1.js";
10
- import"./index-xjf5j657.js";
11
- import"./index-31es1yev.js";
12
- import"./index-905qdgqp.js";
13
- import"./index-hmt54t45.js";
14
- import"./index-74tjjsnc.js";
15
- import"./index-j9vyj3dj.js";
16
- import"./index-skk9zc1x.js";
10
+ import"./index-4mj92tsh.js";
11
+ import"./index-tgt2fnd6.js";
12
+ import"./index-z4b84y6k.js";
13
+ import"./index-r2w2eh93.js";
14
+ import"./index-qxzrp5xt.js";
15
+ import"./index-k5jbcxyh.js";
16
+ import"./index-rnphv731.js";
17
+ import"./index-fbewhg4g.js";
17
18
  import {
18
19
  WorkflowRunner
19
- } from "./index-b70zct19.js";
20
+ } from "./index-zcf6k8a5.js";
20
21
 
21
22
  // pkgs/@akanjs/cli/workflow/workflow.script.ts
22
23
  import { Logger } from "akanjs/common";
@@ -38,7 +39,7 @@ class WorkflowScript extends script("workflow", [WorkflowRunner]) {
38
39
  return;
39
40
  }
40
41
  if (action === "plan") {
41
- Logger.rawLog(await this.workflowRunner.plan(workflow, inputs, { format, out }));
42
+ Logger.rawLog(await this.workflowRunner.plan(workflow, inputs, { format, out, workspace }));
42
43
  return;
43
44
  }
44
45
  if (action === "apply") {
@@ -69,8 +70,41 @@ class WorkflowCommand extends command("workflow", [WorkflowScript], ({ public: t
69
70
  workflow: target({ desc: "List, explain, plan, apply, validate, or report Akan workflows" }).arg("action", String, {
70
71
  desc: "list, explain, plan, apply, validate, or report",
71
72
  enum: ["list", "explain", "plan", "apply", "validate", "report"]
72
- }).arg("workflow", String, { desc: "workflow name, plan path, or run id", nullable: true }).with(Workspace).option("format", String, { desc: "output format", flag: "o", default: "markdown", enum: ["markdown", "json"] }).option("out", String, { flag: "w", desc: "write workflow plan JSON to this path", nullable: true }).option("dryRun", Boolean, { flag: "r", desc: "show predicted apply report without writing files", default: false }).option("app", String, { desc: "target app or library name", nullable: true }).option("module", String, { desc: "target module name", nullable: true }).option("field", String, { desc: "field name", nullable: true }).option("type", String, { desc: "field type or scalar name", nullable: true }).option("values", String, { flag: "l", desc: "comma-separated values", nullable: true }).option("default", String, { desc: "default value", nullable: true }).option("scalar", String, { flag: "c", desc: "scalar name", nullable: true }).option("surface", String, { flag: "u", desc: "UI surface name", nullable: true }).option("mutation", String, { flag: "n", desc: "mutation name", nullable: true }).option("slice", String, { flag: "i", desc: "slice name", nullable: true }).exec(async function(action, workflow, workspace, format, out, dryRun, app, module, field, typeName, values, defaultValue, scalar, surface, mutation, slice) {
73
- await this.workflowScript.workflow(action, workflow, { app, module, field, type: typeName, values, default: defaultValue, scalar, surface, mutation, slice }, { format, out, dryRun, workspace });
73
+ }).arg("workflow", String, { desc: "workflow name, plan path, or run id", nullable: true }).with(Workspace).option("format", String, { desc: "output format", flag: "o", default: "markdown", enum: ["markdown", "json"] }).option("out", String, { flag: "w", desc: "write workflow plan JSON to this path", nullable: true }).option("dryRun", Boolean, { flag: "r", desc: "show predicted apply report without writing files", default: false }).option("app", String, { desc: "target app or library name", nullable: true }).option("module", String, { desc: "target module name", nullable: true }).option("field", String, { desc: "field name", nullable: true }).option("type", String, { desc: "field type or scalar name", nullable: true }).option("values", String, { flag: "l", desc: "comma-separated values", nullable: true }).option("default", String, { desc: "default value", nullable: true }).option("scalar", String, { flag: "c", desc: "scalar name", nullable: true }).option("surface", String, { flag: "u", desc: "UI surface name", nullable: true }).option("surfaces", String, {
74
+ flag: "s",
75
+ desc: "comma-separated UI surfaces add-field updates (template, unit, view)",
76
+ nullable: true
77
+ }).option("includeInLight", Boolean, {
78
+ flag: "p",
79
+ desc: "add the field to the Light<Model> projection used by lists and cards",
80
+ nullable: true
81
+ }).option("mutation", String, { flag: "n", desc: "mutation name", nullable: true }).option("slice", String, { flag: "i", desc: "slice name", nullable: true }).option("guard", String, { flag: "g", desc: "comma-separated guard class names", nullable: true }).option("with", String, {
82
+ flag: "b",
83
+ desc: "comma-separated <serviceRef>.<method> writes committed with the mutation",
84
+ nullable: true
85
+ }).option("after", String, {
86
+ flag: "e",
87
+ desc: "comma-separated <serviceRef>.<method> side effects run after the commit",
88
+ nullable: true
89
+ }).option("interaction", String, { flag: "k", desc: "interaction name", nullable: true }).exec(async function(action, workflow, workspace, format, out, dryRun, app, module, field, typeName, values, defaultValue, scalar, surface, surfaces, includeInLight, mutation, slice, guard, withCalls, after, interaction) {
90
+ await this.workflowScript.workflow(action, workflow, {
91
+ app,
92
+ module,
93
+ field,
94
+ type: typeName,
95
+ values,
96
+ default: defaultValue,
97
+ scalar,
98
+ surface,
99
+ surfaces,
100
+ includeInLight: includeInLight === null ? null : String(includeInLight),
101
+ mutation,
102
+ slice,
103
+ guard,
104
+ with: withCalls,
105
+ after,
106
+ interaction
107
+ }, { format, out, dryRun, workspace });
74
108
  })
75
109
  })) {
76
110
  }