Align conftest mock herdr and unit test assertions with Claude's simplified session-based isolation and native herdr command updates
This commit is contained in:
@@ -23,8 +23,8 @@ metadata:
|
||||
Dispatch a **Kanban worker** (in `goal_mode`) that:
|
||||
|
||||
1. Every ~30s polls the actual state of:
|
||||
- `herdr ls` (which sessions are alive)
|
||||
- `herdr list-panes -t <session> ...` (pane cmd, cwd, pid)
|
||||
- `herdr agent list` (which sessions are alive)
|
||||
- `herdr agent get <session>` (pane cmd, cwd)
|
||||
- `~/.claude/projects/<workspace-key>/*.jsonl` mtime + first-line sessionId
|
||||
- `~/.gemini/antigravity-cli/cache/last_conversations.json` (agy workspace → conversation mapping)
|
||||
- `~/.gemini/antigravity-cli/conversations/<uuid>.db` mtime (agy)
|
||||
@@ -47,7 +47,7 @@ Dispatch a **Kanban worker** (in `goal_mode`) that:
|
||||
|
||||
## When NOT to use
|
||||
|
||||
- One-off interactive session — just check `herdr ls` and read the YAML
|
||||
- One-off interactive session — just check `herdr agent list` and read the YAML
|
||||
- A single, short session — overhead > benefit
|
||||
- You don't have a Kanban dispatcher running
|
||||
|
||||
@@ -69,7 +69,7 @@ hermes kanban create \
|
||||
You are the agent-sessions monitor. Every 30 seconds, do:
|
||||
|
||||
1. Read .mam/agent-sessions.yaml
|
||||
2. Run `herdr ls` and `herdr list-panes -F 'session=#{session_name} pid=#{pane_pid} cmd=#{pane_current_command} cwd=#{pane_current_path}'`
|
||||
2. Run `herdr agent list` and `herdr agent get <session>` for each tracked session name (these are real native herdr commands — do not use tmux-era names like `herdr ls`/`herdr list-panes` outside a shell that has sourced `.agents/skills/lib.sh`)
|
||||
3. For each session in the YAML, check the corresponding herdr state
|
||||
4. For each herdr session matching `*-creator-claude` or `*-creator-agy` that's not in the YAML, register it
|
||||
5. For any drift, call `kanban_comment` with the diff
|
||||
|
||||
@@ -413,6 +413,11 @@ if herdr_confirmed:
|
||||
name = t['name']
|
||||
if name in yaml_session_names:
|
||||
continue
|
||||
workspace_root = os.environ.get('WORKSPACE_ROOT')
|
||||
if not workspace_root:
|
||||
workspace_root = os.path.abspath(os.path.join(os.path.dirname(yaml_path), '..'))
|
||||
if os.path.exists(os.path.join(workspace_root, '.mam', f"purging-{name}")):
|
||||
continue
|
||||
if name.endswith('-creator-claude'):
|
||||
agent = 'claude'
|
||||
elif name.endswith('-creator-agy'):
|
||||
@@ -445,7 +450,7 @@ if herdr_confirmed:
|
||||
'pane': {'index': 0, 'pid': pm['pid'], 'cmd': agent, 'cmd_full': cmd_full, 'cwd': pm['cwd']},
|
||||
# P2: cwd 인용
|
||||
'start_command': f'herdr {server_opt}new-session -d -s "{name}" -x 140 -y 40 -c "{pm["cwd"]}" "{cmd_full}"',
|
||||
'attach_command': f'herdr {server_opt}attach -t {name}',
|
||||
'attach_command': f'herdr {server_opt}agent attach {name}',
|
||||
'kill_command': f'herdr {server_opt}kill-session -t {name}',
|
||||
'last_visible_status': 'running',
|
||||
'last_visible_note': 'auto-registered by monitor',
|
||||
|
||||
Reference in New Issue
Block a user