@goodandready/dsh-kanban 0.2.19 → 0.2.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.
@@ -1,5 +1,5 @@
1
- // dsh-kanban: фиксация и безопасная передача среза прогресса задачи (PROGRESSDUMP).
2
- // Парсит блок <<<PROGRESSDUMP ... >>>PROGRESSDUMP, маскирует секреты и генерирует вводный бриф.
1
+ // dsh-kanban: recording and safe handover of task progress snapshot (PROGRESSDUMP).
2
+ // Parses <<<PROGRESSDUMP ... >>>PROGRESSDUMP block, redacts secrets and generates intro brief.
3
3
 
4
4
  const BEGIN_MARKER = '<<<PROGRESSDUMP'
5
5
  const END_MARKER = '>>>PROGRESSDUMP'
@@ -24,7 +24,7 @@ function sanitizeText(raw) {
24
24
  text = text.replace(pattern, REDACTED)
25
25
  }
26
26
  }
27
- // Блокируем внедрение слэш-команд харнесса
27
+ // Block injection of harness slash commands
28
28
  text = text.split('\n')
29
29
  .map((line) => (line.trim().startsWith('/') ? ('# ' + line) : line))
30
30
  .join('\n')
@@ -39,7 +39,7 @@ function truncateBytes(str, maxBytes) {
39
39
  }
40
40
 
41
41
  /**
42
- * Разобрать блок PROGRESSDUMP из произвольного текста.
42
+ * Parse PROGRESSDUMP block from arbitrary text.
43
43
  * @param {string} text
44
44
  * @returns {{ ok: true, dump: { goal: string, progress: string, next: string, redacted: boolean } } | { ok: false, error: string }}
45
45
  */
@@ -62,15 +62,15 @@ export function parseProgressDump(text) {
62
62
  const line = rawLine.trim()
63
63
  const lower = line.toLowerCase()
64
64
 
65
- if (lower.startsWith('цель:') || lower.startsWith('goal:')) {
65
+ if (lower.startsWith('goal:') || lower.startsWith('\u0446\u0435\u043b\u044c:')) {
66
66
  currentKey = 'goal'
67
67
  const val = line.slice(line.indexOf(':') + 1).trim()
68
68
  if (val) sections.goal.push(val)
69
- } else if (lower.startsWith('прогресс:') || lower.startsWith('progress:')) {
69
+ } else if (lower.startsWith('progress:') || lower.startsWith('\u043f\u0440\u043e\u0433\u0440\u0435\u0441\u0441:')) {
70
70
  currentKey = 'progress'
71
71
  const val = line.slice(line.indexOf(':') + 1).trim()
72
72
  if (val) sections.progress.push(val)
73
- } else if (lower.startsWith('следующие шаги:') || lower.startsWith('next:') || lower.startsWith('шаги:')) {
73
+ } else if (lower.startsWith('next:') || lower.startsWith('next steps:') || lower.startsWith('\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0448\u0430\u0433\u0438:') || lower.startsWith('\u0448\u0430\u0433\u0438:')) {
74
74
  currentKey = 'next'
75
75
  const val = line.slice(line.indexOf(':') + 1).trim()
76
76
  if (val) sections.next.push(val)
@@ -94,39 +94,39 @@ export function parseProgressDump(text) {
94
94
  }
95
95
 
96
96
  /**
97
- * Сериализовать срез в канонический блок <<<PROGRESSDUMP ... >>>PROGRESSDUMP.
97
+ * Serialize snapshot to canonical <<<PROGRESSDUMP ... >>>PROGRESSDUMP block.
98
98
  */
99
99
  export function formatProgressDump(dump) {
100
100
  if (!dump) return ''
101
101
  return [
102
102
  BEGIN_MARKER,
103
- 'Цель:',
103
+ 'Goal:',
104
104
  dump.goal || '—',
105
105
  '',
106
- 'Прогресс:',
106
+ 'Progress:',
107
107
  dump.progress || '—',
108
108
  '',
109
- 'Следующие шаги:',
109
+ 'Next steps:',
110
110
  dump.next || '—',
111
111
  END_MARKER,
112
112
  ].join('\n')
113
113
  }
114
114
 
115
115
  /**
116
- * Сформировать аккуратный вводный бриф для новой сессии агента.
116
+ * Build clean introductory brief for new agent session.
117
117
  */
118
118
  export function formatHandoverPreamble(dump) {
119
119
  if (!dump || (!dump.goal && !dump.progress && !dump.next)) return ''
120
120
  return [
121
- '## 📋 Эстафета задачи (PROGRESSDUMP)',
121
+ '## 📋 Task Handover (PROGRESSDUMP)',
122
122
  '> [!NOTE]',
123
- '> Предыдущий ход зафиксировал текущее состояние работы:',
123
+ '> Previous run recorded the current state:',
124
124
  '',
125
- '**Цель:** ' + (dump.goal || '—'),
125
+ '**Goal:** ' + (dump.goal || '—'),
126
126
  '',
127
- '**Сделано:** ' + (dump.progress || '—'),
127
+ '**Done:** ' + (dump.progress || '—'),
128
128
  '',
129
- '**Следующие шаги:** ' + (dump.next || '—'),
129
+ '**Next steps:** ' + (dump.next || '—'),
130
130
  '',
131
131
  '---',
132
132
  '',