@akanjs/cli 3.1.1-rc.9 → 3.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (184) hide show
  1. package/.build-stamp +1 -1
  2. package/CodeAgent-35wnb7w5.js +9 -0
  3. package/{CodeTui-z5vkm9ea.js → CodeTui-h6yz2kvq.js} +1 -1
  4. package/TunnelShare-xyjpa7gx.js +14 -0
  5. package/agent.command-3r4jsck8.js +46 -0
  6. package/akanCode.js +10 -6
  7. package/{application.command-wthg8nn9.js → application.command-g7xv6ad0.js} +44 -11
  8. package/{applicationBuildRunner-t2r84sz6.js → applicationBuildRunner-qvjnhr9j.js} +9 -6
  9. package/buildBatch.proc.js +6 -6
  10. package/{cloud.command-sz11hpre.js → cloud.command-6ebygmhw.js} +17 -15
  11. package/cloud.script-0s1jybd5.js +26 -0
  12. package/{code.command-9h3yrzhe.js → code.command-mpkm2emr.js} +6 -6
  13. package/commandManifest.json +1 -1
  14. package/{context.command-15j9b7c0.js → context.command-svdh6b2w.js} +18 -17
  15. package/context.runner-ch0z3a8g.js +26 -0
  16. package/{devTui-q7k7bakd.js → devTui-evr3b35y.js} +1 -1
  17. package/{guideline.command-snh85ctf.js → guideline.command-qwp3tnjx.js} +3 -3
  18. package/guidelines/conventions/core.md +106 -0
  19. package/guidelines/conventions/rules/app.md +83 -0
  20. package/guidelines/conventions/rules/auth.md +45 -0
  21. package/guidelines/conventions/rules/config.md +56 -0
  22. package/guidelines/conventions/rules/constant.md +24 -0
  23. package/guidelines/conventions/rules/gates.md +31 -0
  24. package/guidelines/conventions/rules/layer.md +25 -0
  25. package/guidelines/conventions/rules/migration.md +27 -0
  26. package/guidelines/conventions/rules/module.md +90 -0
  27. package/guidelines/conventions/rules/page.md +56 -0
  28. package/guidelines/conventions/rules/sensitive.md +16 -0
  29. package/guidelines/conventions/rules/server.md +86 -0
  30. package/guidelines/conventions/rules/ssr.md +47 -0
  31. package/guidelines/conventions/rules/style.md +43 -0
  32. package/guidelines/conventions/rules/test.md +34 -0
  33. package/guidelines/conventions/rules/ts.md +95 -0
  34. package/guidelines/conventions/rules/tsx.md +75 -0
  35. package/guidelines/mcpRule/mcpRule.instruction.md +1 -1
  36. package/guidelines/pageRule/pageRule.instruction.md +4 -3
  37. package/guidelines/queryRule/queryRule.instruction.md +4 -0
  38. package/guidelines/workspaceRecipes/workspaceRecipes.instruction.md +3 -3
  39. package/incrementalBuilder.proc.js +6 -6
  40. package/{index-pcwzkdqb.js → index-1p0qbq3m.js} +1 -1
  41. package/{index-xb8809yb.js → index-1shvxzt0.js} +3 -3
  42. package/{index-a58emady.js → index-266dewjs.js} +11 -11
  43. package/{index-bt438yxm.js → index-3yz30c07.js} +5 -4
  44. package/{index-xjf5j657.js → index-4mj92tsh.js} +952 -47
  45. package/index-4pdts00b.js +1604 -0
  46. package/{index-42j4a8zq.js → index-8559hsz4.js} +4 -3
  47. package/{index-wcej7g4z.js → index-8scw1pjk.js} +93 -23
  48. package/{index-a5dhqkdr.js → index-96wzdhfh.js} +74 -233
  49. package/index-9bv479q5.js +1 -0
  50. package/index-9rvcs76p.js +653 -0
  51. package/index-am36s3jh.js +3582 -0
  52. package/index-b8c289dx.js +444 -0
  53. package/{index-espk51ah.js → index-dd44g6vz.js} +3 -3
  54. package/{index-3wypz6xj.js → index-eja64h28.js} +7 -3
  55. package/index-fbewhg4g.js +590 -0
  56. package/index-jje9qzyq.js +27 -0
  57. package/{index-j9vyj3dj.js → index-k5jbcxyh.js} +3 -3
  58. package/{index-2mwc0g0d.js → index-ksfgqq1x.js} +1 -1
  59. package/index-m5n3ka0p.js +18 -0
  60. package/{index-5nd1wtkv.js → index-p6x5b7hr.js} +1 -1
  61. package/{index-6txx6a9p.js → index-payhwt51.js} +21 -29
  62. package/{index-2azahjaw.js → index-qkkdhjm6.js} +2 -2
  63. package/{index-74tjjsnc.js → index-qxzrp5xt.js} +33 -37
  64. package/{index-qfp55x1y.js → index-r0k3ham2.js} +4 -4
  65. package/{index-hmt54t45.js → index-r2w2eh93.js} +4 -4
  66. package/index-r2wedvqn.js +138 -0
  67. package/{index-skk9zc1x.js → index-rnphv731.js} +2 -2
  68. package/{index-9th4gszy.js → index-s6da8ta9.js} +82 -1227
  69. package/index-tenw3mah.js +225 -0
  70. package/{index-31es1yev.js → index-tgt2fnd6.js} +107 -6
  71. package/{index-55j120r8.js → index-vxmy1p4f.js} +16 -36
  72. package/{index-301pdbzz.js → index-w4k2ragk.js} +7 -7
  73. package/{index-js6geqjn.js → index-w7q6h97v.js} +1 -1
  74. package/{index-dy0jx9ay.js → index-wwe9rsrx.js} +14 -0
  75. package/{index-2xcc2ax5.js → index-xq543a5y.js} +2 -2
  76. package/{index-0fz95kxe.js → index-xqgwjz7a.js} +1 -1
  77. package/{index-40brg4px.js → index-xxfy1jp2.js} +4 -4
  78. package/{index-905qdgqp.js → index-z4b84y6k.js} +1 -1
  79. package/index-zcf6k8a5.js +410 -0
  80. package/index.js +23 -22
  81. package/{library.command-gycrwhf1.js → library.command-2853y6mk.js} +3 -3
  82. package/{localRegistry.command-jtd8gaes.js → localRegistry.command-76ds31p4.js} +19 -15
  83. package/{module.command-v6hgs1bc.js → module.command-yfnb0abs.js} +5 -5
  84. package/{package.command-shzpcfph.js → package.command-d9s86hp9.js} +3 -3
  85. package/package.json +2 -2
  86. package/{page.command-ptxn5kqk.js → page.command-6a8a8rd1.js} +3 -3
  87. package/{pipeline.command-zz31pgax.js → pipeline.command-rt3rwd2z.js} +2 -2
  88. package/{primitive.command-a1vse91z.js → primitive.command-emcebgrq.js} +6 -6
  89. package/{projectTypecheck-2ztky9cf.js → projectTypecheck-51m7eh1f.js} +1 -1
  90. package/{prompter-76k56b37.js → prompter-hgcta8pb.js} +1 -1
  91. package/quality.command-xtrk0n3x.js +76 -0
  92. package/{repair.command-cvazbz99.js → repair.command-51szxnxx.js} +5 -5
  93. package/{routeSourceValidator-6jd0q6r6.js → routeSourceValidator-4h947v7c.js} +13 -3
  94. package/{scalar.command-0acvyp26.js → scalar.command-8qv27t82.js} +4 -4
  95. package/skills/akan-agent/SKILL.md +36 -0
  96. package/skills/akan-code/SKILL.md +1 -0
  97. package/skills/akan-debug/SKILL.md +40 -6
  98. package/skills/akan-deps/SKILL.md +1 -2
  99. package/skills/akan-mcp/SKILL.md +40 -0
  100. package/skills/akan-page/SKILL.md +44 -0
  101. package/skills/akan-query/SKILL.md +38 -0
  102. package/skills/akan-runtime/SKILL.md +40 -0
  103. package/skills/akan-scaffold/SKILL.md +16 -6
  104. package/skills/akan-transport/SKILL.md +40 -0
  105. package/skills/akan-validate/SKILL.md +13 -11
  106. package/{subspace.command-822qx2bx.js → subspace.command-pn56pnh8.js} +8 -8
  107. package/templates/__scalar/__model__/__model__.constant.ts +3 -5
  108. package/templates/__scalar/__model__/__model__.dictionary.ts +6 -5
  109. package/templates/__scalar/__model__/__model__.document.ts +3 -3
  110. package/templates/app/akan.config.ts +2 -3
  111. package/templates/app/env/env.client.ts +2 -4
  112. package/templates/app/env/env.client.type.ts +2 -3
  113. package/templates/app/env/env.server.ts +2 -3
  114. package/templates/app/lib/___appName__/__appName__.dictionary.ts +1 -2
  115. package/templates/app/lib/___appName__/__appName__.service.ts +3 -3
  116. package/templates/app/lib/___appName__/__appName__.signal.ts +5 -5
  117. package/templates/app/lib/___appName__/__appName__.store.ts +4 -6
  118. package/templates/app/lib/option.ts +2 -3
  119. package/templates/app/main.ts +2 -4
  120. package/templates/app/page/_index.tsx +3 -3
  121. package/templates/app/page/_layout.tsx +13 -10
  122. package/templates/appSample/lib/__scalar/workHistory/workHistory.constant.ts +1 -5
  123. package/templates/appSample/lib/__scalar/workHistory/workHistory.dictionary.ts +1 -1
  124. package/templates/appSample/lib/_noti/noti.signal.ts +1 -1
  125. package/templates/appSample/lib/task/Task.Template.tsx +2 -1
  126. package/templates/appSample/lib/task/Task.Unit.tsx +3 -2
  127. package/templates/appSample/lib/task/Task.Util.tsx +16 -4
  128. package/templates/appSample/lib/task/task.constant.ts +1 -5
  129. package/templates/appSample/lib/task/task.dictionary.ts +2 -8
  130. package/templates/appSample/lib/task/task.document.ts +1 -1
  131. package/templates/appSample/page/task/_index.tsx +2 -1
  132. package/templates/appSample/page/task/new.tsx +2 -1
  133. package/templates/appSample/ui/QuantityControl.tsx +5 -9
  134. package/templates/biomeForm.ts +144 -0
  135. package/templates/crudPages/[__model__Id]/edit/page.tsx +3 -3
  136. package/templates/crudPages/[__model__Id]/page.tsx +5 -5
  137. package/templates/crudPages/new/page.tsx +4 -3
  138. package/templates/crudPages/page.tsx +3 -3
  139. package/templates/crudSinglePage/page.tsx +9 -5
  140. package/templates/libRoot/akan.config.ts +2 -3
  141. package/templates/libRoot/lib/___libName__/__libName__.dictionary.ts +1 -2
  142. package/templates/libRoot/lib/___libName__/__libName__.service.ts +5 -4
  143. package/templates/libRoot/lib/___libName__/__libName__.signal.ts +6 -5
  144. package/templates/libRoot/lib/___libName__/__libName__.store.ts +5 -6
  145. package/templates/libRoot/lib/option.ts +1 -2
  146. package/templates/module/__Model__.Template.tsx +11 -10
  147. package/templates/module/__Model__.Unit.tsx +18 -5
  148. package/templates/module/__Model__.Util.tsx +9 -7
  149. package/templates/module/__Model__.View.tsx +9 -6
  150. package/templates/module/__Model__.Zone.tsx +25 -17
  151. package/templates/module/__model__.constant.ts +8 -9
  152. package/templates/module/__model__.dictionary.ts +16 -17
  153. package/templates/module/__model__.document.ts +6 -8
  154. package/templates/module/__model__.service.ts +3 -3
  155. package/templates/module/__model__.signal.ts +11 -10
  156. package/templates/module/__model__.store.ts +3 -5
  157. package/templates/service/__model__.dictionary.ts +6 -5
  158. package/templates/service/__model__.service.ts +3 -3
  159. package/templates/service/__model__.signal.ts +5 -4
  160. package/templates/service/__model__.store.ts +3 -5
  161. package/templates/workspaceRoot/.gitignore.template +3 -0
  162. package/templates/workspaceRoot/.vscode/settings.json.template +21 -21
  163. package/templates/workspaceRoot/AGENTS.md.template +4 -10
  164. package/{tunnel.command-ycmja19q.js → tunnel.command-q2h0j2en.js} +7 -7
  165. package/{typeChecker-px49mezc.js → typeChecker-j2jdnqsr.js} +1 -1
  166. package/typecheck.proc.js +6 -1
  167. package/verify.command-z1dsbmrt.js +91 -0
  168. package/{workflow.command-abb1d5xy.js → workflow.command-r3y67jeq.js} +47 -13
  169. package/workspace.command-t2f0xsrw.js +263 -0
  170. package/CodeAgent-8d5qs787.js +0 -9
  171. package/TunnelShare-qkm8zp03.js +0 -14
  172. package/agent.command-ydftceda.js +0 -25
  173. package/cloud.script-nqevg5qw.js +0 -24
  174. package/context.runner-8gg030b0.js +0 -25
  175. package/guidelines/conventions/conventions.instruction.md +0 -617
  176. package/guidelines/workspaceOnboarding/workspaceOnboarding.instruction.md +0 -291
  177. package/index-4vgbysa0.js +0 -279
  178. package/index-7md2g9vw.js +0 -6
  179. package/index-b70zct19.js +0 -856
  180. package/index-zzvvc845.js +0 -74
  181. package/quality.command-ah8qcakd.js +0 -1478
  182. package/templates/workspaceRoot/docs/AI-DEVELOPMENT.md.template +0 -69
  183. package/templates/workspaceRoot/docs/GENERATED.md.template +0 -55
  184. package/workspace.command-qm7cw29v.js +0 -521
@@ -0,0 +1,263 @@
1
+ // @bun
2
+ import {
3
+ Exec,
4
+ Workspace,
5
+ script,
6
+ command
7
+ } from "./index-eja64h28.js";
8
+ import"./index-52w0fvh8.js";
9
+ import {
10
+ AppExecutor,
11
+ LibExecutor,
12
+ PkgExecutor
13
+ } from "./index-8scw1pjk.js";
14
+ import"./index-62md4dwy.js";
15
+ import {
16
+ defaultMaxDiagnostics,
17
+ WorkspaceRunner
18
+ } from "./index-am36s3jh.js";
19
+ import"./index-hj6w4ka1.js";
20
+ import"./index-fbewhg4g.js";
21
+ import"./index-r2wedvqn.js";
22
+ import"./index-4mj92tsh.js";
23
+ import"./index-tgt2fnd6.js";
24
+ import"./index-s6da8ta9.js";
25
+ import"./index-p6x5b7hr.js";
26
+ import"./index-3yz30c07.js";
27
+ import"./index-w7q6h97v.js";
28
+ import"./index-m9jj544v.js";
29
+ import"./index-1shvxzt0.js";
30
+ import"./index-xqgwjz7a.js";
31
+ import {
32
+ AgentScript
33
+ } from "./index-9rvcs76p.js";
34
+ import {
35
+ LibraryScript
36
+ } from "./index-xq543a5y.js";
37
+ import {
38
+ ApplicationScript
39
+ } from "./index-4pdts00b.js";
40
+ import"./index-tenw3mah.js";
41
+ import"./index-qkkdhjm6.js";
42
+ import"./index-tvehn2sp.js";
43
+ import {
44
+ PackageScript
45
+ } from "./index-8559hsz4.js";
46
+ import"./index-payhwt51.js";
47
+ import {
48
+ CloudScript2
49
+ } from "./index-w4k2ragk.js";
50
+ import"./index-266dewjs.js";
51
+ import"./index-k5jbcxyh.js";
52
+ import"./index-z4b84y6k.js";
53
+ import"./index-r2w2eh93.js";
54
+ import"./index-qxzrp5xt.js";
55
+ import"./index-rnphv731.js";
56
+ import"./index-zcf6k8a5.js";
57
+ import {
58
+ ContextScript
59
+ } from "./index-r0k3ham2.js";
60
+ import"./index-b8c289dx.js";
61
+ import"./index-1p0qbq3m.js";
62
+ import"./index-9bv479q5.js";
63
+
64
+ // pkgs/@akanjs/cli/workspace/workspace.script.ts
65
+ import { Logger } from "akanjs/common";
66
+ class WorkspaceScript extends script("workspace", [
67
+ WorkspaceRunner,
68
+ ApplicationScript,
69
+ LibraryScript,
70
+ PackageScript,
71
+ CloudScript2,
72
+ ContextScript,
73
+ AgentScript
74
+ ]) {
75
+ async createWorkspace(repoName, appName, {
76
+ dirname = ".",
77
+ installLibs = false,
78
+ init = true,
79
+ registryUrl,
80
+ owner,
81
+ mcpInstall = true,
82
+ agentInstall = true
83
+ }) {
84
+ const akanVersion = await this.packageScript.version(null, { log: false });
85
+ const workspace = await this.workspaceRunner.createWorkspace(repoName, appName, {
86
+ dirname,
87
+ init,
88
+ akanVersion,
89
+ ...registryUrl ? { registryUrl } : {},
90
+ ...owner ? { owner } : {}
91
+ });
92
+ if (installLibs) {
93
+ await this.libraryScript.installLibrary(workspace, "util");
94
+ await this.libraryScript.installLibrary(workspace, "shared");
95
+ }
96
+ await this.applicationScript.createApplication(appName, workspace, {
97
+ libs: installLibs ? ["util", "shared"] : [],
98
+ sample: true
99
+ });
100
+ await workspace.applyTemplate({
101
+ basePath: `apps/${appName}`,
102
+ template: "appSample",
103
+ dict: { appName },
104
+ options: { libs: installLibs ? ["util", "shared"] : [] }
105
+ });
106
+ if (agentInstall)
107
+ await this.agentScript.agent(workspace, "install", "all", { force: true });
108
+ if (mcpInstall)
109
+ await this.contextScript.mcpInstall(workspace, "all", { force: true });
110
+ const gitSpinner = workspace.spinning("Initializing git repository and commit...");
111
+ try {
112
+ await workspace.commit("Initial commit", { init: true });
113
+ gitSpinner.succeed("Git repository initialized and committed");
114
+ } catch (_) {
115
+ gitSpinner.fail("Git repository initialization failed. It's not fatal, you can commit manually");
116
+ }
117
+ Logger.rawLog(`
118
+ \uD83C\uDF89 Welcome aboard! Workspace created in ${workspace.workspaceRoot}`);
119
+ Logger.rawLog(`\uD83D\uDE80 Run \`cd ${workspace.workspaceRoot} && akan start ${appName}\` to start the development server.`);
120
+ Logger.rawLog(`
121
+ \uD83D\uDC4B Happy coding!`);
122
+ }
123
+ async generateAgentRules(workspace, { overwrite = false, cursorRules = true } = {}) {
124
+ const spinner = workspace.spinning("Generating agent rules...");
125
+ const files = await this.workspaceRunner.generateAgentRules(workspace, { overwrite, cursorRules });
126
+ if (files.some((file) => file.filePath.endsWith("AGENTS.md")))
127
+ await this.agentScript.agent(workspace, "install", "agents-md", { force: overwrite });
128
+ spinner.succeed(`Agent rules ready (${files.length} file${files.length === 1 ? "" : "s"})`);
129
+ }
130
+ async machineKeygen(workspace, out) {
131
+ const { file, publicKey } = await this.workspaceRunner.machineKeygen(workspace, out);
132
+ const access = process.platform === "win32" ? "; Windows gives it the permissions of its folder, so keep it in one only you can read" : " (mode 600)";
133
+ Logger.rawLog(`Wrote the private key to ${file}${access}. Set it as AKAN_MACHINE_PRIVATE_KEY on the server that issues machine tokens; nothing else needs it.`);
134
+ Logger.rawLog(`A server that only verifies them takes the public key:
135
+ AKAN_MACHINE_PUBLIC_KEY=${publicKey}`);
136
+ }
137
+ async lint(exec, workspace, { fix = true, maxDiagnostics } = {}) {
138
+ if (exec instanceof AppExecutor)
139
+ await this.applicationScript.sync(exec);
140
+ else if (exec instanceof LibExecutor)
141
+ await this.libraryScript.syncLibrary(exec);
142
+ const spinner = workspace.spinning(`Linting${fix ? " with fix" : ""}...`);
143
+ try {
144
+ await this.workspaceRunner.lint(exec, workspace, { fix, maxDiagnostics });
145
+ spinner.succeed("Lint completed with no errors");
146
+ } catch (error) {
147
+ spinner.fail("Lint failed with errors");
148
+ throw error;
149
+ }
150
+ }
151
+ async lintAll(workspace, { fix = true, maxDiagnostics } = {}) {
152
+ const [appNames, libNames, pkgNames] = await workspace.getExecs();
153
+ const options = { fix, maxDiagnostics };
154
+ await Promise.all(appNames.map((appName) => this.applicationScript.sync(AppExecutor.from(workspace, appName))));
155
+ await Promise.all(libNames.map((libName) => this.libraryScript.syncLibrary(LibExecutor.from(workspace, libName))));
156
+ await Promise.all([
157
+ ...appNames.map((appName) => this.workspaceRunner.lint(AppExecutor.from(workspace, appName), workspace, options)),
158
+ ...libNames.map((libName) => this.workspaceRunner.lint(LibExecutor.from(workspace, libName), workspace, options)),
159
+ ...pkgNames.filter((pkgName) => pkgName !== "contract").map((pkgName) => this.workspaceRunner.lint(PkgExecutor.from(workspace, pkgName), workspace, options))
160
+ ]);
161
+ }
162
+ async syncAll(workspace) {
163
+ const [appNames, libNames] = await workspace.getExecs();
164
+ for (const libName of libNames)
165
+ await this.libraryScript.syncLibrary(LibExecutor.from(workspace, libName));
166
+ for (const appName of appNames)
167
+ await this.applicationScript.sync(AppExecutor.from(workspace, appName));
168
+ }
169
+ async init(devProjectId, workspace, { host } = {}) {
170
+ const [bunfigExists, packageJsonExists, tsconfigExists] = await Promise.all([
171
+ workspace.exists("bunfig.toml"),
172
+ workspace.exists("package.json"),
173
+ workspace.exists("tsconfig.json")
174
+ ]);
175
+ const isRoot = bunfigExists && packageJsonExists && tsconfigExists;
176
+ if (!isRoot)
177
+ throw new Error("Current directory is not a root workspace");
178
+ const spinner = workspace.spinning("Initializing workspace...");
179
+ try {
180
+ await this.workspaceRunner.writeTopLevelEnv(workspace, devProjectId);
181
+ await this.cloudScript.downloadEnv(workspace, devProjectId, { host });
182
+ spinner.succeed("Workspace initialized");
183
+ } catch (error) {
184
+ spinner.fail("Workspace initialization failed");
185
+ throw error;
186
+ }
187
+ }
188
+ }
189
+
190
+ // pkgs/@akanjs/cli/workspace/workspace.command.ts
191
+ var maxDiagnosticsOption = {
192
+ desc: "How many diagnostics Biome prints before truncating (0 for no limit)",
193
+ default: defaultMaxDiagnostics
194
+ };
195
+
196
+ class WorkspaceCommand extends command("workspace", [WorkspaceScript], ({ public: target }) => ({
197
+ createWorkspace: target({ desc: "Create a new Akan.js workspace", runsOnWorkspaceRoot: false }).arg("workspaceName", String, { desc: "what is the name of your organization?" }).option("app", String, { desc: "what is the codename of your first application? (e.g. myapp)" }).option("dir", String, {
198
+ desc: "directory of workspace",
199
+ default: process.env.USE_AKANJS_PKGS === "true" ? "local" : "."
200
+ }).option("libs", Boolean, {
201
+ desc: "Do you want to install shared and util libraries? (admin, user file, etc.)",
202
+ enum: [
203
+ { label: "No, I want to start with empty workspace (Recommended)", value: false },
204
+ {
205
+ label: "Yes, I want to accelerate development by installing shared and util libraries (for akanjs experts)",
206
+ value: true
207
+ }
208
+ ],
209
+ default: false
210
+ }).option("init", Boolean, { desc: "Do you want to initialize the workspace? (Recommended)", default: true }).option("registry", String, {
211
+ desc: "npm registry URL for installing Akan packages",
212
+ default: process.env.AKAN_NPM_REGISTRY ?? "https://registry.npmjs.org"
213
+ }).option("owner", String, { desc: "owner of the workspace", default: process.env.GITHUB_OWNER, nullable: true }).option("mcpInstall", Boolean, {
214
+ desc: "Install the Akan MCP server config for Cursor, Claude Code, and Codex? (Recommended)",
215
+ default: true
216
+ }).option("agentInstall", Boolean, {
217
+ flag: "A",
218
+ desc: "Install Akan agent rules (AGENTS.md, CLAUDE.md, Cursor)? (Recommended)",
219
+ default: true
220
+ }).exec(async function(workspaceName, app, dir, libs, init, registry, owner, mcpInstall, agentInstall) {
221
+ const appName = app || "app";
222
+ await this.workspaceScript.createWorkspace(workspaceName.toLowerCase().replace(/ /g, "-"), appName.toLowerCase().replace(/ /g, "-"), {
223
+ dirname: dir,
224
+ installLibs: libs,
225
+ init,
226
+ owner,
227
+ mcpInstall,
228
+ agentInstall,
229
+ ...registry ? { registryUrl: registry } : {}
230
+ });
231
+ }),
232
+ generateAgentRules: target({
233
+ desc: "Generate AGENTS.md, CLAUDE.md, and optional Cursor rules for Akan coding agents"
234
+ }).option("overwrite", Boolean, { desc: "Overwrite existing agent rule files", default: false }).option("cursorRules", Boolean, { desc: "Generate .cursor/rules/akan.mdc", default: true }).with(Workspace).exec(async function(overwrite, cursorRules, workspace) {
235
+ await this.workspaceScript.generateAgentRules(workspace, { overwrite, cursorRules });
236
+ }),
237
+ lint: target({ desc: "Lint and fix code in a specific app/lib/pkg" }).with(Exec).option("fix", Boolean, { default: true }).option("maxDiagnostics", Number, maxDiagnosticsOption).with(Workspace).exec(async function(exec, fix, maxDiagnostics, workspace) {
238
+ await this.workspaceScript.lint(exec, workspace, { fix, maxDiagnostics });
239
+ }),
240
+ lintAll: target({ desc: "Lint and fix code in all apps and libraries" }).option("fix", Boolean, { default: true }).option("maxDiagnostics", Number, maxDiagnosticsOption).with(Workspace).exec(async function(fix, maxDiagnostics, workspace) {
241
+ await this.workspaceScript.lintAll(workspace, { fix, maxDiagnostics });
242
+ }),
243
+ machineKeygen: target({
244
+ desc: "Make an Ed25519 key for machine tokens: write the private key to a file, print the public key"
245
+ }).arg("out", String, {
246
+ desc: "file the private key is written to (mode 600; on Windows, its folder's permissions); an existing one is refused"
247
+ }).with(Workspace).exec(async function(out, workspace) {
248
+ await this.workspaceScript.machineKeygen(workspace, out);
249
+ }),
250
+ syncAll: target({ desc: "Sync dependencies and configuration for all apps and libraries" }).with(Workspace).exec(async function(workspace) {
251
+ await this.workspaceScript.syncAll(workspace);
252
+ }),
253
+ init: target({ desc: "Initialize the workspace", runsOnWorkspaceRoot: false }).arg("devProjectId", String, { desc: "the ID of the workspace" }).option("host", String, {
254
+ desc: "host of the cloud to target (default: cloud.host of the root akan.config.ts, else Akan Cloud)",
255
+ nullable: true
256
+ }).with(Workspace).exec(async function(devProjectId, host, workspace) {
257
+ await this.workspaceScript.init(devProjectId, workspace, { host });
258
+ })
259
+ })) {
260
+ }
261
+ export {
262
+ WorkspaceCommand
263
+ };
@@ -1,9 +0,0 @@
1
- // @bun
2
- import {
3
- CodeAgent2
4
- } from "./index-a5dhqkdr.js";
5
- import"./index-55j120r8.js";
6
- import"./index-7md2g9vw.js";
7
- export {
8
- CodeAgent2 as CodeAgent
9
- };
@@ -1,14 +0,0 @@
1
- // @bun
2
- import {
3
- TunnelShare2
4
- } from "./index-2mwc0g0d.js";
5
- import"./index-2azahjaw.js";
6
- import"./index-bt438yxm.js";
7
- import"./index-m9jj544v.js";
8
- import"./index-xb8809yb.js";
9
- import"./index-0fz95kxe.js";
10
- import"./index-wcej7g4z.js";
11
- import"./index-52w0fvh8.js";
12
- export {
13
- TunnelShare2 as TunnelShare
14
- };
@@ -1,25 +0,0 @@
1
- // @bun
2
- import {
3
- Workspace,
4
- command
5
- } from "./index-3wypz6xj.js";
6
- import"./index-52w0fvh8.js";
7
- import"./index-wcej7g4z.js";
8
- import"./index-hj6w4ka1.js";
9
- import"./index-xjf5j657.js";
10
- import"./index-31es1yev.js";
11
- import"./index-zzvvc845.js";
12
- import {
13
- AgentScript
14
- } from "./index-4vgbysa0.js";
15
-
16
- // pkgs/@akanjs/cli/agent/agent.command.ts
17
- class AgentCommand extends command("agent", [AgentScript], ({ public: target }) => ({
18
- agent: target({ desc: "Install Akan agent rules for editors and coding agents" }).arg("action", String, { desc: "install" }).arg("target", String, { desc: "cursor, agents-md, claude, or all", nullable: true }).option("force", Boolean, { desc: "overwrite existing rule files", default: false }).with(Workspace).exec(async function(action, targetName, force, workspace) {
19
- await this.agentScript.agent(workspace, action, targetName, { force });
20
- })
21
- })) {
22
- }
23
- export {
24
- AgentCommand
25
- };
@@ -1,24 +0,0 @@
1
- // @bun
2
- import {
3
- CloudScript2
4
- } from "./index-301pdbzz.js";
5
- import"./index-6txx6a9p.js";
6
- import"./index-9th4gszy.js";
7
- import"./index-pcwzkdqb.js";
8
- import"./index-2xcc2ax5.js";
9
- import"./index-42j4a8zq.js";
10
- import"./index-js6geqjn.js";
11
- import"./index-2azahjaw.js";
12
- import"./index-bt438yxm.js";
13
- import"./index-m9jj544v.js";
14
- import"./index-3wypz6xj.js";
15
- import"./index-7md2g9vw.js";
16
- import"./index-xb8809yb.js";
17
- import"./index-5nd1wtkv.js";
18
- import"./index-0fz95kxe.js";
19
- import"./index-wcej7g4z.js";
20
- import"./index-tvehn2sp.js";
21
- import"./index-52w0fvh8.js";
22
- export {
23
- CloudScript2 as CloudScript
24
- };
@@ -1,25 +0,0 @@
1
- // @bun
2
- import {
3
- ContextRunner2
4
- } from "./index-a58emady.js";
5
- import"./index-b70zct19.js";
6
- import"./index-skk9zc1x.js";
7
- import"./index-74tjjsnc.js";
8
- import"./index-j9vyj3dj.js";
9
- import"./index-hmt54t45.js";
10
- import"./index-905qdgqp.js";
11
- import"./index-js6geqjn.js";
12
- import"./index-bt438yxm.js";
13
- import"./index-m9jj544v.js";
14
- import"./index-31es1yev.js";
15
- import"./index-xjf5j657.js";
16
- import"./index-zzvvc845.js";
17
- import"./index-3wypz6xj.js";
18
- import"./index-xb8809yb.js";
19
- import"./index-0fz95kxe.js";
20
- import"./index-wcej7g4z.js";
21
- import"./index-hj6w4ka1.js";
22
- import"./index-52w0fvh8.js";
23
- export {
24
- ContextRunner2 as ContextRunner
25
- };