@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.
- package/.build-stamp +1 -1
- package/CodeAgent-35wnb7w5.js +9 -0
- package/{CodeTui-z5vkm9ea.js → CodeTui-h6yz2kvq.js} +1 -1
- package/TunnelShare-xyjpa7gx.js +14 -0
- package/agent.command-3r4jsck8.js +46 -0
- package/akanCode.js +10 -6
- package/{application.command-wthg8nn9.js → application.command-g7xv6ad0.js} +44 -11
- package/{applicationBuildRunner-t2r84sz6.js → applicationBuildRunner-qvjnhr9j.js} +9 -6
- package/buildBatch.proc.js +6 -6
- package/{cloud.command-sz11hpre.js → cloud.command-6ebygmhw.js} +17 -15
- package/cloud.script-0s1jybd5.js +26 -0
- package/{code.command-9h3yrzhe.js → code.command-mpkm2emr.js} +6 -6
- package/commandManifest.json +1 -1
- package/{context.command-15j9b7c0.js → context.command-svdh6b2w.js} +18 -17
- package/context.runner-ch0z3a8g.js +26 -0
- package/{devTui-q7k7bakd.js → devTui-evr3b35y.js} +1 -1
- package/{guideline.command-snh85ctf.js → guideline.command-qwp3tnjx.js} +3 -3
- package/guidelines/conventions/core.md +106 -0
- package/guidelines/conventions/rules/app.md +83 -0
- package/guidelines/conventions/rules/auth.md +45 -0
- package/guidelines/conventions/rules/config.md +56 -0
- package/guidelines/conventions/rules/constant.md +24 -0
- package/guidelines/conventions/rules/gates.md +31 -0
- package/guidelines/conventions/rules/layer.md +25 -0
- package/guidelines/conventions/rules/migration.md +27 -0
- package/guidelines/conventions/rules/module.md +90 -0
- package/guidelines/conventions/rules/page.md +56 -0
- package/guidelines/conventions/rules/sensitive.md +16 -0
- package/guidelines/conventions/rules/server.md +86 -0
- package/guidelines/conventions/rules/ssr.md +47 -0
- package/guidelines/conventions/rules/style.md +43 -0
- package/guidelines/conventions/rules/test.md +34 -0
- package/guidelines/conventions/rules/ts.md +95 -0
- package/guidelines/conventions/rules/tsx.md +75 -0
- package/guidelines/mcpRule/mcpRule.instruction.md +1 -1
- package/guidelines/pageRule/pageRule.instruction.md +4 -3
- package/guidelines/queryRule/queryRule.instruction.md +4 -0
- package/guidelines/workspaceRecipes/workspaceRecipes.instruction.md +3 -3
- package/incrementalBuilder.proc.js +6 -6
- package/{index-pcwzkdqb.js → index-1p0qbq3m.js} +1 -1
- package/{index-xb8809yb.js → index-1shvxzt0.js} +3 -3
- package/{index-a58emady.js → index-266dewjs.js} +11 -11
- package/{index-bt438yxm.js → index-3yz30c07.js} +5 -4
- package/{index-xjf5j657.js → index-4mj92tsh.js} +952 -47
- package/index-4pdts00b.js +1604 -0
- package/{index-42j4a8zq.js → index-8559hsz4.js} +4 -3
- package/{index-wcej7g4z.js → index-8scw1pjk.js} +93 -23
- package/{index-a5dhqkdr.js → index-96wzdhfh.js} +74 -233
- package/index-9bv479q5.js +1 -0
- package/index-9rvcs76p.js +653 -0
- package/index-am36s3jh.js +3582 -0
- package/index-b8c289dx.js +444 -0
- package/{index-espk51ah.js → index-dd44g6vz.js} +3 -3
- package/{index-3wypz6xj.js → index-eja64h28.js} +7 -3
- package/index-fbewhg4g.js +590 -0
- package/index-jje9qzyq.js +27 -0
- package/{index-j9vyj3dj.js → index-k5jbcxyh.js} +3 -3
- package/{index-2mwc0g0d.js → index-ksfgqq1x.js} +1 -1
- package/index-m5n3ka0p.js +18 -0
- package/{index-5nd1wtkv.js → index-p6x5b7hr.js} +1 -1
- package/{index-6txx6a9p.js → index-payhwt51.js} +21 -29
- package/{index-2azahjaw.js → index-qkkdhjm6.js} +2 -2
- package/{index-74tjjsnc.js → index-qxzrp5xt.js} +33 -37
- package/{index-qfp55x1y.js → index-r0k3ham2.js} +4 -4
- package/{index-hmt54t45.js → index-r2w2eh93.js} +4 -4
- package/index-r2wedvqn.js +138 -0
- package/{index-skk9zc1x.js → index-rnphv731.js} +2 -2
- package/{index-9th4gszy.js → index-s6da8ta9.js} +82 -1227
- package/index-tenw3mah.js +225 -0
- package/{index-31es1yev.js → index-tgt2fnd6.js} +107 -6
- package/{index-55j120r8.js → index-vxmy1p4f.js} +16 -36
- package/{index-301pdbzz.js → index-w4k2ragk.js} +7 -7
- package/{index-js6geqjn.js → index-w7q6h97v.js} +1 -1
- package/{index-dy0jx9ay.js → index-wwe9rsrx.js} +14 -0
- package/{index-2xcc2ax5.js → index-xq543a5y.js} +2 -2
- package/{index-0fz95kxe.js → index-xqgwjz7a.js} +1 -1
- package/{index-40brg4px.js → index-xxfy1jp2.js} +4 -4
- package/{index-905qdgqp.js → index-z4b84y6k.js} +1 -1
- package/index-zcf6k8a5.js +410 -0
- package/index.js +23 -22
- package/{library.command-gycrwhf1.js → library.command-2853y6mk.js} +3 -3
- package/{localRegistry.command-jtd8gaes.js → localRegistry.command-76ds31p4.js} +19 -15
- package/{module.command-v6hgs1bc.js → module.command-yfnb0abs.js} +5 -5
- package/{package.command-shzpcfph.js → package.command-d9s86hp9.js} +3 -3
- package/package.json +2 -2
- package/{page.command-ptxn5kqk.js → page.command-6a8a8rd1.js} +3 -3
- package/{pipeline.command-zz31pgax.js → pipeline.command-rt3rwd2z.js} +2 -2
- package/{primitive.command-a1vse91z.js → primitive.command-emcebgrq.js} +6 -6
- package/{projectTypecheck-2ztky9cf.js → projectTypecheck-51m7eh1f.js} +1 -1
- package/{prompter-76k56b37.js → prompter-hgcta8pb.js} +1 -1
- package/quality.command-xtrk0n3x.js +76 -0
- package/{repair.command-cvazbz99.js → repair.command-51szxnxx.js} +5 -5
- package/{routeSourceValidator-6jd0q6r6.js → routeSourceValidator-4h947v7c.js} +13 -3
- package/{scalar.command-0acvyp26.js → scalar.command-8qv27t82.js} +4 -4
- package/skills/akan-agent/SKILL.md +36 -0
- package/skills/akan-code/SKILL.md +1 -0
- package/skills/akan-debug/SKILL.md +40 -6
- package/skills/akan-deps/SKILL.md +1 -2
- package/skills/akan-mcp/SKILL.md +40 -0
- package/skills/akan-page/SKILL.md +44 -0
- package/skills/akan-query/SKILL.md +38 -0
- package/skills/akan-runtime/SKILL.md +40 -0
- package/skills/akan-scaffold/SKILL.md +16 -6
- package/skills/akan-transport/SKILL.md +40 -0
- package/skills/akan-validate/SKILL.md +13 -11
- package/{subspace.command-822qx2bx.js → subspace.command-pn56pnh8.js} +8 -8
- package/templates/__scalar/__model__/__model__.constant.ts +3 -5
- package/templates/__scalar/__model__/__model__.dictionary.ts +6 -5
- package/templates/__scalar/__model__/__model__.document.ts +3 -3
- package/templates/app/akan.config.ts +2 -3
- package/templates/app/env/env.client.ts +2 -4
- package/templates/app/env/env.client.type.ts +2 -3
- package/templates/app/env/env.server.ts +2 -3
- package/templates/app/lib/___appName__/__appName__.dictionary.ts +1 -2
- package/templates/app/lib/___appName__/__appName__.service.ts +3 -3
- package/templates/app/lib/___appName__/__appName__.signal.ts +5 -5
- package/templates/app/lib/___appName__/__appName__.store.ts +4 -6
- package/templates/app/lib/option.ts +2 -3
- package/templates/app/main.ts +2 -4
- package/templates/app/page/_index.tsx +3 -3
- package/templates/app/page/_layout.tsx +13 -10
- package/templates/appSample/lib/__scalar/workHistory/workHistory.constant.ts +1 -5
- package/templates/appSample/lib/__scalar/workHistory/workHistory.dictionary.ts +1 -1
- package/templates/appSample/lib/_noti/noti.signal.ts +1 -1
- package/templates/appSample/lib/task/Task.Template.tsx +2 -1
- package/templates/appSample/lib/task/Task.Unit.tsx +3 -2
- package/templates/appSample/lib/task/Task.Util.tsx +16 -4
- package/templates/appSample/lib/task/task.constant.ts +1 -5
- package/templates/appSample/lib/task/task.dictionary.ts +2 -8
- package/templates/appSample/lib/task/task.document.ts +1 -1
- package/templates/appSample/page/task/_index.tsx +2 -1
- package/templates/appSample/page/task/new.tsx +2 -1
- package/templates/appSample/ui/QuantityControl.tsx +5 -9
- package/templates/biomeForm.ts +144 -0
- package/templates/crudPages/[__model__Id]/edit/page.tsx +3 -3
- package/templates/crudPages/[__model__Id]/page.tsx +5 -5
- package/templates/crudPages/new/page.tsx +4 -3
- package/templates/crudPages/page.tsx +3 -3
- package/templates/crudSinglePage/page.tsx +9 -5
- package/templates/libRoot/akan.config.ts +2 -3
- package/templates/libRoot/lib/___libName__/__libName__.dictionary.ts +1 -2
- package/templates/libRoot/lib/___libName__/__libName__.service.ts +5 -4
- package/templates/libRoot/lib/___libName__/__libName__.signal.ts +6 -5
- package/templates/libRoot/lib/___libName__/__libName__.store.ts +5 -6
- package/templates/libRoot/lib/option.ts +1 -2
- package/templates/module/__Model__.Template.tsx +11 -10
- package/templates/module/__Model__.Unit.tsx +18 -5
- package/templates/module/__Model__.Util.tsx +9 -7
- package/templates/module/__Model__.View.tsx +9 -6
- package/templates/module/__Model__.Zone.tsx +25 -17
- package/templates/module/__model__.constant.ts +8 -9
- package/templates/module/__model__.dictionary.ts +16 -17
- package/templates/module/__model__.document.ts +6 -8
- package/templates/module/__model__.service.ts +3 -3
- package/templates/module/__model__.signal.ts +11 -10
- package/templates/module/__model__.store.ts +3 -5
- package/templates/service/__model__.dictionary.ts +6 -5
- package/templates/service/__model__.service.ts +3 -3
- package/templates/service/__model__.signal.ts +5 -4
- package/templates/service/__model__.store.ts +3 -5
- package/templates/workspaceRoot/.gitignore.template +3 -0
- package/templates/workspaceRoot/.vscode/settings.json.template +21 -21
- package/templates/workspaceRoot/AGENTS.md.template +4 -10
- package/{tunnel.command-ycmja19q.js → tunnel.command-q2h0j2en.js} +7 -7
- package/{typeChecker-px49mezc.js → typeChecker-j2jdnqsr.js} +1 -1
- package/typecheck.proc.js +6 -1
- package/verify.command-z1dsbmrt.js +91 -0
- package/{workflow.command-abb1d5xy.js → workflow.command-r3y67jeq.js} +47 -13
- package/workspace.command-t2f0xsrw.js +263 -0
- package/CodeAgent-8d5qs787.js +0 -9
- package/TunnelShare-qkm8zp03.js +0 -14
- package/agent.command-ydftceda.js +0 -25
- package/cloud.script-nqevg5qw.js +0 -24
- package/context.runner-8gg030b0.js +0 -25
- package/guidelines/conventions/conventions.instruction.md +0 -617
- package/guidelines/workspaceOnboarding/workspaceOnboarding.instruction.md +0 -291
- package/index-4vgbysa0.js +0 -279
- package/index-7md2g9vw.js +0 -6
- package/index-b70zct19.js +0 -856
- package/index-zzvvc845.js +0 -74
- package/quality.command-ah8qcakd.js +0 -1478
- package/templates/workspaceRoot/docs/AI-DEVELOPMENT.md.template +0 -69
- package/templates/workspaceRoot/docs/GENERATED.md.template +0 -55
- 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
|
+
};
|
package/CodeAgent-8d5qs787.js
DELETED
package/TunnelShare-qkm8zp03.js
DELETED
|
@@ -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
|
-
};
|
package/cloud.script-nqevg5qw.js
DELETED
|
@@ -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
|
-
};
|