agileflow 2.37.0 → 2.37.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/package.json
CHANGED
|
@@ -33,6 +33,59 @@ Set up the hooks system that enables event-driven automation in Claude Code. Hoo
|
|
|
33
33
|
|
|
34
34
|
## Configuration Steps
|
|
35
35
|
|
|
36
|
+
### Step 0: Check and Migrate Old Format
|
|
37
|
+
|
|
38
|
+
**IMPORTANT**: Before configuring, check if `.claude/settings.json` exists with old format and migrate it.
|
|
39
|
+
|
|
40
|
+
The NEW hooks format uses `matcher` and `hooks` array:
|
|
41
|
+
```json
|
|
42
|
+
{
|
|
43
|
+
"hooks": {
|
|
44
|
+
"SessionStart": [
|
|
45
|
+
{
|
|
46
|
+
"matcher": "",
|
|
47
|
+
"hooks": [
|
|
48
|
+
{
|
|
49
|
+
"type": "command",
|
|
50
|
+
"command": "echo 'Hello'"
|
|
51
|
+
}
|
|
52
|
+
]
|
|
53
|
+
}
|
|
54
|
+
]
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
The OLD format (pre-2024) used `enabled`, `command`, `description` directly - THIS IS INVALID NOW:
|
|
60
|
+
```json
|
|
61
|
+
{
|
|
62
|
+
"hooks": {
|
|
63
|
+
"SessionStart": [
|
|
64
|
+
{
|
|
65
|
+
"enabled": true,
|
|
66
|
+
"command": "echo 'Hello'",
|
|
67
|
+
"description": "..."
|
|
68
|
+
}
|
|
69
|
+
]
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
**Migration check**:
|
|
75
|
+
```bash
|
|
76
|
+
if [ -f .claude/settings.json ]; then
|
|
77
|
+
# Check for old format (has "enabled" but no "hooks" array inside)
|
|
78
|
+
if jq -e '.hooks.SessionStart[0].enabled' .claude/settings.json >/dev/null 2>&1; then
|
|
79
|
+
echo "⚠️ Old hooks format detected - migration needed"
|
|
80
|
+
# Backup
|
|
81
|
+
cp .claude/settings.json .claude/settings.json.backup
|
|
82
|
+
echo "Backed up to .claude/settings.json.backup"
|
|
83
|
+
fi
|
|
84
|
+
fi
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
If old format detected, the agent should rebuild the hooks configuration from scratch using the new format.
|
|
88
|
+
|
|
36
89
|
### Step 1: Create Directories
|
|
37
90
|
|
|
38
91
|
```bash
|
|
@@ -223,15 +223,45 @@ else
|
|
|
223
223
|
fi
|
|
224
224
|
```
|
|
225
225
|
|
|
226
|
+
**Check for old statusLine format** (string instead of object):
|
|
227
|
+
|
|
228
|
+
The NEW format uses an object:
|
|
229
|
+
```json
|
|
230
|
+
{
|
|
231
|
+
"statusLine": {
|
|
232
|
+
"type": "command",
|
|
233
|
+
"command": "bash scripts/agileflow-statusline.sh",
|
|
234
|
+
"padding": 0
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
```
|
|
238
|
+
|
|
239
|
+
The OLD format (invalid) was just a string:
|
|
240
|
+
```json
|
|
241
|
+
{
|
|
242
|
+
"statusLine": "bash scripts/agileflow-statusline.sh"
|
|
243
|
+
}
|
|
244
|
+
```
|
|
245
|
+
|
|
246
|
+
```bash
|
|
247
|
+
# Check for old string format
|
|
248
|
+
if [ -f .claude/settings.json ]; then
|
|
249
|
+
OLD_FORMAT=$(jq -r 'if .statusLine | type == "string" then "yes" else "no" end' .claude/settings.json 2>/dev/null)
|
|
250
|
+
if [ "$OLD_FORMAT" = "yes" ]; then
|
|
251
|
+
echo "⚠️ Old statusLine format detected (string) - will be replaced with object format"
|
|
252
|
+
fi
|
|
253
|
+
fi
|
|
254
|
+
```
|
|
255
|
+
|
|
226
256
|
Add or update the statusLine configuration:
|
|
227
257
|
|
|
228
|
-
Use `jq` to add/update the statusLine field:
|
|
258
|
+
Use `jq` to add/update the statusLine field (this will replace old string format):
|
|
229
259
|
|
|
230
260
|
```bash
|
|
231
261
|
# Backup existing settings
|
|
232
262
|
cp .claude/settings.json .claude/settings.json.backup 2>/dev/null
|
|
233
263
|
|
|
234
|
-
# Add statusLine configuration
|
|
264
|
+
# Add statusLine configuration (replaces any old format)
|
|
235
265
|
jq '. + {"statusLine": {"type": "command", "command": "bash scripts/agileflow-statusline.sh", "padding": 0}}' .claude/settings.json > .claude/settings.json.tmp && mv .claude/settings.json.tmp .claude/settings.json
|
|
236
266
|
```
|
|
237
267
|
|