-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathagent-claude.kdl
More file actions
153 lines (150 loc) · 4.39 KB
/
Copy pathagent-claude.kdl
File metadata and controls
153 lines (150 loc) · 4.39 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
// Canonical hand-authored declaration for a Claude Code agent. It keeps the persona and native bus
// contract in a catalog-owned `.st2/` overlay and adds a small Claude rules loader.
agent "<identity>" {
host "<host>"
workspace "<workspace>"
// Optional metadata:
// role "worker"
// supervisor "<host>.<supervisor-identity>"
// The rendered bus contract requires agent-declared status: busy while executing work, available
// only when yielding/ready, and dnd only for an explicit hold.
argv "claude" "--permission-mode" "bypassPermissions" "<boot prompt>"
ding
render {
copy "assets/PERSONA.md" ".st2/PERSONA.md"
copy "assets/bus.st2.md" ".st2/bus.md"
ensure-line ".claude/rules/st2.md" "@../../.st2/PERSONA.md"
ensure-line ".claude/rules/st2.md" "@../../.st2/bus.md"
// Hooks-only observability: this seat launches claude directly (no session wrapper), so the
// registrations below give it transitions and blocked-on-you — but no heartbeat owner and no
// terminal record. A live-but-idle seat ages to `unknown` after the staleness horizon and an
// exit leaves the last state to age out; both read indeterminate, never wrong. The full
// producer (heartbeats, terminal exits) comes with the session wrapper, i.e. a typed
// `claude {}` driver seat or `deliver "mcp"`.
//
// The `statusLine` entry is the harness-context tee: it is Claude's ONLY channel carrying a
// context window, and the slot is single-valued — the winning declaration replaces the others
// outright rather than merging. So this command records the payload and then chains to the
// operator's own renderer, resolved from `$ST_CLAUDE_STATUSLINE_RENDERER` or
// `~/.claude/statusline-renderer.json`, passing the payload through unchanged when neither
// resolves. Declaring anything else here would silently remove the operator's status line.
json-upsert ".claude/settings.local.json" arrays="union" #"""
{
"$schema": "https://json.schemastore.org/claude-code-settings.json",
"hooks": {
"SessionStart": [
{
"hooks": [
{
"type": "command",
"async": true,
"asyncRewake": true,
"command": "\"$ST_HOOKS/claude-session-start.sh\""
},
{
"type": "command",
"command": "\"$ST_HOOKS/claude-observe.sh\" SessionStart"
}
]
}
],
"PreCompact": [
{
"hooks": [
{
"type": "command",
"command": "\"$ST_HOOKS/claude-pre-compact.sh\""
},
{
"type": "command",
"command": "\"$ST_HOOKS/claude-observe.sh\" PreCompact"
}
]
}
],
"PostCompact": [
{
"hooks": [
{
"type": "command",
"command": "\"$ST_HOOKS/claude-observe.sh\" PostCompact"
}
]
}
],
"StopFailure": [
{
"hooks": [
{
"type": "command",
"command": "\"$ST_HOOKS/claude-stop-failure.sh\""
},
{
"type": "command",
"command": "\"$ST_HOOKS/claude-observe.sh\" StopFailure"
}
]
}
],
"UserPromptSubmit": [
{
"hooks": [
{
"type": "command",
"command": "\"$ST_HOOKS/claude-observe.sh\" UserPromptSubmit"
}
]
}
],
"Stop": [
{
"hooks": [
{
"type": "command",
"command": "\"$ST_HOOKS/claude-observe.sh\" Stop"
}
]
}
],
"PermissionRequest": [
{
"hooks": [
{
"type": "command",
"command": "\"$ST_HOOKS/claude-observe.sh\" PermissionRequest"
}
]
}
],
"PreToolUse": [
{
"hooks": [
{
"type": "command",
"command": "\"$ST_HOOKS/claude-observe.sh\" PreToolUse"
}
]
}
],
"PostToolUse": [
{
"hooks": [
{
"type": "command",
"command": "\"$ST_HOOKS/claude-observe.sh\" PostToolUse"
}
]
}
]
},
"statusLine": {
"type": "command",
"command": "\"$ST_HOOKS/claude-statusline.sh\"",
"padding": 0,
"refreshInterval": 5
}
}
"""#
git-exclude ".st2/" ".claude/rules/st2.md" ".claude/settings.local.json"
}
}