herdr-turn-coordinator 0.1.0 → 0.1.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/README.md +1 -0
- package/herdr-plugin.toml +1 -1
- package/herdr_turn.py +11 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -70,6 +70,7 @@ then consume its single final JSON result. Do not poll Herdr from model turns.
|
|
|
70
70
|
|
|
71
71
|
- Preserves the native interactive TUI; it never substitutes `kimi -p`, `grok --single`, or another batch mode.
|
|
72
72
|
- Rejects prompts to agents reported as `working`, `blocked`, or `unknown`.
|
|
73
|
+
- Leaves Kimi's first-run folder-trust prompt untouched for manual confirmation.
|
|
73
74
|
- Uses Herdr's native blocking wait first.
|
|
74
75
|
- On `agent_prompt_stalled`, falls back only after a revision advance plus a new prompt anchor or a recovered `working` state.
|
|
75
76
|
- Uses native lifecycle waiting once Herdr reports `working`; otherwise a local 15-second revision-quiet heuristic returns `unknown` without declaring success.
|
package/herdr-plugin.toml
CHANGED
package/herdr_turn.py
CHANGED
|
@@ -87,6 +87,13 @@ def contains_new_prompt(before, after, prompt):
|
|
|
87
87
|
return False
|
|
88
88
|
|
|
89
89
|
|
|
90
|
+
def requires_manual_setup(text):
|
|
91
|
+
text = " ".join(text.lower().split())
|
|
92
|
+
return "trust this folder?" in text and (
|
|
93
|
+
"don't trust" in text or "enable project mcp servers" in text
|
|
94
|
+
)
|
|
95
|
+
|
|
96
|
+
|
|
90
97
|
def wait_for_quiet(target, pane_id, delivered_revision, timeout):
|
|
91
98
|
deadline = time.monotonic() + max(0, timeout - 5000) / 1000
|
|
92
99
|
revision = delivered_revision
|
|
@@ -120,6 +127,10 @@ def wait_for_quiet(target, pane_id, delivered_revision, timeout):
|
|
|
120
127
|
|
|
121
128
|
def submit(target, prompt, timeout, lines, baseline_revision):
|
|
122
129
|
before = call("agent", "read", target, "--source", "visible")
|
|
130
|
+
if before.returncode:
|
|
131
|
+
fail("agent_preflight_read_failed", detail=payload(before))
|
|
132
|
+
if requires_manual_setup(before.stdout):
|
|
133
|
+
fail("agent_requires_manual_setup", target=target)
|
|
123
134
|
result = call("agent", "prompt", target, prompt, "--wait", "--timeout", str(timeout))
|
|
124
135
|
if result.returncode:
|
|
125
136
|
state = call("agent", "get", target)
|