@akanjs/cli 3.1.1-rc.15 → 3.1.1-rc.17
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-gtwn7tmb.js → CodeAgent-fbcq8vks.js} +2 -2
- package/{CodeTui-v941fqdh.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-j1reb9p1.js → application.command-3a7q1hs2.js} +11 -10
- package/{applicationBuildRunner-w20x63mz.js → applicationBuildRunner-s7yt71j4.js} +6 -5
- package/buildBatch.proc.js +6 -6
- package/{cloud.command-zd2mfkm0.js → cloud.command-4vg0pcea.js} +15 -14
- package/cloud.script-nkmeyhet.js +25 -0
- package/{code.command-dyet4xn6.js → code.command-fbntb67p.js} +6 -6
- package/commandManifest.json +1 -1
- package/{context.command-79gxczm4.js → context.command-31rm54v0.js} +18 -17
- package/context.runner-w01a32ph.js +26 -0
- package/{guideline.command-xwkskvky.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-pqdz7rat.js → index-05nxx4m5.js} +952 -47
- package/{index-41d3zx66.js → index-0ht91675.js} +37 -59
- package/{index-cz9g85xh.js → index-0zwznvv1.js} +1 -1
- package/{index-7ktk2hnz.js → index-0zyatd10.js} +2 -2
- package/{index-8jb5ep2e.js → index-12kzwak1.js} +3 -3
- package/{index-yknrmkmt.js → index-1dhf8ymv.js} +2 -2
- package/{index-qmeh0s05.js → index-3gccwenr.js} +2 -2
- package/{index-hdzjaq7s.js → index-3txrjt6n.js} +2 -2
- package/{index-tzzs52h0.js → index-57q1ayd2.js} +18 -1240
- package/index-5kh9scvs.js +514 -0
- package/index-5n5hds19.js +1246 -0
- package/{index-pc9ps0hx.js → index-6269mf2s.js} +10 -9
- package/{index-1e2955yd.js → index-64g9fsjy.js} +43 -12
- package/index-7zeb5r1p.js +653 -0
- package/{index-kr62ph5a.js → index-8s8b4eba.js} +45 -4
- package/{index-wvvwdzfw.js → index-922k2zwq.js} +3 -3
- package/{index-brpk7gd8.js → index-9ndw5d8j.js} +7 -7
- package/{index-xeh7m2j5.js → index-et6ce601.js} +1 -1
- package/{index-jtydvvq7.js → index-f5adsa58.js} +4 -4
- package/index-fbewhg4g.js +590 -0
- package/{index-7abjzny1.js → index-hm7x0c11.js} +33 -37
- package/{index-rshwdv9w.js → index-hvv5rnaq.js} +2 -2
- package/index-jje9qzyq.js +27 -0
- package/index-js1gj6f6.js +410 -0
- package/{index-2qzzp0c9.js → index-kjrvwzav.js} +3 -3
- package/index-m5n3ka0p.js +18 -0
- package/index-m6r88hhr.js +3582 -0
- package/{index-4rwfh2de.js → index-mt0wa941.js} +4 -4
- package/{index-553xyb55.js → index-mwj9q2ya.js} +1 -1
- package/{index-5nd1wtkv.js → index-p6x5b7hr.js} +1 -1
- package/index-r2wedvqn.js +138 -0
- package/{index-ygy8c12j.js → index-rvynj5gz.js} +1 -1
- package/{index-nmy1rana.js → index-tdv66eah.js} +4 -4
- package/{index-8rvwgd1r.js → index-w134p86k.js} +1 -1
- package/{index-jjd97ya6.js → index-wfczhj1z.js} +14 -36
- package/{index-dy0jx9ay.js → index-wwe9rsrx.js} +14 -0
- package/{index-kbbyzs6j.js → index-x5ecanqh.js} +2 -2
- package/{index-ch1sv7ke.js → index-zre4m2ce.js} +9 -21
- package/index.js +23 -22
- package/{library.command-td8t85kb.js → library.command-sh70fyvy.js} +3 -3
- package/{localRegistry.command-jx9zkmxf.js → localRegistry.command-2nbyy84d.js} +17 -14
- package/{module.command-j70mqgpp.js → module.command-n0bmtzwy.js} +5 -5
- package/{package.command-1b1v6k5v.js → package.command-7h9r51bz.js} +3 -3
- package/package.json +2 -2
- package/{page.command-m31w2tsz.js → page.command-vjtpfbb1.js} +3 -3
- package/{pipeline.command-q7b8wy55.js → pipeline.command-c93se3ar.js} +2 -2
- package/{primitive.command-4zrbhkb9.js → primitive.command-a3075qp2.js} +6 -6
- package/{projectTypecheck-synx6qff.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-98n6zxg7.js → repair.command-tg57d8yt.js} +5 -5
- package/{scalar.command-rak5pjk3.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-ej0rk116.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-kdx3amrc.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-gffk9nj9.js → workflow.command-srhky88x.js} +47 -13
- package/workspace.command-9stchcd2.js +262 -0
- package/TunnelShare-26ty9skr.js +0 -14
- package/agent.command-h82gepwn.js +0 -25
- package/cloud.script-vdj8ymch.js +0 -24
- package/context.runner-ejag7mhr.js +0 -25
- package/guidelines/conventions/conventions.instruction.md +0 -617
- package/guidelines/workspaceOnboarding/workspaceOnboarding.instruction.md +0 -291
- package/index-6pzt55w3.js +0 -279
- package/index-y5m4j2w6.js +0 -856
- package/index-zzvvc845.js +0 -74
- package/quality.command-cy0pgqjz.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-097hv6n1.js +0 -521
|
@@ -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}
|
|
@@ -2292,6 +2292,7 @@ var appRootAllowedFiles = new Set([
|
|
|
2292
2292
|
"AGENTS.md",
|
|
2293
2293
|
"CLAUDE.md",
|
|
2294
2294
|
"akan.app.json",
|
|
2295
|
+
"akan.baseline.json",
|
|
2295
2296
|
"akan.config.ts",
|
|
2296
2297
|
"client.ts",
|
|
2297
2298
|
"main.ts",
|
|
@@ -2320,6 +2321,7 @@ var libRootAllowedFiles = new Set([
|
|
|
2320
2321
|
"AGENTS.md",
|
|
2321
2322
|
"CLAUDE.md",
|
|
2322
2323
|
"README.md",
|
|
2324
|
+
"akan.baseline.json",
|
|
2323
2325
|
"akan.config.ts",
|
|
2324
2326
|
"akan.lib.json",
|
|
2325
2327
|
"client.ts",
|
|
@@ -2862,6 +2864,18 @@ class Spinner {
|
|
|
2862
2864
|
import { mkdir as mkdir2, rm as rm3 } from "fs/promises";
|
|
2863
2865
|
import path12 from "path";
|
|
2864
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
|
|
2865
2879
|
class ProjectTypecheck2 {
|
|
2866
2880
|
projectDir;
|
|
2867
2881
|
workspaceRoot;
|
|
@@ -2876,7 +2890,7 @@ class ProjectTypecheck2 {
|
|
|
2876
2890
|
get typecheckDir() {
|
|
2877
2891
|
return path12.join(this.projectDir, ".akan", "typecheck");
|
|
2878
2892
|
}
|
|
2879
|
-
async run(entries, { clean = false, incremental = true, tests = false } = {}) {
|
|
2893
|
+
async run(entries, { clean = false, incremental = true, tests = false, report = "pretty" } = {}) {
|
|
2880
2894
|
const name = tests ? "tsconfig.tests" : "tsconfig";
|
|
2881
2895
|
await mkdir2(this.typecheckDir, { recursive: true });
|
|
2882
2896
|
const tsconfig = {
|
|
@@ -2891,13 +2905,18 @@ class ProjectTypecheck2 {
|
|
|
2891
2905
|
`);
|
|
2892
2906
|
if (clean)
|
|
2893
2907
|
await rm3(path12.join(this.typecheckDir, `${name}.tsbuildinfo`), { force: true });
|
|
2894
|
-
await this
|
|
2908
|
+
await this.check(tsconfigPath, report);
|
|
2895
2909
|
return tsconfigPath;
|
|
2896
2910
|
}
|
|
2897
|
-
async
|
|
2911
|
+
async check(tsconfigPath, report = "pretty") {
|
|
2898
2912
|
const proc = Bun.spawn([process.execPath, await ProjectTypecheck2.workerEntry(this.workspaceRoot)], {
|
|
2899
2913
|
cwd: this.workspaceRoot,
|
|
2900
|
-
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
|
+
},
|
|
2901
2920
|
stdout: "pipe",
|
|
2902
2921
|
stderr: "pipe"
|
|
2903
2922
|
});
|
|
@@ -2906,8 +2925,20 @@ class ProjectTypecheck2 {
|
|
|
2906
2925
|
new Response(proc.stderr).text(),
|
|
2907
2926
|
proc.exited
|
|
2908
2927
|
]);
|
|
2909
|
-
if (exitCode
|
|
2910
|
-
|
|
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
|
+
}
|
|
2911
2942
|
}
|
|
2912
2943
|
static async workerEntry(workspaceRoot) {
|
|
2913
2944
|
const candidates = [
|
|
@@ -3360,7 +3391,7 @@ class Executor {
|
|
|
3360
3391
|
}
|
|
3361
3392
|
}
|
|
3362
3393
|
async getTypeChecker() {
|
|
3363
|
-
const { TypeChecker } = await import("./typeChecker-
|
|
3394
|
+
const { TypeChecker } = await import("./typeChecker-j2jdnqsr.js");
|
|
3364
3395
|
this.typeChecker ??= new TypeChecker(this);
|
|
3365
3396
|
return this.typeChecker;
|
|
3366
3397
|
}
|
|
@@ -4326,4 +4357,4 @@ class ModuleExecutor extends Executor {
|
|
|
4326
4357
|
}
|
|
4327
4358
|
}
|
|
4328
4359
|
|
|
4329
|
-
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, 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 };
|