Commit Graph

244 Commits

Author SHA1 Message Date
operator-main 8ff4dd0e30 cmd_sidechat_create: check + first, open panel only if needed\n\nAvoids unnecessary switcher click when panel already open. 2026-10-04 03:37:32 +00:00
operator-main 4379610d06 cmd_sidechat_create: verified working selectors\n\nDOM investigation found:\n- Switcher: [data-testid=hatch-chat-switcher-trigger] (idempotent)\n- Plus: [data-testid=hatch-chat-compose] (SVG, no text)\n- Old text-based checks were false-positive on DM content 2026-10-04 03:37:01 +00:00
operator-main bc4cd77a52 Fix sidechat selectors from DOM investigation\n\n- + button: [data-testid=hatch-chat-compose] (SVG, no text)\n- Panel: [data-testid=hatch-chat-switcher-trigger] (idempotent)\n- ensure_sidebar: check + button presence, not text (was false-positive\n on DM text containing Side chats) 2026-10-04 03:36:06 +00:00
operator-main 1cffacc7d1 Sidechat: render wait, direct send, stderr logging\n\n- Wait for Side chats to render before finding + button\n- Dispatcher: send_to_current_chat for sidechat jobs\n- Log stderr on create failure 2026-10-04 03:29:21 +00:00
operator-main 5feca52602 cmd_sidechat_create: remove Ctrl+J toggle\n\nPanel is always open; Ctrl+J toggle was closing it.\nJust find the + button directly. 2026-10-04 03:26:17 +00:00
operator-main 7938322e6d cmd_sidechat_create: Ctrl+J opens chat panel via CDP\n\nSidebar is actually the chat panel (Ctrl+J toggle).\nUse proven Input.dispatchKeyEvent like cmd_sidechat_main. 2026-10-04 03:25:37 +00:00
operator-main 34082045cc Nail sidechat create: direct send, no ID lookup\n\n- cmd_sidechat_create: simplified, just create and return\n- job-dispatch: after create, send via direct API to current chat\n- No thread ID parsing needed; thread lookup via URL for later ops 2026-10-04 03:23:34 +00:00
operator-main 4524907663 sidechat_manager: Use data-testid for sidebar button\n\nReliable selector hatch-chat-switcher-trigger instead of\nflaky text matching. 2026-10-04 03:20:42 +00:00
operator-main c57a05963a Fix sidechat CDP and button selectors\n\n- sidechat_manager._ev: use id=1 and returnByValue to match ev()\n- cmd_sidechat_create: find + button via Side chats header proximity\n- cmd_sidechat_create: use cmd_send for initial message (not DOM hack)\n- Integrate ensure_sidebar with retry 2026-10-04 03:19:48 +00:00
operator-main 7a6e54fed2 sidechat_manager: Fix CDP id mismatch\n\n_e() used id=100, muse-chat-api.py ev() uses id=1.\nOn shared websocket, responses mismatched. 2026-10-04 03:16:10 +00:00
operator-main 2074145e22 muse-chat-api.py: Integrate sidechat_manager.ensure_sidebar\n\nUse robust sidebar opener with exponential backoff retry\ninstead of single-attempt click. Fixes flaky NOSIDEBAR errors. 2026-10-04 03:15:07 +00:00
operator-main 50ddecb02e muse-chat-api.py: Get real thread ID after sidechat create\n\nSend system message to trigger ID assignment, poll for\n/thread/<uuid> instead of accepting /thread/new placeholder. 2026-10-04 03:13:07 +00:00
operator-main 942f37e21c job-dispatch.py: Send job DM to sidechat directly\n\nWhen sidechat.create=true, the job DM now goes to the sidechat\nitself (via thread ID), not to main chat. Keeps main clean;\nthe sidechat IS the workspace. 2026-10-04 03:11:11 +00:00
operator-main 39e47ab2ef muse-chat-api.py: Fix sidechat create URL race\n\nPoll for /thread/ URL up to 15s instead of fixed 5s sleep.\nWas capturing base URL before navigation settled. 2026-10-04 03:10:52 +00:00
operator-main 35bd358b78 job-dispatch.py: Add sidechat creation support\n\nWhen job has sidechat.create=true, creates sidechat via\nmuse-chat-api.py in sender context, includes URL in DM. 2026-10-04 03:09:42 +00:00
operator-main 78dbf8f131 Add job-dispatch.py: JOB system dispatcher\n\nReads job JSON, renders prompt template, sends DM via dm.py,\nlogs to job-log.jsonl. Tested end-to-end: canary-test job\ndispatched successfully (DM 36bd80aa SENT and VERIFIED). 2026-10-04 03:06:46 +00:00
operator-main 70b82f5a8b Add sidechat_manager.py: robust sidebar operations with retry and logging\n\n- ensure_sidebar() with exponential backoff (2s, 4s, 6s)\n- list_sidechats() with heuristic parsing\n- log_sidechat_op() for audit trail to sidechat-log.jsonl\nAddresses flaky NOSIDEBAR errors from hardcoded sleeps. 2026-10-04 02:49:38 +00:00
operator-main 7c591c73bc Add shared rate_limiter.py module\n\nModular rate limiter any .py script can use:\n from rate_limiter import rate_limit_wait\n rate_limit_wait(agent)\n\nToken bucket per agent: 1 op/3s sustained, burst 5, max 20/min.\nState in /tmp/netvm-rate-limit.json. 2026-10-04 02:40:56 +00:00
operator-main c48fbc03f6 muse-chat-api: Dont block sends on dialogs without IPs\n\ncheck_approvals was raising APPROVAL_NEEDED for false positives\n(dialogs without IP addresses, likely chat content misidentified).\nOnly IP-based permission dialogs should block. Others are ignored. 2026-10-04 02:32:38 +00:00
operator-main d82bf58e78 DM: signed-DM pipeline (dm-sign.sh) + attribution unification + honest docs
- New bin/dm-sign.sh: produce signed DMs (ssh-keygen -Y sign, namespace
  dm) in the [from:X] [id:Y] wire format that dm.py verify-sig checks.
  dm.py referenced it in usage but it never existed.
- dm.py: rewrite stale docstring/argparse (claimed verification was
  removed / delivery unconfirmed — it does recipient-side read-back with
  3 retries); unify all attribution on [from:X]/[id:Y] (was three
  formats: [from X], [X], [from:X]); fix dm_thread double-attribution;
  --no-verify kept as a documented no-op; raw mode sends verbatim and
  reuses the embedded [id:Y] for the audit log; navigation/send/park
  now all target the recipient browser (fixes cross-operator side-chat
  sends); drop dead --from-sender flag.
- Register dm-signers/operator-main.pub.
- Round-trip verified: sign (operator-main) -> send --raw via opm
  loopback -> read-back SENT+VERIFIED -> verify-sig GOOD.
2026-10-04 02:31:37 +00:00
operator-main 6189793748 agent-health.sh: Verify CDP port liveness, not just API success\n\nThe watchdog only checked if the API responded, missing zombie\nbrowsers (process alive but CDP not listening). Now explicitly\nchecks via ss -tln in the netns before trying the API.\nAlso: kill by exact PIDs instead of unreliable pkill patterns,\nand warn if port still bound after kill. 2026-10-04 02:23:20 +00:00
operator-main 5dddedb667 muse-chat-api: Press chat button to refocus Main Chat\n\nUser confirmed pressing the chat button properly refocuses Main Chat.\nSimpler and more reliable than searching for Main chat text in sidebar. 2026-10-04 02:11:41 +00:00
operator-main c83fb7c294 muse-chat-api: Use fuzzy matching for Main chat button\n\nExact match was too fragile - if the UI text differs slightly,\nit returns NOTFOUND and the browser stays on the side chat.\nNow uses substring + shortest-first like cmd_sidechat_use. 2026-10-04 02:04:19 +00:00
operator-main 062e46a6f8 chat-state tap: per-node main+sidechat reporter for box
chat-state-check.py: polls each node Chromium via CDP, captures main
chat + up to 5 side chats (last 10 DOM-visible messages each, 500
chars). Structural React selectors; picks the most common non-empty
list across repeated renders.
chat-state-report.py: signs and POSTs the report to the board
/api/box/chat-state/report ingest (namespace health, 5-min timer).

Session: sidechat/box-console
2026-10-04 01:59:00 +00:00
operator-main e5c85c7940 muse-chat-api: Fix cmd_sidechat_main to click Main chat button\n\nWas navigating to https://muse.ai/ (landing page) which restores the\nlast-viewed chat (often a side chat like Manage Muse agents). Now opens\nthe sidebar and clicks the Main chat element directly. 2026-10-04 01:58:41 +00:00
operator-main 77d904d344 dm.py: Fix dm_thread to pass to_agent correctly\n\nWas calling dm_send(to_agent, target, attributed) which set the\nsender to the recipient and omitted the to_agent param. Now calls\ndm_send(from_agent, target, attributed, to_agent=to_agent). 2026-10-04 01:29:26 +00:00
operator-main d3c19425e8 muse-chat-api.py upload: verify via Remove-attachment button 2026-10-04 01:28:47 +00:00
operator-main c759ca353f muse-chat-api.py upload: ev1() skips CDP chatter on verify 2026-10-04 01:28:19 +00:00
operator-main 716b31a7e6 muse-chat-api.py upload: verify chip by own-text (React swaps the input) 2026-10-04 01:27:55 +00:00
operator-main 1c386ca6bb muse-chat-api.py: cdp_call skips CDP event chatter 2026-10-04 01:25:44 +00:00
operator-main 566edf20c6 muse-chat-api.py upload: --dry-run/--message as real argparse flags 2026-10-04 01:25:10 +00:00
operator-main b5f718a885 muse-chat-api.py: upload subcommand (CDP file attach)
Attach a file to the agent chat composer via DOM.setFileInputFiles.
--dry-run stages the attachment and verifies the preview chip without
sending; otherwise sends (optional --message caption) and verifies via
read-back. Supports the box console upload flow (v0.2).

Session: sidechat/box-console
2026-10-04 01:23:22 +00:00
operator-main f19aff9b79 Fix supervisor SIGKILL loop killing restarted browsers (opm/pip)
Root cause: agent-health.service runs Type=oneshot with the default
KillMode=control-group. restart_browser() spawned the replacement
chromium with nohup under the service, so systemd SIGKILLed it the
moment the service exited. Every 5-min tick: FAIL -> restart ->
RECOVERED -> SIGKILL at teardown. opm and pip were permanently dark
and dm.py read masked it (empty output, exit 0).

Fix: launch replacements via systemd-run --user --scope (backgrounded)
so the browser lives in a transient scope outside the service cgroup
and survives teardown. setsid does NOT escape either. Note:
systemd-run --scope waits for the scope even with --no-block
(verified 2026-10-03), hence the backgrounding. Same fix in
chromebox-watchdog.sh (timers currently off).

dm.py: dm_read() now uses run_full() and prints a WARNING to stderr
with rc + last error line instead of failing silently on empty reads.

Trailers: Session: sidechat/opm-blind-fix
2026-10-04 01:16:59 +00:00
operator 3a1f0107ba Add holdings logging to muse-auth.py (log_holdings/get_holdings, logs/auth-holdings.log) 2026-10-03 22:32:54 +00:00
operator 08f05263e6 dm.py: Add UUID, logging, and read-back verification. No trust required. 2026-10-03 21:36:42 +00:00
operator 027d7baa30 multi-account selection: --account-name hint, exit 3 NEEDS_HUMAN
onboard-driver.py accepts --account-name and forwards to muse-signin.py.
muse-signin.py detects Meta multi-account selection after OTP submit:
with a hint it clicks the matching display-name button (never the +1
collapsed entry); without a hint (or no match) it exits 3 so the queue
marks the job needs_human instead of stalling.
2026-10-03 21:30:32 +00:00
operator a7639e2341 propagation: single registry drives all node references
New bin/netvm-registry.py parses NODES.md (node -> cdp_port); every
consumer reads from it instead of hardcoding:
- onboard-driver.py: CDP_PORTS dict -> registry lookup (new nodes work)
- muse-signin.py: hardcoded 9410 -> --node/--cdp-port args
- muse-chat-api.py: hardcoded ACCOUNTS -> registry-built
- agent-health.sh: hardcoded muse/pip blocks -> loop over all active
  nodes (646 and opm now get health coverage too)
NODES.md: record opm node (9440).
2026-10-03 21:28:36 +00:00
operator 1191cbd86e Add muse-auth.py: login state detection, sign-in vs sign-up notes 2026-10-03 21:06:22 +00:00
operator 02cf10acc8 bulk onboarding step 1: netvm-provision-node.sh + CDP_PORT_OVERRIDE
One command provisions a full client node: Warp identity (operator-
authorized 2026-10-03), netns + tunnel, chrome-box profile, NODES.md
registry entry with next-free 94x0 CDP port. Idempotent per stage.
netvm-names.sh gains CDP_PORT_OVERRIDE (backwards compatible) so the
CDP relay and the browser share the assigned port.
2026-10-03 20:54:56 +00:00
operator 2006ecd5a2 Add opm (operator-main) to DM system on CDP 9440 2026-10-03 20:50:53 +00:00
operator 9d6805060e Remove wrongly-specced opp-dm.py and dev-dm.py; dm.py is the headless DM tool 2026-10-03 20:34:33 +00:00
operator 7272ccfeea opp-dm.py: fix to work from bl or container, verify writes 2026-10-03 20:28:18 +00:00
operator 3ad28cb679 opp-dm.py and dev-dm.py: separate operator vs developer DM systems 2026-10-03 20:25:21 +00:00
operator e934a31778 dm-listener: auto-route 646 Message commands 2026-10-03 20:00:43 +00:00
operator 9fde2232fd dm.py: Headless DM function class, separate from Chat 2026-10-03 19:48:09 +00:00
operator fced2e79a4 thread-listener: auto-execute 646 THREAD commands 2026-10-03 19:43:40 +00:00
operator 169b7d1f35 p2p-relay: add watermark to prevent duplicates 2026-10-03 19:25:42 +00:00
operator 828f67ffc8 p2p-relay: 646 to muse via headless 2026-10-03 19:21:04 +00:00
operator 667755e312 meta-acct: Accounts Center read API (list-linked, security-status, login-activity)\n\nImplements the read ops from META-ACCOUNTS-API.md via the agent browser\nsession. Key finding: phone-OTP login leaves a full Meta session -\naccountscenter.meta.com loads without redirect.\n\nAlso: 646 node fully registered (warp-646, CDP 9430, active). 2026-10-03 19:20:47 +00:00
operator a8d456529f muse-chat-api: add sidechat use/main/list commands 2026-10-03 19:15:50 +00:00