@akanjs/cli 3.2.0-rc.2 → 3.2.0-rc.20

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 (132) hide show
  1. package/.build-stamp +2 -1
  2. package/CodeAgent-faqv7t4g.js +11 -0
  3. package/{CodeTui-zyc7zaq6.js → CodeTui-vqck9tet.js} +822 -666
  4. package/README.ko.md +26 -1
  5. package/README.md +26 -1
  6. package/TunnelShare-bwe3ddv7.js +18 -0
  7. package/agent.command-p75jvgrd.js +56 -0
  8. package/akanCode.js +12 -12
  9. package/appExecutor-020cyesq.js +11 -0
  10. package/{application.command-vb278qnq.js → application.command-ta2knqxm.js} +72 -34
  11. package/{applicationBuildRunner-bqbyeg84.js → applicationBuildRunner-gkh82j2b.js} +18 -13
  12. package/buildBatch.proc.js +26 -11
  13. package/{cloud.command-ca777ee2.js → cloud.command-v3jhfvm5.js} +31 -28
  14. package/cloud.script-be9s1432.js +35 -0
  15. package/{code.command-j08txqcd.js → code.command-mh7dh1st.js} +14 -9
  16. package/{context.command-2fa6egp9.js → context.command-1ycfjkdd.js} +28 -23
  17. package/context.runner-333jkz86.js +34 -0
  18. package/{dependencyScanner-78sq8m4q.js → dependencyScanner-ge10gb52.js} +2 -2
  19. package/{devTui-w38ch13a.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 +17 -5
  23. package/guidelines/akanApi/akanApi.instruction.md +3 -1
  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/errorCodes/errorCodes.instruction.md +158 -0
  28. package/guidelines/fieldRule/fieldRule.instruction.md +2 -1
  29. package/guidelines/mcpRule/mcpRule.instruction.md +74 -2
  30. package/guidelines/pageRule/pageRule.instruction.md +11 -1
  31. package/guidelines/runtimeRule/runtimeRule.instruction.md +7 -2
  32. package/guidelines/transportRule/transportRule.instruction.md +8 -1
  33. package/incrementalBuilder.proc.js +574 -410
  34. package/{index-c5ymqb05.js → index-013n6z7m.js} +12 -12
  35. package/{index-w15mg3km.js → index-0dm25wvf.js} +1 -1
  36. package/{index-8nbx607g.js → index-0hj82f9w.js} +136 -48
  37. package/{index-ebwkh7bt.js → index-1c0mjc2b.js} +25 -7
  38. package/{index-6h775rv3.js → index-1jk52ffq.js} +53 -12
  39. package/{index-hj6w4ka1.js → index-1p81ecbz.js} +1 -1
  40. package/{index-ygrdw6jw.js → index-1pjwsh2g.js} +65 -8
  41. package/{index-cbcwxp5v.js → index-22g3jq43.js} +9 -7
  42. package/{index-466z5931.js → index-2d9nm03s.js} +580 -364
  43. package/{index-0fj9ra3q.js → index-2k6mve6a.js} +18 -11
  44. package/{index-qd7xn2bk.js → index-2ny1e95c.js} +2 -2
  45. package/{index-j7p0jgaq.js → index-52w4jb87.js} +6 -6
  46. package/{index-e22zedc2.js → index-5h888r6j.js} +3 -3
  47. package/{index-7kmbqp0b.js → index-6pxmcaq8.js} +1 -1
  48. package/{index-xa0289eg.js → index-6zb17wcm.js} +16 -9
  49. package/{index-qgazn58x.js → index-7a07tdap.js} +50 -38
  50. package/{index-m5sg5spm.js → index-7ehdht84.js} +565 -187
  51. package/{index-y725zb1a.js → index-7v7tvgt7.js} +196 -168
  52. package/{index-pq5rjkch.js → index-88s746ns.js} +7 -2
  53. package/{index-r0a604h4.js → index-99kjwyma.js} +1 -1
  54. package/{index-2mrn1mrg.js → index-9f3reh2y.js} +1 -1
  55. package/{index-386canwe.js → index-9rv2zt48.js} +186 -121
  56. package/{index-wr9magsr.js → index-9zswcze5.js} +3 -3
  57. package/{index-xq97me1h.js → index-a41vv4cy.js} +811 -697
  58. package/{index-yf9wc28h.js → index-bejy9zyc.js} +1 -1
  59. package/{index-bdmgqzb5.js → index-bket1068.js} +58 -29
  60. package/{index-bns3wcpc.js → index-by2tvsq6.js} +1 -1
  61. package/{index-1cb9apzn.js → index-czf94w8c.js} +2 -2
  62. package/{index-65b6ms4c.js → index-d3178asw.js} +15 -11
  63. package/index-dss3ds74.js +127 -0
  64. package/{index-annxfpgz.js → index-eyfty8kk.js} +9 -9
  65. package/{index-ny2k80mv.js → index-ffa52fwf.js} +1 -1
  66. package/{index-8jpc5fqv.js → index-g7jgd4xs.js} +2 -2
  67. package/{index-abfbf01s.js → index-gwsesvqc.js} +2 -2
  68. package/{index-kcpk2d20.js → index-h1w4wqgd.js} +1474 -1139
  69. package/{index-j1hjb477.js → index-hp2c7xc2.js} +1 -1
  70. package/index-j4yvgfhr.js +70 -0
  71. package/{index-84c2pgak.js → index-jx2jcw1r.js} +89 -78
  72. package/{index-j6eeh5d7.js → index-knpm8sdm.js} +5 -5
  73. package/{index-2gees180.js → index-mpp4aas6.js} +62 -33
  74. package/index-na8r4a27.js +30 -0
  75. package/{index-0mqga3h9.js → index-nmxszh6x.js} +525 -440
  76. package/{index-35j83zkd.js → index-p5zh7pmc.js} +2 -2
  77. package/{index-20wvskt8.js → index-pt0agdck.js} +1 -1
  78. package/{index-htxck0pn.js → index-q444k260.js} +15 -10
  79. package/{index-wfmpxke3.js → index-qssq2d41.js} +2775 -3677
  80. package/{index-23860fej.js → index-rwgqba9p.js} +24 -9
  81. package/{index-v50xjbbe.js → index-t4d0ckde.js} +1 -1
  82. package/index-va90m8nd.js +25 -0
  83. package/index-vjbne22r.js +80 -0
  84. package/{index-djc5nxpy.js → index-w23tf30e.js} +6 -6
  85. package/{index-mvwvxgtd.js → index-wa01phm9.js} +289 -210
  86. package/{index-h7hehkw6.js → index-xczjdng6.js} +3 -1
  87. package/{index-vbhx60x5.js → index-xwe7y0gf.js} +2140 -2165
  88. package/index-ze48c0vd.js +788 -0
  89. package/{index-dk4g0x0d.js → index-zttyg7tg.js} +27 -16
  90. package/{index-ygdbn9jn.js → index-zyb0ebm4.js} +1 -1
  91. package/index.js +29 -24
  92. package/libExecutor-tq994592.js +10 -0
  93. package/{library.command-8d03a0pq.js → library.command-x219mhcx.js} +9 -4
  94. package/{localRegistry.command-vyv5k6t0.js → localRegistry.command-4p17wa9t.js} +30 -24
  95. package/{module.command-vy3kg965.js → module.command-tjthnvvr.js} +17 -8
  96. package/{package.command-qjh13rs9.js → package.command-c6df2hxx.js} +13 -8
  97. package/package.json +2 -2
  98. package/{page.command-t0nx1jat.js → page.command-gf06paq2.js} +9 -4
  99. package/{pipeline.command-2yjeas7m.js → pipeline.command-y07dgj9b.js} +14 -8
  100. package/pkgExecutor-stde3yc3.js +10 -0
  101. package/{primitive.command-8vm49279.js → primitive.command-0enfygxn.js} +13 -8
  102. package/{projectTypecheck-s9hhe5sa.js → projectTypecheck-mk8wefvd.js} +2 -1
  103. package/{prompter-qrwx1p17.js → prompter-qyggfhqd.js} +2 -2
  104. package/{quality.command-v76fev72.js → quality.command-dkbdztad.js} +23 -16
  105. package/{recipeScanner-4b69ybe0.js → recipeScanner-rrx69awy.js} +1 -1
  106. package/{repair.command-fp4m3w03.js → repair.command-g5vd95ax.js} +13 -8
  107. package/{routeSourceValidator-4h947v7c.js → routeSourceValidator-8n6j1vn7.js} +4 -2
  108. package/{scalar.command-hxe6try8.js → scalar.command-7909pg0d.js} +11 -6
  109. package/skills/akan-debug/SKILL.md +10 -3
  110. package/skills/akan-err/SKILL.md +7 -0
  111. package/skills/akan-mcp/SKILL.md +10 -1
  112. package/skills/akan-scaffold/SKILL.md +2 -2
  113. package/skills/akan-transport/SKILL.md +2 -0
  114. package/skills/akan-validate/SKILL.md +1 -0
  115. package/{subspace.command-q42n1844.js → subspace.command-at4jt1fb.js} +29 -23
  116. package/templates/biomeForm.ts +1 -1
  117. package/templates/env/_env.server.type.ts +1 -1
  118. package/templates/facetIndex/index.ts +2 -37
  119. package/templates/lib/sig.ts +0 -4
  120. package/templates/lib/useClient.ts +1 -1
  121. package/templates/workspaceRoot/AGENTS.md.template +2 -1
  122. package/{tunnel.command-22g11n0x.js → tunnel.command-91h92dwr.js} +17 -12
  123. package/{typeChecker-s640r6c0.js → typeChecker-bfrd1n9n.js} +1 -1
  124. package/typecheck.proc.js +6 -3
  125. package/{verify.command-rx43bha1.js → verify.command-pzky05ts.js} +26 -20
  126. package/{workflow.command-yg0d8mmq.js → workflow.command-mqqe4n12.js} +37 -19
  127. package/{workspace.command-fcfztvn5.js → workspace.command-y4rznvhx.js} +64 -53
  128. package/CodeAgent-6cpjtj25.js +0 -11
  129. package/TunnelShare-zkfkrw8w.js +0 -14
  130. package/agent.command-kf1g3nh4.js +0 -51
  131. package/cloud.script-agpxzq6j.js +0 -30
  132. package/context.runner-ftv8373t.js +0 -29
@@ -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-5h888r6j.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-1jk52ffq.js";
17
+ import"./index-w23tf30e.js";
18
+ import"./index-pt0agdck.js";
15
19
  import"./index-m9jj544v.js";
16
- import"./index-84c2pgak.js";
17
- import"./index-wr9magsr.js";
20
+ import"./index-jx2jcw1r.js";
21
+ import"./index-9zswcze5.js";
18
22
  import {
19
23
  npmRegistryFromEnv,
20
24
  warnIgnoredNpmRegistry
21
- } from "./index-ny2k80mv.js";
22
- import"./index-y725zb1a.js";
23
- import"./index-xa0289eg.js";
24
- import"./index-kcpk2d20.js";
25
- import"./index-23860fej.js";
26
- import"./index-8nbx607g.js";
27
- import"./index-qd7xn2bk.js";
28
- import"./index-m5sg5spm.js";
29
- import"./index-1cb9apzn.js";
30
- import"./index-ygrdw6jw.js";
31
- import"./index-65b6ms4c.js";
25
+ } from "./index-ffa52fwf.js";
26
+ import"./index-7v7tvgt7.js";
27
+ import"./index-6zb17wcm.js";
28
+ import"./index-h1w4wqgd.js";
29
+ import"./index-rwgqba9p.js";
30
+ import"./index-0hj82f9w.js";
31
+ import"./index-7ehdht84.js";
32
+ import"./index-czf94w8c.js";
33
+ import"./index-1pjwsh2g.js";
34
+ import"./index-2ny1e95c.js";
35
+ import"./index-d3178asw.js";
32
36
  import {
33
37
  CloudScript2
34
- } from "./index-annxfpgz.js";
38
+ } from "./index-eyfty8kk.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-eyfty8kk.js";
5
+ import"./index-1jk52ffq.js";
6
+ import"./index-0hj82f9w.js";
7
+ import"./index-6zb17wcm.js";
8
+ import"./index-d3178asw.js";
9
+ import"./index-5h888r6j.js";
10
+ import"./index-ffa52fwf.js";
11
+ import"./index-h1w4wqgd.js";
12
+ import"./index-g7jgd4xs.js";
13
+ import"./index-1pjwsh2g.js";
14
+ import"./index-pt0agdck.js";
15
+ import"./index-w23tf30e.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-czf94w8c.js";
22
+ import"./index-7ehdht84.js";
23
+ import"./index-9zswcze5.js";
24
+ import"./index-7v7tvgt7.js";
25
+ import"./index-jx2jcw1r.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-6cpjtj25.js"),
85
+ import("./CodeAgent-faqv7t4g.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-6cpjtj25.js"),
115
- import("./CodeTui-zyc7zaq6.js")
119
+ import("./CodeAgent-faqv7t4g.js"),
120
+ import("./CodeTui-vqck9tet.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-6cpjtj25.js");
156
+ const { CodeAgent } = await import("./CodeAgent-faqv7t4g.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-0mqga3h9.js";
9
- import"./index-hj6w4ka1.js";
10
- import"./index-xq97me1h.js";
11
- import"./index-m5sg5spm.js";
12
- import"./index-mvwvxgtd.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-a41vv4cy.js";
13
+ import"./index-7ehdht84.js";
14
+ import"./index-nmxszh6x.js";
15
+ import"./index-1p81ecbz.js";
16
+ import"./index-wa01phm9.js";
17
+ import"./index-knpm8sdm.js";
18
+ import"./index-w23tf30e.js";
19
+ import"./index-pt0agdck.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-ebwkh7bt.js";
21
- import"./index-cbcwxp5v.js";
22
- import"./index-7kmbqp0b.js";
23
- import"./index-htxck0pn.js";
24
- import"./index-qgazn58x.js";
25
- import"./index-pq5rjkch.js";
26
- import"./index-v50xjbbe.js";
27
- import"./index-c5ymqb05.js";
21
+ import"./index-jx2jcw1r.js";
22
+ import"./index-9zswcze5.js";
23
+ import"./index-zyb0ebm4.js";
24
+ import"./index-1c0mjc2b.js";
25
+ import"./index-22g3jq43.js";
26
+ import"./index-6pxmcaq8.js";
27
+ import"./index-q444k260.js";
28
+ import"./index-7a07tdap.js";
29
+ import"./index-88s746ns.js";
30
+ import"./index-t4d0ckde.js";
31
+ import"./index-013n6z7m.js";
28
32
  import {
29
33
  ContextScript
30
- } from "./index-j7p0jgaq.js";
34
+ } from "./index-52w4jb87.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-wa01phm9.js";
5
+ import"./index-013n6z7m.js";
6
+ import"./index-22g3jq43.js";
7
+ import"./index-88s746ns.js";
8
+ import"./index-7a07tdap.js";
9
+ import"./index-q444k260.js";
10
+ import"./index-6pxmcaq8.js";
11
+ import"./index-t4d0ckde.js";
12
+ import"./index-nmxszh6x.js";
13
+ import"./index-pt0agdck.js";
14
+ import"./index-a41vv4cy.js";
15
+ import"./index-w23tf30e.js";
16
+ import"./index-m9jj544v.js";
17
+ import"./index-knpm8sdm.js";
18
+ import"./index-9rv2zt48.js";
19
+ import"./index-1c0mjc2b.js";
20
+ import"./index-zyb0ebm4.js";
21
+ import"./index-7ehdht84.js";
22
+ import"./index-9zswcze5.js";
23
+ import"./index-jx2jcw1r.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-23860fej.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,8 +60,13 @@ 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. `chrome={false}` drops the header bar whole, for an `inline` chat inside a
69
+ panel the app already titles, and `defaultDraft` opens the composer with text in it without sending it. A panel driven by a
64
70
  controlled `open` with **no** `onOpenChange` draws no close button at all rather than an inert one. Then the
65
71
  slots: `AgentLauncher`, `AgentSteps`, `AgentBubble`, `AgentComposer`, `AgentApproval`,
66
72
  `AgentQuestion`, `AgentToolCard`, `AgentQueued`, `AgentMenu`, `AgentMarkdown` and `AgentCode` each replace one part in `_overrides.tsx`, and
@@ -636,6 +642,12 @@ pages declaring one name never clash, and a registry kept outside the surface re
636
642
  - **A turn that failed says so on the wire.** `error` is a field only this wire has, so a provider mapping reads
637
643
  `text` and drops it; `AgentService.explained` folds it into the text before any adaptor sees it, because an
638
644
  assistant turn that says nothing is one the model repeats.
645
+ - **A failed turn keeps its code for the host.** The relay's `error` event carries `code`: the `Err`'s key, else
646
+ an `AkanError`'s own code when its JSON carries it, else the status's name, so a custom `toJSON()` keeps `code`
647
+ in what it returns or the failure reads as its status. It is one code whether the failure is answered before the
648
+ stream opens or inside it, a 5xx included. A refusal (401/403) is named by its status alone, unless the server
649
+ kept it under its own code. The chat keeps it on that assistant message as `errorCode` after translating the
650
+ text, so a host branches on `message.errorCode`, never on the sentence. It is never sent back to the relay.
639
651
  - **↑ and ↓ in the composer walk what was sent**, seeded from the transcript so a persisted chat does not lose
640
652
  only what was just typed. A single-line input has nothing of its own on the vertical arrows, and the
641
653
  half-written draft they were walked away from comes back at the bottom of the walk. **The `/` menu takes those
@@ -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
 
@@ -237,6 +237,8 @@ method?: HttpMutationMethod;
237
237
  fileUpload?: boolean;
238
238
  /** `false` keeps it out of the MCP catalogue (default `true`); curation, not authorization — HTTP still serves it. */
239
239
  mcp?: boolean;
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`).