@akanjs/cli 3.1.1-rc.16 → 3.1.1-rc.18
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-23ewzxqa.js → CodeAgent-fbcq8vks.js} +2 -2
- package/{CodeTui-kc99fk78.js → CodeTui-0626gxqd.js} +1 -1
- package/TunnelShare-2p24xxza.js +14 -0
- package/agent.command-hpza0pg9.js +46 -0
- package/akanCode.js +5 -3
- package/{application.command-bvfd1680.js → application.command-3a7q1hs2.js} +11 -10
- package/{applicationBuildRunner-4ajaesk1.js → applicationBuildRunner-s7yt71j4.js} +5 -5
- package/buildBatch.proc.js +6 -6
- package/{cloud.command-f2w40fyy.js → cloud.command-4vg0pcea.js} +15 -14
- package/cloud.script-nkmeyhet.js +25 -0
- package/{code.command-dbhhnahn.js → code.command-fbntb67p.js} +6 -6
- package/commandManifest.json +1 -1
- package/{context.command-yswjwv6y.js → context.command-31rm54v0.js} +18 -18
- package/context.runner-w01a32ph.js +26 -0
- package/{guideline.command-ztx6dkpk.js → guideline.command-cv3by2ng.js} +3 -3
- package/guidelines/conventions/core.md +104 -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/workspaceRecipes/workspaceRecipes.instruction.md +3 -3
- package/incrementalBuilder.proc.js +6 -6
- package/{index-xjwcp91m.js → index-05nxx4m5.js} +43 -12
- package/{index-k9k18vq9.js → index-0ht91675.js} +37 -59
- package/{index-er16p89s.js → index-0zwznvv1.js} +1 -1
- package/{index-76jwsm3g.js → index-0zyatd10.js} +2 -2
- package/{index-97fsvy66.js → index-12kzwak1.js} +3 -3
- package/{index-005dqc83.js → index-1dhf8ymv.js} +2 -2
- package/{index-00ke4phc.js → index-3gccwenr.js} +1 -1
- package/{index-2epb3wgh.js → index-3txrjt6n.js} +2 -2
- package/{index-7ndgffg4.js → index-57q1ayd2.js} +18 -1240
- package/index-5kh9scvs.js +514 -0
- package/index-5n5hds19.js +1246 -0
- package/{index-9sa6abze.js → index-6269mf2s.js} +10 -9
- package/{index-921cxqrd.js → index-64g9fsjy.js} +41 -12
- package/index-7zeb5r1p.js +653 -0
- package/{index-s4c2y5gs.js → index-8s8b4eba.js} +45 -4
- package/{index-4332q6yj.js → index-922k2zwq.js} +3 -3
- package/{index-m6qgr1rx.js → index-9ndw5d8j.js} +7 -7
- package/{index-xfp4dcnx.js → index-et6ce601.js} +1 -1
- package/{index-saj9cx3a.js → index-f5adsa58.js} +4 -4
- package/{index-vgt25eh1.js → index-fbewhg4g.js} +7 -32
- package/{index-ysyt782g.js → index-hm7x0c11.js} +4 -4
- package/{index-2p1brf5e.js → index-hvv5rnaq.js} +2 -2
- package/index-jje9qzyq.js +27 -0
- package/{index-rxse80x6.js → index-js1gj6f6.js} +12 -10
- package/{index-p2pahmsa.js → index-kjrvwzav.js} +3 -3
- package/index-m6r88hhr.js +3582 -0
- package/{index-mk391h0z.js → index-mt0wa941.js} +4 -4
- package/{index-m93qg20j.js → index-mwj9q2ya.js} +1 -1
- package/{index-5nd1wtkv.js → index-p6x5b7hr.js} +1 -1
- package/index-r2wedvqn.js +138 -0
- package/{index-gxj80jz7.js → index-rvynj5gz.js} +1 -1
- package/{index-m54n0v29.js → index-tdv66eah.js} +4 -4
- package/{index-vq77g679.js → index-w134p86k.js} +1 -1
- package/{index-deeskxjh.js → index-wfczhj1z.js} +14 -36
- package/{index-dy0jx9ay.js → index-wwe9rsrx.js} +14 -0
- package/{index-qx4r4cj2.js → index-x5ecanqh.js} +2 -2
- package/{index-nzfgyw3b.js → index-zre4m2ce.js} +4 -4
- package/index.js +23 -22
- package/{library.command-hmbkcwzw.js → library.command-sh70fyvy.js} +3 -3
- package/{localRegistry.command-sq5p4c9x.js → localRegistry.command-2nbyy84d.js} +14 -13
- package/{module.command-n4z29zcv.js → module.command-n0bmtzwy.js} +5 -5
- package/{package.command-20025dy3.js → package.command-7h9r51bz.js} +3 -3
- package/package.json +2 -2
- package/{page.command-q8fvpjer.js → page.command-vjtpfbb1.js} +3 -3
- package/{pipeline.command-8j97fq88.js → pipeline.command-c93se3ar.js} +2 -2
- package/{primitive.command-e5y6dqp1.js → primitive.command-a3075qp2.js} +6 -6
- package/{projectTypecheck-tbdye9k3.js → projectTypecheck-sf9xwaga.js} +1 -1
- package/{prompter-76k56b37.js → prompter-hgcta8pb.js} +1 -1
- package/quality.command-dw1y9hmy.js +76 -0
- package/{repair.command-dq1gckth.js → repair.command-tg57d8yt.js} +5 -5
- package/{scalar.command-5vwf152w.js → scalar.command-cwzge353.js} +4 -4
- package/skills/akan-agent/SKILL.md +36 -0
- package/skills/akan-debug/SKILL.md +3 -3
- 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-182be8vj.js → subspace.command-3h03c7kc.js} +8 -8
- package/templates/workspaceRoot/.gitignore.template +3 -0
- package/templates/workspaceRoot/AGENTS.md.template +4 -10
- package/{tunnel.command-bfzj7xkb.js → tunnel.command-czaz6ys4.js} +7 -7
- package/{typeChecker-px49mezc.js → typeChecker-j2jdnqsr.js} +1 -1
- package/typecheck.proc.js +6 -1
- package/verify.command-nzwhtz71.js +91 -0
- package/{workflow.command-3g53242s.js → workflow.command-srhky88x.js} +23 -13
- package/{workspace.command-h7399jwv.js → workspace.command-9stchcd2.js} +31 -29
- package/TunnelShare-dk2gw78d.js +0 -14
- package/agent.command-knp5j7bq.js +0 -25
- package/cloud.script-2r82sv0f.js +0 -24
- package/context.runner-c3wsh2jw.js +0 -26
- package/guidelines/conventions/conventions.instruction.md +0 -663
- package/guidelines/workspaceOnboarding/workspaceOnboarding.instruction.md +0 -291
- package/index-4t4qb8jg.js +0 -279
- package/index-hvg3esm0.js +0 -1844
- package/index-zzvvc845.js +0 -74
- package/quality.command-168pt5vm.js +0 -1788
- package/templates/workspaceRoot/docs/AI-DEVELOPMENT.md.template +0 -69
- package/templates/workspaceRoot/docs/GENERATED.md.template +0 -55
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import {
|
|
3
3
|
AppExecutor
|
|
4
|
-
} from "./index-
|
|
4
|
+
} from "./index-64g9fsjy.js";
|
|
5
5
|
import {
|
|
6
6
|
jsonText,
|
|
7
7
|
createWorkflowBaselineSummary,
|
|
8
8
|
buildAkanModuleContextIndex,
|
|
9
9
|
toolingRolloutGate
|
|
10
|
-
} from "./index-
|
|
10
|
+
} from "./index-05nxx4m5.js";
|
|
11
11
|
import {
|
|
12
12
|
buildResourceList,
|
|
13
13
|
codexMcpConfigPath,
|
|
@@ -17,29 +17,29 @@ import {
|
|
|
17
17
|
upsertCodexMcpServerBlock,
|
|
18
18
|
renderDoctorText,
|
|
19
19
|
AkanContextAnalyzer
|
|
20
|
-
} from "./index-
|
|
20
|
+
} from "./index-8s8b4eba.js";
|
|
21
21
|
import {
|
|
22
22
|
runner
|
|
23
|
-
} from "./index-
|
|
23
|
+
} from "./index-3gccwenr.js";
|
|
24
24
|
import {
|
|
25
25
|
NativeApp
|
|
26
|
-
} from "./index-
|
|
26
|
+
} from "./index-kjrvwzav.js";
|
|
27
27
|
import {
|
|
28
28
|
isPlaceholderAppId
|
|
29
|
-
} from "./index-
|
|
29
|
+
} from "./index-w134p86k.js";
|
|
30
30
|
import {
|
|
31
31
|
getMobileTargets,
|
|
32
32
|
appIdsOf
|
|
33
33
|
} from "./index-m9jj544v.js";
|
|
34
34
|
import {
|
|
35
35
|
Prompter2
|
|
36
|
-
} from "./index-
|
|
36
|
+
} from "./index-r2wedvqn.js";
|
|
37
37
|
import {
|
|
38
38
|
RepairRunner
|
|
39
|
-
} from "./index-
|
|
39
|
+
} from "./index-922k2zwq.js";
|
|
40
40
|
import {
|
|
41
41
|
WorkflowRunner
|
|
42
|
-
} from "./index-
|
|
42
|
+
} from "./index-js1gj6f6.js";
|
|
43
43
|
|
|
44
44
|
// pkgs/@akanjs/devkit/akanMcpContract.ts
|
|
45
45
|
import path from "path";
|
|
@@ -948,6 +948,7 @@ ${payload}`);
|
|
|
948
948
|
"create-ui": "`akan create-ui --app <app-or-lib> --module <module> --surface <view|unit|template> --format json` creates one UI surface and returns a primitive write report.",
|
|
949
949
|
"add-field": "`akan add-field --app <app-or-lib> --module <module> --field <field> --type <String|Boolean|Date|Int|Float|scalar> --format json` updates source constant/dictionary files. Use Int or Float for numeric fields, not Number.",
|
|
950
950
|
"add-enum-field": "`akan add-enum-field --app <app-or-lib> --module <module> --field <field> --values a,b --format json` adds an enum field to source constant/dictionary files without editing generated files.",
|
|
951
|
+
verify: "`akan verify [<app-or-lib-or-pkg>]` syncs, lints, typechecks and fast-builds what git reports as changed in one run, printing one line per problem; run it instead of lint, typecheck and build in turn.",
|
|
951
952
|
sync: "`akan sync <app-or-lib>` refreshes generated Akan files from source conventions.",
|
|
952
953
|
lint: "`akan lint <app-or-lib-or-pkg>` runs Biome linting after preparing generated files.",
|
|
953
954
|
typecheck: "`akan typecheck <app-or-lib>` typechecks an app or a library after preparing generated files, its tests and specs included (`--tests false` to leave them out; a build does).",
|
|
@@ -123,16 +123,16 @@ var renderScopeAgentBlock = (scope, recipes) => {
|
|
|
123
123
|
const scopePath = `${scope.type}s/${scope.name}`;
|
|
124
124
|
const intro = `## Recipes In Scope
|
|
125
125
|
|
|
126
|
-
UI recipes importable from \`${scopePath}\` code, **in addition to** the framework recipes indexed in
|
|
127
|
-
|
|
126
|
+
UI recipes importable from \`${scopePath}\` code, **in addition to** the framework recipes indexed in
|
|
127
|
+
\`.claude/rules/akan/style.md\`. Same contract: import by exact name, then \`<name>(variants?, className?)\` \u2014 the second
|
|
128
128
|
arg merges internally and takes an array too, so never wrap it in \`cn()\`. \`*\` marks the default, \`key?\` is a
|
|
129
129
|
boolean flag. Do not guess recipe names or import paths; this index is regenerated by \`akan sync ${scope.name}\`
|
|
130
130
|
and verified by \`akan lint ${scope.name}\`.`;
|
|
131
131
|
if (recipes.length === 0) {
|
|
132
132
|
return `${intro}
|
|
133
133
|
|
|
134
|
-
No scope recipes yet. Before inlining a repeated surface (card, box, tile, \u2026), reuse a framework recipe from
|
|
135
|
-
|
|
134
|
+
No scope recipes yet. Before inlining a repeated surface (card, box, tile, \u2026), reuse a framework recipe from
|
|
135
|
+
\`.claude/rules/akan/style.md\` or author one as \`${scopePath}/ui/Recipe/<name>.ts\` (one recipe per file, re-exported from that
|
|
136
136
|
folder's \`index.ts\`) \u2014 see the \`recipeRule\` guideline.`;
|
|
137
137
|
}
|
|
138
138
|
return `${intro}
|
|
@@ -2864,6 +2864,18 @@ class Spinner {
|
|
|
2864
2864
|
import { mkdir as mkdir2, rm as rm3 } from "fs/promises";
|
|
2865
2865
|
import path12 from "path";
|
|
2866
2866
|
|
|
2867
|
+
// pkgs/@akanjs/devkit/typecheck/typecheckFailure.ts
|
|
2868
|
+
class TypecheckFailure extends Error {
|
|
2869
|
+
records;
|
|
2870
|
+
constructor(records) {
|
|
2871
|
+
super(records.slice(0, 20).map((record) => `${record.file ?? "-"}:${record.line}:${record.col} ${record.code} ${record.message}`).join(`
|
|
2872
|
+
`) || "Typecheck failed");
|
|
2873
|
+
this.records = records;
|
|
2874
|
+
this.name = "TypecheckFailure";
|
|
2875
|
+
}
|
|
2876
|
+
}
|
|
2877
|
+
|
|
2878
|
+
// pkgs/@akanjs/devkit/typecheck/projectTypecheck.ts
|
|
2867
2879
|
class ProjectTypecheck2 {
|
|
2868
2880
|
projectDir;
|
|
2869
2881
|
workspaceRoot;
|
|
@@ -2878,7 +2890,7 @@ class ProjectTypecheck2 {
|
|
|
2878
2890
|
get typecheckDir() {
|
|
2879
2891
|
return path12.join(this.projectDir, ".akan", "typecheck");
|
|
2880
2892
|
}
|
|
2881
|
-
async run(entries, { clean = false, incremental = true, tests = false } = {}) {
|
|
2893
|
+
async run(entries, { clean = false, incremental = true, tests = false, report = "pretty" } = {}) {
|
|
2882
2894
|
const name = tests ? "tsconfig.tests" : "tsconfig";
|
|
2883
2895
|
await mkdir2(this.typecheckDir, { recursive: true });
|
|
2884
2896
|
const tsconfig = {
|
|
@@ -2893,13 +2905,18 @@ class ProjectTypecheck2 {
|
|
|
2893
2905
|
`);
|
|
2894
2906
|
if (clean)
|
|
2895
2907
|
await rm3(path12.join(this.typecheckDir, `${name}.tsbuildinfo`), { force: true });
|
|
2896
|
-
await this
|
|
2908
|
+
await this.check(tsconfigPath, report);
|
|
2897
2909
|
return tsconfigPath;
|
|
2898
2910
|
}
|
|
2899
|
-
async
|
|
2911
|
+
async check(tsconfigPath, report = "pretty") {
|
|
2900
2912
|
const proc = Bun.spawn([process.execPath, await ProjectTypecheck2.workerEntry(this.workspaceRoot)], {
|
|
2901
2913
|
cwd: this.workspaceRoot,
|
|
2902
|
-
env: {
|
|
2914
|
+
env: {
|
|
2915
|
+
...this.env,
|
|
2916
|
+
AKAN_COMMAND_TYPE: "typecheck",
|
|
2917
|
+
AKAN_TYPECHECK_TSCONFIG: tsconfigPath,
|
|
2918
|
+
...report === "records" ? { AKAN_TYPECHECK_FORMAT: "json", AKAN_TYPECHECK_ROOT: this.workspaceRoot } : {}
|
|
2919
|
+
},
|
|
2903
2920
|
stdout: "pipe",
|
|
2904
2921
|
stderr: "pipe"
|
|
2905
2922
|
});
|
|
@@ -2908,8 +2925,20 @@ class ProjectTypecheck2 {
|
|
|
2908
2925
|
new Response(proc.stderr).text(),
|
|
2909
2926
|
proc.exited
|
|
2910
2927
|
]);
|
|
2911
|
-
if (exitCode
|
|
2912
|
-
|
|
2928
|
+
if (exitCode === 0)
|
|
2929
|
+
return;
|
|
2930
|
+
const records = report === "records" ? ProjectTypecheck2.#parseRecords(stdout) : null;
|
|
2931
|
+
if (records?.length)
|
|
2932
|
+
throw new TypecheckFailure(records);
|
|
2933
|
+
throw new Error((stderr || stdout).trim() || `Typecheck failed with exit code ${exitCode}`);
|
|
2934
|
+
}
|
|
2935
|
+
static #parseRecords(stdout) {
|
|
2936
|
+
try {
|
|
2937
|
+
const parsed = JSON.parse(stdout);
|
|
2938
|
+
return Array.isArray(parsed) ? parsed : null;
|
|
2939
|
+
} catch {
|
|
2940
|
+
return null;
|
|
2941
|
+
}
|
|
2913
2942
|
}
|
|
2914
2943
|
static async workerEntry(workspaceRoot) {
|
|
2915
2944
|
const candidates = [
|
|
@@ -3362,7 +3391,7 @@ class Executor {
|
|
|
3362
3391
|
}
|
|
3363
3392
|
}
|
|
3364
3393
|
async getTypeChecker() {
|
|
3365
|
-
const { TypeChecker } = await import("./typeChecker-
|
|
3394
|
+
const { TypeChecker } = await import("./typeChecker-j2jdnqsr.js");
|
|
3366
3395
|
this.typeChecker ??= new TypeChecker(this);
|
|
3367
3396
|
return this.typeChecker;
|
|
3368
3397
|
}
|
|
@@ -4328,4 +4357,4 @@ class ModuleExecutor extends Executor {
|
|
|
4328
4357
|
}
|
|
4329
4358
|
}
|
|
4330
4359
|
|
|
4331
|
-
export { AGENT_BLOCK_START, AGENT_BLOCK_END, stampBlockVersion, extractBlockVersion, readDevkitVersion, upsertAgentBlock, extractAgentBlock, renderRecipeEntries, collectScopeRecipeSources, renderScopeAgentBlock, CLAUDE_COMMENT_RULE, binPlatforms, ServerEnvProfile, AkanAppConfig, AkanWorkspaceConfig, AsyncDefaultExportDetector, resolveSsrPageEntriesForApp, CodegenLock, JsonFormatter, Linter, LibSource, formatLibStatuses, rootAllowedFiles, rootAllowedDirs, isAllowedLibFacetRootFile, libFacetRootHintOf, barrelFacetDirs, facetIndexShadowOf, rootEntryHintOf, isScannedRootEntry, AppInfo, Spinner, ProjectTypecheck2, CommandExecutionError, Executor, WorkspaceExecutor, SysExecutor, AppExecutor, LibExecutor, PkgExecutor, ModuleExecutor };
|
|
4360
|
+
export { AGENT_BLOCK_START, AGENT_BLOCK_END, stampBlockVersion, extractBlockVersion, readDevkitVersion, upsertAgentBlock, extractAgentBlock, renderRecipeEntries, collectScopeRecipeSources, renderScopeAgentBlock, CLAUDE_COMMENT_RULE, binPlatforms, ServerEnvProfile, AkanAppConfig, AkanWorkspaceConfig, AsyncDefaultExportDetector, resolveSsrPageEntriesForApp, CodegenLock, JsonFormatter, parseBiomeReport, Linter, LibSource, formatLibStatuses, rootAllowedFiles, rootAllowedDirs, isAllowedLibFacetRootFile, libFacetRootHintOf, barrelFacetDirs, facetIndexShadowOf, rootEntryHintOf, isScannedRootEntry, AppInfo, Spinner, TypecheckFailure, ProjectTypecheck2, CommandExecutionError, Executor, WorkspaceExecutor, SysExecutor, AppExecutor, LibExecutor, PkgExecutor, ModuleExecutor };
|