@akanjs/cli 3.2.0-rc.1 → 3.2.0-rc.11

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 (99) hide show
  1. package/.build-stamp +2 -1
  2. package/{CodeAgent-vmd9k4ak.js → CodeAgent-fk66n37w.js} +3 -3
  3. package/{CodeTui-zka44v52.js → CodeTui-4rf1mqmv.js} +1 -1
  4. package/README.ko.md +26 -1
  5. package/README.md +26 -1
  6. package/TunnelShare-44er4e29.js +15 -0
  7. package/{agent.command-2f657613.js → agent.command-7g9czkkd.js} +20 -19
  8. package/akanCode.js +3 -3
  9. package/{application.command-q6skd3am.js → application.command-00spg55s.js} +31 -24
  10. package/{applicationBuildRunner-sctcmkyx.js → applicationBuildRunner-f4yf0qyc.js} +9 -7
  11. package/buildBatch.proc.js +7 -6
  12. package/{cloud.command-7642pks6.js → cloud.command-ab704p0g.js} +24 -25
  13. package/cloud.script-4p4y0s7e.js +31 -0
  14. package/{code.command-7s4ndq2k.js → code.command-m6c9xk56.js} +7 -6
  15. package/{context.command-569z0rqf.js → context.command-hgcgxtdk.js} +20 -19
  16. package/context.runner-w071gmc3.js +30 -0
  17. package/{devTui-w38ch13a.js → devTui-h77zrjv5.js} +1 -1
  18. package/{guideline.command-gnv3e8p8.js → guideline.command-6yz6d4hf.js} +3 -2
  19. package/guidelines/agentRule/agentRule.instruction.md +4 -3
  20. package/guidelines/akanApi/akanApi.instruction.md +2 -0
  21. package/guidelines/conventions/core.md +1 -1
  22. package/guidelines/conventions/rules/app.md +3 -0
  23. package/guidelines/conventions/rules/page.md +5 -0
  24. package/guidelines/errorCodes/errorCodes.instruction.md +140 -0
  25. package/guidelines/fieldRule/fieldRule.instruction.md +2 -1
  26. package/guidelines/mcpRule/mcpRule.instruction.md +72 -2
  27. package/guidelines/pageRule/pageRule.instruction.md +5 -0
  28. package/guidelines/runtimeRule/runtimeRule.instruction.md +5 -1
  29. package/guidelines/transportRule/transportRule.instruction.md +5 -0
  30. package/incrementalBuilder.proc.js +8 -7
  31. package/{index-vkzfk7qt.js → index-097bjwvm.js} +40 -30
  32. package/{index-93ewzmp6.js → index-23d8gw08.js} +165 -102
  33. package/{index-p6hjwt2d.js → index-41mfhgq0.js} +72 -26
  34. package/{index-ktb3wcqz.js → index-4k9nv4m3.js} +71 -81
  35. package/{index-vr68mxj5.js → index-5jwx4bf2.js} +69 -33
  36. package/{index-5w9my9qe.js → index-6eptmk8z.js} +30 -20
  37. package/{index-d4n1wmrz.js → index-6fnrhpn1.js} +8 -4
  38. package/{index-kpdv34rq.js → index-6qtxs86x.js} +10 -7
  39. package/{index-ed6ea0qp.js → index-6z57w95f.js} +1 -1
  40. package/{index-drz9e84d.js → index-7ky4brfy.js} +2 -2
  41. package/{index-8g7tdsk4.js → index-849qvd7t.js} +58 -29
  42. package/{index-1q1cjn8s.js → index-9xh4zvw3.js} +94 -53
  43. package/{index-48d5qsj3.js → index-adj7qmz9.js} +23 -15
  44. package/{index-fjr4d6yd.js → index-apcr1qgk.js} +458 -304
  45. package/{index-8ts9774g.js → index-aybfcx58.js} +9 -4
  46. package/{index-8kczhnmv.js → index-b3pr4ee6.js} +1 -1
  47. package/{index-23860fej.js → index-b4qq3rq0.js} +23 -8
  48. package/{index-thckcabc.js → index-bper31wr.js} +24 -6
  49. package/{index-a8a9ede9.js → index-bxkx0x03.js} +14 -7
  50. package/{index-0fb3cpbt.js → index-c3r23w24.js} +9 -7
  51. package/{index-8pb9yvp8.js → index-dfsa009c.js} +148 -31
  52. package/{index-zpv14wpy.js → index-dsg50er9.js} +3 -3
  53. package/{index-hqrkqxx2.js → index-e5f6czck.js} +46 -7
  54. package/{index-sy481q2x.js → index-frvjq1rd.js} +1 -1
  55. package/{index-abgh0jve.js → index-grt0e6kk.js} +1 -1
  56. package/{index-e3vmjtph.js → index-hf9nvwam.js} +7 -2
  57. package/{index-v4p1zye8.js → index-hhagjhkh.js} +7 -7
  58. package/index-j4yvgfhr.js +70 -0
  59. package/{index-s2grpzef.js → index-k2r3hmbz.js} +6 -4
  60. package/{index-7y5yghjg.js → index-nd39rssn.js} +1162 -435
  61. package/{index-6wpaq392.js → index-p4htjyvk.js} +44 -5
  62. package/{index-aj3ehkcx.js → index-p54s83sz.js} +1 -1
  63. package/{index-7xdpww43.js → index-rdx8cyv2.js} +342 -134
  64. package/{index-sr5da35e.js → index-sq9d0jhj.js} +21 -18
  65. package/{index-eajbmk10.js → index-t4d0ckde.js} +2 -2
  66. package/{index-mqntfzv5.js → index-t8h09yjs.js} +7 -2
  67. package/index-va90m8nd.js +25 -0
  68. package/{index-rc5fvqj2.js → index-xfv2p7b5.js} +95 -58
  69. package/{index-w639tvkd.js → index-xgqz3kak.js} +29 -8
  70. package/{index-9tbgb4d8.js → index-xy70tcv4.js} +1 -1
  71. package/{index-mmym5xmb.js → index-z43wddce.js} +5 -3
  72. package/index.js +24 -23
  73. package/{library.command-1gp5qe3r.js → library.command-kc1zahcg.js} +5 -4
  74. package/{localRegistry.command-x7jptkd3.js → localRegistry.command-bz2df40m.js} +19 -18
  75. package/{module.command-4xz9he6h.js → module.command-cchwzz9r.js} +12 -7
  76. package/{package.command-s7qpnn1g.js → package.command-qcjajpv8.js} +8 -7
  77. package/package.json +2 -2
  78. package/{page.command-fan34c49.js → page.command-1t86dx8a.js} +4 -3
  79. package/{pipeline.command-ph4fnn9w.js → pipeline.command-2xx9z3d0.js} +3 -2
  80. package/{primitive.command-3fqh8emf.js → primitive.command-mc0x8txr.js} +8 -7
  81. package/{projectTypecheck-vkb40hjc.js → projectTypecheck-tz497yx7.js} +2 -1
  82. package/{quality.command-ecj6exsh.js → quality.command-11rayf5c.js} +7 -6
  83. package/{repair.command-fe9jw719.js → repair.command-8w41vy78.js} +7 -6
  84. package/{scalar.command-cnvfhk0n.js → scalar.command-rvwh98ny.js} +7 -6
  85. package/skills/akan-debug/SKILL.md +7 -3
  86. package/skills/akan-err/SKILL.md +7 -0
  87. package/skills/akan-mcp/SKILL.md +10 -1
  88. package/skills/akan-scaffold/SKILL.md +3 -2
  89. package/skills/akan-transport/SKILL.md +2 -0
  90. package/skills/akan-validate/SKILL.md +1 -0
  91. package/{subspace.command-qw5ddd6y.js → subspace.command-0970n7kd.js} +9 -8
  92. package/{tunnel.command-ggj38mqf.js → tunnel.command-bcy0rtmh.js} +8 -7
  93. package/typecheck.proc.js +5 -2
  94. package/{verify.command-w9ttxkdz.js → verify.command-ynaztxr2.js} +18 -16
  95. package/{workflow.command-ss8devj0.js → workflow.command-yp9ajthb.js} +45 -16
  96. package/{workspace.command-6z2rh8ze.js → workspace.command-e4wfxm86.js} +39 -34
  97. package/TunnelShare-k3ja4w9x.js +0 -14
  98. package/cloud.script-1sfseznn.js +0 -30
  99. package/context.runner-ms8v1rxy.js +0 -29
package/index.js CHANGED
@@ -4,9 +4,10 @@ import {
4
4
  getTargetMetas,
5
5
  getTargetCommandNames,
6
6
  runCommands
7
- } from "./index-93ewzmp6.js";
7
+ } from "./index-23d8gw08.js";
8
+ import"./index-j4yvgfhr.js";
8
9
  import"./index-bns3wcpc.js";
9
- import"./index-sr5da35e.js";
10
+ import"./index-sq9d0jhj.js";
10
11
 
11
12
  // pkgs/@akanjs/cli/bunVersionGuard.ts
12
13
  class BunVersionGuard {
@@ -22,27 +23,27 @@ import path from "path";
22
23
 
23
24
  // pkgs/@akanjs/cli/commandModules.ts
24
25
  var commandModules = {
25
- workspace: async () => (await import("./workspace.command-6z2rh8ze.js")).WorkspaceCommand,
26
- agent: async () => (await import("./agent.command-2f657613.js")).AgentCommand,
27
- code: async () => (await import("./code.command-7s4ndq2k.js")).CodeCommand,
28
- application: async () => (await import("./application.command-q6skd3am.js")).ApplicationCommand,
29
- library: async () => (await import("./library.command-1gp5qe3r.js")).LibraryCommand,
30
- localRegistry: async () => (await import("./localRegistry.command-x7jptkd3.js")).LocalRegistryCommand,
31
- package: async () => (await import("./package.command-s7qpnn1g.js")).PackageCommand,
32
- module: async () => (await import("./module.command-4xz9he6h.js")).ModuleCommand,
33
- page: async () => (await import("./page.command-fan34c49.js")).PageCommand,
34
- context: async () => (await import("./context.command-569z0rqf.js")).ContextCommand,
35
- cloud: async () => (await import("./cloud.command-7642pks6.js")).CloudCommand,
36
- subspace: async () => (await import("./subspace.command-qw5ddd6y.js")).SubspaceCommand,
37
- guideline: async () => (await import("./guideline.command-gnv3e8p8.js")).GuidelineCommand,
38
- scalar: async () => (await import("./scalar.command-cnvfhk0n.js")).ScalarCommand,
39
- primitive: async () => (await import("./primitive.command-3fqh8emf.js")).PrimitiveCommand,
40
- quality: async () => (await import("./quality.command-ecj6exsh.js")).QualityCommand,
41
- verify: async () => (await import("./verify.command-w9ttxkdz.js")).VerifyCommand,
42
- repair: async () => (await import("./repair.command-fe9jw719.js")).RepairCommand,
43
- workflow: async () => (await import("./workflow.command-ss8devj0.js")).WorkflowCommand,
44
- pipeline: async () => (await import("./pipeline.command-ph4fnn9w.js")).PipelineCommand,
45
- tunnel: async () => (await import("./tunnel.command-ggj38mqf.js")).TunnelCommand
26
+ workspace: async () => (await import("./workspace.command-e4wfxm86.js")).WorkspaceCommand,
27
+ agent: async () => (await import("./agent.command-7g9czkkd.js")).AgentCommand,
28
+ code: async () => (await import("./code.command-m6c9xk56.js")).CodeCommand,
29
+ application: async () => (await import("./application.command-00spg55s.js")).ApplicationCommand,
30
+ library: async () => (await import("./library.command-kc1zahcg.js")).LibraryCommand,
31
+ localRegistry: async () => (await import("./localRegistry.command-bz2df40m.js")).LocalRegistryCommand,
32
+ package: async () => (await import("./package.command-qcjajpv8.js")).PackageCommand,
33
+ module: async () => (await import("./module.command-cchwzz9r.js")).ModuleCommand,
34
+ page: async () => (await import("./page.command-1t86dx8a.js")).PageCommand,
35
+ context: async () => (await import("./context.command-hgcgxtdk.js")).ContextCommand,
36
+ cloud: async () => (await import("./cloud.command-ab704p0g.js")).CloudCommand,
37
+ subspace: async () => (await import("./subspace.command-0970n7kd.js")).SubspaceCommand,
38
+ guideline: async () => (await import("./guideline.command-6yz6d4hf.js")).GuidelineCommand,
39
+ scalar: async () => (await import("./scalar.command-rvwh98ny.js")).ScalarCommand,
40
+ primitive: async () => (await import("./primitive.command-mc0x8txr.js")).PrimitiveCommand,
41
+ quality: async () => (await import("./quality.command-11rayf5c.js")).QualityCommand,
42
+ verify: async () => (await import("./verify.command-ynaztxr2.js")).VerifyCommand,
43
+ repair: async () => (await import("./repair.command-8w41vy78.js")).RepairCommand,
44
+ workflow: async () => (await import("./workflow.command-yp9ajthb.js")).WorkflowCommand,
45
+ pipeline: async () => (await import("./pipeline.command-2xx9z3d0.js")).PipelineCommand,
46
+ tunnel: async () => (await import("./tunnel.command-bcy0rtmh.js")).TunnelCommand
46
47
  };
47
48
  var commandModuleIds = Object.keys(commandModules);
48
49
 
@@ -3,19 +3,20 @@ import {
3
3
  Lib,
4
4
  Workspace,
5
5
  command
6
- } from "./index-93ewzmp6.js";
6
+ } from "./index-23d8gw08.js";
7
+ import"./index-j4yvgfhr.js";
7
8
  import"./index-bns3wcpc.js";
8
- import"./index-sr5da35e.js";
9
+ import"./index-sq9d0jhj.js";
9
10
  import {
10
11
  LibraryScript
11
- } from "./index-mqntfzv5.js";
12
+ } from "./index-t8h09yjs.js";
12
13
 
13
14
  // pkgs/@akanjs/cli/library/library.command.ts
14
15
  class LibraryCommand extends command("library", [LibraryScript], ({ public: target }) => ({
15
16
  createLibrary: target({ desc: "Create a new shared library in the workspace" }).arg("libName", String, { desc: "name of library" }).with(Workspace).exec(async function(libName, workspace) {
16
17
  await this.libraryScript.createLibrary(libName.toLowerCase().replace(/ /g, "-"), workspace);
17
18
  }),
18
- removeLibrary: target({ desc: "Remove a library from the workspace" }).with(Lib).exec(async function(lib) {
19
+ removeLibrary: target({ desc: "Remove a library from the workspace", destructive: true }).with(Lib).exec(async function(lib) {
19
20
  await this.libraryScript.removeLibrary(lib);
20
21
  }),
21
22
  syncLibrary: target({ desc: "Sync dependencies and configuration for a library" }).with(Lib).exec(async function(lib) {
@@ -4,41 +4,42 @@ import {
4
4
  runner,
5
5
  script,
6
6
  command
7
- } from "./index-93ewzmp6.js";
7
+ } from "./index-23d8gw08.js";
8
+ import"./index-j4yvgfhr.js";
8
9
  import"./index-bns3wcpc.js";
9
10
  import {
10
11
  parseEnvFile,
11
12
  PkgExecutor
12
- } from "./index-sr5da35e.js";
13
+ } from "./index-sq9d0jhj.js";
13
14
  import {
14
15
  npmRegistryFromEnv,
15
16
  warnIgnoredNpmRegistry,
16
17
  getNpmRegistryUrl
17
18
  } from "./index-ny2k80mv.js";
18
- import"./index-p6hjwt2d.js";
19
- import"./index-zpv14wpy.js";
20
- import"./index-ed6ea0qp.js";
19
+ import"./index-41mfhgq0.js";
20
+ import"./index-dsg50er9.js";
21
+ import"./index-6z57w95f.js";
21
22
  import"./index-m9jj544v.js";
22
- import"./index-1q1cjn8s.js";
23
- import"./index-mmym5xmb.js";
24
- import"./index-mqntfzv5.js";
25
- import"./index-ktb3wcqz.js";
26
- import"./index-23860fej.js";
23
+ import"./index-9xh4zvw3.js";
24
+ import"./index-z43wddce.js";
25
+ import"./index-t8h09yjs.js";
26
+ import"./index-4k9nv4m3.js";
27
+ import"./index-b4qq3rq0.js";
27
28
  import {
28
29
  ApplicationScript
29
- } from "./index-vr68mxj5.js";
30
- import"./index-drz9e84d.js";
30
+ } from "./index-5jwx4bf2.js";
31
+ import"./index-7ky4brfy.js";
31
32
  import {
32
33
  CloudRunner
33
- } from "./index-6wpaq392.js";
34
+ } from "./index-p4htjyvk.js";
34
35
  import"./index-qd7xn2bk.js";
35
- import"./index-7y5yghjg.js";
36
- import"./index-abgh0jve.js";
37
- import"./index-hqrkqxx2.js";
36
+ import"./index-nd39rssn.js";
37
+ import"./index-grt0e6kk.js";
38
+ import"./index-e5f6czck.js";
38
39
  import {
39
40
  PackageScript
40
- } from "./index-d4n1wmrz.js";
41
- import"./index-sy481q2x.js";
41
+ } from "./index-6fnrhpn1.js";
42
+ import"./index-frvjq1rd.js";
42
43
  import"./index-9bv479q5.js";
43
44
 
44
45
  // pkgs/@akanjs/cli/localRegistry/localRegistry.runner.ts
@@ -2,18 +2,20 @@
2
2
  import {
3
3
  Sys,
4
4
  Module,
5
+ ModuleOrService,
5
6
  command
6
- } from "./index-93ewzmp6.js";
7
+ } from "./index-23d8gw08.js";
8
+ import"./index-j4yvgfhr.js";
7
9
  import"./index-bns3wcpc.js";
8
- import"./index-sr5da35e.js";
10
+ import"./index-sq9d0jhj.js";
9
11
  import {
10
12
  renderPrimitiveReport
11
- } from "./index-8pb9yvp8.js";
12
- import"./index-7y5yghjg.js";
13
- import"./index-aj3ehkcx.js";
13
+ } from "./index-dfsa009c.js";
14
+ import"./index-nd39rssn.js";
15
+ import"./index-p54s83sz.js";
14
16
  import {
15
17
  ModuleScript
16
- } from "./index-8ts9774g.js";
18
+ } from "./index-aybfcx58.js";
17
19
 
18
20
  // pkgs/@akanjs/cli/module/module.command.ts
19
21
  import { Logger, lowerlize } from "akanjs/common";
@@ -23,7 +25,10 @@ class ModuleCommand extends command("module", [ModuleScript], ({ public: target
23
25
  const report = await this.moduleScript.createModuleTemplate(sys, name, { page });
24
26
  Logger.rawLog(renderPrimitiveReport(report, format));
25
27
  }),
26
- removeModule: target({ desc: "Remove a module from an app or library" }).with(Module).exec(async function(module) {
28
+ removeModule: target({
29
+ desc: "Remove a module, or a service module as <sys>:_<name>, from an app or library",
30
+ destructive: true
31
+ }).with(ModuleOrService).exec(async function(module) {
27
32
  await this.moduleScript.removeModule(module);
28
33
  }),
29
34
  createService: target({ desc: "Create a service module without database files" }).arg("serviceName", String, { desc: "name of service module" }).with(Sys).option("format", String, { flag: "o", desc: "output format", default: "markdown", enum: ["markdown", "json"] }).exec(async function(serviceName, sys, format) {
@@ -3,16 +3,17 @@ import {
3
3
  Pkg,
4
4
  Workspace,
5
5
  command
6
- } from "./index-93ewzmp6.js";
6
+ } from "./index-23d8gw08.js";
7
+ import"./index-j4yvgfhr.js";
7
8
  import"./index-bns3wcpc.js";
8
- import"./index-sr5da35e.js";
9
+ import"./index-sq9d0jhj.js";
9
10
  import"./index-qd7xn2bk.js";
10
- import"./index-7y5yghjg.js";
11
- import"./index-abgh0jve.js";
12
- import"./index-hqrkqxx2.js";
11
+ import"./index-nd39rssn.js";
12
+ import"./index-grt0e6kk.js";
13
+ import"./index-e5f6czck.js";
13
14
  import {
14
15
  PackageScript
15
- } from "./index-d4n1wmrz.js";
16
+ } from "./index-6fnrhpn1.js";
16
17
 
17
18
  // pkgs/@akanjs/cli/package/package.command.ts
18
19
  class PackageCommand extends command("package", [PackageScript], ({ public: target }) => ({
@@ -22,7 +23,7 @@ class PackageCommand extends command("package", [PackageScript], ({ public: targ
22
23
  createPackage: target({ desc: "Create a new package in pkgs/<name>/" }).option("name", String, { desc: "name of package" }).with(Workspace).exec(async function(name, workspace) {
23
24
  await this.packageScript.createPackage(workspace, name.toLowerCase().replace(/ /g, "-"));
24
25
  }),
25
- removePackage: target({ desc: "Remove a package from the workspace" }).with(Pkg).exec(async function(pkg) {
26
+ removePackage: target({ desc: "Remove a package from the workspace", destructive: true }).with(Pkg).exec(async function(pkg) {
26
27
  await this.packageScript.removePackage(pkg);
27
28
  }),
28
29
  syncPackage: target({ desc: "Sync dependencies and configuration for a package" }).with(Pkg).exec(async function(pkg) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@akanjs/cli",
3
- "version": "3.2.0-rc.1",
3
+ "version": "3.2.0-rc.11",
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.2.0-rc.1",
42
+ "akanjs": "3.2.0-rc.11",
43
43
  "chalk": "^6.0.1",
44
44
  "commander": "^15.0.0",
45
45
  "dayjs": "^1.11.23",
@@ -3,12 +3,13 @@ import {
3
3
  App,
4
4
  Module,
5
5
  command
6
- } from "./index-93ewzmp6.js";
6
+ } from "./index-23d8gw08.js";
7
+ import"./index-j4yvgfhr.js";
7
8
  import"./index-bns3wcpc.js";
8
- import"./index-sr5da35e.js";
9
+ import"./index-sq9d0jhj.js";
9
10
  import {
10
11
  PageScript
11
- } from "./index-aj3ehkcx.js";
12
+ } from "./index-p54s83sz.js";
12
13
 
13
14
  // pkgs/@akanjs/cli/page/page.command.ts
14
15
  class PageCommand extends command("page", [PageScript], ({ public: target }) => ({
@@ -4,7 +4,8 @@ import {
4
4
  runner,
5
5
  script,
6
6
  command
7
- } from "./index-93ewzmp6.js";
7
+ } from "./index-23d8gw08.js";
8
+ import"./index-j4yvgfhr.js";
8
9
  import {
9
10
  FileSys2
10
11
  } from "./index-bns3wcpc.js";
@@ -12,7 +13,7 @@ import {
12
13
  AkanAppConfig,
13
14
  AkanWorkspaceConfig,
14
15
  AppExecutor
15
- } from "./index-sr5da35e.js";
16
+ } from "./index-sq9d0jhj.js";
16
17
  import {
17
18
  resolveMobileTargets
18
19
  } from "./index-m9jj544v.js";
@@ -2,18 +2,19 @@
2
2
  import {
3
3
  Workspace,
4
4
  command
5
- } from "./index-93ewzmp6.js";
5
+ } from "./index-23d8gw08.js";
6
+ import"./index-j4yvgfhr.js";
6
7
  import"./index-bns3wcpc.js";
7
- import"./index-sr5da35e.js";
8
+ import"./index-sq9d0jhj.js";
8
9
  import {
9
10
  renderPrimitiveReport
10
- } from "./index-8pb9yvp8.js";
11
- import"./index-7y5yghjg.js";
12
- import"./index-aj3ehkcx.js";
13
- import"./index-8ts9774g.js";
11
+ } from "./index-dfsa009c.js";
12
+ import"./index-nd39rssn.js";
13
+ import"./index-p54s83sz.js";
14
+ import"./index-aybfcx58.js";
14
15
  import {
15
16
  PrimitiveScript
16
- } from "./index-48d5qsj3.js";
17
+ } from "./index-adj7qmz9.js";
17
18
 
18
19
  // pkgs/@akanjs/cli/primitive/primitive.command.ts
19
20
  import { Logger } from "akanjs/common";
@@ -1,7 +1,8 @@
1
1
  // @bun
2
2
  import {
3
3
  ProjectTypecheck2
4
- } from "./index-sr5da35e.js";
4
+ } from "./index-sq9d0jhj.js";
5
+ import"./index-j4yvgfhr.js";
5
6
  export {
6
7
  ProjectTypecheck2 as ProjectTypecheck
7
8
  };
@@ -3,28 +3,29 @@ import {
3
3
  Workspace,
4
4
  script,
5
5
  command
6
- } from "./index-93ewzmp6.js";
6
+ } from "./index-23d8gw08.js";
7
+ import"./index-j4yvgfhr.js";
7
8
  import"./index-bns3wcpc.js";
8
9
  import {
9
10
  AppExecutor,
10
11
  LibExecutor,
11
12
  PkgExecutor
12
- } from "./index-sr5da35e.js";
13
+ } from "./index-sq9d0jhj.js";
13
14
  import {
14
15
  MaintainabilityBaseline
15
- } from "./index-hqrkqxx2.js";
16
+ } from "./index-e5f6czck.js";
16
17
  import {
17
18
  WorkspaceRunner,
18
19
  AkanQualityScanner,
19
20
  formatQualityScanResult,
20
21
  formatSsrScanResult
21
- } from "./index-fjr4d6yd.js";
22
- import"./index-7y5yghjg.js";
22
+ } from "./index-apcr1qgk.js";
23
+ import"./index-nd39rssn.js";
23
24
  import"./index-62md4dwy.js";
24
25
  import"./index-ygdbn9jn.js";
25
26
  import"./index-hj6w4ka1.js";
26
27
  import"./index-ny2k80mv.js";
27
- import"./index-eajbmk10.js";
28
+ import"./index-t4d0ckde.js";
28
29
 
29
30
  // pkgs/@akanjs/cli/quality/quality.script.ts
30
31
  import { Logger } from "akanjs/common";
@@ -3,16 +3,17 @@ import {
3
3
  Workspace,
4
4
  script,
5
5
  command
6
- } from "./index-93ewzmp6.js";
6
+ } from "./index-23d8gw08.js";
7
+ import"./index-j4yvgfhr.js";
7
8
  import"./index-bns3wcpc.js";
8
- import"./index-sr5da35e.js";
9
+ import"./index-sq9d0jhj.js";
10
+ import"./index-bper31wr.js";
9
11
  import"./index-hj6w4ka1.js";
10
- import"./index-8pb9yvp8.js";
11
- import"./index-7y5yghjg.js";
12
- import"./index-thckcabc.js";
12
+ import"./index-dfsa009c.js";
13
+ import"./index-nd39rssn.js";
13
14
  import {
14
15
  RepairRunner
15
- } from "./index-0fb3cpbt.js";
16
+ } from "./index-c3r23w24.js";
16
17
 
17
18
  // pkgs/@akanjs/cli/repair/repair.script.ts
18
19
  import { Logger } from "akanjs/common";
@@ -2,16 +2,17 @@
2
2
  import {
3
3
  Sys,
4
4
  command
5
- } from "./index-93ewzmp6.js";
5
+ } from "./index-23d8gw08.js";
6
+ import"./index-j4yvgfhr.js";
6
7
  import"./index-bns3wcpc.js";
7
- import"./index-sr5da35e.js";
8
+ import"./index-sq9d0jhj.js";
8
9
  import {
9
10
  renderPrimitiveReport
10
- } from "./index-8pb9yvp8.js";
11
- import"./index-7y5yghjg.js";
11
+ } from "./index-dfsa009c.js";
12
+ import"./index-nd39rssn.js";
12
13
  import {
13
14
  ScalarScript
14
- } from "./index-e3vmjtph.js";
15
+ } from "./index-hf9nvwam.js";
15
16
 
16
17
  // pkgs/@akanjs/cli/scalar/scalar.command.ts
17
18
  import { Logger, lowerlize } from "akanjs/common";
@@ -21,7 +22,7 @@ class ScalarCommand extends command("scalar", [ScalarScript], ({ public: target
21
22
  const report = await this.scalarScript.createScalar(sys, name);
22
23
  Logger.rawLog(renderPrimitiveReport(report, format));
23
24
  }),
24
- removeScalar: target({ desc: "Remove a scalar type from an app or library" }).arg("scalarName", String, { desc: "name of scalar" }).with(Sys).exec(async function(scalarName, sys) {
25
+ removeScalar: target({ desc: "Remove a scalar type from an app or library", destructive: true }).arg("scalarName", String, { desc: "name of scalar" }).with(Sys).exec(async function(scalarName, sys) {
25
26
  await this.scalarScript.removeScalar(sys, scalarName);
26
27
  })
27
28
  })) {
@@ -9,14 +9,18 @@ description: "Check and debug a running Akan app: akan preview for what a page s
9
9
 
10
10
  `akan preview <app> [paths]` opens pages of the app's dev server in a headless browser and prints, per page,
11
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.
12
+ the server errors logged meanwhile, console errors and warnings, and layout smells. It exits 3 when a page failed.
13
13
 
14
14
  - It uses the dev server that answers for this app and checkout. With none, it starts one for the run and
15
15
  stops it after; `--keep` leaves it up for the next preview. It never starts a second server beside a
16
16
  running one.
17
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. A `/_akan` route such as Studio
19
- (`/_akan/studio?view=runtime`), a signal route or a file opens as written.
18
+ one, unless the app sets `localePrefix: "as-needed"` and `--csr` is off. What the server answers outside a
19
+ locale opens as written: a `/_akan` route such as Studio (`/_akan/studio?view=runtime`), a route under the
20
+ API prefix, `/__csr`, `/__rsc`, `/.well-known`, `/openapi.json`, the default `/mcp`, `/favicon.ico`,
21
+ `/robots.txt`, `/sitemap.xml`, `manifest.webmanifest` and a file in the app's `public/`. A full URL
22
+ (`http://localhost:<port>/oauth/token`) opens exactly as written: use it for an endpoint mounted outside the
23
+ API prefix or a custom MCP path. A page `--changed` finds always gets the locale.
20
24
  `--changed` adds the pages your uncommitted page and layout edits reach. A dynamic route needs a concrete
21
25
  path (`/memo/1`); `akan context --app <app>` lists every route with its params and search names.
22
26
  - The viewport is a 390x844 phone; `--desktop` is 1280x800. `--csr` loads each page in the CSR boot the native
@@ -15,6 +15,8 @@ This is the common failure. Import `Err` from the source matching the **runtime
15
15
  - server code: `import { Err } from "../dict"`
16
16
  - UI: `from "@libs/<lib>/client"` or `from "@apps/<app>/client"`
17
17
 
18
+ Never `from "akanjs/common"` (`no-import-common-err.grit`): that `Err` takes any string, so a mistyped key compiles.
19
+
18
20
  ## Where the rule does not apply
19
21
 
20
22
  The lint rule exempts tests, `*.constant.ts`, `common/**`, and `env/**`. The last two have **no legal `Err`
@@ -38,3 +40,8 @@ discards what the endpoint chose to say, and a bare `Error` is generalized to "I
38
40
  way out.
39
41
 
40
42
  Korean `.error()` messages end in `다.`.
43
+
44
+ **The framework's own failures carry a code.** A `NoDocumentError`, an `Exception` status class or another
45
+ `AkanError` names its kind in `code`; branch on that with `AkanError.is(error, "<code>")`, never on its message.
46
+
47
+ Every code, its status and whether the caller's JSON carries it: `get_guideline` with `errorCodes`.
@@ -23,7 +23,8 @@ an endpoint with a real guard is published, one with none is refused, and so is
23
23
  - `option.setMcp({ … })` in the app's `lib/option.ts`, never `main.ts`; `AKAN_MCP=false` takes the surface off.
24
24
  - `JWT_SECRET` is required outside `local`.
25
25
  - Every published entry needs a `.desc()`; model-facing text is English.
26
- - Never make a refusal message more helpful.
26
+ - Never make a refusal message more helpful. A client branches on the code a failure carries
27
+ (`_meta["akanjs/failure"]`, or a JSON-RPC error's `data.code`), never on its text.
27
28
 
28
29
  ## Pages for the host
29
30
 
@@ -31,6 +32,14 @@ an endpoint with a real guard is published, one with none is refused, and so is
31
32
  - `page().app(name, description, load)` publishes one component a host draws in the chat, as a read-only tool
32
33
  whose `load` may only query.
33
34
 
35
+ ## Calling it from the server
36
+
37
+ - `plug(AgentToolsRole)` gives a service `listAs(account, { allow })` / `callAs(account, call)`: the same catalogue
38
+ and refusals in-process, batch servers included. Pass only an account the server resolved, never client input.
39
+ - `this.agentService.loop({ account | principal, allow, messages, approve, untrusted, onMessage, meta, budget })`
40
+ runs a model over those tools until it answers; `option.setAgentAccountResolver` resolves a stored `principal`
41
+ before every round. Each round is metered as its own turn with `turn.loop` and `turn.meta`.
42
+
34
43
  ## Verify
35
44
 
36
45
  - One exposure test per app in `srvkit/mcpExposure.signal.test.ts`: list the tools with a user token, pin the names
@@ -37,13 +37,14 @@ Then pick the workflow that matches the intent:
37
37
 
38
38
  ## The chain
39
39
 
40
- Each result names the next call in `next.tool`. Follow it; do not improvise.
40
+ Each result names the next call in `next.tool`. Follow it; do not improvise. A result with an error diagnostic, or
41
+ an apply that failed, names none: do what the diagnostic says, then plan again.
41
42
 
42
43
  1. `plan_workflow({ workflow: "create-module", inputs: { app: "<app>", module: "comment" } })` — read-only.
43
44
  Returns `planPath` and `next.tool=apply_workflow`. (`list_workflows` / `explain_workflow` give the names
44
45
  and each workflow's inputs.)
45
46
  2. `apply_workflow({ planPath })` — writes the scaffold and syncs the generated barrels. Returns
46
- `validationTarget`.
47
+ `validationTarget`. With `dryRun: true` it writes nothing and names this apply next.
47
48
  3. `run_validation({ runIdOrPlan: <validationTarget> })`, or run `akan verify` (`akan_verify` in akan code);
48
49
  both are the whole chain in one process.
49
50
  4. **Read each scaffolded file before editing it.** They are a few lines each and they extend base classes
@@ -27,6 +27,8 @@ description: "Guard and tune endpoints on the wire: writing a Can<Verb><Model> g
27
27
  - `{ rateLimit: { calls, windowMs?, by? } }` per endpoint, `option.setRateLimit` per app, `plug(RateLimit)` for a
28
28
  business key.
29
29
  - A mutation repeated under one `Idempotency-Key` header runs once and replays its first answer.
30
+ - A browser send that changes nothing read back (typing status, a cursor move) passes `{ keepsReads: true }`, so it
31
+ neither ends in-flight query sharing nor drops prefetched pages.
30
32
  - `{ method: "PATCH" | "PUT" | "DELETE" }` moves a mutation off `POST` — only when a foreign protocol forces it.
31
33
  - `errors: { 409: ["ticket.error.locked"] }` names the errors an endpoint throws on purpose.
32
34
 
@@ -20,6 +20,7 @@ three times the output. Narrow the one command instead:
20
20
  - `akan verify --no-build` — leave the app build out.
21
21
  - `akan verify --max 0` — every line, when the report ends in `+N more`.
22
22
  - `fixed N files` in the header means lint rewrote them on disk: re-read before editing them again.
23
+ - It exits 3 when it found problems, 2 for a target the workspace does not have, 1 when the run itself broke.
23
24
 
24
25
  Raw `tsc` misses the generated barrels and reports false errors. Do not reach for it.
25
26
 
@@ -5,7 +5,8 @@ import {
5
5
  runner,
6
6
  script,
7
7
  command
8
- } from "./index-93ewzmp6.js";
8
+ } from "./index-23d8gw08.js";
9
+ import"./index-j4yvgfhr.js";
9
10
  import {
10
11
  FileSys2
11
12
  } from "./index-bns3wcpc.js";
@@ -14,20 +15,20 @@ import {
14
15
  Executor,
15
16
  WorkspaceExecutor,
16
17
  AppExecutor
17
- } from "./index-sr5da35e.js";
18
+ } from "./index-sq9d0jhj.js";
18
19
  import {
19
20
  GlobalConfig
20
- } from "./index-drz9e84d.js";
21
+ } from "./index-7ky4brfy.js";
21
22
  import"./index-m9jj544v.js";
22
- import"./index-zpv14wpy.js";
23
- import"./index-1q1cjn8s.js";
24
- import"./index-mmym5xmb.js";
23
+ import"./index-dsg50er9.js";
24
+ import"./index-9xh4zvw3.js";
25
+ import"./index-z43wddce.js";
25
26
  import {
26
27
  SubspaceConfig
27
28
  } from "./index-h7hehkw6.js";
28
29
  import {
29
30
  SlicePlanner
30
- } from "./index-sy481q2x.js";
31
+ } from "./index-frvjq1rd.js";
31
32
 
32
33
  // pkgs/@akanjs/devkit/subspace.ts
33
34
  import { mkdir as mkdir2 } from "fs/promises";
@@ -818,7 +819,7 @@ class SubspaceRunner extends runner("subspace") {
818
819
  if (!asked)
819
820
  return { name: subspace.name, workspaceId, host, apps, libs: [], outcome: "cancelled", files: [] };
820
821
  const { libs } = await subspace.slice();
821
- const { CloudScript } = await import("./cloud.script-1sfseznn.js");
822
+ const { CloudScript } = await import("./cloud.script-4p4y0s7e.js");
822
823
  const { files } = await CommandContainer.get(CloudScript).uploadEnv(workspace, {
823
824
  host,
824
825
  workspaceId,
@@ -4,22 +4,23 @@ import {
4
4
  runner,
5
5
  script,
6
6
  command
7
- } from "./index-93ewzmp6.js";
7
+ } from "./index-23d8gw08.js";
8
+ import"./index-j4yvgfhr.js";
8
9
  import"./index-bns3wcpc.js";
9
10
  import {
10
11
  AppExecutor
11
- } from "./index-sr5da35e.js";
12
+ } from "./index-sq9d0jhj.js";
12
13
  import {
13
14
  GlobalConfig,
14
15
  CloudApi
15
- } from "./index-drz9e84d.js";
16
+ } from "./index-7ky4brfy.js";
16
17
  import"./index-m9jj544v.js";
17
- import"./index-zpv14wpy.js";
18
- import"./index-1q1cjn8s.js";
19
- import"./index-mmym5xmb.js";
18
+ import"./index-dsg50er9.js";
19
+ import"./index-9xh4zvw3.js";
20
+ import"./index-z43wddce.js";
20
21
  import {
21
22
  TunnelShare2
22
- } from "./index-9tbgb4d8.js";
23
+ } from "./index-xy70tcv4.js";
23
24
  import {
24
25
  writeClipboard
25
26
  } from "./index-p6pbz9n5.js";
package/typecheck.proc.js CHANGED
@@ -2,6 +2,9 @@
2
2
  import {
3
3
  TypeChecker2
4
4
  } from "./index-r0a604h4.js";
5
+ import {
6
+ TypecheckFailure
7
+ } from "./index-j4yvgfhr.js";
5
8
 
6
9
  // pkgs/@akanjs/devkit/typecheck/typecheck.proc.ts
7
10
  import { Logger } from "akanjs/common";
@@ -29,11 +32,11 @@ try {
29
32
  if (process.env.AKAN_TYPECHECK_FORMAT === "json") {
30
33
  const root = process.env.AKAN_TYPECHECK_ROOT ?? process.cwd();
31
34
  process.stdout.write(JSON.stringify(TypeChecker2.toRecords(result.errors, root)));
32
- process.exit(result.errors.length > 0 ? 1 : 0);
35
+ process.exit(result.errors.length > 0 ? TypecheckFailure.workerExitCode : 0);
33
36
  }
34
37
  if (result.errors.length > 0) {
35
38
  console.error(result.message);
36
- process.exit(1);
39
+ process.exit(TypecheckFailure.workerExitCode);
37
40
  }
38
41
  } catch (error) {
39
42
  console.error(error instanceof Error ? error.message : String(error));