viberadar 0.3.205 → 0.3.206
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/dist/server/index.d.ts.map +1 -1
- package/dist/server/index.js +19 -15
- package/dist/server/index.js.map +1 -1
- package/dist/ui/dashboard.html +73 -95
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/server/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAO7B,OAAO,EAAE,UAAU,EAA4H,MAAM,YAAY,CAAC;AAOlK,UAAU,aAAa;IACrB,IAAI,EAAE,UAAU,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,IAAI,CAAC,MAAM,CAAC;CACrB;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/server/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAO7B,OAAO,EAAE,UAAU,EAA4H,MAAM,YAAY,CAAC;AAOlK,UAAU,aAAa;IACrB,IAAI,EAAE,UAAU,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,IAAI,CAAC,MAAM,CAAC;CACrB;AAquED,wBAAgB,WAAW,CAAC,EAAE,IAAI,EAAE,WAAW,EAAE,IAAI,EAAE,WAAW,EAAE,EAAE,aAAa,GAAG,OAAO,CAAC,YAAY,CAAC,CAggG1G"}
|
package/dist/server/index.js
CHANGED
|
@@ -1253,8 +1253,11 @@ function buildObsFeatureReviewPrompt(featureKey, data) {
|
|
|
1253
1253
|
.slice(0, 5)
|
|
1254
1254
|
.map(fp => ` - строка ~${fp.lineApprox}: ${FP_TYPE_LABELS[fp.type] || fp.type} — \`${fp.snippet}\``)
|
|
1255
1255
|
.join('\n');
|
|
1256
|
+
const coverageState = item.hasAnyWarnError
|
|
1257
|
+
? 'часть warn/error уже есть, но не все точки покрыты'
|
|
1258
|
+
: 'warn/error покрытия не найдено';
|
|
1256
1259
|
return [
|
|
1257
|
-
`- ${item.modulePath} (${item.
|
|
1260
|
+
`- ${item.modulePath} (${item.failurePoints.length} точек отказа; ${coverageState})`,
|
|
1258
1261
|
fpLines || ` - Нет warn/error покрытия: найди точки отказа вручную`,
|
|
1259
1262
|
].join('\n');
|
|
1260
1263
|
});
|
|
@@ -1324,9 +1327,9 @@ function buildObsAddCriticalLogsPrompt(modulePath, catalog) {
|
|
|
1324
1327
|
const moduleItem = catalog.find(c => c.modulePath === modulePath);
|
|
1325
1328
|
const missingFields = moduleItem?.missingFields || [];
|
|
1326
1329
|
return [
|
|
1327
|
-
|
|
1330
|
+
`Проверь точки отказа и добавь нужные warn/error логи в модуль \`${modulePath}\`.`,
|
|
1328
1331
|
``,
|
|
1329
|
-
|
|
1332
|
+
`VibeRadar не нашёл достаточного warn/error покрытия. Это статический сигнал, а не приказ логировать всё подряд.`,
|
|
1330
1333
|
``,
|
|
1331
1334
|
moduleItem
|
|
1332
1335
|
? `Текущее состояние модуля:\n- Формат: ${moduleItem.format}\n- Уровень: ${moduleItem.level}\n- Пропущенные поля: ${missingFields.length > 0 ? missingFields.join(', ') : 'нет'}`
|
|
@@ -1357,9 +1360,8 @@ function buildObsAddCriticalLogsPromptV2(item, catalog) {
|
|
|
1357
1360
|
const catalogEntry = catalog.find(c => c.modulePath === item.modulePath);
|
|
1358
1361
|
const fpDescriptions = item.failurePoints.map(fp => `- Строка ~${fp.lineApprox}: ${FP_TYPE_LABELS[fp.type] || fp.type}\n \`${fp.snippet}\``).join('\n');
|
|
1359
1362
|
return [
|
|
1360
|
-
|
|
1363
|
+
`Проверь точки отказа и добавь нужные warn/error логи в модуль \`${item.modulePath}\`.`,
|
|
1361
1364
|
``,
|
|
1362
|
-
`Роль модуля: ${item.roleHint} (приоритет: ${item.riskTier})`,
|
|
1363
1365
|
item.hasAnyWarnError
|
|
1364
1366
|
? `В модуле есть некоторые warn/error, но обнаружены незакрытые точки отказа.`
|
|
1365
1367
|
: `В модуле НЕТ ни одного warn/error. При сбоях мы не увидим ошибку в логах.`,
|
|
@@ -1372,12 +1374,13 @@ function buildObsAddCriticalLogsPromptV2(item, catalog) {
|
|
|
1372
1374
|
fpDescriptions,
|
|
1373
1375
|
``,
|
|
1374
1376
|
`Что сделать с каждой точкой:`,
|
|
1375
|
-
`-
|
|
1376
|
-
`- catch
|
|
1377
|
-
`-
|
|
1378
|
-
`-
|
|
1379
|
-
`-
|
|
1380
|
-
`-
|
|
1377
|
+
`- Сначала прочитай контекст и реши: add_error_log | add_warn_log | keep | needs_human_review.`,
|
|
1378
|
+
`- Пустые catch-блоки: добавь logger.error, если ошибка реально теряется и влияет на операцию.`,
|
|
1379
|
+
`- catch без лога: добавь logger.error/warn рядом с обработкой ошибки, если это operational-сбой.`,
|
|
1380
|
+
`- .catch() без лога: добавь лог только если это не намеренный безопасный fallback/cleanup.`,
|
|
1381
|
+
`- HTTP/DB без обработки: оберни в try/catch с logger.error только при реальном риске потери сбоя.`,
|
|
1382
|
+
`- throw без лога: НЕ добавляй лог для штатных validation/not-found/conflict/domain ошибок.`,
|
|
1383
|
+
`- if(err) без лога: добавь logger.warn/error в ветку ошибки, если ошибка должна быть видна в production.`,
|
|
1381
1384
|
``,
|
|
1382
1385
|
`Каждый лог: event_name, outcome, error_code (для error).`,
|
|
1383
1386
|
`event_name: <domain>.<entity>.<action> (lower_snake_case через точку)`,
|
|
@@ -1395,7 +1398,8 @@ function guessTestFile(modulePath) {
|
|
|
1395
1398
|
function buildObsBatchAddCriticalLogsPrompt(items, catalog) {
|
|
1396
1399
|
const moduleBlocks = items.map(item => {
|
|
1397
1400
|
const fpSummary = item.failurePoints.map(fp => ` - строка ~${fp.lineApprox}: ${FP_TYPE_LABELS[fp.type] || fp.type} — \`${fp.snippet}\``).join('\n');
|
|
1398
|
-
|
|
1401
|
+
const coverageState = item.hasAnyWarnError ? 'частично покрыто warn/error' : 'warn/error не найдено';
|
|
1402
|
+
return `### \`${item.modulePath}\` (${item.failurePoints.length} точек отказа; ${coverageState})\n${fpSummary || ' - Нет warn/error, проверь весь модуль на точки отказа'}`;
|
|
1399
1403
|
}).join('\n\n');
|
|
1400
1404
|
const testCommands = items
|
|
1401
1405
|
.map(item => guessTestFile(item.modulePath))
|
|
@@ -1404,9 +1408,9 @@ function buildObsBatchAddCriticalLogsPrompt(items, catalog) {
|
|
|
1404
1408
|
.map(f => ` npm run test -- ${f}`)
|
|
1405
1409
|
.join('\n');
|
|
1406
1410
|
return [
|
|
1407
|
-
|
|
1411
|
+
`Проверь точки отказа и добавь нужные warn/error логи в ${items.length} модулей.`,
|
|
1408
1412
|
``,
|
|
1409
|
-
`Для каждого модуля:
|
|
1413
|
+
`Для каждого модуля: прочитай контекст точек отказа (указаны ниже) и добавь logger.warn/error только там, где это реальный operational-сбой.`,
|
|
1410
1414
|
``,
|
|
1411
1415
|
moduleBlocks,
|
|
1412
1416
|
``,
|
|
@@ -3327,7 +3331,7 @@ function startServer({ data: initialData, port, projectRoot }) {
|
|
|
3327
3331
|
}
|
|
3328
3332
|
else if (task === 'obs-add-critical-logs') {
|
|
3329
3333
|
const modulePath = meta?.modulePath || 'unknown';
|
|
3330
|
-
title = `${agentLabel} — добавить
|
|
3334
|
+
title = `${agentLabel} — добавить логи точек отказа в "${modulePath}"`;
|
|
3331
3335
|
}
|
|
3332
3336
|
else if (task === 'obs-enrich-field') {
|
|
3333
3337
|
const fieldName = meta?.fieldName || 'unknown';
|