@akanjs/cli 3.2.0-rc.3 → 3.2.0-rc.31

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 (144) hide show
  1. package/.build-stamp +2 -1
  2. package/CodeAgent-c17abdbf.js +11 -0
  3. package/{CodeTui-wv9yf7eq.js → CodeTui-jed1nj82.js} +822 -666
  4. package/README.ko.md +26 -1
  5. package/README.md +26 -1
  6. package/TunnelShare-mbfcaqg0.js +18 -0
  7. package/agent.command-9whnc6vb.js +56 -0
  8. package/akanCode.js +12 -12
  9. package/appExecutor-020cyesq.js +11 -0
  10. package/{application.command-6515t682.js → application.command-4eqvyxkw.js} +77 -36
  11. package/{applicationBuildRunner-bqbyeg84.js → applicationBuildRunner-frtcrqfd.js} +18 -13
  12. package/buildBatch.proc.js +26 -11
  13. package/{cloud.command-32esk0v1.js → cloud.command-hbvmeezn.js} +31 -28
  14. package/cloud.script-9kmbr3d6.js +35 -0
  15. package/{code.command-xk7rwq2x.js → code.command-0ayrenk4.js} +14 -9
  16. package/{context.command-jwenkkf0.js → context.command-php852kf.js} +28 -23
  17. package/context.runner-nngmn7c0.js +34 -0
  18. package/{dependencyScanner-78sq8m4q.js → dependencyScanner-ge10gb52.js} +2 -2
  19. package/{devTui-cd03z4mx.js → devTui-rf374y2w.js} +1 -1
  20. package/{fileSys-zpvt5gtf.js → fileSys-q22646yc.js} +1 -1
  21. package/{guideline.command-w6yqpdec.js → guideline.command-w1grfwh7.js} +9 -4
  22. package/guidelines/agentRule/agentRule.instruction.md +29 -12
  23. package/guidelines/akanApi/akanApi.instruction.md +6 -4
  24. package/guidelines/conventions/core.md +23 -5
  25. package/guidelines/conventions/rules/app.md +4 -1
  26. package/guidelines/conventions/rules/page.md +5 -0
  27. package/guidelines/conventions/rules/ts.md +3 -3
  28. package/guidelines/errorCodes/errorCodes.instruction.md +164 -0
  29. package/guidelines/fieldRule/fieldRule.instruction.md +2 -1
  30. package/guidelines/mcpRule/mcpRule.instruction.md +171 -2
  31. package/guidelines/pageRule/pageRule.instruction.md +15 -1
  32. package/guidelines/runtimeRule/runtimeRule.instruction.md +12 -6
  33. package/guidelines/transportRule/transportRule.instruction.md +8 -1
  34. package/incrementalBuilder.proc.js +574 -410
  35. package/{index-w15mg3km.js → index-0dm25wvf.js} +1 -1
  36. package/{index-xrmrvafh.js → index-0gaj78wn.js} +808 -694
  37. package/{index-j1hjb477.js → index-11d7nh8a.js} +1 -1
  38. package/{index-hj6w4ka1.js → index-1p81ecbz.js} +1 -1
  39. package/{index-ygrdw6jw.js → index-1pjwsh2g.js} +65 -8
  40. package/{index-43acpsc7.js → index-28nk8w3j.js} +12 -12
  41. package/{index-qd7xn2bk.js → index-2ny1e95c.js} +2 -2
  42. package/{index-8gm4yag8.js → index-42jhx2ya.js} +6 -6
  43. package/{index-2rqyrvcy.js → index-4st0hq72.js} +62 -33
  44. package/{index-bak9f2br.js → index-5d57kx0s.js} +15 -11
  45. package/{index-bdmgqzb5.js → index-6469101k.js} +58 -29
  46. package/{index-7kmbqp0b.js → index-6pxmcaq8.js} +1 -1
  47. package/{index-54s6knqe.js → index-6zb17wcm.js} +12 -10
  48. package/{index-0ba8nj4d.js → index-7bs463x7.js} +50 -38
  49. package/{index-y725zb1a.js → index-7v7tvgt7.js} +196 -168
  50. package/{index-r0a604h4.js → index-99kjwyma.js} +1 -1
  51. package/{index-2mrn1mrg.js → index-9f3reh2y.js} +1 -1
  52. package/{index-386canwe.js → index-9rv2zt48.js} +186 -121
  53. package/{index-20wvskt8.js → index-9wab2ngg.js} +1 -1
  54. package/{index-2eym1yjb.js → index-9wjrwjgz.js} +288 -209
  55. package/{index-kcpk2d20.js → index-at6haq2x.js} +1474 -1139
  56. package/{index-6h775rv3.js → index-ba2xd32s.js} +53 -12
  57. package/{index-yf9wc28h.js → index-bejy9zyc.js} +1 -1
  58. package/{index-ngpt3zz3.js → index-bj8s07s7.js} +525 -440
  59. package/{index-bns3wcpc.js → index-by2tvsq6.js} +1 -1
  60. package/{index-vbhx60x5.js → index-cb91b6d8.js} +2140 -2165
  61. package/index-dss3ds74.js +127 -0
  62. package/{index-e22zedc2.js → index-f16kr6vj.js} +3 -3
  63. package/{index-ny2k80mv.js → index-ffa52fwf.js} +1 -1
  64. package/{index-djc5nxpy.js → index-fp5xf6ef.js} +6 -6
  65. package/{index-qrk06tfp.js → index-g45y5f3e.js} +2 -2
  66. package/{index-8jpc5fqv.js → index-g7jgd4xs.js} +2 -2
  67. package/index-j4yvgfhr.js +70 -0
  68. package/{index-ytpmk3pb.js → index-jgj31xvw.js} +18 -11
  69. package/{index-j6eeh5d7.js → index-knpm8sdm.js} +5 -5
  70. package/{index-s34v3y28.js → index-m3t28rt3.js} +11 -11
  71. package/{index-dpgywgeq.js → index-m5gg0wzv.js} +27 -16
  72. package/index-na8r4a27.js +30 -0
  73. package/{index-h0p6n4k1.js → index-nm7nt9vm.js} +3 -3
  74. package/{index-j4hkbzj6.js → index-p06kfhdf.js} +6 -6
  75. package/{index-35j83zkd.js → index-p5zh7pmc.js} +2 -2
  76. package/{index-cmg5ngqa.js → index-p7beqww9.js} +2 -2
  77. package/{index-zhkcab5a.js → index-prgvqqxe.js} +580 -364
  78. package/{index-wfmpxke3.js → index-qssq2d41.js} +2775 -3677
  79. package/{index-sc0g6zbm.js → index-rwgqba9p.js} +24 -11
  80. package/{index-zcdmnfrf.js → index-s3m89wt2.js} +9 -9
  81. package/{index-v50xjbbe.js → index-t4d0ckde.js} +1 -1
  82. package/{index-9p260r4e.js → index-trffs83s.js} +538 -250
  83. package/{index-ddk49ypz.js → index-v929w7j7.js} +133 -49
  84. package/index-va90m8nd.js +25 -0
  85. package/index-vjbne22r.js +80 -0
  86. package/{index-h7hehkw6.js → index-xczjdng6.js} +3 -1
  87. package/{index-39jz41jb.js → index-xs9a3ddt.js} +3 -3
  88. package/{index-84c2pgak.js → index-yvzm8mby.js} +94 -82
  89. package/{index-wr9magsr.js → index-yxkjsyx8.js} +3 -3
  90. package/index-ze48c0vd.js +788 -0
  91. package/{index-ygdbn9jn.js → index-zyb0ebm4.js} +1 -1
  92. package/index.js +29 -24
  93. package/libExecutor-tq994592.js +10 -0
  94. package/{library.command-qs8beggh.js → library.command-x219mhcx.js} +9 -4
  95. package/{localRegistry.command-hz4ged9n.js → localRegistry.command-zvdcejhn.js} +30 -24
  96. package/{module.command-z9js77m2.js → module.command-k6cwcm7g.js} +17 -8
  97. package/{package.command-zqenq8c0.js → package.command-vw7x09f8.js} +13 -8
  98. package/package.json +2 -2
  99. package/{page.command-t0nx1jat.js → page.command-gf06paq2.js} +9 -4
  100. package/{pipeline.command-2yjeas7m.js → pipeline.command-y07dgj9b.js} +14 -8
  101. package/pkgExecutor-stde3yc3.js +10 -0
  102. package/{primitive.command-v5kypwy4.js → primitive.command-edydvh07.js} +13 -8
  103. package/{projectTypecheck-s9hhe5sa.js → projectTypecheck-mk8wefvd.js} +2 -1
  104. package/{prompter-qrwx1p17.js → prompter-qyggfhqd.js} +2 -2
  105. package/{quality.command-q55j2htd.js → quality.command-mdb45vyr.js} +23 -16
  106. package/{recipeScanner-4b69ybe0.js → recipeScanner-rrx69awy.js} +1 -1
  107. package/{repair.command-7ssbbdq2.js → repair.command-kvtaeecy.js} +13 -8
  108. package/{routeSourceValidator-4h947v7c.js → routeSourceValidator-8n6j1vn7.js} +4 -2
  109. package/{scalar.command-p5jb7z57.js → scalar.command-sjt9p5e1.js} +11 -6
  110. package/skills/akan-debug/SKILL.md +10 -3
  111. package/skills/akan-err/SKILL.md +7 -0
  112. package/skills/akan-mcp/SKILL.md +17 -2
  113. package/skills/akan-scaffold/SKILL.md +2 -2
  114. package/skills/akan-transport/SKILL.md +2 -0
  115. package/skills/akan-validate/SKILL.md +1 -0
  116. package/{subspace.command-7wxy6ptj.js → subspace.command-mkkqync4.js} +29 -23
  117. package/templates/app/page/_layout.tsx +13 -0
  118. package/templates/app/page/styles.css.template +40 -0
  119. package/templates/appSample/page/_index.tsx +9 -9
  120. package/templates/appSample/page/_layout.tsx +1 -0
  121. package/templates/appSample/page/styles.css.template +40 -5
  122. package/templates/appSample/ui/Recipe/jellyButton.ts +1 -1
  123. package/templates/biomeForm.ts +1 -1
  124. package/templates/env/_env.server.type.ts +1 -1
  125. package/templates/facetIndex/index.ts +2 -37
  126. package/templates/lib/sig.ts +0 -4
  127. package/templates/lib/useClient.ts +1 -1
  128. package/templates/workspaceRoot/AGENTS.md.template +2 -1
  129. package/{tunnel.command-22g11n0x.js → tunnel.command-tr5b3030.js} +17 -12
  130. package/{typeChecker-s640r6c0.js → typeChecker-bfrd1n9n.js} +1 -1
  131. package/typecheck.proc.js +6 -3
  132. package/{verify.command-m0wnndd7.js → verify.command-0p9h8tpp.js} +26 -20
  133. package/{workflow.command-jx8dqs9n.js → workflow.command-9mfcwqzj.js} +37 -19
  134. package/{workspace.command-ca9kfyt3.js → workspace.command-5hjtmcfs.js} +61 -54
  135. package/CodeAgent-e9c712an.js +0 -11
  136. package/TunnelShare-zkfkrw8w.js +0 -14
  137. package/agent.command-9erafkcb.js +0 -51
  138. package/cloud.script-arsagnq6.js +0 -30
  139. package/context.runner-mqpp67br.js +0 -29
  140. package/index-x3x31df8.js +0 -14
  141. /package/templates/{appSample → app}/public/fonts/Pretendard-Bold.woff2 +0 -0
  142. /package/templates/{appSample → app}/public/fonts/Pretendard-Medium.woff2 +0 -0
  143. /package/templates/{appSample → app}/public/fonts/Pretendard-Regular.woff2 +0 -0
  144. /package/templates/{appSample → app}/public/fonts/Pretendard-SemiBold.woff2 +0 -0
@@ -3,35 +3,39 @@ import {
3
3
  App,
4
4
  Workspace,
5
5
  command
6
- } from "./index-386canwe.js";
7
- import"./index-bns3wcpc.js";
8
- import"./index-wfmpxke3.js";
9
- import"./index-e22zedc2.js";
6
+ } from "./index-9rv2zt48.js";
7
+ import"./index-j4yvgfhr.js";
8
+ import"./index-qssq2d41.js";
9
+ import"./index-by2tvsq6.js";
10
+ import"./index-ze48c0vd.js";
11
+ import"./index-na8r4a27.js";
12
+ import"./index-dss3ds74.js";
13
+ import"./index-f16kr6vj.js";
10
14
  import {
11
15
  PlatformTestRun
12
- } from "./index-6h775rv3.js";
13
- import"./index-djc5nxpy.js";
14
- import"./index-20wvskt8.js";
16
+ } from "./index-ba2xd32s.js";
17
+ import"./index-fp5xf6ef.js";
18
+ import"./index-9wab2ngg.js";
15
19
  import"./index-m9jj544v.js";
16
- import"./index-84c2pgak.js";
17
- import"./index-wr9magsr.js";
20
+ import"./index-yvzm8mby.js";
21
+ import"./index-yxkjsyx8.js";
18
22
  import {
19
23
  npmRegistryFromEnv,
20
24
  warnIgnoredNpmRegistry
21
- } from "./index-ny2k80mv.js";
22
- import"./index-y725zb1a.js";
23
- import"./index-54s6knqe.js";
24
- import"./index-kcpk2d20.js";
25
- import"./index-sc0g6zbm.js";
26
- import"./index-ddk49ypz.js";
27
- import"./index-qd7xn2bk.js";
28
- import"./index-9p260r4e.js";
29
- import"./index-cmg5ngqa.js";
30
- import"./index-ygrdw6jw.js";
31
- import"./index-bak9f2br.js";
25
+ } from "./index-ffa52fwf.js";
26
+ import"./index-7v7tvgt7.js";
27
+ import"./index-6zb17wcm.js";
28
+ import"./index-at6haq2x.js";
29
+ import"./index-rwgqba9p.js";
30
+ import"./index-v929w7j7.js";
31
+ import"./index-trffs83s.js";
32
+ import"./index-p7beqww9.js";
33
+ import"./index-1pjwsh2g.js";
34
+ import"./index-2ny1e95c.js";
35
+ import"./index-5d57kx0s.js";
32
36
  import {
33
37
  CloudScript2
34
- } from "./index-zcdmnfrf.js";
38
+ } from "./index-s3m89wt2.js";
35
39
  import {
36
40
  writeOption,
37
41
  oneNativeTargetOption,
@@ -42,8 +46,9 @@ import {
42
46
  hostOption,
43
47
  subspaceOption
44
48
  } from "./index-mdjc93e1.js";
45
- import"./index-8jpc5fqv.js";
49
+ import"./index-g7jgd4xs.js";
46
50
  import"./index-9bv479q5.js";
51
+ import"./index-vjbne22r.js";
47
52
 
48
53
  // pkgs/@akanjs/cli/cloud/cloud.command.ts
49
54
  var localRegistryUrl = () => npmRegistryFromEnv() ?? "http://127.0.0.1:4873";
@@ -51,6 +56,8 @@ var resolveRegistryUrl = (registry) => {
51
56
  warnIgnoredNpmRegistry();
52
57
  return registry === "local" ? localRegistryUrl() : undefined;
53
58
  };
59
+ var pushUpdateDesc = "Pack an over-the-air update of a phone's web bundle, or take the folder `akan pack-update` wrote, and upload it to the Akan Cloud project, which signs and publishes it; or upload the desktop release `akan publish-update` signed, as it is. Exits 2 when the pack needs a new store build or the project rejects it, 1 on any other failure";
60
+ var registerBinaryDesc = "Register the store build of a phone app with the Akan Cloud project, with a pack of the same commit as its embedded bundle. Exits 2 when the store build differs natively from this commit's pack, 1 on any other failure";
54
61
 
55
62
  class CloudCommand extends command("cloud", [CloudScript2], ({ public: target }) => ({
56
63
  login: target({ desc: "Login to Akan Cloud services" }).option("host", String, hostOption).with(Workspace).exec(async function(host, workspace) {
@@ -121,9 +128,7 @@ class CloudCommand extends command("cloud", [CloudScript2], ({ public: target })
121
128
  }).exec(async function(workspace, tag, registry) {
122
129
  await this.cloudScript.update(workspace, tag, { registryUrl: resolveRegistryUrl(registry) });
123
130
  }),
124
- pushUpdate: target({
125
- desc: "Pack an over-the-air update of a phone's web bundle, or take the folder `akan pack-update` wrote, and upload it to the Akan Cloud project, which signs and publishes it; or upload the desktop release `akan publish-update` signed, as it is. Exits 2 when the pack needs a new store build or the project rejects it, 1 on any other failure"
126
- }).with(App).option("platform", String, {
131
+ pushUpdate: target({ desc: pushUpdateDesc, usageExitCode: 1 }).with(App).option("platform", String, {
127
132
  enum: ["ios", "android", "desktop", "macos", "windows", "linux"],
128
133
  desc: "the app it updates; desktop is this computer's OS (with --pack, default: the pack's)",
129
134
  nullable: true
@@ -162,9 +167,7 @@ class CloudCommand extends command("cloud", [CloudScript2], ({ public: target })
162
167
  publicEnv
163
168
  });
164
169
  }),
165
- registerBinary: target({
166
- desc: "Register the store build of a phone app with the Akan Cloud project, with a pack of the same commit as its embedded bundle. Exits 2 when the store build differs natively from this commit's pack, 1 on any other failure"
167
- }).with(App).option("platform", String, { enum: ["ios", "android"], desc: "the store build to register" }).option("distribution", String, {
170
+ registerBinary: target({ desc: registerBinaryDesc, usageExitCode: 1 }).with(App).option("platform", String, { enum: ["ios", "android"], desc: "the store build to register" }).option("distribution", String, {
168
171
  enum: ["appStore", "testFlight", "playStore", "playTesting", "direct"],
169
172
  desc: "where the binary ships"
170
173
  }).option("target", String, oneNativeTargetOption).option("env", String, releaseEnvOption).option("subspace", String, subspaceOption("gets it")).option("host", String, hostOption).option("write", Boolean, writeOption).option("allowLocalRelease", Boolean, allowLocalOption("packing")).option("publicEnv", String, publicEnvOption("the pack (default: what the store build recorded)")).with(Workspace).exec(async function(app, platform, distribution, target, env, subspace, host, write, allowLocalRelease, publicEnv, workspace) {
@@ -0,0 +1,35 @@
1
+ // @bun
2
+ import {
3
+ CloudScript2
4
+ } from "./index-s3m89wt2.js";
5
+ import"./index-ba2xd32s.js";
6
+ import"./index-v929w7j7.js";
7
+ import"./index-6zb17wcm.js";
8
+ import"./index-5d57kx0s.js";
9
+ import"./index-f16kr6vj.js";
10
+ import"./index-ffa52fwf.js";
11
+ import"./index-at6haq2x.js";
12
+ import"./index-g7jgd4xs.js";
13
+ import"./index-1pjwsh2g.js";
14
+ import"./index-9wab2ngg.js";
15
+ import"./index-fp5xf6ef.js";
16
+ import"./index-m9jj544v.js";
17
+ import"./index-2ny1e95c.js";
18
+ import"./index-9rv2zt48.js";
19
+ import"./index-9bv479q5.js";
20
+ import"./index-rwgqba9p.js";
21
+ import"./index-p7beqww9.js";
22
+ import"./index-trffs83s.js";
23
+ import"./index-yxkjsyx8.js";
24
+ import"./index-7v7tvgt7.js";
25
+ import"./index-yvzm8mby.js";
26
+ import"./index-vjbne22r.js";
27
+ import"./index-ze48c0vd.js";
28
+ import"./index-na8r4a27.js";
29
+ import"./index-dss3ds74.js";
30
+ import"./index-qssq2d41.js";
31
+ import"./index-j4yvgfhr.js";
32
+ import"./index-by2tvsq6.js";
33
+ export {
34
+ CloudScript2 as CloudScript
35
+ };
@@ -4,18 +4,23 @@ import {
4
4
  runner,
5
5
  script,
6
6
  command
7
- } from "./index-386canwe.js";
8
- import"./index-bns3wcpc.js";
9
- import"./index-wfmpxke3.js";
7
+ } from "./index-9rv2zt48.js";
8
+ import"./index-j4yvgfhr.js";
9
+ import"./index-qssq2d41.js";
10
+ import"./index-by2tvsq6.js";
11
+ import"./index-ze48c0vd.js";
12
+ import"./index-na8r4a27.js";
13
+ import"./index-dss3ds74.js";
10
14
  import {
11
15
  AkanCodeEnv,
12
16
  akanCodePaths2
13
- } from "./index-35j83zkd.js";
17
+ } from "./index-p5zh7pmc.js";
14
18
  import {
15
19
  akanCodeDefaultModel2,
16
20
  CodeAgentStreamPrinter2,
17
21
  WorkspaceTrust
18
- } from "./index-w15mg3km.js";
22
+ } from "./index-0dm25wvf.js";
23
+ import"./index-vjbne22r.js";
19
24
 
20
25
  // pkgs/@akanjs/cli/code/code.runner.ts
21
26
  import { randomBytes } from "crypto";
@@ -77,7 +82,7 @@ class CodeRunner extends runner("code") {
77
82
  async serve(options, listen) {
78
83
  await import("./consoleToStderr-h5bryj94.js");
79
84
  const [{ CodeAgent }, { CodeAgentRpcHost }, { CodeAgentRpcListener }] = await Promise.all([
80
- import("./CodeAgent-e9c712an.js"),
85
+ import("./CodeAgent-c17abdbf.js"),
81
86
  import("./CodeAgentRpcHost-6dzfkvsc.js"),
82
87
  import("./CodeAgentRpcListener-tcwrdvst.js")
83
88
  ]);
@@ -111,8 +116,8 @@ class CodeRunner extends runner("code") {
111
116
  }
112
117
  async tui(options, seed) {
113
118
  const [{ CodeAgent }, { CodeTui }] = await Promise.all([
114
- import("./CodeAgent-e9c712an.js"),
115
- import("./CodeTui-wv9yf7eq.js")
119
+ import("./CodeAgent-c17abdbf.js"),
120
+ import("./CodeTui-jed1nj82.js")
116
121
  ]);
117
122
  const start = await CodeRunner.#start(options, { hostAttached: false, interactive: true, ask: true });
118
123
  const agentOptions = start.agent;
@@ -148,7 +153,7 @@ class CodeRunner extends runner("code") {
148
153
  }
149
154
  }
150
155
  async run(prompt, options) {
151
- const { CodeAgent } = await import("./CodeAgent-e9c712an.js");
156
+ const { CodeAgent } = await import("./CodeAgent-c17abdbf.js");
152
157
  const ask = !!process.stdin.isTTY && !!process.stderr.isTTY;
153
158
  const start = await CodeRunner.#start(options, { hostAttached: false, interactive: false, ask });
154
159
  for (const warning of start.warnings)
@@ -2,32 +2,37 @@
2
2
  import {
3
3
  Workspace,
4
4
  command
5
- } from "./index-386canwe.js";
6
- import"./index-bns3wcpc.js";
7
- import"./index-wfmpxke3.js";
8
- import"./index-ngpt3zz3.js";
9
- import"./index-hj6w4ka1.js";
10
- import"./index-xrmrvafh.js";
11
- import"./index-9p260r4e.js";
12
- import"./index-2eym1yjb.js";
13
- import"./index-djc5nxpy.js";
14
- import"./index-20wvskt8.js";
5
+ } from "./index-9rv2zt48.js";
6
+ import"./index-j4yvgfhr.js";
7
+ import"./index-qssq2d41.js";
8
+ import"./index-by2tvsq6.js";
9
+ import"./index-ze48c0vd.js";
10
+ import"./index-na8r4a27.js";
11
+ import"./index-dss3ds74.js";
12
+ import"./index-0gaj78wn.js";
13
+ import"./index-trffs83s.js";
14
+ import"./index-bj8s07s7.js";
15
+ import"./index-1p81ecbz.js";
16
+ import"./index-9wjrwjgz.js";
17
+ import"./index-knpm8sdm.js";
18
+ import"./index-fp5xf6ef.js";
19
+ import"./index-9wab2ngg.js";
15
20
  import"./index-m9jj544v.js";
16
- import"./index-84c2pgak.js";
17
- import"./index-wr9magsr.js";
18
- import"./index-j6eeh5d7.js";
19
- import"./index-ygdbn9jn.js";
20
- import"./index-39jz41jb.js";
21
- import"./index-8gm4yag8.js";
22
- import"./index-7kmbqp0b.js";
23
- import"./index-s34v3y28.js";
24
- import"./index-0ba8nj4d.js";
25
- import"./index-h0p6n4k1.js";
26
- import"./index-v50xjbbe.js";
27
- import"./index-43acpsc7.js";
21
+ import"./index-yvzm8mby.js";
22
+ import"./index-yxkjsyx8.js";
23
+ import"./index-zyb0ebm4.js";
24
+ import"./index-xs9a3ddt.js";
25
+ import"./index-42jhx2ya.js";
26
+ import"./index-6pxmcaq8.js";
27
+ import"./index-m3t28rt3.js";
28
+ import"./index-7bs463x7.js";
29
+ import"./index-nm7nt9vm.js";
30
+ import"./index-t4d0ckde.js";
31
+ import"./index-28nk8w3j.js";
28
32
  import {
29
33
  ContextScript
30
- } from "./index-j4hkbzj6.js";
34
+ } from "./index-p06kfhdf.js";
35
+ import"./index-vjbne22r.js";
31
36
 
32
37
  // pkgs/@akanjs/cli/context/context.command.ts
33
38
  class ContextCommand extends command("context", [ContextScript], ({ public: target }) => ({
@@ -0,0 +1,34 @@
1
+ // @bun
2
+ import {
3
+ ContextRunner2
4
+ } from "./index-9wjrwjgz.js";
5
+ import"./index-28nk8w3j.js";
6
+ import"./index-42jhx2ya.js";
7
+ import"./index-nm7nt9vm.js";
8
+ import"./index-7bs463x7.js";
9
+ import"./index-m3t28rt3.js";
10
+ import"./index-6pxmcaq8.js";
11
+ import"./index-t4d0ckde.js";
12
+ import"./index-bj8s07s7.js";
13
+ import"./index-9wab2ngg.js";
14
+ import"./index-0gaj78wn.js";
15
+ import"./index-fp5xf6ef.js";
16
+ import"./index-m9jj544v.js";
17
+ import"./index-knpm8sdm.js";
18
+ import"./index-9rv2zt48.js";
19
+ import"./index-xs9a3ddt.js";
20
+ import"./index-zyb0ebm4.js";
21
+ import"./index-trffs83s.js";
22
+ import"./index-yxkjsyx8.js";
23
+ import"./index-yvzm8mby.js";
24
+ import"./index-vjbne22r.js";
25
+ import"./index-ze48c0vd.js";
26
+ import"./index-na8r4a27.js";
27
+ import"./index-dss3ds74.js";
28
+ import"./index-qssq2d41.js";
29
+ import"./index-j4yvgfhr.js";
30
+ import"./index-1p81ecbz.js";
31
+ import"./index-by2tvsq6.js";
32
+ export {
33
+ ContextRunner2 as ContextRunner
34
+ };
@@ -1,8 +1,8 @@
1
1
  // @bun
2
2
  import {
3
3
  TypeScriptDependencyScanner2
4
- } from "./index-qd7xn2bk.js";
5
- import"./index-bns3wcpc.js";
4
+ } from "./index-2ny1e95c.js";
5
+ import"./index-by2tvsq6.js";
6
6
  export {
7
7
  TypeScriptDependencyScanner2 as TypeScriptDependencyScanner
8
8
  };
@@ -1,7 +1,7 @@
1
1
  // @bun
2
2
  import {
3
3
  stripAnsi
4
- } from "./index-sc0g6zbm.js";
4
+ } from "./index-rwgqba9p.js";
5
5
  import {
6
6
  writeClipboard
7
7
  } from "./index-p6pbz9n5.js";
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  getDirname2,
4
4
  FileSys2
5
- } from "./index-bns3wcpc.js";
5
+ } from "./index-by2tvsq6.js";
6
6
  export {
7
7
  FileSys2 as FileSys,
8
8
  getDirname2 as getDirname
@@ -2,12 +2,17 @@
2
2
  import {
3
3
  script,
4
4
  command
5
- } from "./index-386canwe.js";
6
- import"./index-bns3wcpc.js";
7
- import"./index-wfmpxke3.js";
5
+ } from "./index-9rv2zt48.js";
6
+ import"./index-j4yvgfhr.js";
7
+ import"./index-qssq2d41.js";
8
+ import"./index-by2tvsq6.js";
9
+ import"./index-ze48c0vd.js";
10
+ import"./index-na8r4a27.js";
11
+ import"./index-dss3ds74.js";
8
12
  import {
9
13
  Prompter2
10
- } from "./index-j6eeh5d7.js";
14
+ } from "./index-knpm8sdm.js";
15
+ import"./index-vjbne22r.js";
11
16
 
12
17
  // pkgs/@akanjs/cli/guideline/guideline.script.ts
13
18
  import { Logger } from "akanjs/common";
@@ -32,9 +32,10 @@ pages declaring one name never clash, and a registry kept outside the surface re
32
32
  warning. A product with accounts names it in its `option.ts`, `option.setAgentAccess(SignedIn)`, taking the same
33
33
  guard classes every endpoint takes (an array is ANDed, `null` clears what a library set); without one the chat
34
34
  cannot spend the LLM key. **The guard decides who, not what** — the browser writes the instructions, tools and
35
- transcript — so `option.setAgentRequestPolicy((request, { account, ip }) => request)` sees each turn after the
36
- guard, before the quota and the model (tool names as the page published them), and returns what is sent, or
37
- throws an `Err` (`agent.error.requestRefused`) to refuse it. With no policy set, a turn past
35
+ transcript — so `option.setAgentRequestPolicy((request, { id, headers, account, ip }) => request)` sees each turn
36
+ after the guard, before the quota and the model (tool names as the page published them), and returns what is
37
+ sent, or throws an `Err` (`agent.error.requestRefused`) to refuse it. `setAgentQuota` and `setAgentUsage` get that
38
+ same `turn`, and usage comes once per turn the quota passed, `failed` and `aborted` ones too. With no policy set, a turn past
38
39
  `AgentRelayPolicy.defaultLimits` (5,000 messages, 512 tools, 256 context entries, 8M characters, 64 MiB of
39
40
  attachments) is refused with 413; a policy of the app's own keeps them by returning
40
41
  `AgentRelayPolicy.capped(request, limits)`, and `(request) => request` lifts them. An error that is not an `Err`
@@ -59,11 +60,18 @@ pages declaring one name never clash, and a registry kept outside the surface re
59
60
  and under every menu and modal — `launcherClassName` / `panelClassName` reach one surface each where
60
61
  `className` reaches both, `intro`
61
62
  replaces the empty-state line — where starter questions go — and `header` adds controls beside the built-in
62
- clear and close. `chrome={false}` drops the header bar whole, for an `inline` chat inside a panel the app
63
- already titles, and `defaultDraft` opens the composer with text in it without sending it. A panel driven by a
63
+ clear and close. `title` takes a node (a mark before the name); give `label` then, as the panel's accessible
64
+ name. The header's parts carry `data-slot="agent-header"`, `"agent-title"` and `"agent-running"`, so
65
+ `panelClassName="[&_[data-slot=agent-running]]:bg-accent"` restyles one without leaning on the markup. A modal,
66
+ menu or popconfirm opened from inside the floating panel, `header` included, stacks above the panel, while
67
+ one the page opens stays under it. While the turn waits on an approval, card or question, a scrim the panel
68
+ opened sinks under the panel so the answer stays reachable, and it comes back once answered. A question
69
+ arriving leaves focus in an overlay the person is typing in, and Escape in the composer closes a modal the panel
70
+ or a card opened through the modal's own close, `confirmClose` included, before it closes the panel. `chrome={false}` drops the header bar whole, for an `inline` chat inside a
71
+ panel the app already titles, and `defaultDraft` opens the composer with text in it without sending it. A panel driven by a
64
72
  controlled `open` with **no** `onOpenChange` draws no close button at all rather than an inert one. Then the
65
73
  slots: `AgentLauncher`, `AgentSteps`, `AgentBubble`, `AgentComposer`, `AgentApproval`,
66
- `AgentQuestion`, `AgentToolCard`, `AgentQueued`, `AgentMenu`, `AgentMarkdown` and `AgentCode` each replace one part in `_overrides.tsx`, and
74
+ `AgentQuestion`, `AgentToolCard`, `AgentToolRow`, `AgentQueued`, `AgentMenu`, `AgentMarkdown` and `AgentCode` each replace one part in `_overrides.tsx`, and
67
75
  `akanjs/ui` exports every default beside them (`DefaultBubble`, `DefaultComposer`, …) so a skin composes the
68
76
  one it is replacing. **`AgentSteps` is one agent turn** — the messages between the user message that opened it
69
77
  and the next one, with `isRunning` saying whether more are still coming — which is the grain a chat needs to
@@ -120,9 +128,10 @@ pages declaring one name never clash, and a registry kept outside the surface re
120
128
  carries `{ provider, status }`, the hostname and the HTTP status; the provider's own sentence goes to the server
121
129
  log only, because it can quote an account id or part of a key and `Err` data reaches the browser.
122
130
  `LlmOverflow.refusal(host, status, reason)` builds it, and reads the one refusal a chat can undo — a prompt past
123
- the window, recognized from each provider's own sentence — as `agent.error.contextOverflow` with the `limit` it
124
- named, which the relay flags so the chat compacts and asks again. An adaptor an app wrote throws through the same function, so its refusals
125
- translate and recover the way the shipped ones do without a key in the framework's dictionary it cannot add.
131
+ the window, recognized from each provider's own sentence — as `agent.error.contextOverflow` with the `limit` and
132
+ `requested` it named, which the relay flags so the chat compacts and asks again. An adaptor an app wrote throws through the same function, so its refusals
133
+ translate and recover the way the shipped ones do without a key in the framework's dictionary it cannot add. An
134
+ adaptor's own size cap throws that error with `{ limit, requested }` in its own unit, bytes included.
126
135
  - **`accepts` is answered per model, through `option.setLlm({ accepts })`.** An adaptor answers for an API and one
127
136
  API serves models that differ, so the override rides beside the `model` it is a fact about. It is not a table
128
137
  the framework keeps: a table is a claim about models that ship after it, and getting this wrong is the worst
@@ -597,8 +606,8 @@ pages declaring one name never clash, and a registry kept outside the surface re
597
606
  `window − answer ceiling (8,192 when unreported) − compact.buffer (13,000, the margin Claude Code leaves)` —
598
607
  measured by the provider's own count of the last turn (`done.usage`, kept on that assistant message) plus the
599
608
  four-character estimate for what arrived since, so a Korean transcript the character rule reads as small is
600
- still caught. The window comes from `option.setLlm({ contextWindow })` or from the first refusal that names it;
601
- with neither, only the ceiling runs. **A refusal for length is answered once**: a relay flags it `overflow` on
609
+ still caught. The window comes from `option.setLlm({ contextWindow })` or from a refusal that names it, scaled by
610
+ its `limit / requested` to this estimate when it gives both; with neither, only the ceiling runs. **A refusal for length is answered once**: a relay flags it `overflow` on
602
611
  the wire, and the session compacts and sends the same turn again, and a second refusal in the same send fails
603
612
  with `agent.error.contextOverflow`. Either way the history above the last `keep` messages
604
613
  becomes one message standing in for it, flagged `summary` on the wire — `<Agent.Chat compact={{ at, keep, buffer }} />`
@@ -636,6 +645,12 @@ pages declaring one name never clash, and a registry kept outside the surface re
636
645
  - **A turn that failed says so on the wire.** `error` is a field only this wire has, so a provider mapping reads
637
646
  `text` and drops it; `AgentService.explained` folds it into the text before any adaptor sees it, because an
638
647
  assistant turn that says nothing is one the model repeats.
648
+ - **A failed turn keeps its code for the host.** The relay's `error` event carries `code`: the `Err`'s key, else
649
+ an `AkanError`'s own code when its JSON carries it, else the status's name, so a custom `toJSON()` keeps `code`
650
+ in what it returns or the failure reads as its status. It is one code whether the failure is answered before the
651
+ stream opens or inside it, a 5xx included. A refusal (401/403) is named by its status alone, unless the server
652
+ kept it under its own code. The chat keeps it on that assistant message as `errorCode` after translating the
653
+ text, so a host branches on `message.errorCode`, never on the sentence. It is never sent back to the relay.
639
654
  - **↑ and ↓ in the composer walk what was sent**, seeded from the transcript so a persisted chat does not lose
640
655
  only what was just typed. A single-line input has nothing of its own on the vertical arrows, and the
641
656
  half-written draft they were walked away from comes back at the bottom of the walk. **The `/` menu takes those
@@ -779,7 +794,9 @@ pages declaring one name never clash, and a registry kept outside the surface re
779
794
  keeps a free-text row either way, because the model wrote the options and only the user knows whether the answer
780
795
  is among them. The loop parks on the question exactly as it parks on an approval, a dismissal is the tool's
781
796
  error result rather than a silent empty answer, and the settled exchange renders as question-and-answer instead
782
- of a tool row. **Never re-implement it per screen** — a `st.tool("askAboutX")` that opens a modal is the same
797
+ of a tool row. A restored transcript that ends on an unanswered `askUser` — a server run that parked on it while
798
+ no chat was open, or a reload mid-question — opens on that question, and settling it runs the turn on through the
799
+ runner; a turn started first closes it as unanswered instead. **Never re-implement it per screen** — a `st.tool("askAboutX")` that opens a modal is the same
783
800
  thing with a worse transcript — and a hook tool named `askUser` shadows it like any other built-in. The line
784
801
  between it and a `.card()` tool is what the answer *is*: a sentence or a pick off a list is `askUser` and belongs
785
802
  to the conversation, while a shape the model must not invent — fields, a form, a signature — is a card the screen
@@ -112,7 +112,7 @@ Shared by `page()`, `layout()` and `rootLayout()`:
112
112
  .render(render: (args: RouteBaseArgs) => PromiseOrObject<ReactNode>)
113
113
  .config(config: PageConfig)
114
114
  .head(head: HeadStage<RouteBaseArgs>)
115
- .guard(guard: (args: RouteBaseArgs) => void | Promise<void>)
115
+ .guard(guard: (args: RouteBaseArgs, request: RouteGuardRequest) => void | Promise<void>)
116
116
  .loading(render: (args: RouteBaseArgs) => PromiseOrObject<ReactNode>)
117
117
  ```
118
118
 
@@ -120,7 +120,7 @@ Only on `page()`:
120
120
 
121
121
  ```ts
122
122
  .prompt(name: string, description: string)
123
- .app<Name extends string>(name: Name & FreeName<Name, Record<never, never>>, description: string, load: (args: RouteBaseArgs) => PromiseOrObject<ReactNode>)
123
+ .app<Name extends string>(name: Name & FreeName<Name, Record<never, never>>, description: string, load: (args: RouteBaseArgs) => PromiseOrObject<ReactNode>, option?: { static?: boolean; })
124
124
  ```
125
125
 
126
126
  On `layout()` and `rootLayout()`, where a line replaces its shared form above:
@@ -235,8 +235,10 @@ globalPrefix?: false;
235
235
  /** HTTP verb of a `mutation`, `POST` unless named; every other endpoint type ignores it. */
236
236
  method?: HttpMutationMethod;
237
237
  fileUpload?: boolean;
238
- /** `false` keeps it out of the MCP catalogue (default `true`); curation, not authorization — HTTP still serves it. */
239
- mcp?: boolean;
238
+ /** `false` keeps it out of the MCP catalogue (default `true`), and `"agent"` keeps it off `/mcp` while the in-process agent (`AgentToolsRole`, `agentService.loop`) still lists it; curation, not authorization — HTTP still serves it. */
239
+ mcp?: McpShelf;
240
+ /** Overrides what the key implies for a `mutation`'s MCP `destructiveHint`: `true` for one no verb gives away, such as `archiveOrder`, `false` for a `drop…` that loses nothing. */
241
+ destructive?: boolean;
240
242
  /** The errors this endpoint throws on purpose, by status. */
241
243
  errors?: EndpointErrors;
242
244
  /** A slow subscriber of a `pubsub(Binary)`: `"coalesce"` (default) keeps only the newest frame per room, `"queue"` delivers every frame and grows the send buffer with the slowest subscriber. */
@@ -30,6 +30,24 @@ and infrastructure. A workspace is Bun-first: `apps/<app>` holds pages, domain m
30
30
  - Follow the nearest established pattern; when two shapes disagree, follow the newer neighbour. A new abstraction must
31
31
  remove real duplication — near-identical sibling modules are copied with changed literals, not parameterised.
32
32
 
33
+ ## Finishing Work
34
+
35
+ - Carry the task through to `verify ok`. A failing check, a stale generated file, a stopped dev server or a tool
36
+ error is an ordinary obstacle: diagnose it and work through it (`akan sync`, `akan repair generated`, a retry,
37
+ another command) rather than stopping to report it or offering to continue. Silencing a check is not a way through.
38
+ - Routine steps need no confirmation: reading code, `akan sync`, `akan verify`, `akan test`, `akan preview`, and the
39
+ workflow plan and apply the task calls for. Ask only when the work cannot go on without the answer, and keep doing
40
+ the parts that do not depend on it.
41
+ - A deliberate blocker stays put — another person's change in a dirty tree, an `akan.baseline.json` entry, a secret
42
+ you cannot read, a failure outside what you changed: leave it, say what you found, and finish the rest. Confirm
43
+ before a step that is hard to undo or leaves this machine, such as a push, a deploy or a write to a shared database.
44
+
45
+ ## Reporting
46
+
47
+ Write the final message for a reader who did not watch your tool calls. Lead with the outcome, name every file you
48
+ changed (small edits too), give each check's own result line, and say what you left undone or could not check, and
49
+ why. Use plain words, not labels you coined during the work.
50
+
33
51
  ## Looks Wrong, Is Right — Do Not "Fix"
34
52
 
35
53
  - Tailwind class order (`font-bold text-2xl text-foreground`) — Biome sorts it, `cn()` arguments included.
@@ -47,7 +65,7 @@ and infrastructure. A workspace is Bun-first: `apps/<app>` holds pages, domain m
47
65
  contract. Path rules name their checks the same way.
48
66
 
49
67
  - Throw `new Err("<module>.error.<key>")` with the key in the module dictionary's `.error({})`; never a raw `Error`
50
- (`no-throw-raw-error`) [app].
68
+ (`no-throw-raw-error`) and never the untyped `Err` of `akanjs/common` (`no-import-common-err`) [app].
51
69
  - A third-party package reaches `page/**`, a barrel or a module file only through a lib re-export
52
70
  (`no-import-external-library`) [app].
53
71
  - Colors only from the semantic vocabulary (`bg-primary`, `text-foreground/70`) — no palette, arbitrary, daisyUI or
@@ -77,10 +95,10 @@ contract. Path rules name their checks the same way.
77
95
  - One class per file, named after it; TypeScript files are camelCase, component and convention files excepted.
78
96
  - Identifiers, endpoint names and logs are English; everything a user reads goes through `l("model.field")` or
79
97
  `l.trans({ en, ko })`, and dictionary entries are `[en, ko]` pairs.
80
- - Comment only what the code cannot say (`akan verify` flags each new one as `akan.comment.added`) — a vendor quirk,
81
- an infrastructure constraint, security reasoning, a domain field's meaning, a state transition, a rejected
82
- alternative. Never restate code, label a section or add JSDoc; retire a symbol with
83
- `/** @deprecated <what instead> */`.
98
+ - Comment only what the code cannot say (`akan verify` flags each new one as `akan.comment.added`, a
99
+ `// TODO: <issue url>` aside) — a vendor quirk, an infrastructure constraint, security reasoning, a domain field's
100
+ meaning, a state transition, a rejected alternative. Never restate code, label a section or add JSDoc; retire a
101
+ symbol with `/** @deprecated <what instead> */`.
84
102
  - Server rendering is the default: `"use client"` only for a hook, an event handler, the store, a browser global or
85
103
  a client-only package.
86
104
 
@@ -17,6 +17,9 @@ each plugin's header and diagnostic carry its full reasoning.
17
17
  stored loses the key and status too (a warning for now). Exempt: tests, `*.constant.ts`, a root `native/` folder
18
18
  (plugins throw `AkanNativeError`), `script/migration/**` (an operator reads its message), and `common/**` / `env/**`,
19
19
  which have no legal `Err` import — keep throwing code out of them.
20
+ - **Never import `Err` from `akanjs/common`** or `akanjs/common/err` (`no-import-common-err`). That class takes any
21
+ string, so a mistyped key compiles; the `Err` from `"../dict"` or a client entrypoint is the same class, typed with
22
+ the dictionary's keys. `import type` stays legal, to annotate a caught `Err`. Exempt: tests.
20
23
  - **Never import a third-party package** (`no-import-external-library`) from `page/**`, any barrel, a module logic file
21
24
  (`*.{constant,dictionary,document,service,signal,store}.ts`) or module component
22
25
  (`*.{Template,Unit,Util,View,Zone}.tsx`) — re-export it through a lib first (one-line shims in a lib's `common/`,
@@ -49,7 +52,7 @@ each plugin's header and diagnostic carry its full reasoning.
49
52
  - Lib root files: `AGENTS.md`, `CLAUDE.md`, `README.md`, `akan.baseline.json`, `akan.config.ts`, `akan.lib.json`,
50
53
  `client.ts`, `index.ts`, `package.json`, `server.ts`, `tsconfig.json`, `tsconfig.spec.json`, `tsconfig.tsbuildinfo`;
51
54
  folders: the app's minus `.akan`, `script`, `secrets` (no `main.ts` either — a lib is never booted).
52
- - The allowlists' one source is `pkgs/@akanjs/devkit/workspaceLayout.ts`, read by `akan sync` (error), `akan doctor`
55
+ - The allowlists' one source is `pkgs/@akanjs/devkit/workspace/workspaceLayout.ts`, read by `akan sync` (error), `akan doctor`
53
56
  and `akan quality scan` — add an entry there and mirror it here.
54
57
  - `apps/<app>/AGENTS.md` / `libs/<lib>/AGENTS.md` carry a generated `## Recipes In Scope` block between the
55
58
  `akan:agent` markers — never hand-edit it (outside the markers is yours); `akan lint` fails when it is stale.
@@ -43,6 +43,11 @@ export default page()
43
43
  - `.render()` gets the declared args flat and typed (no `PageProps`, no `loader=` prop). Order: `usePage()`, fetch,
44
44
  return; auth is the chain's `.guard()`, which runs before anything renders. Hand `fetch.init*` / `view*` / `edit*` fields to sections unawaited; await only what the shell reads
45
45
  (title, redirect, link id) in one `Promise.all`.
46
+ - **A field's refusal belongs to its `Load.*`**, which draws a notice in its place while the page answers 200. So a
47
+ field reaches only a `Load.*`, directly or through a Zone. Awaited in a component below the page, rendered as a
48
+ child or `use()`-d outside `Load.*`, a refused field takes its whole route level, which draws a retryable notice
49
+ under the layouts above it, as any server error after the first byte does. Await the handle
50
+ (`await fetch.initX()`) instead, so a refusal takes the layout's `.error()`.
46
51
  - **A route never writes while it renders**: a `fetch.<mutation>()` in a stage or a component it renders throws
47
52
  `base.error.mutationInRender`, since opening a link would perform it. Send it from a user action;
48
53
  `{ duringRender: true }` only for a write harmless to repeat and safe for anyone to trigger (`ssrRule`).
@@ -89,8 +89,8 @@ Do not narrate code. Do document the thing the code cannot say. Both halves are
89
89
  - Warranted for: a vendor or protocol quirk; an infrastructure constraint; a library gotcha; security reasoning; why
90
90
  an arbitrary-looking rule is correct; a math derivation; a domain field's business meaning; a state transition above
91
91
  a document chain method; why an obvious alternative was rejected.
92
- - Markers: `TODO` (tracked unfinished work), `FIXME` (known broken), `XXX` (a hazard a reader must not miss), `//!`
93
- (disabled or must-fix — server, `srvkit/`, CLI only), `//?` (an aside), `//*` (a design note), and a deletion
94
- caution saying why removing a line would break something non-obvious.
92
+ - Markers: `TODO: <issue url>` (tracked unfinished work), `FIXME` (known broken), `XXX` (a hazard a reader must not
93
+ miss), `//!` (disabled or must-fix — server, `srvkit/`, CLI only), `//?` (an aside), `//*` (a design note), and a
94
+ deletion caution saying why removing a line would break something non-obvious.
95
95
  - One short line each. Every suppression carries a reason (`// biome-ignore lint/<rule>: <why>`), never a bare
96
96
  disable block. Match the nearby density.