@akanjs/cli 3.1.1-rc.9 → 3.1.2-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 (207) hide show
  1. package/.build-stamp +1 -1
  2. package/CodeAgent-dyc45f5w.js +11 -0
  3. package/{CodeAgentRpcHost-9g27hmer.js → CodeAgentRpcHost-6dzfkvsc.js} +1 -1
  4. package/CodeAgentRpcListener-tcwrdvst.js +182 -0
  5. package/{CodeTui-z5vkm9ea.js → CodeTui-q55b2zrn.js} +25 -8
  6. package/TunnelShare-hdq9h1hr.js +14 -0
  7. package/agent.command-20zaqe60.js +49 -0
  8. package/akanCode.js +13 -8
  9. package/{application.command-wthg8nn9.js → application.command-nd0fshsk.js} +45 -12
  10. package/{applicationBuildRunner-t2r84sz6.js → applicationBuildRunner-s13x3zqb.js} +14 -10
  11. package/buildBatch.proc.js +7 -7
  12. package/{cloud.command-sz11hpre.js → cloud.command-8kbddsz9.js} +28 -19
  13. package/cloud.script-hgvvajm3.js +27 -0
  14. package/code.command-625bg8s8.js +345 -0
  15. package/commandManifest.json +1 -1
  16. package/{context.command-15j9b7c0.js → context.command-p6haqjay.js} +20 -18
  17. package/context.runner-rsnqnk9j.js +27 -0
  18. package/{dependencyScanner-3afj2vt1.js → dependencyScanner-78sq8m4q.js} +2 -2
  19. package/{devTui-q7k7bakd.js → devTui-evr3b35y.js} +1 -1
  20. package/{fileSys-wzzrntkw.js → fileSys-zpvt5gtf.js} +1 -1
  21. package/{guideline.command-snh85ctf.js → guideline.command-195g0h9a.js} +4 -4
  22. package/guidelines/agentRule/agentRule.instruction.md +22 -8
  23. package/guidelines/conventions/core.md +106 -0
  24. package/guidelines/conventions/rules/app.md +83 -0
  25. package/guidelines/conventions/rules/auth.md +46 -0
  26. package/guidelines/conventions/rules/config.md +60 -0
  27. package/guidelines/conventions/rules/constant.md +24 -0
  28. package/guidelines/conventions/rules/gates.md +32 -0
  29. package/guidelines/conventions/rules/layer.md +25 -0
  30. package/guidelines/conventions/rules/migration.md +27 -0
  31. package/guidelines/conventions/rules/module.md +90 -0
  32. package/guidelines/conventions/rules/page.md +56 -0
  33. package/guidelines/conventions/rules/sensitive.md +16 -0
  34. package/guidelines/conventions/rules/server.md +91 -0
  35. package/guidelines/conventions/rules/ssr.md +47 -0
  36. package/guidelines/conventions/rules/style.md +43 -0
  37. package/guidelines/conventions/rules/test.md +34 -0
  38. package/guidelines/conventions/rules/ts.md +95 -0
  39. package/guidelines/conventions/rules/tsx.md +76 -0
  40. package/guidelines/mcpRule/mcpRule.instruction.md +1 -1
  41. package/guidelines/pageRule/pageRule.instruction.md +8 -7
  42. package/guidelines/queryRule/queryRule.instruction.md +4 -0
  43. package/guidelines/runtimeRule/runtimeRule.instruction.md +35 -25
  44. package/guidelines/ssrRule/ssrRule.instruction.md +11 -10
  45. package/guidelines/transportRule/transportRule.instruction.md +5 -4
  46. package/guidelines/workspaceRecipes/workspaceRecipes.instruction.md +4 -4
  47. package/incrementalBuilder.proc.js +7 -7
  48. package/{index-301pdbzz.js → index-00a7j05x.js} +7 -7
  49. package/{index-js6geqjn.js → index-0j1t1h2b.js} +3 -1
  50. package/{index-6txx6a9p.js → index-1h2jc0x3.js} +154 -88
  51. package/{index-55j120r8.js → index-1qsd8ft1.js} +65 -145
  52. package/{index-9th4gszy.js → index-2mwjshz5.js} +233 -1271
  53. package/index-2nxk8wgs.js +266 -0
  54. package/{index-j9vyj3dj.js → index-2phm56a1.js} +49 -8
  55. package/index-35j83zkd.js +61 -0
  56. package/index-4am4dvmf.js +29 -0
  57. package/index-75y7bcz4.js +28 -0
  58. package/index-7apsdr5g.js +487 -0
  59. package/{index-42j4a8zq.js → index-84h43kg6.js} +8 -6
  60. package/index-9bv479q5.js +1 -0
  61. package/{index-3wypz6xj.js → index-9zy8479y.js} +11 -5
  62. package/{index-a5dhqkdr.js → index-a1vb3x7t.js} +273 -259
  63. package/{index-52w0fvh8.js → index-bns3wcpc.js} +15 -0
  64. package/index-cjmjvg4r.js +3622 -0
  65. package/{index-pcwzkdqb.js → index-defp4gmb.js} +1 -1
  66. package/index-ewbmfarf.js +1606 -0
  67. package/index-fbewhg4g.js +590 -0
  68. package/index-fhw7yq2d.js +653 -0
  69. package/{index-wcej7g4z.js → index-g500c5j9.js} +271 -105
  70. package/{index-74tjjsnc.js → index-g841cap9.js} +33 -37
  71. package/{index-2azahjaw.js → index-gr9thy79.js} +5 -5
  72. package/{index-4pf8g7ff.js → index-h7hehkw6.js} +3 -0
  73. package/{index-xjf5j657.js → index-hm0tn7qv.js} +1001 -91
  74. package/index-j6eeh5d7.js +138 -0
  75. package/{index-31es1yev.js → index-j7hwy56s.js} +108 -7
  76. package/{index-skk9zc1x.js → index-jc2zbwra.js} +2 -2
  77. package/{index-905qdgqp.js → index-khk05tsf.js} +1 -1
  78. package/{index-5nd1wtkv.js → index-p6x5b7hr.js} +1 -1
  79. package/{index-tvehn2sp.js → index-qd7xn2bk.js} +1 -1
  80. package/{index-a58emady.js → index-qw6814m4.js} +55 -17
  81. package/index-raz588b3.js +445 -0
  82. package/{index-at7bz0xq.js → index-s4nvxpzm.js} +2 -0
  83. package/{index-bt438yxm.js → index-sp0qsr7a.js} +116 -13
  84. package/{index-xb8809yb.js → index-sveq36gh.js} +40 -43
  85. package/{index-hmt54t45.js → index-t1t9wq9a.js} +4 -4
  86. package/index-t78230d7.js +191 -0
  87. package/index-tenw3mah.js +225 -0
  88. package/{index-qfp55x1y.js → index-tgqameyb.js} +4 -4
  89. package/{index-espk51ah.js → index-tp56652m.js} +6 -6
  90. package/index-w15mg3km.js +389 -0
  91. package/{index-dy0jx9ay.js → index-wwe9rsrx.js} +14 -0
  92. package/{index-2xcc2ax5.js → index-y4kcmbt2.js} +2 -2
  93. package/index-yf9wc28h.js +52 -0
  94. package/{index-0fz95kxe.js → index-zbrwnmf1.js} +9 -7
  95. package/{index-40brg4px.js → index-zttm13c3.js} +5 -5
  96. package/index.js +24 -23
  97. package/{library.command-gycrwhf1.js → library.command-63hgt9te.js} +4 -4
  98. package/{localRegistry.command-jtd8gaes.js → localRegistry.command-g3f8k25t.js} +46 -22
  99. package/{module.command-v6hgs1bc.js → module.command-r4sa2khp.js} +7 -6
  100. package/{package.command-shzpcfph.js → package.command-96eheyvd.js} +5 -5
  101. package/package.json +2 -2
  102. package/{page.command-ptxn5kqk.js → page.command-gs6d841d.js} +4 -4
  103. package/{pipeline.command-zz31pgax.js → pipeline.command-wdfvdbfj.js} +3 -3
  104. package/{primitive.command-a1vse91z.js → primitive.command-dfsv4mpe.js} +8 -7
  105. package/{projectTypecheck-2ztky9cf.js → projectTypecheck-kqj1t6hb.js} +1 -1
  106. package/{prompter-76k56b37.js → prompter-qrwx1p17.js} +2 -2
  107. package/quality.command-webzxee2.js +78 -0
  108. package/{repair.command-cvazbz99.js → repair.command-3r3j1xre.js} +7 -6
  109. package/{routeSourceValidator-6jd0q6r6.js → routeSourceValidator-4h947v7c.js} +13 -3
  110. package/{scalar.command-0acvyp26.js → scalar.command-e8y47j6d.js} +6 -5
  111. package/skills/akan-agent/SKILL.md +43 -0
  112. package/skills/akan-code/SKILL.md +38 -11
  113. package/skills/akan-debug/SKILL.md +41 -6
  114. package/skills/akan-deps/SKILL.md +1 -2
  115. package/skills/akan-err/SKILL.md +2 -1
  116. package/skills/akan-mcp/SKILL.md +40 -0
  117. package/skills/akan-page/SKILL.md +44 -0
  118. package/skills/akan-query/SKILL.md +39 -0
  119. package/skills/akan-runtime/SKILL.md +43 -0
  120. package/skills/akan-scaffold/SKILL.md +16 -6
  121. package/skills/akan-transport/SKILL.md +40 -0
  122. package/skills/akan-validate/SKILL.md +13 -11
  123. package/{subspace.command-822qx2bx.js → subspace.command-a1sf9n5a.js} +12 -10
  124. package/templates/__scalar/__model__/__model__.constant.ts +3 -5
  125. package/templates/__scalar/__model__/__model__.dictionary.ts +6 -5
  126. package/templates/__scalar/__model__/__model__.document.ts +3 -3
  127. package/templates/app/akan.config.ts +2 -3
  128. package/templates/app/env/env.client.ts +2 -4
  129. package/templates/app/env/env.client.type.ts +2 -3
  130. package/templates/app/env/env.server.ts +2 -3
  131. package/templates/app/lib/___appName__/__appName__.dictionary.ts +1 -2
  132. package/templates/app/lib/___appName__/__appName__.service.ts +3 -3
  133. package/templates/app/lib/___appName__/__appName__.signal.ts +5 -5
  134. package/templates/app/lib/___appName__/__appName__.store.ts +4 -6
  135. package/templates/app/lib/option.ts +2 -3
  136. package/templates/app/main.ts +2 -4
  137. package/templates/app/page/_index.tsx +3 -3
  138. package/templates/app/page/_layout.tsx +13 -10
  139. package/templates/appSample/lib/__scalar/workHistory/workHistory.constant.ts +1 -5
  140. package/templates/appSample/lib/__scalar/workHistory/workHistory.dictionary.ts +1 -1
  141. package/templates/appSample/lib/_noti/noti.signal.ts +1 -1
  142. package/templates/appSample/lib/task/Task.Template.tsx +2 -1
  143. package/templates/appSample/lib/task/Task.Unit.tsx +3 -2
  144. package/templates/appSample/lib/task/Task.Util.tsx +16 -4
  145. package/templates/appSample/lib/task/task.constant.ts +1 -5
  146. package/templates/appSample/lib/task/task.dictionary.ts +2 -8
  147. package/templates/appSample/lib/task/task.document.ts +1 -1
  148. package/templates/appSample/lib/task/task.signal.ts +14 -9
  149. package/templates/appSample/page/task/_index.tsx +2 -1
  150. package/templates/appSample/page/task/new.tsx +2 -1
  151. package/templates/appSample/srvkit/guards.ts +11 -0
  152. package/templates/appSample/ui/QuantityControl.tsx +5 -9
  153. package/templates/biomeForm.ts +144 -0
  154. package/templates/crudPages/[__model__Id]/edit/page.tsx +3 -3
  155. package/templates/crudPages/[__model__Id]/page.tsx +5 -5
  156. package/templates/crudPages/new/page.tsx +4 -3
  157. package/templates/crudPages/page.tsx +3 -3
  158. package/templates/crudSinglePage/page.tsx +9 -5
  159. package/templates/libRoot/akan.config.ts +2 -3
  160. package/templates/libRoot/lib/___libName__/__libName__.dictionary.ts +1 -2
  161. package/templates/libRoot/lib/___libName__/__libName__.service.ts +5 -4
  162. package/templates/libRoot/lib/___libName__/__libName__.signal.ts +6 -5
  163. package/templates/libRoot/lib/___libName__/__libName__.store.ts +5 -6
  164. package/templates/libRoot/lib/option.ts +1 -2
  165. package/templates/module/__Model__.Template.tsx +11 -10
  166. package/templates/module/__Model__.Unit.tsx +18 -5
  167. package/templates/module/__Model__.Util.tsx +9 -7
  168. package/templates/module/__Model__.View.tsx +9 -6
  169. package/templates/module/__Model__.Zone.tsx +25 -17
  170. package/templates/module/__model__.constant.ts +8 -9
  171. package/templates/module/__model__.dictionary.ts +16 -17
  172. package/templates/module/__model__.document.ts +6 -8
  173. package/templates/module/__model__.service.ts +3 -3
  174. package/templates/module/__model__.signal.ts +11 -10
  175. package/templates/module/__model__.store.ts +3 -5
  176. package/templates/service/__model__.dictionary.ts +5 -6
  177. package/templates/service/__model__.service.ts +3 -3
  178. package/templates/service/__model__.signal.ts +5 -4
  179. package/templates/service/__model__.store.ts +3 -5
  180. package/templates/workspaceRoot/.gitignore.template +4 -0
  181. package/templates/workspaceRoot/.vscode/settings.json.template +21 -21
  182. package/templates/workspaceRoot/AGENTS.md.template +4 -10
  183. package/{tunnel.command-ycmja19q.js → tunnel.command-dcb0wg93.js} +25 -13
  184. package/{typeChecker-px49mezc.js → typeChecker-j2jdnqsr.js} +1 -1
  185. package/typecheck.proc.js +6 -1
  186. package/verify.command-yyepccbh.js +93 -0
  187. package/{workflow.command-abb1d5xy.js → workflow.command-z5pg9ay0.js} +49 -14
  188. package/workspace.command-d7x5jttw.js +290 -0
  189. package/CodeAgent-8d5qs787.js +0 -9
  190. package/CodeAgentRpcListener-7p7z5dd7.js +0 -97
  191. package/TunnelShare-qkm8zp03.js +0 -14
  192. package/agent.command-ydftceda.js +0 -25
  193. package/cloud.script-nqevg5qw.js +0 -24
  194. package/code.command-9h3yrzhe.js +0 -167
  195. package/context.runner-8gg030b0.js +0 -25
  196. package/guidelines/conventions/conventions.instruction.md +0 -617
  197. package/guidelines/workspaceOnboarding/workspaceOnboarding.instruction.md +0 -291
  198. package/index-2mwc0g0d.js +0 -49
  199. package/index-4vgbysa0.js +0 -279
  200. package/index-7md2g9vw.js +0 -6
  201. package/index-b70zct19.js +0 -856
  202. package/index-c6eggbee.js +0 -123
  203. package/index-zzvvc845.js +0 -74
  204. package/quality.command-ah8qcakd.js +0 -1478
  205. package/templates/workspaceRoot/docs/AI-DEVELOPMENT.md.template +0 -69
  206. package/templates/workspaceRoot/docs/GENERATED.md.template +0 -55
  207. package/workspace.command-qm7cw29v.js +0 -521
@@ -4,32 +4,38 @@ import {
4
4
  runner,
5
5
  script,
6
6
  command
7
- } from "./index-3wypz6xj.js";
8
- import"./index-52w0fvh8.js";
7
+ } from "./index-9zy8479y.js";
8
+ import"./index-bns3wcpc.js";
9
9
  import {
10
10
  PkgExecutor
11
- } from "./index-wcej7g4z.js";
12
- import"./index-5nd1wtkv.js";
13
- import"./index-bt438yxm.js";
14
- import"./index-js6geqjn.js";
11
+ } from "./index-g500c5j9.js";
12
+ import {
13
+ npmRegistryFromEnv,
14
+ warnIgnoredNpmRegistry,
15
+ getNpmRegistryUrl
16
+ } from "./index-4am4dvmf.js";
17
+ import"./index-p6x5b7hr.js";
18
+ import"./index-sp0qsr7a.js";
19
+ import"./index-0j1t1h2b.js";
15
20
  import"./index-m9jj544v.js";
16
- import"./index-xb8809yb.js";
17
- import"./index-0fz95kxe.js";
18
- import"./index-2xcc2ax5.js";
21
+ import"./index-zbrwnmf1.js";
22
+ import"./index-sveq36gh.js";
23
+ import"./index-y4kcmbt2.js";
24
+ import"./index-2mwjshz5.js";
19
25
  import {
20
26
  ApplicationScript
21
- } from "./index-9th4gszy.js";
22
- import"./index-7md2g9vw.js";
23
- import"./index-2azahjaw.js";
27
+ } from "./index-ewbmfarf.js";
28
+ import"./index-tenw3mah.js";
29
+ import"./index-gr9thy79.js";
24
30
  import {
25
- getNpmRegistryUrl,
26
31
  CloudRunner
27
- } from "./index-6txx6a9p.js";
28
- import"./index-tvehn2sp.js";
32
+ } from "./index-1h2jc0x3.js";
33
+ import"./index-qd7xn2bk.js";
29
34
  import {
30
35
  PackageScript
31
- } from "./index-42j4a8zq.js";
32
- import"./index-pcwzkdqb.js";
36
+ } from "./index-84h43kg6.js";
37
+ import"./index-defp4gmb.js";
38
+ import"./index-9bv479q5.js";
33
39
 
34
40
  // pkgs/@akanjs/cli/localRegistry/localRegistry.runner.ts
35
41
  import { mkdir, rm } from "fs/promises";
@@ -39,15 +45,31 @@ var defaultLocalRegistryUrl = "http://127.0.0.1:4873";
39
45
  var containerName = "akan-verdaccio";
40
46
  var smokeRepoName = "akan-local-smoke";
41
47
  var smokeAppName = "demo";
48
+ var ipv4Pattern = /^\d{1,3}(?:\.\d{1,3}){3}$/;
42
49
 
43
50
  class LocalRegistryRunner extends runner("localRegistry") {
44
- getRegistryUrl(registryUrl = process.env.AKAN_NPM_REGISTRY ?? defaultLocalRegistryUrl) {
51
+ getRegistryUrl(registryUrl = npmRegistryFromEnv() ?? defaultLocalRegistryUrl) {
45
52
  return getNpmRegistryUrl(registryUrl);
46
53
  }
54
+ static publishAddressOf(registry) {
55
+ const { hostname, port } = new URL(registry);
56
+ return { host: ipv4Pattern.test(hostname) ? hostname : "127.0.0.1", port: port || "4873" };
57
+ }
58
+ static #listensEverywhere(inspectOutput) {
59
+ try {
60
+ const [container] = JSON.parse(inspectOutput);
61
+ return Object.values(container?.HostConfig?.PortBindings ?? {}).some((bindings) => (bindings ?? []).some(({ HostIp }) => !HostIp || HostIp === "0.0.0.0" || HostIp === "::"));
62
+ } catch {
63
+ return false;
64
+ }
65
+ }
47
66
  async start(workspace, { registryUrl } = {}) {
48
67
  const registry = this.getRegistryUrl(registryUrl);
68
+ const address = LocalRegistryRunner.publishAddressOf(registry);
49
69
  try {
50
- await workspace.spawn("docker", ["inspect", containerName]);
70
+ const inspected = await workspace.spawn("docker", ["inspect", containerName]);
71
+ if (address.host !== "0.0.0.0" && LocalRegistryRunner.#listensEverywhere(inspected))
72
+ Logger.warn(`The running ${containerName} container listens on every network interface; run \`docker rm -f ${containerName}\` and start it again to bind it to ${address.host}.`);
51
73
  Logger.info(`Local registry is already running at ${registry}`);
52
74
  return registry;
53
75
  } catch {}
@@ -61,7 +83,7 @@ class LocalRegistryRunner extends runner("localRegistry") {
61
83
  "--name",
62
84
  containerName,
63
85
  "-p",
64
- "4873:4873",
86
+ `${address.host}:${address.port}:4873`,
65
87
  "-v",
66
88
  `${configPath}:/verdaccio/conf/config.yaml:ro`,
67
89
  "-v",
@@ -145,14 +167,16 @@ class LocalRegistryScript extends script("localRegistry", [
145
167
  class LocalRegistryCommand extends command("local-registry", [LocalRegistryScript], ({ public: target }) => ({
146
168
  startRegistry: target({ devOnly: true, desc: "Start the local Verdaccio npm registry" }).with(Workspace).option("registry", String, {
147
169
  desc: "local npm registry URL",
148
- default: process.env.AKAN_NPM_REGISTRY ?? "http://127.0.0.1:4873"
170
+ default: npmRegistryFromEnv() ?? "http://127.0.0.1:4873"
149
171
  }).exec(async function(workspace, registry) {
172
+ warnIgnoredNpmRegistry();
150
173
  await this.localRegistryScript.start(workspace, { registryUrl: registry });
151
174
  }),
152
175
  resetRegistry: target({ devOnly: true, desc: "Stop and clear the local Verdaccio npm registry" }).with(Workspace).exec(async function(workspace) {
153
176
  await this.localRegistryScript.reset(workspace);
154
177
  }),
155
- smokeRegistry: target({ devOnly: true, desc: "Publish to local registry and build a generated workspace" }).with(Workspace).option("tag", String, { flag: "g", desc: "dist-tag for local registry publish", default: "rc" }).option("test", Boolean, { desc: "run package tests before publishing", default: true }).option("registry", String, { desc: "local npm registry URL", default: process.env.AKAN_NPM_REGISTRY }).exec(async function(workspace, tag, test, registry) {
178
+ smokeRegistry: target({ devOnly: true, desc: "Publish to local registry and build a generated workspace" }).with(Workspace).option("tag", String, { flag: "g", desc: "dist-tag for local registry publish", default: "rc" }).option("test", Boolean, { desc: "run package tests before publishing", default: true }).option("registry", String, { desc: "local npm registry URL", default: npmRegistryFromEnv() }).exec(async function(workspace, tag, test, registry) {
179
+ warnIgnoredNpmRegistry();
156
180
  await this.localRegistryScript.smoke(workspace, { tag, test, registryUrl: registry });
157
181
  })
158
182
  })) {
@@ -3,16 +3,17 @@ import {
3
3
  Sys,
4
4
  Module,
5
5
  command
6
- } from "./index-3wypz6xj.js";
7
- import"./index-52w0fvh8.js";
8
- import"./index-wcej7g4z.js";
6
+ } from "./index-9zy8479y.js";
7
+ import"./index-bns3wcpc.js";
8
+ import"./index-g500c5j9.js";
9
9
  import {
10
10
  renderPrimitiveReport
11
- } from "./index-xjf5j657.js";
12
- import"./index-905qdgqp.js";
11
+ } from "./index-hm0tn7qv.js";
12
+ import"./index-2nxk8wgs.js";
13
+ import"./index-khk05tsf.js";
13
14
  import {
14
15
  ModuleScript
15
- } from "./index-hmt54t45.js";
16
+ } from "./index-t1t9wq9a.js";
16
17
 
17
18
  // pkgs/@akanjs/cli/module/module.command.ts
18
19
  import { Logger, lowerlize } from "akanjs/common";
@@ -3,13 +3,13 @@ import {
3
3
  Pkg,
4
4
  Workspace,
5
5
  command
6
- } from "./index-3wypz6xj.js";
7
- import"./index-52w0fvh8.js";
8
- import"./index-wcej7g4z.js";
9
- import"./index-tvehn2sp.js";
6
+ } from "./index-9zy8479y.js";
7
+ import"./index-bns3wcpc.js";
8
+ import"./index-g500c5j9.js";
9
+ import"./index-qd7xn2bk.js";
10
10
  import {
11
11
  PackageScript
12
- } from "./index-42j4a8zq.js";
12
+ } from "./index-84h43kg6.js";
13
13
 
14
14
  // pkgs/@akanjs/cli/package/package.command.ts
15
15
  class PackageCommand extends command("package", [PackageScript], ({ public: target }) => ({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@akanjs/cli",
3
- "version": "3.1.1-rc.9",
3
+ "version": "3.1.2-rc.0",
4
4
  "sourceType": "module",
5
5
  "type": "module",
6
6
  "publishConfig": {
@@ -39,7 +39,7 @@
39
39
  "@earendil-works/pi-tui": "1.3.0",
40
40
  "@inquirer/prompts": "^8.7.3",
41
41
  "@tailwindcss/node": "^4.3.3",
42
- "akanjs": "3.1.1-rc.9",
42
+ "akanjs": "3.1.2-rc.0",
43
43
  "chalk": "^6.0.1",
44
44
  "commander": "^15.0.0",
45
45
  "dayjs": "^1.11.23",
@@ -3,12 +3,12 @@ import {
3
3
  App,
4
4
  Module,
5
5
  command
6
- } from "./index-3wypz6xj.js";
7
- import"./index-52w0fvh8.js";
8
- import"./index-wcej7g4z.js";
6
+ } from "./index-9zy8479y.js";
7
+ import"./index-bns3wcpc.js";
8
+ import"./index-g500c5j9.js";
9
9
  import {
10
10
  PageScript
11
- } from "./index-905qdgqp.js";
11
+ } from "./index-khk05tsf.js";
12
12
 
13
13
  // pkgs/@akanjs/cli/page/page.command.ts
14
14
  class PageCommand extends command("page", [PageScript], ({ public: target }) => ({
@@ -4,15 +4,15 @@ import {
4
4
  runner,
5
5
  script,
6
6
  command
7
- } from "./index-3wypz6xj.js";
7
+ } from "./index-9zy8479y.js";
8
8
  import {
9
9
  FileSys2
10
- } from "./index-52w0fvh8.js";
10
+ } from "./index-bns3wcpc.js";
11
11
  import {
12
12
  AkanAppConfig,
13
13
  AkanWorkspaceConfig,
14
14
  AppExecutor
15
- } from "./index-wcej7g4z.js";
15
+ } from "./index-g500c5j9.js";
16
16
  import {
17
17
  resolveMobileTargets
18
18
  } from "./index-m9jj544v.js";
@@ -2,17 +2,18 @@
2
2
  import {
3
3
  Workspace,
4
4
  command
5
- } from "./index-3wypz6xj.js";
6
- import"./index-52w0fvh8.js";
7
- import"./index-wcej7g4z.js";
5
+ } from "./index-9zy8479y.js";
6
+ import"./index-bns3wcpc.js";
7
+ import"./index-g500c5j9.js";
8
8
  import {
9
9
  renderPrimitiveReport
10
- } from "./index-xjf5j657.js";
11
- import"./index-905qdgqp.js";
12
- import"./index-hmt54t45.js";
10
+ } from "./index-hm0tn7qv.js";
11
+ import"./index-2nxk8wgs.js";
12
+ import"./index-khk05tsf.js";
13
+ import"./index-t1t9wq9a.js";
13
14
  import {
14
15
  PrimitiveScript
15
- } from "./index-74tjjsnc.js";
16
+ } from "./index-g841cap9.js";
16
17
 
17
18
  // pkgs/@akanjs/cli/primitive/primitive.command.ts
18
19
  import { Logger } from "akanjs/common";
@@ -1,7 +1,7 @@
1
1
  // @bun
2
2
  import {
3
3
  ProjectTypecheck2
4
- } from "./index-wcej7g4z.js";
4
+ } from "./index-g500c5j9.js";
5
5
  export {
6
6
  ProjectTypecheck2 as ProjectTypecheck
7
7
  };
@@ -1,8 +1,8 @@
1
1
  // @bun
2
2
  import {
3
3
  Prompter2
4
- } from "./index-zzvvc845.js";
5
- import"./index-52w0fvh8.js";
4
+ } from "./index-j6eeh5d7.js";
5
+ import"./index-bns3wcpc.js";
6
6
  export {
7
7
  Prompter2 as Prompter
8
8
  };
@@ -0,0 +1,78 @@
1
+ // @bun
2
+ import {
3
+ Workspace,
4
+ script,
5
+ command
6
+ } from "./index-9zy8479y.js";
7
+ import"./index-bns3wcpc.js";
8
+ import {
9
+ AppExecutor,
10
+ LibExecutor
11
+ } from "./index-g500c5j9.js";
12
+ import {
13
+ MaintainabilityBaseline,
14
+ WorkspaceRunner,
15
+ AkanQualityScanner,
16
+ formatQualityScanResult,
17
+ formatSsrScanResult
18
+ } from "./index-cjmjvg4r.js";
19
+ import"./index-2nxk8wgs.js";
20
+ import"./index-62md4dwy.js";
21
+ import"./index-hj6w4ka1.js";
22
+ import"./index-4am4dvmf.js";
23
+ import"./index-fbewhg4g.js";
24
+
25
+ // pkgs/@akanjs/cli/quality/quality.script.ts
26
+ import { Logger } from "akanjs/common";
27
+ class QualityScript extends script("quality", [WorkspaceRunner]) {
28
+ async scan(workspace, format = "text") {
29
+ const spinner = workspace.spinning("Scanning Akan code quality...");
30
+ const result = await new AkanQualityScanner().scan(workspace.workspaceRoot);
31
+ spinner.succeed(`Quality scan completed (${result.scannedFiles} files, ${result.warnings.length} warnings)`);
32
+ Logger.rawLog(format === "json" ? JSON.stringify(result, null, 2) : formatQualityScanResult(result));
33
+ }
34
+ async ssr(workspace, format = "text") {
35
+ const spinner = workspace.spinning("Measuring Akan server/client render balance...");
36
+ const scanned = await new AkanQualityScanner().scan(workspace.workspaceRoot);
37
+ const result = { ...scanned, warnings: scanned.warnings.filter((warning) => warning.scope === "ssr") };
38
+ spinner.succeed(`SSR scan completed (${result.scannedFiles} files, ${result.warnings.length} warnings)`);
39
+ Logger.rawLog(format === "json" ? JSON.stringify(result, null, 2) : formatSsrScanResult(result));
40
+ }
41
+ async baseline(workspace, { force = false } = {}) {
42
+ const [appNames, libNames] = await workspace.getExecs();
43
+ const execs = [
44
+ ...appNames.map((appName) => AppExecutor.from(workspace, appName)),
45
+ ...libNames.map((libName) => LibExecutor.from(workspace, libName))
46
+ ];
47
+ const { fileName } = MaintainabilityBaseline;
48
+ for (const exec of execs) {
49
+ const contract = await this.workspaceRunner.maintainabilityContractOf(exec);
50
+ const { result, violations } = await contract.seed({ force });
51
+ const outcome = {
52
+ written: `wrote ${fileName} with ${violations.length} entries`,
53
+ kept: `kept the existing ${fileName} (${violations.length} current violations); --force rewrites it`,
54
+ removed: `no violations, removed ${fileName}`,
55
+ clean: "no violations"
56
+ }[result];
57
+ Logger.rawLog(`${contract.sysPath}: ${outcome}`);
58
+ }
59
+ }
60
+ }
61
+
62
+ // pkgs/@akanjs/cli/quality/quality.command.ts
63
+ class QualityCommand extends command("quality", [QualityScript], ({ public: target }) => ({
64
+ quality: target({ desc: "Scan apps and libs for Akan code quality warnings" }).arg("action", String, { desc: "quality action", default: "scan", enum: ["scan", "ssr", "baseline"] }).option("format", String, { desc: "output format", default: "text", enum: ["text", "json"] }).option("force", Boolean, { flag: "F", desc: "baseline: rewrite an existing akan.baseline.json", default: false }).with(Workspace).exec(async function(action, format, force, workspace) {
65
+ if (action === "scan")
66
+ await this.qualityScript.scan(workspace, format);
67
+ else if (action === "ssr")
68
+ await this.qualityScript.ssr(workspace, format);
69
+ else if (action === "baseline")
70
+ await this.qualityScript.baseline(workspace, { force });
71
+ else
72
+ throw new Error(`Unknown quality action: ${action}. Use "scan", "ssr" or "baseline".`);
73
+ })
74
+ })) {
75
+ }
76
+ export {
77
+ QualityCommand
78
+ };
@@ -3,15 +3,16 @@ import {
3
3
  Workspace,
4
4
  script,
5
5
  command
6
- } from "./index-3wypz6xj.js";
7
- import"./index-52w0fvh8.js";
8
- import"./index-wcej7g4z.js";
6
+ } from "./index-9zy8479y.js";
7
+ import"./index-bns3wcpc.js";
8
+ import"./index-g500c5j9.js";
9
9
  import"./index-hj6w4ka1.js";
10
- import"./index-xjf5j657.js";
11
- import"./index-31es1yev.js";
10
+ import"./index-hm0tn7qv.js";
11
+ import"./index-2nxk8wgs.js";
12
+ import"./index-j7hwy56s.js";
12
13
  import {
13
14
  RepairRunner
14
- } from "./index-j9vyj3dj.js";
15
+ } from "./index-2phm56a1.js";
15
16
 
16
17
  // pkgs/@akanjs/cli/repair/repair.script.ts
17
18
  import { Logger } from "akanjs/common";
@@ -77,7 +77,9 @@ class RouteSourceValidator {
77
77
  kind: chain.kind,
78
78
  params: chain.params,
79
79
  ...chain.prompt ? { prompt: chain.prompt } : {},
80
- apps: chain.apps
80
+ apps: chain.apps,
81
+ search: chain.search,
82
+ guarded: chain.guarded
81
83
  }
82
84
  };
83
85
  }
@@ -128,8 +130,10 @@ class RouteSourceValidator {
128
130
  static #chainOf(kind, stages, filePath) {
129
131
  const params = [];
130
132
  const apps = [];
133
+ const search = [];
131
134
  let prompt;
132
135
  let devOnly = false;
136
+ let guarded = false;
133
137
  const literal = (stage) => {
134
138
  const first = stage.args[0];
135
139
  if (!first || !ts.isStringLiteralLike(first))
@@ -143,10 +147,16 @@ class RouteSourceValidator {
143
147
  prompt = literal(stage);
144
148
  else if (stage.name === "app")
145
149
  apps.push(literal(stage));
146
- else if (stage.name === "config")
150
+ else if (stage.name === "guard")
151
+ guarded = true;
152
+ else if (stage.name === "search") {
153
+ const first = stage.args[0];
154
+ if (first && ts.isStringLiteralLike(first))
155
+ search.push(first.text);
156
+ } else if (stage.name === "config")
147
157
  devOnly = RouteSourceValidator.#devOnlyOf(RouteSourceValidator.#unwrapExpression(stage.args[0]), filePath);
148
158
  }
149
- return { kind, params, prompt, apps, devOnly };
159
+ return { kind, params, prompt, apps, search, guarded, devOnly };
150
160
  }
151
161
  static #assertChainParams(chain, pattern, filePath) {
152
162
  const inPath = pattern.split("/").filter((part) => part.startsWith(":")).map((part) => part.slice(1)).filter((name) => name !== "lang");
@@ -2,15 +2,16 @@
2
2
  import {
3
3
  Sys,
4
4
  command
5
- } from "./index-3wypz6xj.js";
6
- import"./index-52w0fvh8.js";
7
- import"./index-wcej7g4z.js";
5
+ } from "./index-9zy8479y.js";
6
+ import"./index-bns3wcpc.js";
7
+ import"./index-g500c5j9.js";
8
8
  import {
9
9
  renderPrimitiveReport
10
- } from "./index-xjf5j657.js";
10
+ } from "./index-hm0tn7qv.js";
11
+ import"./index-2nxk8wgs.js";
11
12
  import {
12
13
  ScalarScript
13
- } from "./index-skk9zc1x.js";
14
+ } from "./index-jc2zbwra.js";
14
15
 
15
16
  // pkgs/@akanjs/cli/scalar/scalar.command.ts
16
17
  import { Logger, lowerlize } from "akanjs/common";
@@ -0,0 +1,43 @@
1
+ ---
2
+ name: akan-agent
3
+ description: "Build the in-page agent: mounting Agent.Chat, setAgentAccess and the request policy, the LLM, publishing st.tool actions and cards, forms, readable state, zones, route guidance and slash commands."
4
+ ---
5
+
6
+ # Akan in-page agent
7
+
8
+ **The surface is what components declare, exactly.** `st.tool` publishes one action and `st.use` / `st.sel` /
9
+ `st.ref` make one store key readable while the reading component is mounted. A method on a store class gives an
10
+ agent nothing, and only the current page's declarations are live.
11
+
12
+ ## Mount it
13
+
14
+ 1. Mount `<Agent.Chat />` once, in a layout. It never executes tools: every tool runs in the caller's browser,
15
+ gated by guards and the approval card.
16
+ 2. It refuses every call until `option.setAgentAccess(<guard>)` in `lib/option.ts` names who may use it
17
+ (`SignedIn` for a product with accounts). What a turn may ask is `option.setAgentRequestPolicy`; until one is
18
+ set, a turn past `AgentRelayPolicy.defaultLimits` is refused with 413, and a policy of the app's own keeps them
19
+ with `AgentRelayPolicy.capped(request, limits)`. An error that is not an `Err` reaches the chat as a generic
20
+ failure unless `AKAN_ERROR_DETAIL=1` or a development runtime shows it.
21
+ 3. The LLM is `option.setLlm({ apiKey, model, host })`, never env.
22
+
23
+ ## Publish actions
24
+
25
+ - Declare the tool beside the control that already does it, and hand the result to the control:
26
+ `st.tool("x").desc("…").arg("id", ID).exec((id) => st.do.removeX(id))`. One handler serves the person and the
27
+ agent; `.desc()` is required and first.
28
+ - A name starting with a write verb (`remove`, `delete`, `create`, `update`, `upsert`, `submit`, `save`, `send`,
29
+ `export`) asks the user first; `{ confirm: false }` opts one tool out, `AgentConfirm.set` the app.
30
+ - `.card(({ submit, cancel }) => <Form … />)` parks the call in the chat for an answer that is the user's to give.
31
+ - Store-driven forms publish themselves: `onChange={st.do.setFieldOnX}` by reference emits the `data-akan-action`
32
+ the agent drives. A pass-through arrow publishes nothing and fails lint.
33
+ - Every `st.tool(…).exec()` / `.card()` is a hook: never behind a condition.
34
+
35
+ ## Reads and guidance
36
+
37
+ - `st.use.x({ agent: false })` hides a key; `hidden`, `secret` and `visual` fields are stripped from every read.
38
+ - Page text is data the model reads, never instructions: after a screen read the next call that changes something
39
+ asks once, and `data-agent-private="<label>"` keeps a region's text out of every read.
40
+ - A tool value is capped at 20,000 characters.
41
+ - Route guidance is `<Agent.Guide instructions="…" />`; model-facing text is English.
42
+
43
+ Full detail: `get_guideline` with `agentRule`.
@@ -9,9 +9,9 @@ This is the tool the user is talking to right now. When they ask how to do somet
9
9
  with their code — answer from here, and quote the exact gesture: the slash command to type, or the file to
10
10
  edit. Do not guess a command; everything this tool offers is listed below.
11
11
 
12
- You cannot type a slash command yourself. They are the host's, not yours — say which one to type. You *can*
13
- edit the files named below, which is the useful half of most of these answers: write the change, then say
14
- which command makes it take effect.
12
+ You cannot type a slash command yourself. They are the host's, not yours — say which one to type. You cannot
13
+ edit `mcp.json`, `.akan/code/extensions/` or anything under `~/.akan/` either: the deny list covers them, so
14
+ quote the `/mcp` command that makes the change instead. The context files and skills named below you can edit.
15
15
 
16
16
  ## MCP servers
17
17
 
@@ -52,8 +52,17 @@ From the prompt:
52
52
 
53
53
  **A server added now is not reachable until the session reloads.** The tool allowlist is fixed when the
54
54
  session is created, so `add`, `remove`, `login` and `logout` all reload by themselves — a session that has
55
- said nothing yet has nothing on disk to reopen, and says so. If you edit `mcp.json` yourself, tell the user to
56
- run `/mcp reload`.
55
+ said nothing yet has nothing on disk to reopen, and says so. After the user edits `mcp.json` by hand, `/mcp
56
+ reload` makes it take effect.
57
+
58
+ **This repo's own servers start only once the user approves them.** At start, `akan code` lists what this
59
+ repo's `.akan/code/mcp.json` would run, and the extensions in `.akan/code/extensions/`, and asks once; a yes is
60
+ remembered in `~/.akan/code/trust.json` until that content changes, and is asked again after. An extensions
61
+ folder past 10,000 files or 64 MiB, or with a link that leads out of it, is asked about at every start. With
62
+ nobody at a terminal they are not started, and `/mcp` shows `not approved`. `--trust-workspace` (`-T`) starts
63
+ them for one run without asking. Servers in `~/.akan/code/mcp.json`, where `/mcp add` writes, need no approval;
64
+ `/mcp add --local` writes this repo's file and keeps the approval it had, so a server added while that file
65
+ waits for approval waits with it.
57
66
 
58
67
  `/mcp remove` on a name both files declare takes this repo's entry and leaves the home file's in force; its
59
68
  notice says so, and running it again removes that one too.
@@ -61,8 +70,9 @@ notice says so, and running it again removes that one too.
61
70
  Sign-in is discovered, not configured: the server's `401` names its resource metadata, that names the
62
71
  authorization server, and most hosted servers register a client on demand — so a url is usually the whole
63
72
  entry. For a provider that issues client ids by hand, add `"oauth": { "clientId": "…", "scope": "…" }`.
64
- Tokens are stored per server in `~/.akan/code/mcpAuth.json` at mode 0600, never in the repo, and refreshed
65
- silently — at connect when one has expired, and mid-session when a server refuses one, after which the call is
73
+ Tokens are stored in `~/.akan/code/mcpAuth.json` at mode 0600, never in the repo, bound to the server's origin
74
+ rather than its name — a server renamed in the file keeps its sign-in, and one moved to another url signs in
75
+ again. They are refreshed silently — at connect when one has expired, and mid-session when a server refuses one, after which the call is
66
76
  retried once. When a refresh cannot fix it, `/mcp` shows `sign-in needed` and that server's tools answer with
67
77
  `/mcp login <name>` until the user signs in; the sign-in reloads the session, which brings the server back.
68
78
 
@@ -85,19 +95,23 @@ Stored under `.akan/code/sessions` — project history, so a second checkout of
85
95
  ## Model, effort, keys
86
96
 
87
97
  - `/model <provider>/<id>`, e.g. `/model deepseek/deepseek-v4-pro`. `/effort <level>` for how hard it thinks.
98
+ A `task` sub-agent starts on the model the session is on at that moment.
88
99
  - A provider is authorized by **`<PROVIDER>_API_KEY`** — `DEEPSEEK_API_KEY`, `ANTHROPIC_API_KEY`. The
89
100
  workspace's own `.env` is read as well as the environment, and a key found there is used for the run and
90
101
  never copied anywhere.
91
- - Credentials and the model catalogue live in `~/.akan/code/` (`auth.json`, `models.json`). **`AKAN_CODE_HOME`
92
- moves the whole directory** — for a container with no home, or a checkout that wants its own.
102
+ - Credentials and the model catalogue live in `~/.akan/code/` (`auth.json`, `models.json`), mode 0700.
103
+ **`AKAN_CODE_HOME` moves the whole directory** — for a container with no home, or a checkout that wants its
104
+ own. It, `AKAN_CODE_CAN_PROMPT`, the `AKAN_CODE_PROXY_*` settings and `AKAN_CODE_RPC_TOKEN_FILE` are read
105
+ from the shell only: one a repo's `.env` names is ignored, with a warning at start.
93
106
 
94
107
  ## What the agent reads, and how to change it
95
108
 
96
109
  - Every `AGENTS.md` / `CLAUDE.md` from the workspace root down to the working directory, `.cursorrules`, and
97
110
  any `.cursor/rules/*.mdc` that applies unconditionally (`alwaysApply: true`, or no frontmatter at all).
98
111
  Edit those to change how this agent behaves in this repo — they are the files the editor beside it reads.
99
- - Skills: drop a `<name>/SKILL.md` into `.akan/code/skills`. Extensions: `.akan/code/extensions`. Neither is
100
- read from a home directory, so a session behaves the same in two checkouts.
112
+ - Skills: drop a `<name>/SKILL.md` into `.akan/code/skills`. Extensions: `.akan/code/extensions`, loaded once
113
+ the user approves them (see MCP servers). Neither is read from a home directory, so a session behaves the
114
+ same in two checkouts.
101
115
 
102
116
  ## Keys
103
117
 
@@ -123,8 +137,21 @@ akan code -i "<prompt>" open the session with the prompt already sent
123
137
  --profile local|pod|review|web what it may do (default local)
124
138
  --model <provider>/<id> --thinking, --json, --rpc, --resume <id>
125
139
  --compact-at <percent> compact once the window is this full (10, 20, … 100)
140
+ --trust-workspace start this repo's MCP servers and extensions without asking
141
+ --no-ask-network never ask before an unlisted host (local profile)
142
+ --rpc-listen unix:<path>|tcp:[host:]<port> serve the RPC wire on a socket instead of stdio
126
143
  ```
127
144
 
145
+ `local` runs as the user: it refuses known secret files and the home credential stores, and asks before it
146
+ fetches a page from a host off a short documentation list or a shell command that reaches the network
147
+ (`curl`, `ssh`, …) — refused outright where nobody can answer, as in a one-shot `akan code "<prompt>"`. It is
148
+ not a sandbox; `pod` in a container is.
149
+
150
+ A `tcp:` listener asks every connection to open with `{"auth":"<token>"}` on its first line; the token is a
151
+ fresh one in `~/.akan/code/rpc/<port>.token`, or the one in the file `AKAN_CODE_RPC_TOKEN_FILE` names.
152
+ `--no-rpc-token` drops it, and only a loopback address is bound unless `--rpc-bind-any` is given. A unix
153
+ socket is created owner-only and asks for no token.
154
+
128
155
  `review` reads and never writes, loads no project context files, and keeps no session on disk. `pod` has
129
156
  nobody in front of it: it cannot ask a question. MCP is off in both.
130
157
 
@@ -1,10 +1,43 @@
1
1
  ---
2
2
  name: akan-debug
3
- description: "Debug a running Akan app: where the dev-server log is, how to read it, and how to tell a runtime failure from a build one."
3
+ description: "Check and debug a running Akan app: akan preview for what a page shows and throws, where the dev-server log is, how to read it, and how to tell a runtime failure from a build one."
4
4
  ---
5
5
 
6
6
  # Akan debug
7
7
 
8
+ ## See the change run: `akan preview`
9
+
10
+ `akan preview <app> [paths]` opens pages of the app's dev server in a headless browser and prints, per page,
11
+ the HTTP status, the title, a slice of the visible text, the uncaught errors and rejections the page reported,
12
+ the server errors logged meanwhile, console errors and warnings, and layout smells. It exits 1 when a page failed.
13
+
14
+ - It uses the dev server that answers for this app and checkout. With none, it starts one for the run and
15
+ stops it after; `--keep` leaves it up for the next preview. It never starts a second server beside a
16
+ running one.
17
+ - Paths are comma-separated (`akan preview <app> /board,/board/new`) and get the default locale when they lack
18
+ one, unless the app sets `localePrefix: "as-needed"` and `--csr` is off.
19
+ `--changed` adds the pages your uncommitted page and layout edits reach. A dynamic route needs a concrete
20
+ path (`/memo/1`); `akan context --app <app>` lists every route with its params and search names.
21
+ - The viewport is a 390x844 phone; `--desktop` is 1280x800. `--csr` loads each page in the CSR boot the native
22
+ shells load. `--screenshot` saves a PNG per page under `local/apps/<app>/runtime/preview/`, for a model
23
+ that reads images. `--format json` gives the same report as data.
24
+
25
+ ### Which platforms that covers
26
+
27
+ - Every change: the server-rendered web page and, with `--csr`, the bundle the iOS, Android and desktop
28
+ shells run.
29
+ - A change to `native/`, `plugin/`, an `isNativeApp()` branch, `native` in `akan.config.ts` or an
30
+ `@akanjs/native` plugin also needs that shell: `akan start-ios`, `start-android` or `start-desktop` on top of
31
+ the running dev server. Errors thrown in the shell reach the same dev-server log as `ClientReport` lines
32
+ tagged with the platform and target. Capture the shell with `xcrun simctl io booted screenshot <file>.png` or
33
+ `adb exec-out screencap -p > <file>.png`. When you cannot run the shell, say so: "not checked on iOS".
34
+ - Real devices, memory, OTA updates and store builds are for whoever releases.
35
+
36
+ ### What goes in your answer
37
+
38
+ The verdict lines of the pages you changed (`ok /en/board 200 "Board" 1.4s`) and every finding you left
39
+ unfixed. "Not opened in a browser" is not an answer once `akan preview` can run.
40
+
8
41
  ## The log is a file, and that file is the whole session
9
42
 
10
43
  A supervised `akan start` writes **`local/apps/<app>/runtime/dev.log`** — no ANSI, nothing truncated, every
@@ -17,12 +50,14 @@ what survives in the scrollback is bordered and truncated to the pane.
17
50
  - `tail -n 200 local/apps/<app>/runtime/dev.log` after an edit, to see what the reload produced.
18
51
  - `akan logs <app>` tails a running server with `--level --grep --endpoint --trace --child --role --origin
19
52
  --since` and `--json`.
20
- - The dev server's URL is printed in that log, and the port is allocated rather than fixed — the log is the
21
- only source for it.
53
+ - The dev server's URL is printed in that log. A server `akan preview` started logs to
54
+ `local/apps/<app>/runtime/preview/server.log` instead.
55
+ - An uncaught error or unhandled rejection in a page reaches the server log as a `ClientReport` error line,
56
+ naming the page, the client (`ssr` or `csr`) and the native target.
22
57
 
23
58
  ## Which loop you are in
24
59
 
25
- - **A type or lint failure** is the `akan-validate` loop. `akan_verify`.
60
+ - **A type or lint failure** is the `akan-validate` loop: `akan verify`.
26
61
  - **A runtime or SSR failure** is the dev log. The page renders blank, an overlay appears, or a request
27
62
  500s — none of that shows up in a typecheck.
28
63
 
@@ -38,5 +73,5 @@ reads like its own level is not one.
38
73
 
39
74
  ## Before you conclude
40
75
 
41
- A change that renders is not a change that passed. Run `akan_verify`, and for a `.tsx` change check
42
- `akan quality ssr` too — a UI edit that moves markup into a client bundle typechecks perfectly.
76
+ A change that renders is not a change that passed. Run `akan verify`; for a `.tsx` change it also runs the
77
+ SSR check, since a UI edit that moves markup into a client bundle typechecks perfectly.