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,265 +0,0 @@
|
|
|
1
|
-
import { p as D, a1 as o, aA as M, b as H, aB as B, aC as U, aD as O, aE as k, s as C } from "./shared-DSZTUx5b.js";
|
|
2
|
-
import a from "node:fs";
|
|
3
|
-
import F from "node:path";
|
|
4
|
-
function P(e) {
|
|
5
|
-
const t = D(e, {
|
|
6
|
-
branch: ["branch", "b"],
|
|
7
|
-
incoming: ["incoming"]
|
|
8
|
-
});
|
|
9
|
-
return {
|
|
10
|
-
branch: t.branch,
|
|
11
|
-
incoming: t.incoming
|
|
12
|
-
};
|
|
13
|
-
}
|
|
14
|
-
const h = {
|
|
15
|
-
DD: "both-deleted",
|
|
16
|
-
AU: "added-by-current",
|
|
17
|
-
UD: "deleted-by-current",
|
|
18
|
-
UA: "added-by-incoming",
|
|
19
|
-
DU: "deleted-by-incoming",
|
|
20
|
-
AA: "both-added",
|
|
21
|
-
UU: "both-modified"
|
|
22
|
-
}, N = new Set(Object.keys(h));
|
|
23
|
-
function d(e) {
|
|
24
|
-
const t = Number.parseInt(e.trim(), 10);
|
|
25
|
-
return Number.isFinite(t) ? t : 0;
|
|
26
|
-
}
|
|
27
|
-
function p(e) {
|
|
28
|
-
return e.trim().replace(/^refs\/heads\//, "").replace(/^remotes\//, "").replace(/^origin\//, "").replace(/\^0$/, "");
|
|
29
|
-
}
|
|
30
|
-
function y(e) {
|
|
31
|
-
return o(`git rev-parse --git-path ${e} 2>/dev/null`).trim();
|
|
32
|
-
}
|
|
33
|
-
function x(e) {
|
|
34
|
-
const t = y(e);
|
|
35
|
-
if (!t)
|
|
36
|
-
return "";
|
|
37
|
-
try {
|
|
38
|
-
return a.existsSync(t) ? a.readFileSync(t, "utf-8") : "";
|
|
39
|
-
} catch {
|
|
40
|
-
return "";
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
function T(e) {
|
|
44
|
-
const t = e.split(`
|
|
45
|
-
`).map((i) => i.trim()).find(Boolean);
|
|
46
|
-
if (!t)
|
|
47
|
-
return null;
|
|
48
|
-
const n = [
|
|
49
|
-
/Merge (?:remote-tracking )?branch '([^']+)'(?: into .+)?/i,
|
|
50
|
-
/Merge branch '([^']+)' of [^\s]+/i,
|
|
51
|
-
/Merge pull request #\d+ from [^/]+\/([^\s]+)/i
|
|
52
|
-
];
|
|
53
|
-
for (const i of n) {
|
|
54
|
-
const r = t.match(i);
|
|
55
|
-
if (r?.[1])
|
|
56
|
-
return p(r[1]);
|
|
57
|
-
}
|
|
58
|
-
return null;
|
|
59
|
-
}
|
|
60
|
-
function $(e) {
|
|
61
|
-
const t = o(`git name-rev --name-only ${e} 2>/dev/null`).trim();
|
|
62
|
-
return !t || t === "undefined" ? null : p(t) || null;
|
|
63
|
-
}
|
|
64
|
-
function I(e) {
|
|
65
|
-
if (e.startsWith('"') && e.endsWith('"'))
|
|
66
|
-
try {
|
|
67
|
-
return JSON.parse(e);
|
|
68
|
-
} catch {
|
|
69
|
-
return e.slice(1, -1);
|
|
70
|
-
}
|
|
71
|
-
const t = e.lastIndexOf(" -> ");
|
|
72
|
-
return t > 0 ? e.slice(t + 4) : e;
|
|
73
|
-
}
|
|
74
|
-
function X(e) {
|
|
75
|
-
const t = /* @__PURE__ */ new Map();
|
|
76
|
-
for (const n of e.split(`
|
|
77
|
-
`)) {
|
|
78
|
-
const i = n.trimEnd();
|
|
79
|
-
if (i.length < 4)
|
|
80
|
-
continue;
|
|
81
|
-
const r = i.slice(0, 2);
|
|
82
|
-
if (!N.has(r))
|
|
83
|
-
continue;
|
|
84
|
-
const c = I(i.slice(3).trim());
|
|
85
|
-
c && t.set(c, r);
|
|
86
|
-
}
|
|
87
|
-
return t;
|
|
88
|
-
}
|
|
89
|
-
function z(e, t) {
|
|
90
|
-
const n = F.join(process.cwd(), e), i = h[t] ?? "unknown";
|
|
91
|
-
try {
|
|
92
|
-
if (!a.statSync(n).isFile())
|
|
93
|
-
return {
|
|
94
|
-
path: e,
|
|
95
|
-
status: t,
|
|
96
|
-
kind: i,
|
|
97
|
-
exists: !1,
|
|
98
|
-
binary: !1,
|
|
99
|
-
conflictRegions: 0
|
|
100
|
-
};
|
|
101
|
-
const c = a.readFileSync(n), l = c.includes(0), m = l ? 0 : (c.toString("utf-8").match(/^<{7}(?: .+)?$/gm) ?? []).length;
|
|
102
|
-
return {
|
|
103
|
-
path: e,
|
|
104
|
-
status: t,
|
|
105
|
-
kind: i,
|
|
106
|
-
exists: !0,
|
|
107
|
-
binary: l,
|
|
108
|
-
conflictRegions: m
|
|
109
|
-
};
|
|
110
|
-
} catch {
|
|
111
|
-
return {
|
|
112
|
-
path: e,
|
|
113
|
-
status: t,
|
|
114
|
-
kind: i,
|
|
115
|
-
exists: !1,
|
|
116
|
-
binary: !1,
|
|
117
|
-
conflictRegions: 0
|
|
118
|
-
};
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
function G(e) {
|
|
122
|
-
if (!o("git rev-parse --git-dir 2>/dev/null").trim())
|
|
123
|
-
throw new Error("Текущая директория не является git-репозиторием.");
|
|
124
|
-
const n = y("MERGE_HEAD");
|
|
125
|
-
if (!n || !a.existsSync(n))
|
|
126
|
-
throw new Error(
|
|
127
|
-
"Нет активного merge (MERGE_HEAD не найден). Сначала запустите `git merge <branch>` и получите конфликты."
|
|
128
|
-
);
|
|
129
|
-
const i = a.readFileSync(n, "utf-8").split(`
|
|
130
|
-
`).map((s) => s.trim()).filter(Boolean);
|
|
131
|
-
if (i.length === 0)
|
|
132
|
-
throw new Error("Файл MERGE_HEAD пуст. Повторите merge и попробуйте снова.");
|
|
133
|
-
if (i.length > 1)
|
|
134
|
-
throw new Error(
|
|
135
|
-
"Обнаружен octopus merge (несколько MERGE_HEAD). Команда поддерживает только merge одной ветки."
|
|
136
|
-
);
|
|
137
|
-
const r = i[0];
|
|
138
|
-
if (!r)
|
|
139
|
-
throw new Error("Не удалось определить incoming commit из MERGE_HEAD.");
|
|
140
|
-
const c = o("git rev-parse HEAD 2>/dev/null").trim();
|
|
141
|
-
if (!c)
|
|
142
|
-
throw new Error("Не удалось определить текущий HEAD.");
|
|
143
|
-
const l = o(`git merge-base HEAD ${r} 2>/dev/null`).trim();
|
|
144
|
-
if (!l)
|
|
145
|
-
throw new Error("Не удалось определить merge-base между HEAD и MERGE_HEAD.");
|
|
146
|
-
const m = o("git diff --name-only --diff-filter=U 2>/dev/null").split(`
|
|
147
|
-
`).map((s) => s.trim()).filter(Boolean);
|
|
148
|
-
if (m.length === 0)
|
|
149
|
-
throw new Error("Конфликтующие файлы не найдены (`git diff --diff-filter=U` пуст).");
|
|
150
|
-
const E = o("git status --porcelain --untracked-files=no 2>/dev/null"), b = X(E), g = x("MERGE_MSG").trim(), v = e.incoming?.trim() || T(g) || $(r) || r, w = e.branch?.trim() || M(), A = H(), _ = d(
|
|
151
|
-
o(`git rev-list --count ${r}..HEAD 2>/dev/null`)
|
|
152
|
-
), S = d(
|
|
153
|
-
o(`git rev-list --count HEAD..${r} 2>/dev/null`)
|
|
154
|
-
), R = m.map(
|
|
155
|
-
(s) => z(s, b.get(s) ?? "UU")
|
|
156
|
-
);
|
|
157
|
-
return {
|
|
158
|
-
currentBranch: w,
|
|
159
|
-
incomingBranch: v,
|
|
160
|
-
currentHead: c,
|
|
161
|
-
incomingHead: r,
|
|
162
|
-
mergeBase: l,
|
|
163
|
-
mergeMessage: g,
|
|
164
|
-
currentOnlyCommits: _,
|
|
165
|
-
incomingOnlyCommits: S,
|
|
166
|
-
remote: A,
|
|
167
|
-
conflictFiles: R
|
|
168
|
-
};
|
|
169
|
-
}
|
|
170
|
-
function u(e) {
|
|
171
|
-
return e ? e.slice(0, 12) : "";
|
|
172
|
-
}
|
|
173
|
-
function j(e) {
|
|
174
|
-
const t = e.conflictFiles.map(
|
|
175
|
-
(n) => ({
|
|
176
|
-
tag: "File",
|
|
177
|
-
attrs: {
|
|
178
|
-
path: n.path,
|
|
179
|
-
status: n.status,
|
|
180
|
-
kind: n.kind,
|
|
181
|
-
conflictRegions: String(n.conflictRegions),
|
|
182
|
-
binary: n.binary ? "true" : "false",
|
|
183
|
-
exists: n.exists ? "true" : "false"
|
|
184
|
-
}
|
|
185
|
-
})
|
|
186
|
-
);
|
|
187
|
-
return {
|
|
188
|
-
tag: "Merge_Conflict_Context",
|
|
189
|
-
attrs: {
|
|
190
|
-
host: e.remote?.host ?? "",
|
|
191
|
-
target_repo: e.remote?.project ?? "",
|
|
192
|
-
current_branch: e.currentBranch,
|
|
193
|
-
incoming_branch: e.incomingBranch,
|
|
194
|
-
current_head: u(e.currentHead),
|
|
195
|
-
incoming_head: u(e.incomingHead),
|
|
196
|
-
merge_base: u(e.mergeBase)
|
|
197
|
-
},
|
|
198
|
-
children: [
|
|
199
|
-
{
|
|
200
|
-
tag: "Meta",
|
|
201
|
-
children: [
|
|
202
|
-
{
|
|
203
|
-
tag: "Task_Objective",
|
|
204
|
-
children: "Resolve merge conflicts with intent preservation and confidence-aware decision mode."
|
|
205
|
-
},
|
|
206
|
-
{
|
|
207
|
-
tag: "Merge_Message",
|
|
208
|
-
children: { cdata: e.mergeMessage || "" }
|
|
209
|
-
},
|
|
210
|
-
{
|
|
211
|
-
tag: "Divergence",
|
|
212
|
-
attrs: {
|
|
213
|
-
currentOnlyCommits: String(e.currentOnlyCommits),
|
|
214
|
-
incomingOnlyCommits: String(e.incomingOnlyCommits)
|
|
215
|
-
}
|
|
216
|
-
}
|
|
217
|
-
]
|
|
218
|
-
},
|
|
219
|
-
{
|
|
220
|
-
tag: "Conflict_Files",
|
|
221
|
-
attrs: {
|
|
222
|
-
count: String(e.conflictFiles.length)
|
|
223
|
-
},
|
|
224
|
-
children: t
|
|
225
|
-
}
|
|
226
|
-
]
|
|
227
|
-
};
|
|
228
|
-
}
|
|
229
|
-
function L(e) {
|
|
230
|
-
const t = j(e);
|
|
231
|
-
return B(t);
|
|
232
|
-
}
|
|
233
|
-
async function K() {
|
|
234
|
-
return U("agent-resolve-conflicts.xml");
|
|
235
|
-
}
|
|
236
|
-
async function W(e, t = process.cwd()) {
|
|
237
|
-
const n = await K(), i = O(t);
|
|
238
|
-
let r = n.replace("<!--Resolve_Conflicts_Artifact-->", e);
|
|
239
|
-
return r = r.replace("<!--ai:first-->", k(t)), r = r.replace("<!--ai:verify-axiom-hint-->", i.axiomHint), r = r.replace("<!--ai:verify-tools-example-->", i.toolsExample), r = r.replace("<!--ai:verify-step-commands-->", i.verifyStep), r;
|
|
240
|
-
}
|
|
241
|
-
async function q(e) {
|
|
242
|
-
try {
|
|
243
|
-
const t = G(e), n = L(
|
|
244
|
-
t
|
|
245
|
-
);
|
|
246
|
-
return {
|
|
247
|
-
ok: !0,
|
|
248
|
-
code: 0,
|
|
249
|
-
output: await W(n),
|
|
250
|
-
artifact: {
|
|
251
|
-
resolveConflictsContextGit: t,
|
|
252
|
-
resolveConflictsArtifactXml: n
|
|
253
|
-
}
|
|
254
|
-
};
|
|
255
|
-
} catch (t) {
|
|
256
|
-
const n = t.message ?? String(t);
|
|
257
|
-
return console.error(C.redBright.bold("✖ Ошибка:"), n), {
|
|
258
|
-
ok: !1,
|
|
259
|
-
code: 1
|
|
260
|
-
};
|
|
261
|
-
}
|
|
262
|
-
}
|
|
263
|
-
const J = P(process.argv), f = await q(J);
|
|
264
|
-
f.output && console.info(f.output);
|
|
265
|
-
process.exit(f.code);
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import { parseArgs as g } from "node:util";
|
|
2
|
-
import { l as d, ac as l, ad as p } from "./services-Csd556Tv.js";
|
|
3
|
-
function f(i) {
|
|
4
|
-
const { positionals: e, values: n } = g({
|
|
5
|
-
args: i.slice(3),
|
|
6
|
-
options: {
|
|
7
|
-
dir: { type: "string", multiple: !0 },
|
|
8
|
-
model: { type: "string" },
|
|
9
|
-
engine: { type: "string" },
|
|
10
|
-
timeout: { type: "string" }
|
|
11
|
-
},
|
|
12
|
-
allowPositionals: !0,
|
|
13
|
-
strict: !1
|
|
14
|
-
}), s = e[0] ?? "", t = n.dir, m = t && t.length > 0 ? t : void 0, u = n.model, c = n.engine, o = n.timeout;
|
|
15
|
-
let a;
|
|
16
|
-
if (o !== void 0) {
|
|
17
|
-
const r = Number(o);
|
|
18
|
-
(!Number.isFinite(r) || r <= 0) && (process.stderr.write(
|
|
19
|
-
`✗ --timeout must be a positive number of milliseconds, got: ${o}
|
|
20
|
-
`
|
|
21
|
-
), process.exit(1)), a = r;
|
|
22
|
-
}
|
|
23
|
-
return { task: s, dirs: m, model: u, engine: c, timeout: a };
|
|
24
|
-
}
|
|
25
|
-
async function v(i) {
|
|
26
|
-
d.debug("[RunCommand#runCommand] [idle → parsing]");
|
|
27
|
-
const e = f(i);
|
|
28
|
-
e.task || (process.stderr.write(
|
|
29
|
-
`Usage: gennady run "<task>" [--dir <dir>]... [--model <model>] [--engine <engine>] [--timeout <ms>]
|
|
30
|
-
`
|
|
31
|
-
), process.exit(1));
|
|
32
|
-
const n = {
|
|
33
|
-
task: e.task,
|
|
34
|
-
...e.dirs !== void 0 && { dirs: e.dirs },
|
|
35
|
-
...e.model !== void 0 && { model: e.model },
|
|
36
|
-
...e.engine !== void 0 && { engine: e.engine },
|
|
37
|
-
...e.timeout !== void 0 && { timeout: e.timeout }
|
|
38
|
-
};
|
|
39
|
-
let s = 1;
|
|
40
|
-
try {
|
|
41
|
-
d.debug("[RunCommand#runCommand] [parsing → running]");
|
|
42
|
-
const t = await l(n);
|
|
43
|
-
d.debug(`[RunCommand#runCommand] [running → done] engine=${t.engine}`), process.stdout.write(t.text + `
|
|
44
|
-
`), s = 0;
|
|
45
|
-
} catch (t) {
|
|
46
|
-
t instanceof p ? process.stderr.write(`✗ ${t.hint} [${t.code}]
|
|
47
|
-
`) : process.stderr.write(`✗ Unexpected error: ${String(t)}
|
|
48
|
-
`);
|
|
49
|
-
}
|
|
50
|
-
process.exit(s);
|
|
51
|
-
}
|
|
52
|
-
await v(process.argv);
|