gennady 0.8.4-draft.2 → 0.8.4-draft.3
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/ai/directives/sdd-v2/root.directive.xml +36 -3
- package/ai/directives/sdd-v2/router.directive.xml +22 -1
- package/ai/kit/templates/sdd-v2/root.directive.hbs +11 -3
- package/ai/kit/templates/sdd-v2/router.directive.hbs +22 -1
- package/ai/skills/agent-inbox/SKILL.md +1 -1
- package/ai/skills/sdd/SKILL.md +5 -3
- package/ai/skills/sdd-audit/SKILL.md +5 -2
- package/ai/skills/sdd-check/SKILL.md +2 -2
- package/ai/skills/sdd-code-review/SKILL.md +4 -1
- package/ai/skills/sdd-critic/SKILL.md +5 -2
- package/ai/skills/sdd-execute/SKILL.md +5 -2
- package/ai/skills/sdd-reconcile/SKILL.md +5 -2
- package/ai/skills/sdd-scaffold/SKILL.md +5 -2
- package/dist/ai/directives/sdd-v2/root.directive.xml +36 -3
- package/dist/ai/directives/sdd-v2/router.directive.xml +22 -1
- package/dist/ai/kit/templates/sdd-v2/root.directive.hbs +11 -3
- package/dist/ai/kit/templates/sdd-v2/router.directive.hbs +22 -1
- package/dist/ai/skills/agent-inbox/SKILL.md +1 -1
- package/dist/ai/skills/sdd/SKILL.md +5 -3
- package/dist/ai/skills/sdd-audit/SKILL.md +5 -2
- package/dist/ai/skills/sdd-check/SKILL.md +2 -2
- package/dist/ai/skills/sdd-code-review/SKILL.md +4 -1
- package/dist/ai/skills/sdd-critic/SKILL.md +5 -2
- package/dist/ai/skills/sdd-execute/SKILL.md +5 -2
- package/dist/ai/skills/sdd-reconcile/SKILL.md +5 -2
- package/dist/ai/skills/sdd-scaffold/SKILL.md +5 -2
- package/dist/chunks/{classify-mr-stage.logic-BiCHTmPp.js → classify-mr-stage.logic-CazmQDwZ.js} +2 -2
- package/dist/chunks/{config-index-9VHWSDQD.js → config-index-DU8-FEjq.js} +1 -1
- package/dist/chunks/{devtools-b0DwO1x_.js → devtools-1JmXJjUG.js} +1 -1
- package/dist/chunks/{eval.cmd-CwNPaNJd.js → eval.cmd-CBANnOFG.js} +1 -1
- package/dist/chunks/{help-D5cXtdMI.js → help-DVloaFF5.js} +1 -1
- package/dist/chunks/{index-BVnJEutp.js → index-2xhpqJtd.js} +2 -2
- package/dist/chunks/{index-RR5OUxje.js → index-AxsLBUAx.js} +14 -14
- package/dist/chunks/{index-CUkeTGqM.js → index-B7sydB0W.js} +2 -2
- package/dist/chunks/{index-CMCn9ErF.js → index-BKxk4zOz.js} +2 -2
- package/dist/chunks/{index-Db13NlHh.js → index-BNMmX_Mv.js} +21 -21
- package/dist/chunks/{index-CmQO-RmM.js → index-BPzldG3a.js} +2 -2
- package/dist/chunks/{index-BOQl7F_Z.js → index-BQlFDvKW.js} +2 -2
- package/dist/chunks/{index-RzkvIfJQ.js → index-Baq7RL1L.js} +3 -3
- package/dist/chunks/index-BbPiwvY9.js +2 -0
- package/dist/chunks/{index-ClJLPEUB.js → index-BreGNLJ_.js} +1 -1
- package/dist/chunks/{index-DjSafAkN.js → index-BslPwGtM.js} +2 -2
- package/dist/chunks/{index-DiMFxS0z.js → index-BtCUN2fZ.js} +16 -16
- package/dist/chunks/{index-CS0VbiLD.js → index-C10-EOdB.js} +1 -1
- package/dist/chunks/{index-2BOEcJIa.js → index-C4JmZLaj.js} +2 -2
- package/dist/chunks/index-CA-JKLr4.js +2 -0
- package/dist/chunks/{index-43GiH--T.js → index-CG_jJZVu.js} +2 -2
- package/dist/chunks/{index-BdkFKsMm.js → index-CGyP2uDE.js} +3 -3
- package/dist/chunks/{index-BOKv0b01.js → index-CPl1s9XJ.js} +2 -2
- package/dist/chunks/{index-DIPrBH-4.js → index-CSxE4cEm.js} +9 -9
- package/dist/chunks/{index-Cm7U1-fU.js → index-CWR5EzXx.js} +2 -2
- package/dist/chunks/{index-BwN5llCR.js → index-Camql5kL.js} +2 -2
- package/dist/chunks/{index-Drh-J9O7.js → index-CdUiTipO.js} +7 -7
- package/dist/chunks/{index-Cn029KTN.js → index-Crg61pK5.js} +2 -2
- package/dist/chunks/{index-Dja2O-hV.js → index-Cv9ZYXso.js} +1 -1
- package/dist/chunks/{index-Ck8v_Gv7.js → index-D7ADMlG3.js} +1 -1
- package/dist/chunks/index-DNl2gC8l.js +158 -0
- package/dist/chunks/{index-BYIzl-Ut.js → index-DVJA0qVm.js} +36 -36
- package/dist/chunks/{index-BAEIZVx0.js → index-DcFJhkY1.js} +2 -2
- package/dist/chunks/{index-Dx5_CB2E.js → index-DdEd-L3x.js} +2 -2
- package/dist/chunks/{index-DVmqMmgb.js → index-DkGA1eW_.js} +32 -32
- package/dist/chunks/{index-3k7mPX1e.js → index-Dnwxlti3.js} +1 -1
- package/dist/chunks/{index-CrizvxOJ.js → index-DqdEJDi2.js} +2 -2
- package/dist/chunks/{index-BIPebtDl.js → index-DqiwmBt4.js} +1 -1
- package/dist/chunks/{index-DS4MhAw-.js → index-PfuqBWjY.js} +2 -2
- package/dist/chunks/{index-BmFT1Kx2.js → index-SVP6RfVl.js} +2 -2
- package/dist/chunks/{index-CDxV4b81.js → index-Y8wu48Q0.js} +1 -1
- package/dist/chunks/index-_ewSKppm.js +2 -0
- package/dist/chunks/{index-Ctcr_Qeu.js → index-aBVtCLIJ.js} +2 -2
- package/dist/chunks/index-dNdz9j6d.js +2 -0
- package/dist/chunks/{index-BFUkVkSo.js → index-gskOpu3H.js} +16 -16
- package/dist/chunks/{index-CXpkT25O.js → index-pBSLMn5Q.js} +3 -3
- package/dist/chunks/index-sqPhX5Io.js +2 -0
- package/dist/chunks/{index-BzmR4Es2.js → index-vfrjhUD1.js} +39 -39
- package/dist/chunks/{index-J2NvjjDV.js → index-xGF5XC_i.js} +2 -2
- package/dist/chunks/{run-review-command.logic-CA2Rjymb.js → run-review-command.logic-B9GoCxh-.js} +24 -24
- package/dist/chunks/{serve.cmd-RxYS6WoN.js → serve.cmd-UXkaeaPI.js} +2 -2
- package/dist/chunks/{services-Csd556Tv.js → services-BYCeGBlO.js} +4 -4
- package/dist/chunks/{shared-B5CTGvpG.js → shared-B3cXL2Np.js} +1178 -1117
- package/dist/chunks/{stats-index-BLztvK69.js → stats-index-AIAnnp9S.js} +2 -2
- package/dist/gennady.js +46 -46
- package/dist/index.js +4 -4
- package/dist/shared/sdd/ladder.d.ts +42 -0
- package/dist/shared/sdd/module-specs.d.ts +7 -0
- package/dist/shared/sdd/tracker.d.ts +9 -0
- package/package.json +1 -1
- package/dist/chunks/classify-mr-stage.logic-ClmhzQPQ.js +0 -53
- package/dist/chunks/config-index-RFeqlDWs.js +0 -104
- package/dist/chunks/devtools-p8tmPuLn.js +0 -79
- package/dist/chunks/eval.cmd-ewU5lcUY.js +0 -34
- package/dist/chunks/help-DzGnMNi2.js +0 -7
- package/dist/chunks/index--AXFi0ty.js +0 -89
- package/dist/chunks/index-64TSesTc.js +0 -186
- package/dist/chunks/index-9Gv5trS_.js +0 -125
- package/dist/chunks/index-B1DQIryA.js +0 -2
- package/dist/chunks/index-B1PiBeQ3.js +0 -2
- package/dist/chunks/index-B4rzuhkt.js +0 -183
- package/dist/chunks/index-B97HJjkg.js +0 -159
- package/dist/chunks/index-BF6qypm0.js +0 -131
- package/dist/chunks/index-BK84ZQsh.js +0 -128
- package/dist/chunks/index-BRVIirjj.js +0 -141
- package/dist/chunks/index-BXnryCGW.js +0 -96
- package/dist/chunks/index-BaZm7Otb.js +0 -2
- package/dist/chunks/index-Bhk746A2.js +0 -129
- package/dist/chunks/index-Bi-eY_dY.js +0 -164
- package/dist/chunks/index-BjumU69g.js +0 -2
- package/dist/chunks/index-BkWXcpXU.js +0 -16979
- package/dist/chunks/index-BlY4jQIA.js +0 -168
- package/dist/chunks/index-C0iy7GxD.js +0 -140
- package/dist/chunks/index-CCBTXczb.js +0 -56
- package/dist/chunks/index-CDAfkSrr.js +0 -2
- package/dist/chunks/index-CDHymWzC.js +0 -102
- package/dist/chunks/index-CNfXJAao.js +0 -2
- package/dist/chunks/index-CQsae1nq.js +0 -207
- package/dist/chunks/index-CVmd0prf.js +0 -2
- package/dist/chunks/index-CZuTNeNm.js +0 -2
- package/dist/chunks/index-CasNhhrL.js +0 -96
- package/dist/chunks/index-Ce7GWENF.js +0 -377
- package/dist/chunks/index-Cf-02TAg.js +0 -265
- package/dist/chunks/index-CfjQWSrh.js +0 -52
- package/dist/chunks/index-Chr7gBBz.js +0 -443
- package/dist/chunks/index-Ci875Zlg.js +0 -346
- package/dist/chunks/index-CwA6RzIB.js +0 -3793
- package/dist/chunks/index-D1dI63ej.js +0 -46
- package/dist/chunks/index-DCS32A2i.js +0 -663
- package/dist/chunks/index-DOFoNxvb.js +0 -131
- package/dist/chunks/index-DVkCEuws.js +0 -136
- package/dist/chunks/index-DkadaaXq.js +0 -658
- package/dist/chunks/index-Dn11CLtk.js +0 -7
- package/dist/chunks/index-Do3spFJT.js +0 -340
- package/dist/chunks/index-DrFRZ0Yg.js +0 -2
- package/dist/chunks/index-DvEQhXi2.js +0 -1054
- package/dist/chunks/index-GiS0x6jg.js +0 -90
- package/dist/chunks/index-NacvqeQ5.js +0 -69
- package/dist/chunks/index-RNJhFzdr.js +0 -227
- package/dist/chunks/index-R_vUB6CL.js +0 -2
- package/dist/chunks/index-TQft1s5H.js +0 -20
- package/dist/chunks/index-ZmQRP38W.js +0 -26969
- package/dist/chunks/index-jdOZ4AkD.js +0 -143
- package/dist/chunks/index-kNa21kUI.js +0 -279
- package/dist/chunks/index-v4AV9kAc.js +0 -108
- package/dist/chunks/run-review-command.logic-CU1Slmc_.js +0 -331
- package/dist/chunks/serve.cmd-dWu_k_G_.js +0 -162
- package/dist/chunks/services-CwvXl2MB.js +0 -46832
- package/dist/chunks/shared-DSZTUx5b.js +0 -4509
- package/dist/chunks/stats-index-H6ALcjxy.js +0 -66
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { existsSync as $, readFileSync as m } from "node:fs";
|
|
2
2
|
import { resolve as v, join as y, relative as C } from "node:path";
|
|
3
|
-
import { l as S, ae as h, af as F, ag as b } from "./services-
|
|
4
|
-
import { p as j,
|
|
5
|
-
function
|
|
3
|
+
import { l as S, ae as h, af as F, ag as b } from "./services-BYCeGBlO.js";
|
|
4
|
+
import { p as j, t as B, as as k, w as A, at as E, au as M, a4 as g, av as R, aw as Y } from "./shared-B3cXL2Np.js";
|
|
5
|
+
function D(t, n) {
|
|
6
6
|
if (t.length === 0)
|
|
7
7
|
return {
|
|
8
8
|
text: `yagni: ✅ clean (${n} changed file(s) scanned)`,
|
|
@@ -15,7 +15,7 @@ function q(t, n) {
|
|
|
15
15
|
function u(t) {
|
|
16
16
|
return `'${t.replace(/'/g, "'\\''")}'`;
|
|
17
17
|
}
|
|
18
|
-
async function
|
|
18
|
+
async function H(t, n, a) {
|
|
19
19
|
const e = y(t, n);
|
|
20
20
|
let o;
|
|
21
21
|
try {
|
|
@@ -26,15 +26,15 @@ async function D(t, n, a) {
|
|
|
26
26
|
const c = h(n, a), l = await c.declaredSymbols(n, o), r = A(t, n), d = r ? new Set((await c.declaredSymbols(n, r)).map((i) => i.name)) : /* @__PURE__ */ new Set();
|
|
27
27
|
return l.filter((i) => !d.has(i.name)).map((i) => ({ name: i.name, kind: i.kind, file: n }));
|
|
28
28
|
}
|
|
29
|
-
function
|
|
29
|
+
function I(t, n) {
|
|
30
30
|
return g(
|
|
31
31
|
`grep -rlF --include='*.ts' --include='*.tsx' --include='*.js' --include='*.jsx' --include='*.py' --include='*.go' --include='*.rb' --include='*.java' --exclude-dir=node_modules --exclude-dir=dist --exclude-dir=.git --exclude-dir=coverage -- ${u(n)} ${u(t)} 2>/dev/null`,
|
|
32
32
|
{ expectedExitCodes: [1] }
|
|
33
33
|
).split(`
|
|
34
34
|
`).map((e) => e.trim()).filter(Boolean);
|
|
35
35
|
}
|
|
36
|
-
async function
|
|
37
|
-
const e =
|
|
36
|
+
async function T(t, n, a) {
|
|
37
|
+
const e = I(t, n);
|
|
38
38
|
let o = 0;
|
|
39
39
|
for (const c of e) {
|
|
40
40
|
const l = C(t, c);
|
|
@@ -50,7 +50,7 @@ async function I(t, n, a) {
|
|
|
50
50
|
}
|
|
51
51
|
return Math.max(0, o - 1);
|
|
52
52
|
}
|
|
53
|
-
function
|
|
53
|
+
function U(t, n) {
|
|
54
54
|
const a = g(
|
|
55
55
|
`grep -rlF --include='*.md' -- ${u("`" + n + "`")} ${u(t)} 2>/dev/null`,
|
|
56
56
|
{ expectedExitCodes: [1] }
|
|
@@ -68,7 +68,7 @@ function T(t, n) {
|
|
|
68
68
|
}
|
|
69
69
|
return null;
|
|
70
70
|
}
|
|
71
|
-
function
|
|
71
|
+
function W(t, n) {
|
|
72
72
|
return g(
|
|
73
73
|
`grep -rlF --include='*.md' -- ${u("### " + n)} ${u(t)} 2>/dev/null`,
|
|
74
74
|
{ expectedExitCodes: [1] }
|
|
@@ -81,28 +81,28 @@ function U(t, n) {
|
|
|
81
81
|
}
|
|
82
82
|
});
|
|
83
83
|
}
|
|
84
|
-
async function
|
|
84
|
+
async function _(t) {
|
|
85
85
|
const a = j(t, {})._.filter((s) => typeof s == "string" && s !== "yagni"), e = v(a[0] ?? "."), o = y(e, "specs"), c = {
|
|
86
86
|
exact: new F(),
|
|
87
87
|
approximate: new b()
|
|
88
88
|
}, l = B(e), r = [];
|
|
89
89
|
for (const s of l)
|
|
90
|
-
r.push(...await
|
|
90
|
+
r.push(...await H(e, s, c));
|
|
91
91
|
const d = /* @__PURE__ */ new Map();
|
|
92
92
|
for (const s of r)
|
|
93
|
-
d.has(s.name) || d.set(s.name, await
|
|
93
|
+
d.has(s.name) || d.set(s.name, await T(e, s.name, c));
|
|
94
94
|
const i = /* @__PURE__ */ new Map(), p = /* @__PURE__ */ new Set();
|
|
95
95
|
if ($(o))
|
|
96
96
|
for (const s of r) {
|
|
97
97
|
if ((d.get(s.name) ?? 0) >= 2 || i.has(s.name)) continue;
|
|
98
|
-
const f =
|
|
99
|
-
f && (i.set(s.name, f), f.decision &&
|
|
98
|
+
const f = U(o, s.name);
|
|
99
|
+
f && (i.set(s.name, f), f.decision && W(o, f.decision) && p.add(f.decision));
|
|
100
100
|
}
|
|
101
101
|
const x = k(r, d, i, p);
|
|
102
102
|
return S.debug(
|
|
103
103
|
`[YagniCommand#run] ${x.length} finding(s) across ${l.length} file(s)`
|
|
104
|
-
),
|
|
104
|
+
), D(x, l.length);
|
|
105
105
|
}
|
|
106
|
-
const w = await
|
|
106
|
+
const w = await _(process.argv);
|
|
107
107
|
console.log(w.text);
|
|
108
108
|
process.exit(w.exitCode);
|
|
@@ -2,9 +2,9 @@ import u from "node:fs";
|
|
|
2
2
|
import S from "node:os";
|
|
3
3
|
import v from "node:path";
|
|
4
4
|
import { execSync as P } from "node:child_process";
|
|
5
|
-
import { p as d, A as E } from "./index-
|
|
6
|
-
import { g as H, s as t, x as D, p as F } from "./shared-
|
|
7
|
-
import { l as N } from "./services-
|
|
5
|
+
import { p as d, A as E } from "./index-C4JmZLaj.js";
|
|
6
|
+
import { g as H, s as t, x as D, p as F } from "./shared-B3cXL2Np.js";
|
|
7
|
+
import { l as N } from "./services-BYCeGBlO.js";
|
|
8
8
|
class U {
|
|
9
9
|
/** @purpose Configuration with defaults for mode, prompts, timeout. */
|
|
10
10
|
init;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { readdirSync as $, statSync as L, readFileSync as N, rmdirSync as O, unlinkSync as x, mkdirSync as T, writeFileSync as W } from "node:fs";
|
|
2
|
-
import { join as
|
|
2
|
+
import { join as y, sep as K } from "node:path";
|
|
3
3
|
import { fileURLToPath as z } from "node:url";
|
|
4
|
-
import { l as I } from "./services-
|
|
5
|
-
import {
|
|
4
|
+
import { l as I } from "./services-BYCeGBlO.js";
|
|
5
|
+
import { ax as B, aC as b, ay as M, p as j, az as G } from "./shared-B3cXL2Np.js";
|
|
6
6
|
class H {
|
|
7
7
|
/** @purpose List of all synced file entries, sorted lexicographically by skillName then relativePath. */
|
|
8
8
|
entries;
|
|
@@ -49,7 +49,7 @@ function J(t, e) {
|
|
|
49
49
|
const r = $(t).filter((i) => {
|
|
50
50
|
if (i.startsWith(".") || v.has(i)) return !1;
|
|
51
51
|
try {
|
|
52
|
-
return L(
|
|
52
|
+
return L(y(t, i)).isDirectory();
|
|
53
53
|
} catch {
|
|
54
54
|
return !1;
|
|
55
55
|
}
|
|
@@ -62,7 +62,7 @@ Available: ${r.join(", ")}`, n = new Error(c);
|
|
|
62
62
|
}
|
|
63
63
|
const l = /* @__PURE__ */ new Map();
|
|
64
64
|
for (const i of a) {
|
|
65
|
-
const c =
|
|
65
|
+
const c = y(t, i), n = /* @__PURE__ */ new Map();
|
|
66
66
|
P(c, "", void 0, n), l.set(i, n);
|
|
67
67
|
}
|
|
68
68
|
return l;
|
|
@@ -77,7 +77,7 @@ function P(t, e, r, a) {
|
|
|
77
77
|
}
|
|
78
78
|
for (const d of n) {
|
|
79
79
|
if (d.startsWith(".") || v.has(d)) continue;
|
|
80
|
-
const g =
|
|
80
|
+
const g = y(t, d), k = e ? y(e, d) : d;
|
|
81
81
|
let s;
|
|
82
82
|
try {
|
|
83
83
|
s = i(g);
|
|
@@ -86,9 +86,9 @@ function P(t, e, r, a) {
|
|
|
86
86
|
}
|
|
87
87
|
if (s) {
|
|
88
88
|
if (s.isDirectory())
|
|
89
|
-
P(g,
|
|
89
|
+
P(g, k, r, a);
|
|
90
90
|
else if (s.isFile()) {
|
|
91
|
-
const u =
|
|
91
|
+
const u = k.split(K).join("/");
|
|
92
92
|
a.set(u, c(g));
|
|
93
93
|
}
|
|
94
94
|
}
|
|
@@ -97,8 +97,8 @@ function P(t, e, r, a) {
|
|
|
97
97
|
function V(t, e, r, a, l, i, c, n) {
|
|
98
98
|
let d;
|
|
99
99
|
if (a ? M(r, a) ? d = "updated" : d = "unchanged" : d = "added", !i && d !== "unchanged") {
|
|
100
|
-
const g =
|
|
101
|
-
n(
|
|
100
|
+
const g = y(l, e);
|
|
101
|
+
n(y(g, ".."), { recursive: !0 }), c(g, r);
|
|
102
102
|
}
|
|
103
103
|
return {
|
|
104
104
|
skillName: t,
|
|
@@ -118,24 +118,24 @@ function F(t, e) {
|
|
|
118
118
|
}
|
|
119
119
|
for (const l of a) {
|
|
120
120
|
if (l.startsWith(".") || v.has(l)) continue;
|
|
121
|
-
const i =
|
|
121
|
+
const i = y(t, l);
|
|
122
122
|
try {
|
|
123
123
|
const c = e.stat(i);
|
|
124
|
-
c.isDirectory() ? r.push(...F(i, e).map((n) =>
|
|
124
|
+
c.isDirectory() ? r.push(...F(i, e).map((n) => y(l, n))) : c.isFile() && r.push(l);
|
|
125
125
|
} catch {
|
|
126
126
|
}
|
|
127
127
|
}
|
|
128
128
|
return r;
|
|
129
129
|
}
|
|
130
130
|
function X(t, e, r, a) {
|
|
131
|
-
const l =
|
|
131
|
+
const l = y(e, t);
|
|
132
132
|
let i = [];
|
|
133
133
|
try {
|
|
134
134
|
i = F(l, a);
|
|
135
135
|
} catch {
|
|
136
136
|
}
|
|
137
137
|
if (r) {
|
|
138
|
-
const
|
|
138
|
+
const k = [
|
|
139
139
|
{
|
|
140
140
|
skillName: t,
|
|
141
141
|
relativePath: "",
|
|
@@ -145,21 +145,21 @@ function X(t, e, r, a) {
|
|
|
145
145
|
}
|
|
146
146
|
];
|
|
147
147
|
for (const s of i.sort())
|
|
148
|
-
|
|
148
|
+
k.push({
|
|
149
149
|
skillName: t,
|
|
150
150
|
relativePath: s,
|
|
151
151
|
status: "deleted",
|
|
152
152
|
sourceSize: void 0,
|
|
153
153
|
targetSize: void 0
|
|
154
154
|
});
|
|
155
|
-
return
|
|
155
|
+
return k;
|
|
156
156
|
}
|
|
157
157
|
const c = a.unlink ?? (() => {
|
|
158
158
|
}), n = a.rmdir ?? (() => {
|
|
159
159
|
});
|
|
160
160
|
let d = !1, g;
|
|
161
|
-
for (const
|
|
162
|
-
const s =
|
|
161
|
+
for (const k of i) {
|
|
162
|
+
const s = y(l, k);
|
|
163
163
|
try {
|
|
164
164
|
c(s);
|
|
165
165
|
} catch (u) {
|
|
@@ -168,8 +168,8 @@ function X(t, e, r, a) {
|
|
|
168
168
|
}
|
|
169
169
|
try {
|
|
170
170
|
n(l, { recursive: !0 });
|
|
171
|
-
} catch (
|
|
172
|
-
d = !0, g =
|
|
171
|
+
} catch (k) {
|
|
172
|
+
d = !0, g = k.code ?? "UNKNOWN";
|
|
173
173
|
}
|
|
174
174
|
return d ? [
|
|
175
175
|
{
|
|
@@ -196,7 +196,7 @@ function Y(t, e) {
|
|
|
196
196
|
}
|
|
197
197
|
if (!r.isDirectory())
|
|
198
198
|
throw new Error(`[collectAndCompareSkills] sourceDir is not a directory: ${e.sourceDir}`);
|
|
199
|
-
const a =
|
|
199
|
+
const a = y(e.targetDir, "..");
|
|
200
200
|
try {
|
|
201
201
|
if (t.stat(a).isFile())
|
|
202
202
|
throw new Error("[collectAndCompareSkills] .claude exists but is not a directory");
|
|
@@ -219,7 +219,7 @@ function Y(t, e) {
|
|
|
219
219
|
n = t.readdir(e.targetDir).filter((s) => {
|
|
220
220
|
if (s.startsWith(".") || v.has(s)) return !1;
|
|
221
221
|
try {
|
|
222
|
-
return t.stat(
|
|
222
|
+
return t.stat(y(e.targetDir, s)).isDirectory();
|
|
223
223
|
} catch {
|
|
224
224
|
return !1;
|
|
225
225
|
}
|
|
@@ -228,7 +228,7 @@ function Y(t, e) {
|
|
|
228
228
|
}
|
|
229
229
|
const d = [];
|
|
230
230
|
for (const s of [...c.keys()].sort()) {
|
|
231
|
-
const u = c.get(s), o =
|
|
231
|
+
const u = c.get(s), o = y(e.targetDir, s);
|
|
232
232
|
let f = /* @__PURE__ */ new Map();
|
|
233
233
|
P(o, "", t, f);
|
|
234
234
|
for (const [p, D] of [...u.entries()].sort(
|
|
@@ -250,12 +250,12 @@ function Y(t, e) {
|
|
|
250
250
|
}
|
|
251
251
|
n = n.filter((p) => p !== s);
|
|
252
252
|
}
|
|
253
|
-
const g = e.skillNames,
|
|
254
|
-
for (const s of
|
|
253
|
+
const g = e.skillNames, k = g ? n.filter((s) => g.includes(s)) : n;
|
|
254
|
+
for (const s of k.sort())
|
|
255
255
|
d.push(...X(s, e.targetDir, e.dryRun ?? !1, t));
|
|
256
256
|
return new H(d);
|
|
257
257
|
}
|
|
258
|
-
const q = "(would add)", Q = "(would update)", Z = "(would delete)", ee = "(unchanged, skip)", te = "(unchanged)",
|
|
258
|
+
const q = "(would add)", Q = "(would update)", Z = "(would delete)", ee = "(unchanged, skip)", te = "(unchanged)", w = {
|
|
259
259
|
added: 0,
|
|
260
260
|
updated: 1,
|
|
261
261
|
deleted: 2,
|
|
@@ -270,11 +270,11 @@ function re(t, e = {}) {
|
|
|
270
270
|
for (const o of t) {
|
|
271
271
|
let f = a.get(o.skillName);
|
|
272
272
|
f || (f = { entries: [], dominantStatus: "unchanged" }, a.set(o.skillName, f)), f.entries.push(o);
|
|
273
|
-
const p =
|
|
273
|
+
const p = w[o.status], D = w[f.dominantStatus];
|
|
274
274
|
p < D && (f.dominantStatus = o.status);
|
|
275
275
|
}
|
|
276
276
|
const l = [...a.entries()].sort(([o, f], [p, D]) => {
|
|
277
|
-
const h =
|
|
277
|
+
const h = w[f.dominantStatus] - w[D.dominantStatus];
|
|
278
278
|
return h !== 0 ? h : o.localeCompare(p);
|
|
279
279
|
}), c = Math.max(...l.map(([o]) => ` _ ${o}/`.length)) + 4, n = [];
|
|
280
280
|
for (const [o, f] of l) {
|
|
@@ -303,18 +303,18 @@ function re(t, e = {}) {
|
|
|
303
303
|
n.push(h.padEnd(c) + S);
|
|
304
304
|
}
|
|
305
305
|
}
|
|
306
|
-
const d = t.filter((o) => o.status === "added").length, g = t.filter((o) => o.status === "updated").length,
|
|
306
|
+
const d = t.filter((o) => o.status === "added").length, g = t.filter((o) => o.status === "updated").length, k = t.filter((o) => o.status === "unchanged").length, s = t.filter((o) => o.status === "deleted").length, u = t.filter((o) => o.status === "deleteFailed").length;
|
|
307
307
|
if (r)
|
|
308
308
|
n.push("Dry-run: no files written.");
|
|
309
309
|
else {
|
|
310
|
-
let o = `Synced: ${d} added, ${g} updated, ${
|
|
310
|
+
let o = `Synced: ${d} added, ${g} updated, ${k} skipped, ${s} deleted`;
|
|
311
311
|
u > 0 && (o += `, ${u} delete failed`), n.push(o);
|
|
312
312
|
}
|
|
313
313
|
return n;
|
|
314
314
|
}
|
|
315
315
|
function ne(t) {
|
|
316
316
|
try {
|
|
317
|
-
const e =
|
|
317
|
+
const e = y(t, "..", ".."), r = N(y(e, "package.json"), "utf-8");
|
|
318
318
|
return JSON.parse(r).version ?? "0.0.0";
|
|
319
319
|
} catch {
|
|
320
320
|
return "0.0.0";
|
|
@@ -329,7 +329,7 @@ function se(t, e, r, a, l) {
|
|
|
329
329
|
`);
|
|
330
330
|
}
|
|
331
331
|
function A(t, e) {
|
|
332
|
-
const r = N, a = W, l = T, i = L, c = $, n = x, d = O, g = G,
|
|
332
|
+
const r = N, a = W, l = T, i = L, c = $, n = x, d = O, g = G, k = process.stdout, s = process.stderr, u = j(t, {
|
|
333
333
|
dryRun: ["dry-run"]
|
|
334
334
|
}), o = u.dryRun === !0 || u.dryRun === "true", f = u._.filter(
|
|
335
335
|
(_) => typeof _ == "string" && _ !== "sync-skills"
|
|
@@ -337,14 +337,14 @@ function A(t, e) {
|
|
|
337
337
|
if (!D)
|
|
338
338
|
return s.write(`Error: gennady package not found. Install it locally: npm i -D gennady
|
|
339
339
|
`), 1;
|
|
340
|
-
const h = ne(D), S =
|
|
340
|
+
const h = ne(D), S = y(p, ".claude", "skills"), m = {
|
|
341
341
|
sourceDir: D,
|
|
342
342
|
targetDir: S,
|
|
343
343
|
skillNames: f.length > 0 ? f : void 0,
|
|
344
344
|
dryRun: o
|
|
345
345
|
};
|
|
346
346
|
try {
|
|
347
|
-
const
|
|
347
|
+
const E = Y({
|
|
348
348
|
readFile: r,
|
|
349
349
|
writeFile: a,
|
|
350
350
|
mkdir: l,
|
|
@@ -354,13 +354,13 @@ function A(t, e) {
|
|
|
354
354
|
rmdir: d,
|
|
355
355
|
resolvePackageDir: g
|
|
356
356
|
}, m);
|
|
357
|
-
return se(
|
|
357
|
+
return se(E.entries, o, k, p, h), 0;
|
|
358
358
|
} catch (_) {
|
|
359
|
-
const
|
|
360
|
-
if (
|
|
361
|
-
return s.write(`Error: ${
|
|
359
|
+
const E = _;
|
|
360
|
+
if (E.code === R || E.code === C)
|
|
361
|
+
return s.write(`Error: ${E.message}
|
|
362
362
|
`), 1;
|
|
363
|
-
throw
|
|
363
|
+
throw E;
|
|
364
364
|
}
|
|
365
365
|
}
|
|
366
366
|
if (process.argv[1]) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { PassThrough as h0, Stream as ky } from "node:stream";
|
|
2
2
|
import $A, { env as _Q, cwd as kh } from "node:process";
|
|
3
|
-
import { an as jE, at as Ss, l as Ei, av as Wy, aw as Py, ax as $y, ay as tS } from "./services-
|
|
3
|
+
import { an as jE, at as Ss, l as Ei, av as Wy, aw as Py, ax as $y, ay as tS } from "./services-BYCeGBlO.js";
|
|
4
4
|
import AS from "assert";
|
|
5
5
|
import eS from "events";
|
|
6
6
|
import { execFileSync as nS } from "node:child_process";
|
|
@@ -23399,7 +23399,7 @@ if ($A.env.DEV === "true") {
|
|
|
23399
23399
|
import.meta.resolve("react-devtools-core"), l = !0;
|
|
23400
23400
|
} catch {
|
|
23401
23401
|
}
|
|
23402
|
-
l && await import("./devtools-
|
|
23402
|
+
l && await import("./devtools-1JmXJjUG.js");
|
|
23403
23403
|
}
|
|
23404
23404
|
const Ch = (l, u) => {
|
|
23405
23405
|
if (l === u)
|
package/dist/chunks/{run-review-command.logic-CA2Rjymb.js → run-review-command.logic-B9GoCxh-.js}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { p as R, b as y,
|
|
2
|
-
import { a as w } from "./services-
|
|
1
|
+
import { p as R, b as y, aD as _, aE as j, aF as A, aG as x, aH as E, s as u } from "./shared-B3cXL2Np.js";
|
|
2
|
+
import { a as w } from "./services-BYCeGBlO.js";
|
|
3
3
|
function z(t) {
|
|
4
4
|
const e = R(t, {
|
|
5
5
|
branch: ["branch", "b"],
|
|
@@ -48,7 +48,7 @@ function T(t, e) {
|
|
|
48
48
|
vcs: new w({ token: r, baseUrl: n })
|
|
49
49
|
};
|
|
50
50
|
}
|
|
51
|
-
function
|
|
51
|
+
function P(t) {
|
|
52
52
|
return t.map((e) => {
|
|
53
53
|
const r = String(e.id ?? ""), o = e.updated_at ?? e.created_at;
|
|
54
54
|
return {
|
|
@@ -71,7 +71,7 @@ function C(t) {
|
|
|
71
71
|
};
|
|
72
72
|
});
|
|
73
73
|
}
|
|
74
|
-
async function
|
|
74
|
+
async function C(t, e, r, o) {
|
|
75
75
|
let n = null;
|
|
76
76
|
if (t.source === "branch") {
|
|
77
77
|
const c = r?.branch;
|
|
@@ -89,7 +89,7 @@ async function P(t, e, r, o) {
|
|
|
89
89
|
});
|
|
90
90
|
if (!n)
|
|
91
91
|
return null;
|
|
92
|
-
const i = n, s = o ?
|
|
92
|
+
const i = n, s = o ? P(
|
|
93
93
|
await e.vcs.MergeDiscussions.listDraftNotes({
|
|
94
94
|
iid: i.iid,
|
|
95
95
|
project: e.project
|
|
@@ -103,14 +103,14 @@ async function P(t, e, r, o) {
|
|
|
103
103
|
discussions: s
|
|
104
104
|
};
|
|
105
105
|
}
|
|
106
|
-
function
|
|
106
|
+
function k(t) {
|
|
107
107
|
const e = t.split("!");
|
|
108
108
|
if (e.length !== 2)
|
|
109
109
|
return null;
|
|
110
110
|
const r = e[0]?.trim(), o = e[1]?.trim();
|
|
111
111
|
return !r || !o ? null : { project: r, iid: o };
|
|
112
112
|
}
|
|
113
|
-
function
|
|
113
|
+
function B(t) {
|
|
114
114
|
try {
|
|
115
115
|
const e = new URL(t), r = e.pathname.match(/^(?<project>.+?)\/-\/merge_requests\/(?<iid>\d+)\/?$/);
|
|
116
116
|
return r?.groups ? {
|
|
@@ -122,9 +122,9 @@ function k(t) {
|
|
|
122
122
|
return null;
|
|
123
123
|
}
|
|
124
124
|
}
|
|
125
|
-
function
|
|
125
|
+
function G(t) {
|
|
126
126
|
if (t.url) {
|
|
127
|
-
const e =
|
|
127
|
+
const e = B(t.url);
|
|
128
128
|
if (!e)
|
|
129
129
|
throw new Error("Некорректный --url. Ожидается ссылка на GitLab MR.");
|
|
130
130
|
return {
|
|
@@ -135,7 +135,7 @@ function I(t) {
|
|
|
135
135
|
};
|
|
136
136
|
}
|
|
137
137
|
if (typeof t.ref == "string") {
|
|
138
|
-
const e =
|
|
138
|
+
const e = k(t.ref);
|
|
139
139
|
if (!e)
|
|
140
140
|
throw new Error("Некорректный --ref. Ожидается формат <PROJECT>!<IID>.");
|
|
141
141
|
return {
|
|
@@ -158,11 +158,11 @@ function I(t) {
|
|
|
158
158
|
branch: t.branch
|
|
159
159
|
};
|
|
160
160
|
}
|
|
161
|
-
function
|
|
161
|
+
function I(t, e) {
|
|
162
162
|
const r = t.author?.username ?? "";
|
|
163
163
|
return t.system ? "Skip" : t.body?.includes("🤖") ? "AI_Agent" : /group_|bot\d*/.test(r) ? "Skip" : r === e ? "Author" : "Reviewer";
|
|
164
164
|
}
|
|
165
|
-
function
|
|
165
|
+
function M(t) {
|
|
166
166
|
if (!t) return "";
|
|
167
167
|
try {
|
|
168
168
|
const r = new URL(t).pathname.split("/").filter(Boolean);
|
|
@@ -171,7 +171,7 @@ function U(t) {
|
|
|
171
171
|
return "";
|
|
172
172
|
}
|
|
173
173
|
}
|
|
174
|
-
function
|
|
174
|
+
function U(t) {
|
|
175
175
|
if (!t) return "";
|
|
176
176
|
try {
|
|
177
177
|
return new URL(t).host ?? "";
|
|
@@ -179,7 +179,7 @@ function $(t) {
|
|
|
179
179
|
return "";
|
|
180
180
|
}
|
|
181
181
|
}
|
|
182
|
-
function
|
|
182
|
+
function $(t) {
|
|
183
183
|
let e;
|
|
184
184
|
for (const r of t)
|
|
185
185
|
for (const o of r.notes ?? [])
|
|
@@ -190,12 +190,12 @@ function S(t, e) {
|
|
|
190
190
|
return (t.notes ?? []).some((r) => !!r.updated_at && r.updated_at > e);
|
|
191
191
|
}
|
|
192
192
|
function O(t, e, r = !1, o) {
|
|
193
|
-
const n = t.author?.username, i =
|
|
193
|
+
const n = t.author?.username, i = M(t.web_url), s = U(t.web_url), c = $(e), d = e.map((l) => {
|
|
194
194
|
const h = l.notes?.[0];
|
|
195
195
|
if (!h || !r && (l.resolved || h.resolved) || o && !S(l, o))
|
|
196
196
|
return null;
|
|
197
197
|
const f = h.position ?? {}, g = f.new_path ?? f.old_path ?? "unknown", b = String(f.new_line ?? f.old_line ?? 0), m = (l.notes ?? []).map((p) => {
|
|
198
|
-
const v =
|
|
198
|
+
const v = I(p, n);
|
|
199
199
|
return v === "Skip" ? null : {
|
|
200
200
|
tag: v,
|
|
201
201
|
attrs: {
|
|
@@ -249,15 +249,15 @@ function D(t, e, r = !1, o) {
|
|
|
249
249
|
const n = O(t, e, r, o);
|
|
250
250
|
return j(n);
|
|
251
251
|
}
|
|
252
|
-
async function
|
|
252
|
+
async function H() {
|
|
253
253
|
return A("agent-review-verifier.xml");
|
|
254
254
|
}
|
|
255
|
-
async function
|
|
256
|
-
const r = await
|
|
255
|
+
async function X(t, e = process.cwd()) {
|
|
256
|
+
const r = await H(), o = x(e);
|
|
257
257
|
let n = r.replace("<!--Review_Audit_Artifact-->", t);
|
|
258
258
|
return n = n.replace("<!--ai:first-->", E(e)), n = n.replace("<!--ai:verify-axiom-hint-->", o.axiomHint), n = n.replace("<!--ai:verify-tools-example-->", o.toolsExample), n = n.replace("<!--ai:verify-step-commands-->", o.verifyStep), n;
|
|
259
259
|
}
|
|
260
|
-
function
|
|
260
|
+
function q(t, e) {
|
|
261
261
|
if (t.source === "url")
|
|
262
262
|
return t.host;
|
|
263
263
|
if (e?.remote.host)
|
|
@@ -274,7 +274,7 @@ function N(t, e) {
|
|
|
274
274
|
}
|
|
275
275
|
async function J(t) {
|
|
276
276
|
try {
|
|
277
|
-
const e =
|
|
277
|
+
const e = G(t.args);
|
|
278
278
|
let r, o, n, i;
|
|
279
279
|
if (t.vcsContext) {
|
|
280
280
|
if (r = t.vcsContext.host, o = t.vcsContext.project, i = t.vcsContext.branch ? { branch: t.vcsContext.branch, remote: { host: r, project: o, scheme: "https" } } : void 0, !/gitlab/i.test(r))
|
|
@@ -286,8 +286,8 @@ async function J(t) {
|
|
|
286
286
|
vcs: new w({ token: t.vcsContext.token, baseUrl: l })
|
|
287
287
|
};
|
|
288
288
|
} else
|
|
289
|
-
i = e.source !== "url" ? L(t.args.branch) : void 0, r =
|
|
290
|
-
const s = await
|
|
289
|
+
i = e.source !== "url" ? L(t.args.branch) : void 0, r = q(e, i), o = N(e, i), n = T(r, o);
|
|
290
|
+
const s = await C(
|
|
291
291
|
e,
|
|
292
292
|
n,
|
|
293
293
|
i,
|
|
@@ -310,7 +310,7 @@ async function J(t) {
|
|
|
310
310
|
return {
|
|
311
311
|
ok: !0,
|
|
312
312
|
code: 0,
|
|
313
|
-
output: t.mode === "verify" ? await
|
|
313
|
+
output: t.mode === "verify" ? await X(c) : c,
|
|
314
314
|
artifact: {
|
|
315
315
|
mergeRequest: s.mergeRequest,
|
|
316
316
|
discussions: s.discussions,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { s as o } from "./shared-
|
|
1
|
+
import { s as o } from "./shared-B3cXL2Np.js";
|
|
2
2
|
import { existsSync as E, readFileSync as I, unlinkSync as b, readdirSync as T } from "node:fs";
|
|
3
3
|
import { join as v } from "node:path";
|
|
4
4
|
import { homedir as O } from "node:os";
|
|
5
|
-
import { i as $, t as k, e as M, g as N, S as P, R as V, f as B, h as D, j as _, O as C, k as F, m as U, n as j } from "./services-
|
|
5
|
+
import { i as $, t as k, e as M, g as N, S as P, R as V, f as B, h as D, j as _, O as C, k as F, m as U, n as j } from "./services-BYCeGBlO.js";
|
|
6
6
|
function L(e) {
|
|
7
7
|
const n = e.includes("--mocks"), s = e.find(
|
|
8
8
|
(c) => typeof c == "string" && c.startsWith("--port=")
|
|
@@ -29,7 +29,7 @@ import { execFile as or, exec as yf, execFileSync as br, execSync as uh, spawn a
|
|
|
29
29
|
import mf, { existsSync as we, readdirSync as kt, statSync as zt, rmSync as kr, readFileSync as xe, mkdirSync as St, writeFileSync as ft, renameSync as wf, truncateSync as Sf, openSync as hh, writeSync as gh, fsyncSync as fh, closeSync as ph, appendFileSync as Eh, createReadStream as fA, constants as _f, mkdtempSync as Rf } from "node:fs";
|
|
30
30
|
import * as Df from "node:os";
|
|
31
31
|
import { homedir as Ht, tmpdir as Fa } from "node:os";
|
|
32
|
-
import { p as fs, r as Zt, s as Be, A as vf, T as bf, V as Va, c as Pt, f as kf } from "./shared-
|
|
32
|
+
import { p as fs, r as Zt, s as Be, A as vf, T as bf, V as Va, c as Pt, f as kf } from "./shared-B3cXL2Np.js";
|
|
33
33
|
var Nf = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
34
34
|
function Mf(n) {
|
|
35
35
|
return n && n.__esModule && Object.prototype.hasOwnProperty.call(n, "default") ? n.default : n;
|
|
@@ -21568,7 +21568,7 @@ class rg extends eg {
|
|
|
21568
21568
|
* @returns Resolved client with project, iid, and host.
|
|
21569
21569
|
*/
|
|
21570
21570
|
async _resolveClientForMr(e) {
|
|
21571
|
-
const { resolveVcsContext: t } = await import("./shared-
|
|
21571
|
+
const { resolveVcsContext: t } = await import("./shared-B3cXL2Np.js").then((o) => o.aO), { createVcsClient: r } = await import("./shared-B3cXL2Np.js").then((o) => o.aP), s = await t({ url: e });
|
|
21572
21572
|
return {
|
|
21573
21573
|
client: r(s),
|
|
21574
21574
|
project: s.project,
|
|
@@ -21633,7 +21633,7 @@ class rg extends eg {
|
|
|
21633
21633
|
throw m.error("[VcsInboxReal#getMrContext] [idle → failed]", { error: t }), new Error(`[VcsInboxReal] ${t.error}: ${t.detail}`);
|
|
21634
21634
|
m.debug("[VcsInboxReal#getMrContext] [idle → resolving]", { webUrl: e });
|
|
21635
21635
|
try {
|
|
21636
|
-
const { resolveVcsContext: r } = await import("./shared-
|
|
21636
|
+
const { resolveVcsContext: r } = await import("./shared-B3cXL2Np.js").then((d) => d.aO), { createVcsClient: s } = await import("./shared-B3cXL2Np.js").then((d) => d.aP), i = await r({ url: e }), o = s(i), a = i.project, c = String(i.iid), l = await o.MergeRequests.getByIid({
|
|
21637
21637
|
project: a,
|
|
21638
21638
|
iid: c
|
|
21639
21639
|
});
|
|
@@ -21714,7 +21714,7 @@ class rg extends eg {
|
|
|
21714
21714
|
throw m.error("[VcsInboxReal#getDiscussions] [idle → failed]", { error: r }), new Error(`[VcsInboxReal] ${r.error}: ${r.detail}`);
|
|
21715
21715
|
m.debug("[VcsInboxReal#getDiscussions] [idle → requesting]", { webUrl: e, opts: t });
|
|
21716
21716
|
try {
|
|
21717
|
-
const { resolveVcsContext: s } = await import("./shared-
|
|
21717
|
+
const { resolveVcsContext: s } = await import("./shared-B3cXL2Np.js").then((d) => d.aO), { createVcsClient: i } = await import("./shared-B3cXL2Np.js").then((d) => d.aP), o = await s({ url: e }), a = i(o), c = o.project, l = o.iid, u = await a.MergeDiscussions.getAll({
|
|
21718
21718
|
project: c,
|
|
21719
21719
|
iid: l
|
|
21720
21720
|
});
|