feat(loop): codify external intrinsic loop management, progressive remediation, and operational runbook

- Add bin/gravity.py loop diagnostics, reconstruction, and progressive remediation
- Wire hard-break alerting to job-log audit and operator direct message
- Add comprehensive architecture and operational specification in docs/LOOP-MANAGEMENT.md
- Add sidechat thread auto-provisioning fallback on 'Navigated to: None' in bin/dm.py
- Support Muse unconfirmed signup error handling in bin/muse-signin.py
- Track dynamic pipe sidechat mappings in job-sidechats.json
This commit is contained in:
operator
2026-10-04 16:52:54 +00:00
parent b8f02af572
commit 1d739f6b6a
6 changed files with 1001 additions and 7 deletions
+4 -4
View File
@@ -157,7 +157,7 @@ def cmd_send(ws, message):
sys.exit(2)
msg_esc = message.replace('\\', '\\\\').replace('`', '\\`').replace('$', '\\$')
result = ev(ws, f"""(async()=>{{
result = ev1(ws, f"""(async()=>{{
const input = document.querySelector('[contenteditable="true"]') ||
document.querySelector('textarea[placeholder*="Message"]') ||
[...document.querySelectorAll('div[role="textbox"]')][0];
@@ -181,7 +181,7 @@ def cmd_messages(ws, n=5, width=200):
# Exclude the compose box subtree: a failed send leaves the draft text
# (including the [id:...] tag) in the composer, and scraping it would
# produce a false "verified" (2026-10-04 dm.py false-confirmation bug).
result = ev(ws, f"""(() => {{
result = ev1(ws, f"""(() => {{
const composer = document.querySelector('[contenteditable="true"]') ||
document.querySelector('textarea[placeholder*="Message"]');
const ps = [...document.querySelectorAll('p')]
@@ -194,7 +194,7 @@ def cmd_messages(ws, n=5, width=200):
def cmd_compose_check(ws):
"""Print the current compose-box text (empty string if clear).
Used by dm.py to confirm a send actually left the composer."""
result = ev(ws, """(() => {
result = ev1(ws, """(() => {
const input = document.querySelector('[contenteditable="true"]') ||
document.querySelector('textarea[placeholder*="Message"]') ||
[...document.querySelectorAll('div[role="textbox"]')][0];
@@ -421,7 +421,7 @@ def ev1(ws, expr, await_p=False):
def cmd_url(ws):
"""Print current browser URL."""
url = ev(ws, "window.location.href")
url = ev1(ws, "window.location.href")
print(url)
def cmd_upload(ws, filepath, message=None, dry_run=False):