@hy-sde-org/dsh-git 0.1.1-rc.2 → 0.1.5-rc.1
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/LICENSE +4 -5
- package/README.md +13 -3
- package/dist/conventional/commit-types-data.d.ts +23 -0
- package/dist/conventional/commit-types-data.d.ts.map +1 -0
- package/dist/conventional/commit-types-data.js +437 -0
- package/dist/conventional/commit-types-data.js.map +1 -0
- package/dist/conventional/commit-types.d.ts +63 -0
- package/dist/conventional/commit-types.d.ts.map +1 -0
- package/dist/conventional/commit-types.js +236 -0
- package/dist/conventional/commit-types.js.map +1 -0
- package/dist/conventional/index.d.ts +19 -0
- package/dist/conventional/index.d.ts.map +1 -0
- package/dist/conventional/index.js +19 -0
- package/dist/conventional/index.js.map +1 -0
- package/dist/conventional/normalization.d.ts +59 -0
- package/dist/conventional/normalization.d.ts.map +1 -0
- package/dist/conventional/normalization.js +355 -0
- package/dist/conventional/normalization.js.map +1 -0
- package/dist/conventional/text.d.ts +20 -0
- package/dist/conventional/text.d.ts.map +1 -0
- package/dist/conventional/text.js +51 -0
- package/dist/conventional/text.js.map +1 -0
- package/dist/conventional/types.d.ts +35 -0
- package/dist/conventional/types.d.ts.map +1 -0
- package/dist/conventional/types.js +8 -0
- package/dist/conventional/types.js.map +1 -0
- package/dist/conventional/validation-data.d.ts +22 -0
- package/dist/conventional/validation-data.d.ts.map +1 -0
- package/dist/conventional/validation-data.js +2543 -0
- package/dist/conventional/validation-data.js.map +1 -0
- package/dist/conventional/validation.d.ts +89 -0
- package/dist/conventional/validation.d.ts.map +1 -0
- package/dist/conventional/validation.js +343 -0
- package/dist/conventional/validation.js.map +1 -0
- package/dist/diff.d.ts +1 -1
- package/dist/diff.d.ts.map +1 -1
- package/dist/diff.js +18 -5
- package/dist/diff.js.map +1 -1
- package/dist/index.d.ts +5 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -1
- package/dist/index.js.map +1 -1
- package/dist/repo-lock.d.ts +26 -0
- package/dist/repo-lock.d.ts.map +1 -0
- package/dist/repo-lock.js +53 -0
- package/dist/repo-lock.js.map +1 -0
- package/dist/service.d.ts +10 -3
- package/dist/service.d.ts.map +1 -1
- package/dist/service.js +27 -14
- package/dist/service.js.map +1 -1
- package/dist/types.d.ts +2 -2
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +1 -1
- package/dist/vcs.d.ts +149 -0
- package/dist/vcs.d.ts.map +1 -0
- package/dist/vcs.js +209 -0
- package/dist/vcs.js.map +1 -0
- package/dist/worktree.d.ts +269 -0
- package/dist/worktree.d.ts.map +1 -0
- package/dist/worktree.js +642 -0
- package/dist/worktree.js.map +1 -0
- package/examples/agent-preset/agent.cordis.yml +1 -1
- package/examples/agent-preset/preset.yml +1 -1
- package/package.json +32 -12
|
@@ -0,0 +1,355 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Conventional-commit message normalization.
|
|
3
|
+
* Direct port of omp's `commit/conventional/normalization.ts`, reduced to the
|
|
4
|
+
* deterministic parts (Unicode normalization, summary verb repair, body
|
|
5
|
+
* cleanup, final formatting) — the token-estimation detail capping uses a
|
|
6
|
+
* configurable budget so it works with or without an LLM pipeline.
|
|
7
|
+
* @module @hy-sde-org/dsh-git/conventional/normalization
|
|
8
|
+
*/
|
|
9
|
+
import { presentToPast, isPastTenseVerb, splitVerbToken, verbStem } from "./validation.js";
|
|
10
|
+
/** llm-git's standard standard limits, in effect when callers pass `undefined`. */
|
|
11
|
+
export const DEFAULT_CONVENTIONAL_CONFIG = {
|
|
12
|
+
summaryGuideline: 50,
|
|
13
|
+
summarySoftLimit: 72,
|
|
14
|
+
summaryHardLimit: 100,
|
|
15
|
+
maxDetailTokens: 3000,
|
|
16
|
+
};
|
|
17
|
+
const PRE_NFKD_REPLACEMENTS = {
|
|
18
|
+
'≠': '!=',
|
|
19
|
+
'½': '1/2',
|
|
20
|
+
'¼': '1/4',
|
|
21
|
+
'¾': '3/4',
|
|
22
|
+
'⅓': '1/3',
|
|
23
|
+
'⅔': '2/3',
|
|
24
|
+
'⅕': '1/5',
|
|
25
|
+
'⅖': '2/5',
|
|
26
|
+
'⅗': '3/5',
|
|
27
|
+
'⅘': '4/5',
|
|
28
|
+
'⅙': '1/6',
|
|
29
|
+
'⅚': '5/6',
|
|
30
|
+
'⅛': '1/8',
|
|
31
|
+
'⅜': '3/8',
|
|
32
|
+
'⅝': '5/8',
|
|
33
|
+
'⅞': '7/8',
|
|
34
|
+
'⁰': '^0',
|
|
35
|
+
'¹': '^1',
|
|
36
|
+
'²': '^2',
|
|
37
|
+
'³': '^3',
|
|
38
|
+
'⁴': '^4',
|
|
39
|
+
'⁵': '^5',
|
|
40
|
+
'⁶': '^6',
|
|
41
|
+
'⁷': '^7',
|
|
42
|
+
'⁸': '^8',
|
|
43
|
+
'⁹': '^9',
|
|
44
|
+
'₀': '_0',
|
|
45
|
+
'₁': '_1',
|
|
46
|
+
'₂': '_2',
|
|
47
|
+
'₃': '_3',
|
|
48
|
+
'₄': '_4',
|
|
49
|
+
'₅': '_5',
|
|
50
|
+
'₆': '_6',
|
|
51
|
+
'₇': '_7',
|
|
52
|
+
'₈': '_8',
|
|
53
|
+
'₉': '_9',
|
|
54
|
+
};
|
|
55
|
+
const POST_NFKD_REPLACEMENTS = {
|
|
56
|
+
'‘': "'",
|
|
57
|
+
'’': "'",
|
|
58
|
+
'‚': "'",
|
|
59
|
+
'‹': "'",
|
|
60
|
+
'›': "'",
|
|
61
|
+
'“': '"',
|
|
62
|
+
'”': '"',
|
|
63
|
+
'„': '"',
|
|
64
|
+
'«': '"',
|
|
65
|
+
'»': '"',
|
|
66
|
+
'‐': '-',
|
|
67
|
+
'‑': '-',
|
|
68
|
+
'‒': '-',
|
|
69
|
+
'–': '--',
|
|
70
|
+
'—': '--',
|
|
71
|
+
'―': '--',
|
|
72
|
+
'−': '-',
|
|
73
|
+
'→': '->',
|
|
74
|
+
'←': '<-',
|
|
75
|
+
'↔': '<->',
|
|
76
|
+
'⇒': '=>',
|
|
77
|
+
'⇐': '<=',
|
|
78
|
+
'⇔': '<=>',
|
|
79
|
+
'↑': '^',
|
|
80
|
+
'↓': 'v',
|
|
81
|
+
'≤': '<=',
|
|
82
|
+
'≥': '>=',
|
|
83
|
+
'≈': '~=',
|
|
84
|
+
'≡': '==',
|
|
85
|
+
'×': 'x',
|
|
86
|
+
'÷': '/',
|
|
87
|
+
'…': '...',
|
|
88
|
+
'⋯': '...',
|
|
89
|
+
'⋮': '...',
|
|
90
|
+
'•': '-',
|
|
91
|
+
'◦': '-',
|
|
92
|
+
'▪': '-',
|
|
93
|
+
'▫': '-',
|
|
94
|
+
'◆': '-',
|
|
95
|
+
'◇': '-',
|
|
96
|
+
'✓': 'v',
|
|
97
|
+
'✔': 'v',
|
|
98
|
+
'✗': 'x',
|
|
99
|
+
'✘': 'x',
|
|
100
|
+
'λ': 'lambda',
|
|
101
|
+
'α': 'alpha',
|
|
102
|
+
'β': 'beta',
|
|
103
|
+
'γ': 'gamma',
|
|
104
|
+
'δ': 'delta',
|
|
105
|
+
'ε': 'epsilon',
|
|
106
|
+
'θ': 'theta',
|
|
107
|
+
'μ': 'mu',
|
|
108
|
+
'π': 'pi',
|
|
109
|
+
'σ': 'sigma',
|
|
110
|
+
'Σ': 'Sigma',
|
|
111
|
+
'Δ': 'Delta',
|
|
112
|
+
'Π': 'Pi',
|
|
113
|
+
'\u00a0': ' ',
|
|
114
|
+
'\u2000': ' ',
|
|
115
|
+
'\u2001': ' ',
|
|
116
|
+
'\u2002': ' ',
|
|
117
|
+
'\u2003': ' ',
|
|
118
|
+
'\u2004': ' ',
|
|
119
|
+
'\u2005': ' ',
|
|
120
|
+
'\u2006': ' ',
|
|
121
|
+
'\u2007': ' ',
|
|
122
|
+
'\u2008': ' ',
|
|
123
|
+
'\u2009': ' ',
|
|
124
|
+
'\u200a': ' ',
|
|
125
|
+
'\u202f': ' ',
|
|
126
|
+
'\u205f': ' ',
|
|
127
|
+
'\u3000': ' ',
|
|
128
|
+
'\u200b': '',
|
|
129
|
+
'\u200c': '',
|
|
130
|
+
'\u200d': '',
|
|
131
|
+
'\ufeff': '',
|
|
132
|
+
};
|
|
133
|
+
/**
|
|
134
|
+
* Normalize Unicode punctuation, symbols, fractions, arrows, and spaces.
|
|
135
|
+
* @param text - raw summary/body text.
|
|
136
|
+
* @returns the cleaned ASCII-oriented text.
|
|
137
|
+
*/
|
|
138
|
+
export function normalizeCommitUnicode(text) {
|
|
139
|
+
return replaceCharacters(replaceCharacters(text, PRE_NFKD_REPLACEMENTS).normalize('NFKD'), POST_NFKD_REPLACEMENTS);
|
|
140
|
+
}
|
|
141
|
+
/**
|
|
142
|
+
* Estimate tokens with llm-git's four-UTF-8-bytes rule.
|
|
143
|
+
* @param text - the string to estimate.
|
|
144
|
+
* @returns the estimated token count.
|
|
145
|
+
*/
|
|
146
|
+
export function estimateCommitTokens(text) {
|
|
147
|
+
return Math.ceil(Buffer.byteLength(text, 'utf8') / 4);
|
|
148
|
+
}
|
|
149
|
+
/**
|
|
150
|
+
* Keep the highest-priority details inside the configured token budget.
|
|
151
|
+
* Priority: security/breaking/perf/bug/API keywords, then by length. MUTATES
|
|
152
|
+
* `details` in place (llm-git `cap_commit_details`).
|
|
153
|
+
* @param details - the details array to cap (mutated in place).
|
|
154
|
+
* @param maxTokens - the token budget to respect.
|
|
155
|
+
*/
|
|
156
|
+
export function capCommitDetails(details, maxTokens) {
|
|
157
|
+
if (details.length === 0)
|
|
158
|
+
return;
|
|
159
|
+
if (details.reduce((total, detail) => total + estimateCommitTokens(detail), 0) <= maxTokens)
|
|
160
|
+
return;
|
|
161
|
+
const scored = details.map((detail, index) => {
|
|
162
|
+
const lower = detail.toLowerCase();
|
|
163
|
+
let score = 0;
|
|
164
|
+
if (lower.includes('security') ||
|
|
165
|
+
lower.includes('vulnerability') ||
|
|
166
|
+
lower.includes('exploit') ||
|
|
167
|
+
lower.includes('critical') ||
|
|
168
|
+
(lower.includes('fix') && lower.includes('crash'))) {
|
|
169
|
+
score += 100;
|
|
170
|
+
}
|
|
171
|
+
if (lower.includes('breaking') || lower.includes('incompatible'))
|
|
172
|
+
score += 90;
|
|
173
|
+
if (lower.includes('performance') || lower.includes('faster') || lower.includes('optimization'))
|
|
174
|
+
score += 80;
|
|
175
|
+
if (lower.includes('fix') || lower.includes('bug'))
|
|
176
|
+
score += 70;
|
|
177
|
+
if (lower.includes('api') || lower.includes('interface') || lower.includes('public'))
|
|
178
|
+
score += 50;
|
|
179
|
+
if (lower.includes('user') || lower.includes('client'))
|
|
180
|
+
score += 40;
|
|
181
|
+
if (lower.includes('deprecated') || lower.includes('removed'))
|
|
182
|
+
score += 35;
|
|
183
|
+
score += Math.min(Math.floor(Buffer.byteLength(detail, 'utf8') / 20), 10);
|
|
184
|
+
return { index, score, tokens: estimateCommitTokens(detail) };
|
|
185
|
+
});
|
|
186
|
+
let budget = Math.max(0, Math.trunc(maxTokens));
|
|
187
|
+
const keep = [];
|
|
188
|
+
for (const item of scored.sort((left, right) => right.score - left.score)) {
|
|
189
|
+
if (item.tokens > budget)
|
|
190
|
+
continue;
|
|
191
|
+
keep.push(item.index);
|
|
192
|
+
budget -= item.tokens;
|
|
193
|
+
}
|
|
194
|
+
keep.sort((left, right) => left - right);
|
|
195
|
+
const retained = keep.map(index => details[index] ?? '');
|
|
196
|
+
details.splice(0, details.length, ...retained);
|
|
197
|
+
}
|
|
198
|
+
/**
|
|
199
|
+
* Convert a known leading present-tense summary verb to past tense.
|
|
200
|
+
* @param summary - the summary line to repair.
|
|
201
|
+
* @param commitType - the commit type (drives `refactor` → `restructured`).
|
|
202
|
+
* @returns the repaired summary (unchanged when no repair applies).
|
|
203
|
+
*/
|
|
204
|
+
export function normalizeSummaryVerb(summary, commitType) {
|
|
205
|
+
const stripped = summary.trim();
|
|
206
|
+
if (!stripped)
|
|
207
|
+
return stripped;
|
|
208
|
+
const parts = stripped.split(/\s+/);
|
|
209
|
+
const firstWord = parts[0] ?? '';
|
|
210
|
+
const rest = parts.slice(1).join(' ');
|
|
211
|
+
const firstLower = firstWord.toLowerCase();
|
|
212
|
+
if (isPastTenseVerb(firstLower)) {
|
|
213
|
+
return commitType === 'refactor' && firstLower === 'refactored' ? joinFirstRest('restructured', rest) : stripped;
|
|
214
|
+
}
|
|
215
|
+
const split = splitVerbToken(firstWord);
|
|
216
|
+
if (!split || verbStem(firstWord) === null)
|
|
217
|
+
return stripped;
|
|
218
|
+
const [rawStem, suffix] = split;
|
|
219
|
+
const stem = rawStem.toLowerCase();
|
|
220
|
+
if (suffix && !suffix.startsWith('-') && !suffix.startsWith('/'))
|
|
221
|
+
return stripped;
|
|
222
|
+
if (stem === 're' && suffix.startsWith('-')) {
|
|
223
|
+
const match = suffix.slice(1).match(/^[A-Za-z]+/);
|
|
224
|
+
if (!match)
|
|
225
|
+
return stripped;
|
|
226
|
+
const inner = match[0].toLowerCase();
|
|
227
|
+
const tail = suffix.slice(1 + match[0].length);
|
|
228
|
+
let innerPast = pastForPresentish(inner);
|
|
229
|
+
if (!innerPast)
|
|
230
|
+
return stripped;
|
|
231
|
+
if (commitType === 'refactor' && innerPast === 'refactored')
|
|
232
|
+
innerPast = 'restructured';
|
|
233
|
+
return joinFirstRest(`re-${innerPast}${tail}`, rest);
|
|
234
|
+
}
|
|
235
|
+
let past = pastForPresentish(stem);
|
|
236
|
+
if (!past)
|
|
237
|
+
return stripped;
|
|
238
|
+
if (commitType === 'refactor' && past === 'refactored')
|
|
239
|
+
past = 'restructured';
|
|
240
|
+
return joinFirstRest(`${past}${suffix}`, rest);
|
|
241
|
+
}
|
|
242
|
+
/**
|
|
243
|
+
* Normalize summary, body, and footers before final validation.
|
|
244
|
+
* @param message - the raw conventional commit to normalize.
|
|
245
|
+
* @param config - optional limits (defaults to {@link DEFAULT_CONVENTIONAL_CONFIG}).
|
|
246
|
+
* @returns the normalized message (summary verb-repaired, body bulleted).
|
|
247
|
+
*/
|
|
248
|
+
export function postProcessCommitMessage(message, config = DEFAULT_CONVENTIONAL_CONFIG) {
|
|
249
|
+
let summary = normalizeCommitUnicode(message.summary);
|
|
250
|
+
summary = summary.replaceAll('\r', ' ').replaceAll('\n', ' ').split(/\s+/).filter(Boolean).join(' ');
|
|
251
|
+
summary = summary
|
|
252
|
+
.trim()
|
|
253
|
+
.replace(/[.;:]+$/g, '')
|
|
254
|
+
.trim();
|
|
255
|
+
summary = lowercaseFirstToken(summary);
|
|
256
|
+
summary = normalizeSummaryVerb(summary, message.type);
|
|
257
|
+
summary = lowercaseFirstToken(summary.trim()).replace(/\.+$/g, '').trim();
|
|
258
|
+
if (Buffer.byteLength(summary, 'utf8') > config.summaryHardLimit) {
|
|
259
|
+
throw new Error(`Summary exceeds ${config.summaryHardLimit} bytes`);
|
|
260
|
+
}
|
|
261
|
+
const body = [];
|
|
262
|
+
for (const raw of message.body) {
|
|
263
|
+
let detail = normalizeCommitUnicode(raw).replaceAll('\r', ' ').replaceAll('\n', ' ');
|
|
264
|
+
detail = detail
|
|
265
|
+
.trim()
|
|
266
|
+
.replace(/^[•\-*+]+/, '')
|
|
267
|
+
.trim()
|
|
268
|
+
.split(/\s+/)
|
|
269
|
+
.filter(Boolean)
|
|
270
|
+
.join(' ');
|
|
271
|
+
detail = detail.replace(/[.;,]+$/g, '').trim();
|
|
272
|
+
if (!detail)
|
|
273
|
+
continue;
|
|
274
|
+
const first = firstCodePoint(detail);
|
|
275
|
+
if (first && first === first.toLowerCase() && first !== first.toUpperCase()) {
|
|
276
|
+
detail = first.toUpperCase() + detail.slice(first.length);
|
|
277
|
+
}
|
|
278
|
+
if (!detail.endsWith('.'))
|
|
279
|
+
detail += '.';
|
|
280
|
+
body.push(detail);
|
|
281
|
+
}
|
|
282
|
+
capCommitDetails(body, config.maxDetailTokens);
|
|
283
|
+
return {
|
|
284
|
+
...message,
|
|
285
|
+
summary,
|
|
286
|
+
body,
|
|
287
|
+
footers: message.footers.map(normalizeCommitUnicode),
|
|
288
|
+
};
|
|
289
|
+
}
|
|
290
|
+
/**
|
|
291
|
+
* Format a normalized conventional commit as Git commit-message text.
|
|
292
|
+
* @param message - the normalized commit.
|
|
293
|
+
* @returns the rendered commit-message body.
|
|
294
|
+
*/
|
|
295
|
+
export function formatConventionalCommit(message) {
|
|
296
|
+
const scope = message.scope ? `(${message.scope})` : '';
|
|
297
|
+
let result = `${message.type}${scope}: ${message.summary}`;
|
|
298
|
+
if (message.body.length > 0)
|
|
299
|
+
result += `\n\n${message.body.map(item => `- ${item}`).join('\n')}`;
|
|
300
|
+
if (message.footers.length > 0)
|
|
301
|
+
result += `\n\n${message.footers.join('\n')}`;
|
|
302
|
+
return result;
|
|
303
|
+
}
|
|
304
|
+
function replaceCharacters(text, replacements) {
|
|
305
|
+
const result = [];
|
|
306
|
+
for (const character of text)
|
|
307
|
+
result.push(replacements[character] ?? character);
|
|
308
|
+
return result.join('');
|
|
309
|
+
}
|
|
310
|
+
function pastForPresentish(stem) {
|
|
311
|
+
const direct = presentToPast(stem);
|
|
312
|
+
if (direct)
|
|
313
|
+
return direct;
|
|
314
|
+
if (stem.endsWith('s')) {
|
|
315
|
+
const singular = presentToPast(stem.slice(0, -1));
|
|
316
|
+
if (singular)
|
|
317
|
+
return singular;
|
|
318
|
+
}
|
|
319
|
+
if (stem.endsWith('es')) {
|
|
320
|
+
const singular = presentToPast(stem.slice(0, -2));
|
|
321
|
+
if (singular)
|
|
322
|
+
return singular;
|
|
323
|
+
}
|
|
324
|
+
if (stem.endsWith('ies'))
|
|
325
|
+
return presentToPast(`${stem.slice(0, -3)}y`) ?? null;
|
|
326
|
+
return null;
|
|
327
|
+
}
|
|
328
|
+
function joinFirstRest(first, rest) {
|
|
329
|
+
return rest ? `${first} ${rest}` : first;
|
|
330
|
+
}
|
|
331
|
+
function lowercaseFirstToken(text) {
|
|
332
|
+
if (!text)
|
|
333
|
+
return text;
|
|
334
|
+
const token = text.split(/\s+/, 1)[0] ?? '';
|
|
335
|
+
let hasLetters = false;
|
|
336
|
+
let allUppercase = true;
|
|
337
|
+
for (const character of token) {
|
|
338
|
+
if (!/\p{L}/u.test(character))
|
|
339
|
+
continue;
|
|
340
|
+
hasLetters = true;
|
|
341
|
+
if (character !== character.toUpperCase())
|
|
342
|
+
allUppercase = false;
|
|
343
|
+
}
|
|
344
|
+
if (hasLetters && allUppercase)
|
|
345
|
+
return text;
|
|
346
|
+
const first = firstCodePoint(text);
|
|
347
|
+
return first && first === first.toUpperCase() && first !== first.toLowerCase()
|
|
348
|
+
? `${first.toLowerCase()}${text.slice(first.length)}`
|
|
349
|
+
: text;
|
|
350
|
+
}
|
|
351
|
+
function firstCodePoint(text) {
|
|
352
|
+
const codePoint = text.codePointAt(0);
|
|
353
|
+
return codePoint === undefined ? '' : String.fromCodePoint(codePoint);
|
|
354
|
+
}
|
|
355
|
+
//# sourceMappingURL=normalization.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"normalization.js","sourceRoot":"","sources":["../../src/conventional/normalization.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAGH,OAAO,EAAE,aAAa,EAAE,eAAe,EAAE,cAAc,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAA;AAU1F,mFAAmF;AACnF,MAAM,CAAC,MAAM,2BAA2B,GAAuB;IAC7D,gBAAgB,EAAE,EAAE;IACpB,gBAAgB,EAAE,EAAE;IACpB,gBAAgB,EAAE,GAAG;IACrB,eAAe,EAAE,IAAI;CACtB,CAAA;AAED,MAAM,qBAAqB,GAA2B;IACpD,GAAG,EAAE,IAAI;IACT,GAAG,EAAE,KAAK;IACV,GAAG,EAAE,KAAK;IACV,GAAG,EAAE,KAAK;IACV,GAAG,EAAE,KAAK;IACV,GAAG,EAAE,KAAK;IACV,GAAG,EAAE,KAAK;IACV,GAAG,EAAE,KAAK;IACV,GAAG,EAAE,KAAK;IACV,GAAG,EAAE,KAAK;IACV,GAAG,EAAE,KAAK;IACV,GAAG,EAAE,KAAK;IACV,GAAG,EAAE,KAAK;IACV,GAAG,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,SAAS,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,aAAa,CAAC,SAAS,CAAC,CAAA;AACvE,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Unicode scalar helpers.
|
|
3
|
+
* Direct port of omp's `commit/conventional/text.ts`.
|
|
4
|
+
* @module @hy-sde-org/dsh-git/conventional/text
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* Count Unicode scalar values, matching Python string length semantics.
|
|
8
|
+
* @param text - the string to measure.
|
|
9
|
+
* @returns the number of Unicode scalar values (not UTF-16 code units).
|
|
10
|
+
*/
|
|
11
|
+
export declare function codePointLength(text: string): number;
|
|
12
|
+
/**
|
|
13
|
+
* Slice by Unicode scalar offsets rather than UTF-16 code units.
|
|
14
|
+
* @param text - the string to slice.
|
|
15
|
+
* @param start - inclusive scalar offset.
|
|
16
|
+
* @param end - exclusive scalar offset (default: to end of string).
|
|
17
|
+
* @returns the sliced substring.
|
|
18
|
+
*/
|
|
19
|
+
export declare function sliceCodePoints(text: string, start: number, end?: number): string;
|
|
20
|
+
//# sourceMappingURL=text.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"text.d.ts","sourceRoot":"","sources":["../../src/conventional/text.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAQpD;AAED;;;;;;GAMG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,CAAC,EAAE,MAAM,GAAG,MAAM,CAmBjF"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Unicode scalar helpers.
|
|
3
|
+
* Direct port of omp's `commit/conventional/text.ts`.
|
|
4
|
+
* @module @hy-sde-org/dsh-git/conventional/text
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* Count Unicode scalar values, matching Python string length semantics.
|
|
8
|
+
* @param text - the string to measure.
|
|
9
|
+
* @returns the number of Unicode scalar values (not UTF-16 code units).
|
|
10
|
+
*/
|
|
11
|
+
export function codePointLength(text) {
|
|
12
|
+
let length = 0;
|
|
13
|
+
for (let index = 0; index < text.length; length += 1) {
|
|
14
|
+
const codePoint = text.codePointAt(index);
|
|
15
|
+
if (codePoint === undefined)
|
|
16
|
+
break;
|
|
17
|
+
index += codePoint > 0xffff ? 2 : 1;
|
|
18
|
+
}
|
|
19
|
+
return length;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Slice by Unicode scalar offsets rather than UTF-16 code units.
|
|
23
|
+
* @param text - the string to slice.
|
|
24
|
+
* @param start - inclusive scalar offset.
|
|
25
|
+
* @param end - exclusive scalar offset (default: to end of string).
|
|
26
|
+
* @returns the sliced substring.
|
|
27
|
+
*/
|
|
28
|
+
export function sliceCodePoints(text, start, end) {
|
|
29
|
+
const normalizedStart = Math.max(0, Math.trunc(start));
|
|
30
|
+
const normalizedEnd = end === undefined ? Number.POSITIVE_INFINITY : Math.max(normalizedStart, Math.trunc(end));
|
|
31
|
+
let ordinal = 0;
|
|
32
|
+
let startOffset = text.length;
|
|
33
|
+
let endOffset = text.length;
|
|
34
|
+
for (let index = 0; index < text.length;) {
|
|
35
|
+
if (ordinal === normalizedStart)
|
|
36
|
+
startOffset = index;
|
|
37
|
+
if (ordinal === normalizedEnd) {
|
|
38
|
+
endOffset = index;
|
|
39
|
+
break;
|
|
40
|
+
}
|
|
41
|
+
const codePoint = text.codePointAt(index);
|
|
42
|
+
if (codePoint === undefined)
|
|
43
|
+
break;
|
|
44
|
+
index += codePoint > 0xffff ? 2 : 1;
|
|
45
|
+
ordinal += 1;
|
|
46
|
+
}
|
|
47
|
+
if (normalizedStart === ordinal)
|
|
48
|
+
startOffset = text.length;
|
|
49
|
+
return text.slice(startOffset, endOffset);
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AG,KAAK,CAAA;QACpD,IAAI,OAAO,KAAK,aAAa,EAAE,CAAC;YAC9B,SAAS,GAAG,KAAK,CAAA;YACjB,MAAK;QACP,CAAC;QACD,MAAM,SAAS,GAAG,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,CAAA;QACzC,IAAI,SAAS,KAAK,SAAS;YAAE,MAAK;QAClC,KAAK,IAAI,SAAS,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;QACnC,OAAO,IAAI,CAAC,CAAA;IACd,CAAC;IACD,IAAI,eAAe,KAAK,OAAO;QAAE,WAAW,GAAG,IAAI,CAAC,MAAM,CAAA;IAC1D,OAAO,IAAI,CAAC,KAAK,CAAC,WAAW,EAAE,SAAS,CAAC,CAAA;AAC3C,CAAC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Conventional-commit domain types for the `conventional/` module.
|
|
3
|
+
* Ported from omp's `packages/coding-agent/src/commit/types.ts` (the shapes
|
|
4
|
+
* the unified `conventional/` service operates on).
|
|
5
|
+
* @module @hy-sde-org/dsh-git/conventional/types
|
|
6
|
+
*/
|
|
7
|
+
/** Conventional-commit type vocabulary (llm-git canonical, 22 entries). */
|
|
8
|
+
export type CommitType = 'feat' | 'fix' | 'refactor' | 'docs' | 'test' | 'chore' | 'style' | 'perf' | 'build' | 'ci' | 'revert' | 'deps' | 'security' | 'config' | 'ux' | 'release' | 'hotfix' | 'infra' | 'init' | 'merge' | 'hack' | 'wip';
|
|
9
|
+
/** Changelog categories. */
|
|
10
|
+
export type ChangelogCategory = 'Breaking Changes' | 'Added' | 'Changed' | 'Deprecated' | 'Removed' | 'Fixed' | 'Security';
|
|
11
|
+
/** One conventional-commit type list entry. */
|
|
12
|
+
export interface ConventionalDetail {
|
|
13
|
+
text: string;
|
|
14
|
+
/** Optional changelog category (kept for shape parity with omp). */
|
|
15
|
+
changelogCategory?: string;
|
|
16
|
+
/** Whether this line is user-visible. */
|
|
17
|
+
userVisible: boolean;
|
|
18
|
+
}
|
|
19
|
+
/** Parsed conventional analysis for one commit. */
|
|
20
|
+
export interface ConventionalAnalysis {
|
|
21
|
+
type: CommitType;
|
|
22
|
+
scope: string | null;
|
|
23
|
+
summary?: string;
|
|
24
|
+
details: ConventionalDetail[];
|
|
25
|
+
issueRefs: string[];
|
|
26
|
+
}
|
|
27
|
+
/** A ready-to-commit conventional message. */
|
|
28
|
+
export interface ConventionalCommit {
|
|
29
|
+
type: CommitType;
|
|
30
|
+
scope: string | null;
|
|
31
|
+
summary: string;
|
|
32
|
+
body: string[];
|
|
33
|
+
footers: string[];
|
|
34
|
+
}
|
|
35
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/conventional/types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,2EAA2E;AAC3E,MAAM,MAAM,UAAU,GAClB,MAAM,GACN,KAAK,GACL,UAAU,GACV,MAAM,GACN,MAAM,GACN,OAAO,GACP,OAAO,GACP,MAAM,GACN,OAAO,GACP,IAAI,GACJ,QAAQ,GACR,MAAM,GACN,UAAU,GACV,QAAQ,GACR,IAAI,GACJ,SAAS,GACT,QAAQ,GACR,OAAO,GACP,MAAM,GACN,OAAO,GACP,MAAM,GACN,KAAK,CAAA;AAET,4BAA4B;AAC5B,MAAM,MAAM,iBAAiB,GACzB,kBAAkB,GAClB,OAAO,GACP,SAAS,GACT,YAAY,GACZ,SAAS,GACT,OAAO,GACP,UAAU,CAAA;AAEd,+CAA+C;AAC/C,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,MAAM,CAAA;IACZ,oEAAoE;IACpE,iBAAiB,CAAC,EAAE,MAAM,CAAA;IAC1B,yCAAyC;IACzC,WAAW,EAAE,OAAO,CAAA;CACrB;AAED,mDAAmD;AACnD,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,UAAU,CAAA;IAChB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAA;IACpB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,OAAO,EAAE,kBAAkB,EAAE,CAAA;IAC7B,SAAS,EAAE,MAAM,EAAE,CAAA;CACpB;AAED,8CAA8C;AAC9C,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,UAAU,CAAA;IAChB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAA;IACpB,OAAO,EAAE,MAAM,CAAA;IACf,IAAI,EAAE,MAAM,EAAE,CAAA;IACd,OAAO,EAAE,MAAM,EAAE,CAAA;CAClB"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Conventional-commit domain types for the `conventional/` module.
|
|
3
|
+
* Ported from omp's `packages/coding-agent/src/commit/types.ts` (the shapes
|
|
4
|
+
* the unified `conventional/` service operates on).
|
|
5
|
+
* @module @hy-sde-org/dsh-git/conventional/types
|
|
6
|
+
*/
|
|
7
|
+
export {};
|
|
8
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/conventional/types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Conventional-commit validation lookup tables.
|
|
3
|
+
* Ported verbatim from omp's `commit/conventional/resources/validation_data.json`
|
|
4
|
+
* (source comment: "Single source of truth for src/validation.rs lookup tables.
|
|
5
|
+
* Keep verbs lowercase; past_tense values must be genuine single-token past forms.").
|
|
6
|
+
* @module @hy-sde-org/dsh-git/conventional/validation-data
|
|
7
|
+
*/
|
|
8
|
+
/** Shape of the verbatim `validation_data.json` resource. */
|
|
9
|
+
export interface ValidationResource {
|
|
10
|
+
past_tense: Array<[string, string]>;
|
|
11
|
+
irregular_past: string[];
|
|
12
|
+
ed_blocklist: string[];
|
|
13
|
+
d_blocklist: string[];
|
|
14
|
+
code_extensions: string[];
|
|
15
|
+
doc_extensions: string[];
|
|
16
|
+
filler_words: string[];
|
|
17
|
+
meta_phrases: string[];
|
|
18
|
+
body_present_tense: string[];
|
|
19
|
+
}
|
|
20
|
+
/** Verbatim llm-git validation lookup tables (verb tense, extensions, filters). */
|
|
21
|
+
export declare const VALIDATION_RESOURCE: ValidationResource;
|
|
22
|
+
//# sourceMappingURL=validation-data.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validation-data.d.ts","sourceRoot":"","sources":["../../src/conventional/validation-data.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,6DAA6D;AAC7D,MAAM,WAAW,kBAAkB;IACjC,UAAU,EAAE,KAAK,CAAC,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAA;IACnC,cAAc,EAAE,MAAM,EAAE,CAAA;IACxB,YAAY,EAAE,MAAM,EAAE,CAAA;IACtB,WAAW,EAAE,MAAM,EAAE,CAAA;IACrB,eAAe,EAAE,MAAM,EAAE,CAAA;IACzB,cAAc,EAAE,MAAM,EAAE,CAAA;IACxB,YAAY,EAAE,MAAM,EAAE,CAAA;IACtB,YAAY,EAAE,MAAM,EAAE,CAAA;IACtB,kBAAkB,EAAE,MAAM,EAAE,CAAA;CAC7B;AAED,mFAAmF;AACnF,eAAO,MAAM,mBAAmB,EAAE,kBAu+E/B,CAAA"}
|