conductor-harness 1.0.2 → 1.0.3
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/README.md +2 -1
- package/package.json +1 -1
- package/runtime/.claude/settings.json.template +15 -5
- package/runtime/install.sh +14 -10
package/README.md
CHANGED
|
@@ -57,10 +57,11 @@ RAILWAY_SERVICE_ID=your-service-id
|
|
|
57
57
|
|
|
58
58
|
### 4. Fill in WORKFLOW.md
|
|
59
59
|
|
|
60
|
-
Either edit
|
|
60
|
+
Either edit `WORKFLOW.md` manually, or open the project in Claude Code and run:
|
|
61
61
|
```
|
|
62
62
|
/setup
|
|
63
63
|
```
|
|
64
|
+
This is a Claude Code slash command — type it in the Claude Code chat, not in the terminal.
|
|
64
65
|
|
|
65
66
|
### 5. Start working
|
|
66
67
|
|
package/package.json
CHANGED
|
@@ -2,15 +2,25 @@
|
|
|
2
2
|
"hooks": {
|
|
3
3
|
"SessionStart": [
|
|
4
4
|
{
|
|
5
|
-
"
|
|
6
|
-
"
|
|
5
|
+
"matcher": "",
|
|
6
|
+
"hooks": [
|
|
7
|
+
{
|
|
8
|
+
"type": "command",
|
|
9
|
+
"command": ".claude/hooks/session-start.sh"
|
|
10
|
+
}
|
|
11
|
+
]
|
|
7
12
|
}
|
|
8
13
|
],
|
|
9
14
|
"Stop": [
|
|
10
15
|
{
|
|
11
|
-
"
|
|
12
|
-
"
|
|
13
|
-
|
|
16
|
+
"matcher": "",
|
|
17
|
+
"hooks": [
|
|
18
|
+
{
|
|
19
|
+
"type": "command",
|
|
20
|
+
"command": ".claude/hooks/stop.sh",
|
|
21
|
+
"timeout": 30
|
|
22
|
+
}
|
|
23
|
+
]
|
|
14
24
|
}
|
|
15
25
|
]
|
|
16
26
|
},
|
package/runtime/install.sh
CHANGED
|
@@ -81,8 +81,8 @@ with open(settings_path) as f:
|
|
|
81
81
|
existing = json.load(f)
|
|
82
82
|
|
|
83
83
|
harness_hooks = {
|
|
84
|
-
"SessionStart": [{"type": "command", "command": ".claude/hooks/session-start.sh"}],
|
|
85
|
-
"Stop": [{"type": "command", "command": ".claude/hooks/stop.sh", "timeout": 30}]
|
|
84
|
+
"SessionStart": {"matcher": "", "hooks": [{"type": "command", "command": ".claude/hooks/session-start.sh"}]},
|
|
85
|
+
"Stop": {"matcher": "", "hooks": [{"type": "command", "command": ".claude/hooks/stop.sh", "timeout": 30}]}
|
|
86
86
|
}
|
|
87
87
|
|
|
88
88
|
harness_allow = [
|
|
@@ -97,16 +97,20 @@ harness_deny = [
|
|
|
97
97
|
"Bash(git push -f *)"
|
|
98
98
|
]
|
|
99
99
|
|
|
100
|
-
# Merge hooks
|
|
100
|
+
# Merge hooks — each event is a list of {matcher, hooks} objects
|
|
101
101
|
if "hooks" not in existing:
|
|
102
102
|
existing["hooks"] = {}
|
|
103
|
-
for event,
|
|
103
|
+
for event, entry in harness_hooks.items():
|
|
104
104
|
if event not in existing["hooks"]:
|
|
105
105
|
existing["hooks"][event] = []
|
|
106
|
-
existing_cmds = [
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
106
|
+
existing_cmds = [
|
|
107
|
+
cmd.get("command")
|
|
108
|
+
for h in existing["hooks"][event]
|
|
109
|
+
for cmd in h.get("hooks", [])
|
|
110
|
+
]
|
|
111
|
+
cmd = entry["hooks"][0].get("command")
|
|
112
|
+
if cmd not in existing_cmds:
|
|
113
|
+
existing["hooks"][event].append(entry)
|
|
110
114
|
|
|
111
115
|
# Merge permissions
|
|
112
116
|
if "permissions" not in existing:
|
|
@@ -279,8 +283,8 @@ echo "4. Start a task: /start LIN-123"
|
|
|
279
283
|
echo " End a task: /done"
|
|
280
284
|
echo " Check status: /status"
|
|
281
285
|
echo ""
|
|
282
|
-
echo "5. Fill in WORKFLOW.md —
|
|
283
|
-
echo " Or
|
|
286
|
+
echo "5. Fill in WORKFLOW.md — injected into every Claude Code session as project context."
|
|
287
|
+
echo " Or type /setup inside Claude Code to auto-generate it from your project structure."
|
|
284
288
|
echo ""
|
|
285
289
|
if [ "$USE_RAILWAY" = "y" ] || [ "$USE_RAILWAY" = "yes" ]; then
|
|
286
290
|
echo "6. Edit conductor.json and replace the RAILWAY_* placeholders."
|