@akanjs/cli 3.2.0-rc.2 → 3.2.0-rc.20
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 +2 -1
- package/CodeAgent-faqv7t4g.js +11 -0
- package/{CodeTui-zyc7zaq6.js → CodeTui-vqck9tet.js} +822 -666
- package/README.ko.md +26 -1
- package/README.md +26 -1
- package/TunnelShare-bwe3ddv7.js +18 -0
- package/agent.command-p75jvgrd.js +56 -0
- package/akanCode.js +12 -12
- package/appExecutor-020cyesq.js +11 -0
- package/{application.command-vb278qnq.js → application.command-ta2knqxm.js} +72 -34
- package/{applicationBuildRunner-bqbyeg84.js → applicationBuildRunner-gkh82j2b.js} +18 -13
- package/buildBatch.proc.js +26 -11
- package/{cloud.command-ca777ee2.js → cloud.command-v3jhfvm5.js} +31 -28
- package/cloud.script-be9s1432.js +35 -0
- package/{code.command-j08txqcd.js → code.command-mh7dh1st.js} +14 -9
- package/{context.command-2fa6egp9.js → context.command-1ycfjkdd.js} +28 -23
- package/context.runner-333jkz86.js +34 -0
- package/{dependencyScanner-78sq8m4q.js → dependencyScanner-ge10gb52.js} +2 -2
- package/{devTui-w38ch13a.js → devTui-rf374y2w.js} +1 -1
- package/{fileSys-zpvt5gtf.js → fileSys-q22646yc.js} +1 -1
- package/{guideline.command-w6yqpdec.js → guideline.command-w1grfwh7.js} +9 -4
- package/guidelines/agentRule/agentRule.instruction.md +17 -5
- package/guidelines/akanApi/akanApi.instruction.md +3 -1
- package/guidelines/conventions/core.md +23 -5
- package/guidelines/conventions/rules/app.md +4 -1
- package/guidelines/conventions/rules/page.md +5 -0
- package/guidelines/errorCodes/errorCodes.instruction.md +158 -0
- package/guidelines/fieldRule/fieldRule.instruction.md +2 -1
- package/guidelines/mcpRule/mcpRule.instruction.md +74 -2
- package/guidelines/pageRule/pageRule.instruction.md +11 -1
- package/guidelines/runtimeRule/runtimeRule.instruction.md +7 -2
- package/guidelines/transportRule/transportRule.instruction.md +8 -1
- package/incrementalBuilder.proc.js +574 -410
- package/{index-c5ymqb05.js → index-013n6z7m.js} +12 -12
- package/{index-w15mg3km.js → index-0dm25wvf.js} +1 -1
- package/{index-8nbx607g.js → index-0hj82f9w.js} +136 -48
- package/{index-ebwkh7bt.js → index-1c0mjc2b.js} +25 -7
- package/{index-6h775rv3.js → index-1jk52ffq.js} +53 -12
- package/{index-hj6w4ka1.js → index-1p81ecbz.js} +1 -1
- package/{index-ygrdw6jw.js → index-1pjwsh2g.js} +65 -8
- package/{index-cbcwxp5v.js → index-22g3jq43.js} +9 -7
- package/{index-466z5931.js → index-2d9nm03s.js} +580 -364
- package/{index-0fj9ra3q.js → index-2k6mve6a.js} +18 -11
- package/{index-qd7xn2bk.js → index-2ny1e95c.js} +2 -2
- package/{index-j7p0jgaq.js → index-52w4jb87.js} +6 -6
- package/{index-e22zedc2.js → index-5h888r6j.js} +3 -3
- package/{index-7kmbqp0b.js → index-6pxmcaq8.js} +1 -1
- package/{index-xa0289eg.js → index-6zb17wcm.js} +16 -9
- package/{index-qgazn58x.js → index-7a07tdap.js} +50 -38
- package/{index-m5sg5spm.js → index-7ehdht84.js} +565 -187
- package/{index-y725zb1a.js → index-7v7tvgt7.js} +196 -168
- package/{index-pq5rjkch.js → index-88s746ns.js} +7 -2
- package/{index-r0a604h4.js → index-99kjwyma.js} +1 -1
- package/{index-2mrn1mrg.js → index-9f3reh2y.js} +1 -1
- package/{index-386canwe.js → index-9rv2zt48.js} +186 -121
- package/{index-wr9magsr.js → index-9zswcze5.js} +3 -3
- package/{index-xq97me1h.js → index-a41vv4cy.js} +811 -697
- package/{index-yf9wc28h.js → index-bejy9zyc.js} +1 -1
- package/{index-bdmgqzb5.js → index-bket1068.js} +58 -29
- package/{index-bns3wcpc.js → index-by2tvsq6.js} +1 -1
- package/{index-1cb9apzn.js → index-czf94w8c.js} +2 -2
- package/{index-65b6ms4c.js → index-d3178asw.js} +15 -11
- package/index-dss3ds74.js +127 -0
- package/{index-annxfpgz.js → index-eyfty8kk.js} +9 -9
- package/{index-ny2k80mv.js → index-ffa52fwf.js} +1 -1
- package/{index-8jpc5fqv.js → index-g7jgd4xs.js} +2 -2
- package/{index-abfbf01s.js → index-gwsesvqc.js} +2 -2
- package/{index-kcpk2d20.js → index-h1w4wqgd.js} +1474 -1139
- package/{index-j1hjb477.js → index-hp2c7xc2.js} +1 -1
- package/index-j4yvgfhr.js +70 -0
- package/{index-84c2pgak.js → index-jx2jcw1r.js} +89 -78
- package/{index-j6eeh5d7.js → index-knpm8sdm.js} +5 -5
- package/{index-2gees180.js → index-mpp4aas6.js} +62 -33
- package/index-na8r4a27.js +30 -0
- package/{index-0mqga3h9.js → index-nmxszh6x.js} +525 -440
- package/{index-35j83zkd.js → index-p5zh7pmc.js} +2 -2
- package/{index-20wvskt8.js → index-pt0agdck.js} +1 -1
- package/{index-htxck0pn.js → index-q444k260.js} +15 -10
- package/{index-wfmpxke3.js → index-qssq2d41.js} +2775 -3677
- package/{index-23860fej.js → index-rwgqba9p.js} +24 -9
- package/{index-v50xjbbe.js → index-t4d0ckde.js} +1 -1
- package/index-va90m8nd.js +25 -0
- package/index-vjbne22r.js +80 -0
- package/{index-djc5nxpy.js → index-w23tf30e.js} +6 -6
- package/{index-mvwvxgtd.js → index-wa01phm9.js} +289 -210
- package/{index-h7hehkw6.js → index-xczjdng6.js} +3 -1
- package/{index-vbhx60x5.js → index-xwe7y0gf.js} +2140 -2165
- package/index-ze48c0vd.js +788 -0
- package/{index-dk4g0x0d.js → index-zttyg7tg.js} +27 -16
- package/{index-ygdbn9jn.js → index-zyb0ebm4.js} +1 -1
- package/index.js +29 -24
- package/libExecutor-tq994592.js +10 -0
- package/{library.command-8d03a0pq.js → library.command-x219mhcx.js} +9 -4
- package/{localRegistry.command-vyv5k6t0.js → localRegistry.command-4p17wa9t.js} +30 -24
- package/{module.command-vy3kg965.js → module.command-tjthnvvr.js} +17 -8
- package/{package.command-qjh13rs9.js → package.command-c6df2hxx.js} +13 -8
- package/package.json +2 -2
- package/{page.command-t0nx1jat.js → page.command-gf06paq2.js} +9 -4
- package/{pipeline.command-2yjeas7m.js → pipeline.command-y07dgj9b.js} +14 -8
- package/pkgExecutor-stde3yc3.js +10 -0
- package/{primitive.command-8vm49279.js → primitive.command-0enfygxn.js} +13 -8
- package/{projectTypecheck-s9hhe5sa.js → projectTypecheck-mk8wefvd.js} +2 -1
- package/{prompter-qrwx1p17.js → prompter-qyggfhqd.js} +2 -2
- package/{quality.command-v76fev72.js → quality.command-dkbdztad.js} +23 -16
- package/{recipeScanner-4b69ybe0.js → recipeScanner-rrx69awy.js} +1 -1
- package/{repair.command-fp4m3w03.js → repair.command-g5vd95ax.js} +13 -8
- package/{routeSourceValidator-4h947v7c.js → routeSourceValidator-8n6j1vn7.js} +4 -2
- package/{scalar.command-hxe6try8.js → scalar.command-7909pg0d.js} +11 -6
- package/skills/akan-debug/SKILL.md +10 -3
- package/skills/akan-err/SKILL.md +7 -0
- package/skills/akan-mcp/SKILL.md +10 -1
- package/skills/akan-scaffold/SKILL.md +2 -2
- package/skills/akan-transport/SKILL.md +2 -0
- package/skills/akan-validate/SKILL.md +1 -0
- package/{subspace.command-q42n1844.js → subspace.command-at4jt1fb.js} +29 -23
- package/templates/biomeForm.ts +1 -1
- package/templates/env/_env.server.type.ts +1 -1
- package/templates/facetIndex/index.ts +2 -37
- package/templates/lib/sig.ts +0 -4
- package/templates/lib/useClient.ts +1 -1
- package/templates/workspaceRoot/AGENTS.md.template +2 -1
- package/{tunnel.command-22g11n0x.js → tunnel.command-91h92dwr.js} +17 -12
- package/{typeChecker-s640r6c0.js → typeChecker-bfrd1n9n.js} +1 -1
- package/typecheck.proc.js +6 -3
- package/{verify.command-rx43bha1.js → verify.command-pzky05ts.js} +26 -20
- package/{workflow.command-yg0d8mmq.js → workflow.command-mqqe4n12.js} +37 -19
- package/{workspace.command-fcfztvn5.js → workspace.command-y4rznvhx.js} +64 -53
- package/CodeAgent-6cpjtj25.js +0 -11
- package/TunnelShare-zkfkrw8w.js +0 -14
- package/agent.command-kf1g3nh4.js +0 -51
- package/cloud.script-agpxzq6j.js +0 -30
- package/context.runner-ftv8373t.js +0 -29
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import {
|
|
3
3
|
JsonFormatter
|
|
4
|
-
} from "./index-
|
|
4
|
+
} from "./index-qssq2d41.js";
|
|
5
5
|
|
|
6
|
-
// pkgs/@akanjs/devkit/maintainabilityBaseline.ts
|
|
6
|
+
// pkgs/@akanjs/devkit/quality/maintainabilityBaseline.ts
|
|
7
7
|
class MaintainabilityBaseline {
|
|
8
8
|
sections;
|
|
9
9
|
reasons;
|
|
@@ -19,8 +19,12 @@ class MaintainabilityBaseline {
|
|
|
19
19
|
"akan.store.root-write-chain",
|
|
20
20
|
"akan.component.write-chain",
|
|
21
21
|
"akan.write.placement",
|
|
22
|
-
"akan.service.call-in-loop"
|
|
22
|
+
"akan.service.call-in-loop",
|
|
23
|
+
"akan.error.bare-error"
|
|
23
24
|
];
|
|
25
|
+
static lateRules = new Set(["akan.error.bare-error"]);
|
|
26
|
+
static totalRules = new Set(["akan.error.bare-error"]);
|
|
27
|
+
static totalKey = "(total)";
|
|
24
28
|
static reasonedRules = new Set([
|
|
25
29
|
"akan.size.file",
|
|
26
30
|
"akan.size.component",
|
|
@@ -40,6 +44,8 @@ class MaintainabilityBaseline {
|
|
|
40
44
|
return violation.writeCount;
|
|
41
45
|
if (violation.kind === "writePlacement")
|
|
42
46
|
return violation.writes.length;
|
|
47
|
+
if (violation.kind === "bareError")
|
|
48
|
+
return violation.lines.length;
|
|
43
49
|
return violation.calls.length;
|
|
44
50
|
}
|
|
45
51
|
static isDebtRule(name) {
|
|
@@ -97,6 +103,21 @@ class MaintainabilityBaseline {
|
|
|
97
103
|
const recorded = this.recordedOf(violation);
|
|
98
104
|
return recorded !== undefined && MaintainabilityBaseline.countOf(violation) <= recorded;
|
|
99
105
|
}
|
|
106
|
+
unallowed(violations) {
|
|
107
|
+
const measured = MaintainabilityBaseline.of(violations);
|
|
108
|
+
return violations.filter((violation) => !(MaintainabilityBaseline.totalRules.has(violation.rule) && measured.totalOf(violation.rule) <= this.totalOf(violation.rule)) && !this.allows(violation));
|
|
109
|
+
}
|
|
110
|
+
staleTotals(violations) {
|
|
111
|
+
const measured = MaintainabilityBaseline.of(violations);
|
|
112
|
+
return [...MaintainabilityBaseline.totalRules].flatMap((rule) => {
|
|
113
|
+
const count = measured.totalOf(rule);
|
|
114
|
+
const recorded = this.totalOf(rule);
|
|
115
|
+
return count < recorded ? [{ rule, count, recorded }] : [];
|
|
116
|
+
});
|
|
117
|
+
}
|
|
118
|
+
totalOf(rule) {
|
|
119
|
+
return [...this.sections.get(rule)?.values() ?? []].reduce((sum, count) => sum + count, 0);
|
|
120
|
+
}
|
|
100
121
|
recordedOf(violation) {
|
|
101
122
|
return this.sections.get(violation.rule)?.get(violation.key);
|
|
102
123
|
}
|
|
@@ -114,19 +135,55 @@ class MaintainabilityBaseline {
|
|
|
114
135
|
}))
|
|
115
136
|
]));
|
|
116
137
|
}
|
|
138
|
+
rulesOutside(other) {
|
|
139
|
+
return [...this.sections].filter(([rule, counts]) => counts.size && (other === null || MaintainabilityBaseline.lateRules.has(rule) && !other.sections.has(rule))).map(([rule]) => rule);
|
|
140
|
+
}
|
|
141
|
+
withSectionsOf(other, rules) {
|
|
142
|
+
if (!other)
|
|
143
|
+
return this;
|
|
144
|
+
const sections = new Map(this.sections);
|
|
145
|
+
for (const rule of rules)
|
|
146
|
+
sections.set(rule, other.sections.get(rule) ?? new Map);
|
|
147
|
+
return new MaintainabilityBaseline(sections, this.reasons);
|
|
148
|
+
}
|
|
149
|
+
movedBy(moves) {
|
|
150
|
+
if (!moves.size)
|
|
151
|
+
return this;
|
|
152
|
+
const movedKey = (key) => {
|
|
153
|
+
const file = key.split("#", 1)[0] ?? key;
|
|
154
|
+
const to = moves.get(file);
|
|
155
|
+
return to === undefined ? key : `${to}${key.slice(file.length)}`;
|
|
156
|
+
};
|
|
157
|
+
const sections = new Map([...this.sections].map(([rule, counts]) => {
|
|
158
|
+
const moved = new Map;
|
|
159
|
+
for (const [key, count] of counts) {
|
|
160
|
+
const to = movedKey(key);
|
|
161
|
+
moved.set(to, Math.max(moved.get(to) ?? 0, count));
|
|
162
|
+
}
|
|
163
|
+
return [rule, moved];
|
|
164
|
+
}));
|
|
165
|
+
return new MaintainabilityBaseline(sections, new Map([...this.reasons].map(([key, reason]) => [movedKey(key), reason])));
|
|
166
|
+
}
|
|
117
167
|
tightenedBy(violations) {
|
|
118
168
|
const current = MaintainabilityBaseline.of(violations);
|
|
119
|
-
const sections = new Map([...this.sections].map(([rule, counts]) =>
|
|
120
|
-
rule
|
|
121
|
-
MaintainabilityBaseline
|
|
122
|
-
|
|
169
|
+
const sections = new Map([...this.sections].map(([rule, counts]) => {
|
|
170
|
+
const measured = current.sections.get(rule) ?? new Map;
|
|
171
|
+
if (!MaintainabilityBaseline.totalRules.has(rule))
|
|
172
|
+
return [rule, MaintainabilityBaseline.#lowered(counts, measured)];
|
|
173
|
+
return [rule, current.totalOf(rule) > this.totalOf(rule) ? counts : measured];
|
|
174
|
+
}));
|
|
123
175
|
return new MaintainabilityBaseline(sections).#withReasonsOf(this.reasons);
|
|
124
176
|
}
|
|
125
177
|
#withReasonsOf(reasons) {
|
|
126
178
|
return new MaintainabilityBaseline(this.sections, new Map([...reasons].filter(([key]) => this.#holdsReasoned(key))));
|
|
127
179
|
}
|
|
128
180
|
grownFrom(committed) {
|
|
129
|
-
return [...this.sections].flatMap(([rule, counts]) => MaintainabilityBaseline.#raised(counts, committed.sections.get(rule) ?? new Map).filter(([key]) => !(MaintainabilityBaseline.reasonedRules.has(rule) && this.reasonOf(key))).map(([key, count, recorded]) => ({ rule, key, count, committed: recorded })));
|
|
181
|
+
return [...this.sections].flatMap(([rule, counts]) => MaintainabilityBaseline.totalRules.has(rule) ? this.#totalGrownFrom(committed, rule) : MaintainabilityBaseline.#raised(counts, committed.sections.get(rule) ?? new Map).filter(([key]) => !(MaintainabilityBaseline.reasonedRules.has(rule) && this.reasonOf(key))).map(([key, count, recorded]) => ({ rule, key, count, committed: recorded })));
|
|
182
|
+
}
|
|
183
|
+
#totalGrownFrom(committed, rule) {
|
|
184
|
+
const count = this.totalOf(rule);
|
|
185
|
+
const recorded = committed.sections.has(rule) ? committed.totalOf(rule) : undefined;
|
|
186
|
+
return count > (recorded ?? 0) ? [{ rule, key: MaintainabilityBaseline.totalKey, count, committed: recorded }] : [];
|
|
130
187
|
}
|
|
131
188
|
stringify() {
|
|
132
189
|
const sections = MaintainabilityBaseline.debtRules.flatMap((rule) => {
|
|
@@ -1,19 +1,21 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import {
|
|
3
|
-
|
|
4
|
-
} from "./index-
|
|
3
|
+
runner
|
|
4
|
+
} from "./index-9rv2zt48.js";
|
|
5
5
|
import {
|
|
6
6
|
writeWorkflowRunArtifact,
|
|
7
7
|
generatedFilePathsForTarget,
|
|
8
8
|
writeGeneratedSyncState,
|
|
9
9
|
createRepairReport,
|
|
10
|
-
isWorkflowSysName,
|
|
11
|
-
isWorkflowModuleName,
|
|
12
10
|
renderRepairReport
|
|
13
|
-
} from "./index-
|
|
11
|
+
} from "./index-a41vv4cy.js";
|
|
14
12
|
import {
|
|
15
|
-
|
|
16
|
-
} from "./index-
|
|
13
|
+
AkanContextAnalyzer
|
|
14
|
+
} from "./index-nmxszh6x.js";
|
|
15
|
+
import {
|
|
16
|
+
isWorkflowSysName,
|
|
17
|
+
isWorkflowModuleName
|
|
18
|
+
} from "./index-va90m8nd.js";
|
|
17
19
|
|
|
18
20
|
// pkgs/@akanjs/cli/repair/repair.runner.ts
|
|
19
21
|
var akanArgPattern = /^(?:--?[a-z][a-zA-Z0-9-]*|[A-Za-z0-9@_][A-Za-z0-9@._/:,=-]*)$/;
|