@akanjs/cli 3.1.1-rc.8 → 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-rqxarxsn.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-14xsthcr.js → application.command-g7xv6ad0.js} +46 -13
- package/{applicationBuildRunner-t2r84sz6.js → applicationBuildRunner-qvjnhr9j.js} +9 -6
- package/buildBatch.proc.js +6 -6
- package/{cloud.command-rmw1kcf1.js → cloud.command-6ebygmhw.js} +17 -15
- package/cloud.script-0s1jybd5.js +26 -0
- package/{code.command-719k3e9q.js → code.command-mpkm2emr.js} +6 -6
- package/commandManifest.json +1 -1
- package/{context.command-c4t4z1vy.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-8w76g4rm.js → index-266dewjs.js} +11 -11
- package/{index-5max10jx.js → index-3yz30c07.js} +72 -53
- 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-5phjb48k.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-hmmv2cah.js → index-ksfgqq1x.js} +1 -1
- package/index-m5n3ka0p.js +18 -0
- package/{index-5nd1wtkv.js → index-p6x5b7hr.js} +1 -1
- package/{index-0p37cz91.js → index-payhwt51.js} +21 -29
- package/{index-myc22sgv.js → index-qkkdhjm6.js} +5 -4
- package/{index-74tjjsnc.js → index-qxzrp5xt.js} +33 -37
- package/{index-zrte51fn.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-pa3c2mb8.js → index-s6da8ta9.js} +82 -1227
- package/index-tenw3mah.js +225 -0
- package/{index-31es1yev.js → index-tgt2fnd6.js} +107 -6
- package/{index-8ap5z1n5.js → index-vxmy1p4f.js} +16 -36
- package/{index-mdqr41sp.js → index-w4k2ragk.js} +7 -7
- package/{index-qd5km521.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-2t3fghje.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-kvxmyxtf.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-kxv0ddmp.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-3sy7kjgj.js +0 -9
- package/TunnelShare-2ef94kha.js +0 -14
- package/agent.command-ydftceda.js +0 -25
- package/cloud.script-v1ysyerg.js +0 -24
- package/context.runner-qb15sjf8.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-tsc99yec.js +0 -521
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { AppInfo, LibInfo } from "akanjs";
|
|
2
|
+
import { BiomeForm } from "../biomeForm";
|
|
2
3
|
|
|
3
4
|
interface Dict {
|
|
4
5
|
Model: string;
|
|
@@ -10,25 +11,25 @@ interface Options {
|
|
|
10
11
|
sharedGuards?: boolean;
|
|
11
12
|
}
|
|
12
13
|
export default function getContent(scanInfo: AppInfo | LibInfo | null, dict: Dict, options: Options = {}) {
|
|
14
|
+
const { Model, model } = dict;
|
|
13
15
|
// Admin lives in libs/shared; without it root and cru stay None, shut until the app names a guard of its own.
|
|
14
16
|
const guardImports = options.sharedGuards
|
|
15
17
|
? `import { Admin } from "@libs/shared/srvkit";\nimport { endpoint, internal, Public, slice } from "akanjs/signal";`
|
|
16
18
|
: `import { endpoint, internal, None, Public, slice } from "akanjs/signal";`;
|
|
17
19
|
const writeGuard = options.sharedGuards ? "Admin" : "None";
|
|
18
|
-
|
|
19
|
-
|
|
20
|
+
const sliceBody = `(init) => ({
|
|
21
|
+
inPublic: init({ guards: [Public] }).exec(function () {
|
|
22
|
+
return this.${model}Service.queryAny();
|
|
23
|
+
}),
|
|
24
|
+
})`;
|
|
25
|
+
return `${guardImports}
|
|
20
26
|
|
|
21
27
|
import * as srv from "../srv";
|
|
22
28
|
|
|
23
|
-
export class ${
|
|
29
|
+
${BiomeForm.callArgs("", `export class ${Model}Internal extends internal`, [`srv.${model}`, "({ interval }) => ({})"], " {}")}
|
|
24
30
|
|
|
25
|
-
export class ${
|
|
26
|
-
inPublic: init({ guards: [Public] })
|
|
27
|
-
.exec(function () {
|
|
28
|
-
return this.${dict.model}Service.queryAny();
|
|
29
|
-
}),
|
|
30
|
-
})) {}
|
|
31
|
+
${BiomeForm.callArgs("", `export class ${Model}Slice extends slice`, [`srv.${model}`, `{ guards: { root: ${writeGuard}, get: Public, cru: ${writeGuard} } }`, sliceBody], " {}")}
|
|
31
32
|
|
|
32
|
-
export class ${
|
|
33
|
+
${BiomeForm.callArgs("", `export class ${Model}Endpoint extends endpoint`, [`srv.${model}`, "({ query, mutation }) => ({})"], " {}")}
|
|
33
34
|
`;
|
|
34
35
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { AppInfo, LibInfo } from "akanjs";
|
|
2
|
+
import { BiomeForm } from "../biomeForm";
|
|
2
3
|
|
|
3
4
|
interface Dict {
|
|
4
5
|
Model: string;
|
|
@@ -6,14 +7,11 @@ interface Dict {
|
|
|
6
7
|
sysName: string;
|
|
7
8
|
}
|
|
8
9
|
export default function getContent(scanInfo: AppInfo | LibInfo | null, dict: Dict) {
|
|
9
|
-
return `
|
|
10
|
-
import { store } from "akanjs/store";
|
|
10
|
+
return `import { store } from "akanjs/store";
|
|
11
11
|
|
|
12
12
|
import { sig } from "../useClient";
|
|
13
13
|
|
|
14
|
-
export class ${dict.Model}Store extends store
|
|
15
|
-
// state
|
|
16
|
-
})) {
|
|
14
|
+
${BiomeForm.callArgs("", `export class ${dict.Model}Store extends store`, [`sig.${dict.model}`, "() => ({\n // state\n})"], " {")}
|
|
17
15
|
// action
|
|
18
16
|
}
|
|
19
17
|
`;
|
|
@@ -1,18 +1,19 @@
|
|
|
1
1
|
import type { AppInfo, LibInfo } from "akanjs";
|
|
2
|
+
import { BiomeForm } from "../biomeForm";
|
|
2
3
|
|
|
3
4
|
interface Dict {
|
|
4
5
|
Model: string;
|
|
5
6
|
model: string;
|
|
6
7
|
}
|
|
7
8
|
export default function getContent(scanInfo: AppInfo | LibInfo | null, dict: Dict) {
|
|
8
|
-
|
|
9
|
-
import { modelDictionary } from "akanjs/dictionary";
|
|
9
|
+
const { Model, model } = dict;
|
|
10
|
+
return `import { modelDictionary } from "akanjs/dictionary";
|
|
10
11
|
|
|
11
|
-
import type { ${
|
|
12
|
+
import type { ${Model}Endpoint } from "../sig";
|
|
12
13
|
|
|
13
14
|
export const dictionary = modelDictionary(["en", "ko"])
|
|
14
|
-
|
|
15
|
-
.endpoint<${
|
|
15
|
+
${BiomeForm.dictionaryOf([model, model], [`${model} description`, `${model} 설명`])}
|
|
16
|
+
.endpoint<${Model}Endpoint>((fn) => ({}))
|
|
16
17
|
.error({})
|
|
17
18
|
.translate({});
|
|
18
19
|
`;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import type { AppInfo, LibInfo } from "akanjs";
|
|
2
|
+
import { BiomeForm } from "../biomeForm";
|
|
2
3
|
|
|
3
4
|
interface Dict {
|
|
4
5
|
Model: string;
|
|
5
6
|
model: string;
|
|
6
7
|
}
|
|
7
8
|
export default function getContent(scanInfo: AppInfo | LibInfo | null, dict: Dict) {
|
|
8
|
-
return `
|
|
9
|
-
import { serve } from "akanjs/service";
|
|
9
|
+
return `import { serve } from "akanjs/service";
|
|
10
10
|
|
|
11
|
-
export class ${dict.Model}Service extends serve
|
|
11
|
+
${BiomeForm.callArgs("", `export class ${dict.Model}Service extends serve`, [`"${dict.model}" as const`, "({ use, service, env, signal }) => ({})"], " {}")}
|
|
12
12
|
`;
|
|
13
13
|
}
|
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
import type { AppInfo, LibInfo } from "akanjs";
|
|
2
|
+
import { BiomeForm } from "../biomeForm";
|
|
2
3
|
|
|
3
4
|
interface Dict {
|
|
4
5
|
Model: string;
|
|
5
6
|
model: string;
|
|
6
7
|
}
|
|
7
8
|
export default function getContent(scanInfo: AppInfo | LibInfo | null, dict: Dict) {
|
|
8
|
-
|
|
9
|
-
import { endpoint, internal } from "akanjs/signal";
|
|
9
|
+
const { Model, model } = dict;
|
|
10
|
+
return `import { endpoint, internal } from "akanjs/signal";
|
|
10
11
|
|
|
11
12
|
import * as srv from "../srv";
|
|
12
13
|
|
|
13
|
-
export class ${
|
|
14
|
+
${BiomeForm.callArgs("", `export class ${Model}Internal extends internal`, [`srv.${model}`, "() => ({})"], " {}")}
|
|
14
15
|
|
|
15
|
-
export class ${
|
|
16
|
+
${BiomeForm.callArgs("", `export class ${Model}Endpoint extends endpoint`, [`srv.${model}`, "({ query, mutation }) => ({})"], " {}")}
|
|
16
17
|
`;
|
|
17
18
|
}
|
|
@@ -1,16 +1,14 @@
|
|
|
1
1
|
import type { AppInfo, LibInfo } from "akanjs";
|
|
2
|
+
import { BiomeForm } from "../biomeForm";
|
|
2
3
|
|
|
3
4
|
interface Dict {
|
|
4
5
|
Model: string;
|
|
5
6
|
model: string;
|
|
6
7
|
}
|
|
7
8
|
export default function getContent(scanInfo: AppInfo | LibInfo | null, dict: Dict) {
|
|
8
|
-
return `
|
|
9
|
-
import { store } from "akanjs/store";
|
|
9
|
+
return `import { store } from "akanjs/store";
|
|
10
10
|
|
|
11
|
-
export class ${dict.Model}Store extends store
|
|
12
|
-
// state
|
|
13
|
-
})) {
|
|
11
|
+
${BiomeForm.callArgs("", `export class ${dict.Model}Store extends store`, [`"${dict.model}" as const`, "() => ({\n // state\n})"], " {")}
|
|
14
12
|
// action
|
|
15
13
|
}
|
|
16
14
|
`;
|
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
2
|
+
"typescript.tsdk": "node_modules/typescript/lib",
|
|
3
|
+
"editor.defaultFormatter": "biomejs.biome",
|
|
4
|
+
"editor.formatOnSave": true,
|
|
5
|
+
"editor.codeActionsOnSave": {
|
|
6
|
+
"source.fixAll.biome": "always"
|
|
7
|
+
},
|
|
8
|
+
"[typescript]": {
|
|
9
|
+
"editor.defaultFormatter": "biomejs.biome"
|
|
10
|
+
},
|
|
11
|
+
"[typescriptreact]": {
|
|
12
|
+
"editor.defaultFormatter": "biomejs.biome"
|
|
13
|
+
},
|
|
14
|
+
"[javascript]": {
|
|
15
|
+
"editor.defaultFormatter": "biomejs.biome"
|
|
16
|
+
},
|
|
17
|
+
"[javascriptreact]": {
|
|
18
|
+
"editor.defaultFormatter": "biomejs.biome"
|
|
19
|
+
},
|
|
20
|
+
"[json]": {
|
|
21
|
+
"editor.defaultFormatter": "biomejs.biome"
|
|
22
|
+
}
|
|
23
23
|
}
|
|
@@ -3,9 +3,6 @@
|
|
|
3
3
|
This is an Akan.js workspace. Akan is convention-driven: keep business intent in the expected place and let
|
|
4
4
|
the framework generate the repeated surfaces.
|
|
5
5
|
|
|
6
|
-
For agent-neutral documentation that Claude Code, Codex, Devin, GitHub Copilot Coding Agent, and other tools can
|
|
7
|
-
also read, see `docs/AI-DEVELOPMENT.md` and `docs/GENERATED.md`.
|
|
8
|
-
|
|
9
6
|
## Framework Bugs And Feature Requests
|
|
10
7
|
|
|
11
8
|
If you hit an Akan.js bug, or a fix that one framework change would solve more easily than app-level workarounds,
|
|
@@ -14,13 +11,10 @@ the user before filing it. Keep any interim workaround small and marked `// TODO
|
|
|
14
11
|
|
|
15
12
|
## Generated Context
|
|
16
13
|
|
|
17
|
-
The section below is regenerated by `akan agent install` (run `bun run setup:agent`)
|
|
18
|
-
|
|
19
|
-
markers freely; content between them is overwritten on the next
|
|
20
|
-
|
|
21
|
-
It carries the rules only. The reasoning behind each area lives in deep-dive guidelines fetched on demand —
|
|
22
|
-
`akan guideline list` names them, `akan guideline show <name>` prints one, and an agent wired to `akan mcp`
|
|
23
|
-
calls `get_guideline` instead.
|
|
14
|
+
The section below is regenerated by `akan agent install` (run `bun run setup:agent`), together with the path
|
|
15
|
+
rules in `.claude/rules/akan/` and `.cursor/rules/akan-*.mdc` and the skills in `.claude/skills/` and
|
|
16
|
+
`.agents/skills/`. Edit anything outside the markers freely; content between them is overwritten on the next
|
|
17
|
+
install, and so is a generated file that still carries its `<!-- akan:generated -->` marker.
|
|
24
18
|
|
|
25
19
|
<!-- akan:agent:start -->
|
|
26
20
|
<!-- Populated by `akan agent install`. Run `bun run setup:agent` to refresh. -->
|
|
@@ -4,22 +4,22 @@ import {
|
|
|
4
4
|
runner,
|
|
5
5
|
script,
|
|
6
6
|
command
|
|
7
|
-
} from "./index-
|
|
7
|
+
} from "./index-eja64h28.js";
|
|
8
8
|
import"./index-52w0fvh8.js";
|
|
9
9
|
import {
|
|
10
10
|
AppExecutor
|
|
11
|
-
} from "./index-
|
|
11
|
+
} from "./index-8scw1pjk.js";
|
|
12
12
|
import {
|
|
13
13
|
GlobalConfig,
|
|
14
14
|
CloudApi
|
|
15
|
-
} from "./index-
|
|
15
|
+
} from "./index-qkkdhjm6.js";
|
|
16
16
|
import"./index-m9jj544v.js";
|
|
17
|
-
import"./index-
|
|
18
|
-
import"./index-
|
|
19
|
-
import"./index-
|
|
17
|
+
import"./index-3yz30c07.js";
|
|
18
|
+
import"./index-1shvxzt0.js";
|
|
19
|
+
import"./index-xqgwjz7a.js";
|
|
20
20
|
import {
|
|
21
21
|
TunnelShare2
|
|
22
|
-
} from "./index-
|
|
22
|
+
} from "./index-ksfgqq1x.js";
|
|
23
23
|
import {
|
|
24
24
|
writeClipboard
|
|
25
25
|
} from "./index-p6pbz9n5.js";
|
package/typecheck.proc.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import {
|
|
3
3
|
TypeChecker2
|
|
4
|
-
} from "./index-
|
|
4
|
+
} from "./index-wwe9rsrx.js";
|
|
5
5
|
|
|
6
6
|
// pkgs/@akanjs/devkit/typecheck/typecheck.proc.ts
|
|
7
7
|
import { Logger } from "akanjs/common";
|
|
@@ -26,6 +26,11 @@ try {
|
|
|
26
26
|
if (!configPath)
|
|
27
27
|
throw new Error("AKAN_TYPECHECK_TSCONFIG is required");
|
|
28
28
|
const result = TypeChecker2.checkProject(configPath);
|
|
29
|
+
if (process.env.AKAN_TYPECHECK_FORMAT === "json") {
|
|
30
|
+
const root = process.env.AKAN_TYPECHECK_ROOT ?? process.cwd();
|
|
31
|
+
process.stdout.write(JSON.stringify(TypeChecker2.toRecords(result.errors, root)));
|
|
32
|
+
process.exit(result.errors.length > 0 ? 1 : 0);
|
|
33
|
+
}
|
|
29
34
|
if (result.errors.length > 0) {
|
|
30
35
|
console.error(result.message);
|
|
31
36
|
process.exit(1);
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import {
|
|
3
|
+
Workspace,
|
|
4
|
+
script,
|
|
5
|
+
ExitCodeError,
|
|
6
|
+
markCliErrorPrinted,
|
|
7
|
+
command
|
|
8
|
+
} from "./index-eja64h28.js";
|
|
9
|
+
import"./index-52w0fvh8.js";
|
|
10
|
+
import"./index-8scw1pjk.js";
|
|
11
|
+
import {
|
|
12
|
+
ApplicationRunner,
|
|
13
|
+
VerifyScope
|
|
14
|
+
} from "./index-s6da8ta9.js";
|
|
15
|
+
import"./index-p6x5b7hr.js";
|
|
16
|
+
import"./index-3yz30c07.js";
|
|
17
|
+
import"./index-w7q6h97v.js";
|
|
18
|
+
import"./index-m9jj544v.js";
|
|
19
|
+
import"./index-1shvxzt0.js";
|
|
20
|
+
import"./index-xqgwjz7a.js";
|
|
21
|
+
import"./index-62md4dwy.js";
|
|
22
|
+
import {
|
|
23
|
+
WorkspaceRunner
|
|
24
|
+
} from "./index-am36s3jh.js";
|
|
25
|
+
import"./index-hj6w4ka1.js";
|
|
26
|
+
import"./index-fbewhg4g.js";
|
|
27
|
+
import {
|
|
28
|
+
VerifyPipeline,
|
|
29
|
+
VerifyReport
|
|
30
|
+
} from "./index-b8c289dx.js";
|
|
31
|
+
import"./index-1p0qbq3m.js";
|
|
32
|
+
|
|
33
|
+
// pkgs/@akanjs/cli/verify/verify.script.ts
|
|
34
|
+
import path from "path";
|
|
35
|
+
import { Logger } from "akanjs/common";
|
|
36
|
+
class VerifyScript extends script("verify", [WorkspaceRunner, ApplicationRunner]) {
|
|
37
|
+
async verify(workspace, requested, options = {}) {
|
|
38
|
+
const [apps, libs, pkgs] = await workspace.getExecs();
|
|
39
|
+
const names = { apps, libs, pkgs };
|
|
40
|
+
const changes = options.files?.length ? options.files.map((file) => ({ code: " M", file: VerifyScript.#relative(workspace, file) })) : await VerifyScope.changesIn(workspace.workspaceRoot) ?? [];
|
|
41
|
+
const scope = VerifyScope.resolve(changes, names, requested);
|
|
42
|
+
const consoleOutput = Logger.consoleOutput;
|
|
43
|
+
Logger.consoleOutput = false;
|
|
44
|
+
const result = await new VerifyPipeline(workspace, this.workspaceRunner, this.applicationRunner).run(scope, { lintOnly: options.lintOnly, build: options.build }).finally(() => {
|
|
45
|
+
Logger.consoleOutput = consoleOutput;
|
|
46
|
+
});
|
|
47
|
+
Logger.rawLog(options.format === "json" ? VerifyReport.json(result) : VerifyReport.text(result, { max: options.max }));
|
|
48
|
+
if (result.ok)
|
|
49
|
+
return;
|
|
50
|
+
const failure = new ExitCodeError("verify failed", 1);
|
|
51
|
+
markCliErrorPrinted(failure);
|
|
52
|
+
throw failure;
|
|
53
|
+
}
|
|
54
|
+
static #relative(workspace, file) {
|
|
55
|
+
const absolute = path.isAbsolute(file) ? file : path.resolve(workspace.workspaceRoot, file);
|
|
56
|
+
return path.relative(workspace.workspaceRoot, absolute).split(path.sep).join("/");
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
// pkgs/@akanjs/cli/verify/verify.command.ts
|
|
61
|
+
var listOf = (value) => (value ?? "").split(",").map((entry) => entry.trim()).filter(Boolean);
|
|
62
|
+
|
|
63
|
+
class VerifyCommand extends command("verify", [VerifyScript], ({ public: target }) => ({
|
|
64
|
+
verify: target({
|
|
65
|
+
desc: "Sync, lint, typecheck and build what changed, in one run, and print only what failed",
|
|
66
|
+
stdio: true
|
|
67
|
+
}).arg("targets", String, {
|
|
68
|
+
desc: "apps, libraries or packages to verify, comma-separated (default: whatever git reports as changed)",
|
|
69
|
+
nullable: true
|
|
70
|
+
}).option("files", String, {
|
|
71
|
+
flag: "F",
|
|
72
|
+
desc: "verify these files only, comma-separated, instead of the git changes",
|
|
73
|
+
nullable: true
|
|
74
|
+
}).option("lintOnly", Boolean, {
|
|
75
|
+
flag: "l",
|
|
76
|
+
desc: "lint only: skip sync, typecheck, build and the SSR check",
|
|
77
|
+
default: false
|
|
78
|
+
}).option("build", Boolean, { flag: "b", desc: "build the changed apps once lint and typecheck pass", default: true }).option("max", Number, { flag: "m", desc: "diagnostic lines to print, 0 for all", default: 20 }).option("format", String, { flag: "f", desc: "output format", default: "text", enum: ["text", "json"] }).with(Workspace).exec(async function(targets, files, lintOnly, build, max, format, workspace) {
|
|
79
|
+
await this.verifyScript.verify(workspace, listOf(targets), {
|
|
80
|
+
files: listOf(files),
|
|
81
|
+
lintOnly,
|
|
82
|
+
build,
|
|
83
|
+
max,
|
|
84
|
+
format: format === "json" ? "json" : "text"
|
|
85
|
+
});
|
|
86
|
+
})
|
|
87
|
+
})) {
|
|
88
|
+
}
|
|
89
|
+
export {
|
|
90
|
+
VerifyCommand
|
|
91
|
+
};
|
|
@@ -3,20 +3,21 @@ import {
|
|
|
3
3
|
Workspace,
|
|
4
4
|
script,
|
|
5
5
|
command
|
|
6
|
-
} from "./index-
|
|
6
|
+
} from "./index-eja64h28.js";
|
|
7
7
|
import"./index-52w0fvh8.js";
|
|
8
|
-
import"./index-
|
|
8
|
+
import"./index-8scw1pjk.js";
|
|
9
9
|
import"./index-hj6w4ka1.js";
|
|
10
|
-
import"./index-
|
|
11
|
-
import"./index-
|
|
12
|
-
import"./index-
|
|
13
|
-
import"./index-
|
|
14
|
-
import"./index-
|
|
15
|
-
import"./index-
|
|
16
|
-
import"./index-
|
|
10
|
+
import"./index-4mj92tsh.js";
|
|
11
|
+
import"./index-tgt2fnd6.js";
|
|
12
|
+
import"./index-z4b84y6k.js";
|
|
13
|
+
import"./index-r2w2eh93.js";
|
|
14
|
+
import"./index-qxzrp5xt.js";
|
|
15
|
+
import"./index-k5jbcxyh.js";
|
|
16
|
+
import"./index-rnphv731.js";
|
|
17
|
+
import"./index-fbewhg4g.js";
|
|
17
18
|
import {
|
|
18
19
|
WorkflowRunner
|
|
19
|
-
} from "./index-
|
|
20
|
+
} from "./index-zcf6k8a5.js";
|
|
20
21
|
|
|
21
22
|
// pkgs/@akanjs/cli/workflow/workflow.script.ts
|
|
22
23
|
import { Logger } from "akanjs/common";
|
|
@@ -38,7 +39,7 @@ class WorkflowScript extends script("workflow", [WorkflowRunner]) {
|
|
|
38
39
|
return;
|
|
39
40
|
}
|
|
40
41
|
if (action === "plan") {
|
|
41
|
-
Logger.rawLog(await this.workflowRunner.plan(workflow, inputs, { format, out }));
|
|
42
|
+
Logger.rawLog(await this.workflowRunner.plan(workflow, inputs, { format, out, workspace }));
|
|
42
43
|
return;
|
|
43
44
|
}
|
|
44
45
|
if (action === "apply") {
|
|
@@ -69,8 +70,41 @@ class WorkflowCommand extends command("workflow", [WorkflowScript], ({ public: t
|
|
|
69
70
|
workflow: target({ desc: "List, explain, plan, apply, validate, or report Akan workflows" }).arg("action", String, {
|
|
70
71
|
desc: "list, explain, plan, apply, validate, or report",
|
|
71
72
|
enum: ["list", "explain", "plan", "apply", "validate", "report"]
|
|
72
|
-
}).arg("workflow", String, { desc: "workflow name, plan path, or run id", nullable: true }).with(Workspace).option("format", String, { desc: "output format", flag: "o", default: "markdown", enum: ["markdown", "json"] }).option("out", String, { flag: "w", desc: "write workflow plan JSON to this path", nullable: true }).option("dryRun", Boolean, { flag: "r", desc: "show predicted apply report without writing files", default: false }).option("app", String, { desc: "target app or library name", nullable: true }).option("module", String, { desc: "target module name", nullable: true }).option("field", String, { desc: "field name", nullable: true }).option("type", String, { desc: "field type or scalar name", nullable: true }).option("values", String, { flag: "l", desc: "comma-separated values", nullable: true }).option("default", String, { desc: "default value", nullable: true }).option("scalar", String, { flag: "c", desc: "scalar name", nullable: true }).option("surface", String, { flag: "u", desc: "UI surface name", nullable: true }).option("
|
|
73
|
-
|
|
73
|
+
}).arg("workflow", String, { desc: "workflow name, plan path, or run id", nullable: true }).with(Workspace).option("format", String, { desc: "output format", flag: "o", default: "markdown", enum: ["markdown", "json"] }).option("out", String, { flag: "w", desc: "write workflow plan JSON to this path", nullable: true }).option("dryRun", Boolean, { flag: "r", desc: "show predicted apply report without writing files", default: false }).option("app", String, { desc: "target app or library name", nullable: true }).option("module", String, { desc: "target module name", nullable: true }).option("field", String, { desc: "field name", nullable: true }).option("type", String, { desc: "field type or scalar name", nullable: true }).option("values", String, { flag: "l", desc: "comma-separated values", nullable: true }).option("default", String, { desc: "default value", nullable: true }).option("scalar", String, { flag: "c", desc: "scalar name", nullable: true }).option("surface", String, { flag: "u", desc: "UI surface name", nullable: true }).option("surfaces", String, {
|
|
74
|
+
flag: "s",
|
|
75
|
+
desc: "comma-separated UI surfaces add-field updates (template, unit, view)",
|
|
76
|
+
nullable: true
|
|
77
|
+
}).option("includeInLight", Boolean, {
|
|
78
|
+
flag: "p",
|
|
79
|
+
desc: "add the field to the Light<Model> projection used by lists and cards",
|
|
80
|
+
nullable: true
|
|
81
|
+
}).option("mutation", String, { flag: "n", desc: "mutation name", nullable: true }).option("slice", String, { flag: "i", desc: "slice name", nullable: true }).option("guard", String, { flag: "g", desc: "comma-separated guard class names", nullable: true }).option("with", String, {
|
|
82
|
+
flag: "b",
|
|
83
|
+
desc: "comma-separated <serviceRef>.<method> writes committed with the mutation",
|
|
84
|
+
nullable: true
|
|
85
|
+
}).option("after", String, {
|
|
86
|
+
flag: "e",
|
|
87
|
+
desc: "comma-separated <serviceRef>.<method> side effects run after the commit",
|
|
88
|
+
nullable: true
|
|
89
|
+
}).option("interaction", String, { flag: "k", desc: "interaction name", nullable: true }).exec(async function(action, workflow, workspace, format, out, dryRun, app, module, field, typeName, values, defaultValue, scalar, surface, surfaces, includeInLight, mutation, slice, guard, withCalls, after, interaction) {
|
|
90
|
+
await this.workflowScript.workflow(action, workflow, {
|
|
91
|
+
app,
|
|
92
|
+
module,
|
|
93
|
+
field,
|
|
94
|
+
type: typeName,
|
|
95
|
+
values,
|
|
96
|
+
default: defaultValue,
|
|
97
|
+
scalar,
|
|
98
|
+
surface,
|
|
99
|
+
surfaces,
|
|
100
|
+
includeInLight: includeInLight === null ? null : String(includeInLight),
|
|
101
|
+
mutation,
|
|
102
|
+
slice,
|
|
103
|
+
guard,
|
|
104
|
+
with: withCalls,
|
|
105
|
+
after,
|
|
106
|
+
interaction
|
|
107
|
+
}, { format, out, dryRun, workspace });
|
|
74
108
|
})
|
|
75
109
|
})) {
|
|
76
110
|
}
|