@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.
- package/lib/board-tool.js +18 -48
- package/lib/client.js +85 -176
- package/lib/commands.js +21 -38
- package/lib/config.js +29 -54
- package/lib/cron.js +13 -13
- package/lib/events.js +1 -1
- package/lib/filters.js +58 -82
- package/lib/git-provider.js +23 -23
- package/lib/gitea.js +51 -109
- package/lib/github.js +27 -31
- package/lib/import.js +46 -67
- package/lib/index.js +66 -132
- package/lib/intake.js +18 -26
- package/lib/launcher.js +100 -167
- package/lib/lifecycle.js +11 -17
- package/lib/markdown.js +16 -23
- package/lib/metrics.js +23 -25
- package/lib/order.js +25 -28
- package/lib/outbound.js +25 -26
- package/lib/plan.js +23 -45
- package/lib/power.js +2 -2
- package/lib/progress-dump.js +17 -17
- package/lib/routes.js +86 -145
- package/lib/store.js +59 -77
- package/lib/sync.js +56 -98
- package/lib/time.js +8 -17
- package/lib/transitions.js +36 -57
- package/lib/webhook.js +16 -23
- package/lib/workflow-bridge.js +57 -57
- package/lib/worktree.js +58 -58
- package/package.json +1 -1
package/lib/progress-dump.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
// dsh-kanban:
|
|
2
|
-
//
|
|
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
|
-
*
|
|
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('
|
|
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('
|
|
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('
|
|
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
|
-
*
|
|
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
|
-
'## 📋
|
|
121
|
+
'## 📋 Task Handover (PROGRESSDUMP)',
|
|
122
122
|
'> [!NOTE]',
|
|
123
|
-
'>
|
|
123
|
+
'> Previous run recorded the current state:',
|
|
124
124
|
'',
|
|
125
|
-
'
|
|
125
|
+
'**Goal:** ' + (dump.goal || '—'),
|
|
126
126
|
'',
|
|
127
|
-
'
|
|
127
|
+
'**Done:** ' + (dump.progress || '—'),
|
|
128
128
|
'',
|
|
129
|
-
'
|
|
129
|
+
'**Next steps:** ' + (dump.next || '—'),
|
|
130
130
|
'',
|
|
131
131
|
'---',
|
|
132
132
|
'',
|