feat(agent): deprecate and completely remove cline agent support
- Delete adapters/cline.py and unregister from registry.py - Remove cline branches from lib.sh and all 8 skill scripts (create, resume, stop, status, reconcile, update_yaml_resumed, resolve_session_id, orc_onboard) - Narrow own-key mapping dictionaries across lib_py core modules to 4 supported agents - Delete cline-exclusive tests and retarget shared fixtures to grok/hermes/claude - Update skills documentation and installation guides (439 passed, 0 failures) - Archive cline deprecation consensus and review reports
This commit is contained in:
@@ -144,14 +144,31 @@ if _pane_dialog_open dummy; then echo "DIALOG_OPEN"; else echo "DIALOG_CLOSED";
|
||||
|
||||
def test_c3_strong_token_and_hint_token_readiness_succeeds():
|
||||
"""C-3: Strong ready token + hint token together must detect readiness immediately (rc 0)."""
|
||||
screen = """Cline v3.0.0
|
||||
screen = """MockApp v1.0.0
|
||||
Use arrow keys to select a tool
|
||||
❯
|
||||
"""
|
||||
script = f"""
|
||||
mock_py() {{
|
||||
if [ "$1" = "-m" ] && [ "$2" = "lib_py.agents" ] && [ "$3" = "facts" ]; then
|
||||
echo "MAM_AGENT_NAME='mocktiered'"
|
||||
echo "MAM_OWN_KEY='mock_id_own'"
|
||||
echo "MAM_INPUT_PROMPT='❯'"
|
||||
echo "MAM_INPUT_PLACEHOLDER=''"
|
||||
echo "MAM_INPUT_RULE_PATTERN=''"
|
||||
echo "MAM_READY_TOKENS='MockApp|Use arrow keys|Ready'"
|
||||
echo "MAM_STRONG_READY_TOKENS='MockApp'"
|
||||
echo "MAM_WEAK_READY_TOKENS='Use arrow keys'"
|
||||
echo "MAM_MODAL_TOKENS=''"
|
||||
echo "MAM_EXIT_KEY='/exit'"
|
||||
echo "MAM_DELEGATE_AGENT_KEY='mock-agent'"
|
||||
return 0
|
||||
fi
|
||||
}}
|
||||
_delegate_py_bin() {{ echo "mock_py"; }}
|
||||
_pane_capture() {{ printf '%s' '{screen}'; }}
|
||||
sleep() {{ :; }}
|
||||
wait_for_tui_ready dummy-sess cline
|
||||
wait_for_tui_ready dummy-sess mocktiered
|
||||
"""
|
||||
res = _run_lib_helpers(script)
|
||||
assert res.returncode == 0, res.stderr + res.stdout
|
||||
@@ -170,7 +187,7 @@ sleep() {{ :; }}
|
||||
export MAM_STRONG_READY_TOKENS='NonExistentStrongToken'
|
||||
export MAM_WEAK_READY_TOKENS=''
|
||||
export MAM_INPUT_PLACEHOLDER='Ask anything...'
|
||||
wait_for_tui_ready dummy-sess cline
|
||||
wait_for_tui_ready dummy-sess custom
|
||||
"""
|
||||
res = _run_lib_helpers(script)
|
||||
assert res.returncode == 0, res.stderr + res.stdout
|
||||
@@ -197,7 +214,7 @@ export MAM_INPUT_PROMPT='❯'
|
||||
export MAM_INPUT_RULE_PATTERN='─{{10,}}'
|
||||
_MAM_MODAL_TOKENS='NON_MATCHING_MODAL'
|
||||
rc=0
|
||||
wait_for_tui_ready dummy-sess cline || rc=$?
|
||||
wait_for_tui_ready dummy-sess custom || rc=$?
|
||||
echo "RC=$rc"
|
||||
"""
|
||||
res = _run_lib_helpers(script)
|
||||
@@ -219,7 +236,7 @@ export MAM_INPUT_PLACEHOLDER='NonExistentPlaceholder'
|
||||
export MAM_INPUT_PROMPT='❯'
|
||||
export MAM_INPUT_RULE_PATTERN='─{{10,}}'
|
||||
rc=0
|
||||
wait_for_tui_ready dummy-sess cline || rc=$?
|
||||
wait_for_tui_ready dummy-sess custom || rc=$?
|
||||
echo "RC=$rc"
|
||||
"""
|
||||
res = _run_lib_helpers(script)
|
||||
@@ -247,7 +264,7 @@ export MAM_INPUT_PLACEHOLDER=''
|
||||
export MAM_INPUT_PROMPT='❯'
|
||||
export MAM_INPUT_RULE_PATTERN=''
|
||||
rc=0
|
||||
wait_for_tui_ready dummy-sess cline || rc=$?
|
||||
wait_for_tui_ready dummy-sess custom || rc=$?
|
||||
echo "RC=$rc"
|
||||
"""
|
||||
res1 = _run_lib_helpers(script1)
|
||||
@@ -268,7 +285,7 @@ export MAM_INPUT_PLACEHOLDER=''
|
||||
export MAM_INPUT_PROMPT='❯'
|
||||
export MAM_INPUT_RULE_PATTERN=''
|
||||
rc=0
|
||||
wait_for_tui_ready dummy-sess cline || rc=$?
|
||||
wait_for_tui_ready dummy-sess custom || rc=$?
|
||||
echo "RC=$rc"
|
||||
"""
|
||||
res2 = _run_lib_helpers(script2)
|
||||
@@ -343,7 +360,7 @@ export MAM_INPUT_PLACEHOLDER=''
|
||||
export MAM_INPUT_PROMPT='❯'
|
||||
export MAM_INPUT_RULE_PATTERN=''
|
||||
rc=0
|
||||
wait_for_tui_ready dummy-sess cline || rc=$?
|
||||
wait_for_tui_ready dummy-sess custom || rc=$?
|
||||
echo "RC=$rc"
|
||||
"""
|
||||
res = _run_lib_helpers(script)
|
||||
@@ -368,29 +385,29 @@ echo "DIALOG=$_MAM_DIALOG_TOKENS"
|
||||
def test_c8b_agent_modal_tokens_merged_into_dialog_open():
|
||||
"""C-8b (T-2d / F-8): Per-agent modal_tokens from adapter are merged into _pane_dialog_open and block send_keys_safe."""
|
||||
# 1. Direct _pane_dialog_open test
|
||||
screen = """Please enter your Cline API key to continue:
|
||||
screen = """Try the new fullscreen renderer?
|
||||
"""
|
||||
script1 = f"""
|
||||
_pane_capture() {{ printf '%s' '{screen}'; }}
|
||||
export MAM_MODAL_TOKENS='Cline API key'
|
||||
export MAM_MODAL_TOKENS='Try the new fullscreen renderer\\?'
|
||||
if _pane_dialog_open dummy; then echo "DIALOG_OPEN"; else echo "DIALOG_CLOSED"; fi
|
||||
"""
|
||||
res1 = _run_lib_helpers(script1)
|
||||
assert res1.returncode == 0, res1.stderr + res1.stdout
|
||||
assert "DIALOG_OPEN" in res1.stdout
|
||||
|
||||
# 2. Dynamic facts resolution via send_keys_safe on cline session
|
||||
# 2. Dynamic facts resolution via send_keys_safe on claude session
|
||||
script2 = f"""
|
||||
_pane_quiescent() {{ return 0; }}
|
||||
_pane_capture() {{ printf '%s' 'Select an API provider to get started:'; }}
|
||||
_pane_capture() {{ printf '%s' 'Try the new fullscreen renderer? (y/n)'; }}
|
||||
_sks_herdr() {{ return 0; }}
|
||||
rc=0
|
||||
SKS_DIALOG_TIMEOUT=1 send_keys_safe "my-project-worker-cline-01" "some text" || rc=$?
|
||||
SKS_DIALOG_TIMEOUT=1 send_keys_safe "my-project-worker-claude-01" "some text" || rc=$?
|
||||
echo "RC=$rc"
|
||||
"""
|
||||
res2 = _run_lib_helpers(script2)
|
||||
assert res2.returncode == 0, res2.stderr + res2.stdout
|
||||
assert "RC=2" in res2.stdout, f"Expected dialog blocking (RC=2) for cline modal: {res2.stdout}"
|
||||
assert "RC=2" in res2.stdout, f"Expected dialog blocking (RC=2) for claude modal: {res2.stdout}"
|
||||
|
||||
|
||||
|
||||
@@ -414,7 +431,7 @@ def test_c9_create_session_timeout_alive_pid_preserves_session(mam_sandbox, mock
|
||||
cmd = [
|
||||
"bash", str(script_path),
|
||||
"--workspace", str(mam_sandbox),
|
||||
"--agent", "cline",
|
||||
"--agent", "claude",
|
||||
"--role", "creator",
|
||||
"--session", "test-timeout-sess",
|
||||
"--onboard"
|
||||
@@ -454,7 +471,7 @@ def test_c10_create_session_timeout_dead_pid_kills_session(mam_sandbox, mock_her
|
||||
cmd = [
|
||||
"bash", str(script_path),
|
||||
"--workspace", str(mam_sandbox),
|
||||
"--agent", "cline",
|
||||
"--agent", "claude",
|
||||
"--role", "creator",
|
||||
"--session", "test-dead-sess"
|
||||
]
|
||||
@@ -471,7 +488,7 @@ def test_c10_create_session_timeout_dead_pid_kills_session(mam_sandbox, mock_her
|
||||
def test_adapter_strong_weak_partition():
|
||||
"""N-D: Verify strong_ready_tokens and weak_ready_tokens partition ready_tokens for all adapters."""
|
||||
from lib_py.agents.registry import get_adapter
|
||||
for agent in ('claude', 'agy', 'hermes', 'cline', 'grok'):
|
||||
for agent in ('claude', 'agy', 'hermes', 'grok'):
|
||||
adapter = get_adapter(agent)
|
||||
assert adapter is not None
|
||||
ready_set = set(t for t in adapter.ready_tokens.split('|') if t)
|
||||
@@ -502,26 +519,20 @@ check_sks() {
|
||||
send_keys_safe "$sess" "hello" 2>&1 || true
|
||||
}
|
||||
|
||||
echo "1: $(check_sks 'claude-reviewer-cline-01')"
|
||||
echo "2: $(check_sks 'my-claude-creator-cline')"
|
||||
echo "3: $(check_sks 'reviewer-creator-grok-01')"
|
||||
echo "4: $(check_sks 'planner-reviewer-claude-01')"
|
||||
echo "5: $(check_sks 'test-worker-hermes-02')"
|
||||
echo "6: $(check_sks 'workspace-creator-agy-05')"
|
||||
echo "7: $(check_sks 'claude')"
|
||||
echo "8: $(check_sks 'cline-01')"
|
||||
echo "9: $(check_sks 'grok-02')"
|
||||
"""
|
||||
res = _run_lib_helpers(script)
|
||||
assert res.returncode == 0, res.stderr + res.stdout
|
||||
assert "1: RESOLVED_AGENT=cline" in res.stdout
|
||||
assert "2: RESOLVED_AGENT=cline" in res.stdout
|
||||
assert "3: RESOLVED_AGENT=grok" in res.stdout
|
||||
assert "4: RESOLVED_AGENT=claude" in res.stdout
|
||||
assert "5: RESOLVED_AGENT=hermes" in res.stdout
|
||||
assert "6: RESOLVED_AGENT=agy" in res.stdout
|
||||
assert "7: RESOLVED_AGENT=claude" in res.stdout
|
||||
assert "8: RESOLVED_AGENT=cline" in res.stdout
|
||||
assert "9: RESOLVED_AGENT=grok" in res.stdout
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user