Commit Graph

513 Commits

Author SHA1 Message Date
operator-main a32670731f chromebox-watchdog: fix kill loop on slow cold starts
Two fixes: (1) retry health check 4x with 15s gaps after relaunch instead of single 25s check; (2) skip kill if browser launched <2min ago (probably still starting). Prevents watchdog from killing a working-but-slow browser.

Session: sidechat/chromebox-ops
2026-10-04 13:17:13 +00:00
operator-main 5f0a77d04b Integrate cdp_queue into CDP path
All CDP sessions now go through per-node queue (max 2 concurrent, priority levels). DM sends use high priority. Graceful fallback if module unavailable.

Session: sidechat/chromebox-ops
2026-10-04 13:15:59 +00:00
operator-main 0d25696860 docs: exec-server -> exec-constrained stale references (bl:8444)
- docs/TOKEN_POLICY.md: rewritten for exec-constrained.py (named ops,
  -n exec-constrained, {op,args,ts,nonce} envelope; rotate endpoint gone)
- bin/chromebox-gateway.py: exec-server naming -> shared exec token files
- docs/DM-HTTPS-DESIGN-646.md + docs/DM-OVER-HTTPS-DESIGN.md: port
  8443->8444, namespace exec-server->exec-constrained, envelope updated,
  cloudflared port fix marked done 2026-10-04
2026-10-04 13:04:45 +00:00
operator-main 6e9421644a Add cdp_queue.py: per-browser CDP operation queue
Per-node FIFO, max 2 concurrent, priority levels (high/normal/low), flock-based cross-process coordination. DM sends use high priority.

Session: sidechat/chromebox-ops
2026-10-04 13:04:24 +00:00
operator-main f9dce15a6d netvm-topology.sh: relay check by connectivity, not pidfiles
Pidfiles go stale and lie. Primary verdict now curls the veth IP:port. Also pins registry CDP ports (hash-derived CDP_PORT was wrong).

Session: sidechat/chromebox-ops
2026-10-04 12:41:40 +00:00
operator-main 343920e0c3 Watchdog upgrades: stage-specific logging + new CDP relay watchdog
chromebox-watchdog.sh: HEALTH_FAIL_REASON pinpoints which health stage failed (no process / CDP unreachable / no Chat page); chromium stdout redirected to per-profile chromebox-<profile>.log; 10MB log rotation (one generation); Chat title match relaxed to .*Chat.

bin/cdp-relay-watchdog.sh (new): keeps per-node CDP relays alive. Two-stage check: (1) host veth IP assigned (fail-loud, no auto-fix — veth recreation touches WireGuard/iptables), (2) relay connectivity via curl to veth IP:port (never trust pidfiles — observed stale 2026-10-04). Restarts dead/misrouted relays in-netns. Runs via systemd timer every 5min. Pattern mirrors chromebox-watchdog.sh.

Session: sidechat/chromebox-ops
2026-10-04 12:40:56 +00:00
operator-646 3dd9d9ffaf docs: DM-over-HTTPS design from operator-646 2026-10-04 05:27:55 +00:00
operator-main 45741f1151 bin/box-chat.py + box-chat-cdp.py — read-only bl helper for Box thread oversight
Session: sidechat/box-chat
2026-10-04 04:31:39 +00:00
dom-inspector-4 ef453ccb26 Verify + extend DOM-SETTINGS/SEARCH/NOTIFICATIONS (2026-10-04, 3 nodes)
Session: sidechat/dom-settings
2026-10-04 04:31:11 +00:00
dom-panel-inspector 7d0ccba64c docs/DOM-CHAT-PANEL.md — re-verified 2026-10-04 on opm/muse/pip; unread indicator, stripped state, row differences
Session: sidechat/dom-panel
2026-10-04 04:29:16 +00:00
dom-inspector-5 e28b10edc8 DOM inspector 5/5: verify page structure + edge states, regenerate index
Session: sidechat/dom-structure
2026-10-04 04:29:10 +00:00
dom-inspector-2 c50667b626 DOM message surface re-verified 2026-10-04 (3 nodes): .group/msg nesting fix, ownership-split menus, More reactions dialog, dividers, virtualization, DM text formats
Session: sidechat/dom-messages
2026-10-04 04:28:21 +00:00
dom-inspector-3 bbe1ebb76a docs/DOM-APPROVALS.md — approval/permission dialog DOM surface reference
Session: sidechat/dom-approvals
2026-10-04 04:27:16 +00:00
operator-main 4b9f4889e3 docs/BOX-API-DESIGN-THREADS.md — per-agent thread oversight API contract (draft)
Session: main
2026-10-04 04:16:15 +00:00
operator-main 844aa73bd9 UUID-based sidechat reuse for heartbeat\n\n- Add url command to muse-chat-api.py\n- Dispatcher: reuse_key -> thread UUID mapping in job-sidechats.json\n- Capture UUID after first send, reuse on subsequent runs\n- Fixes multi-spawn bug (was matching by auto-generated title) 2026-10-04 04:03:28 +00:00
operator-main a9812cd355 Add box-ctl.py: allowlisted bl helper for Box API mutations\n\n- 14 actions: timer-list/status/create/delete/start/stop/enable/disable,\n job-list/get/put/delete/trigger, notify\n- Name regex ^[a-z0-9-]{1,64}$, full job schema validation per design §6\n- Cron→OnCalendar conversion + systemd-analyze verification\n- Fixed unit templates (only validated name interpolated)\n- Git commits on job put/delete; audit log to box-ctl.jsonl\n- No shell=True, no string interpolation into commands\n- Tested: full lifecycle on bl (boxtest job) 2026-10-04 04:02:19 +00:00
box-ctl fcf9224404 Delete job boxtest via box-ctl 2026-10-04 04:01:56 +00:00
box-ctl 7cf80bc918 Add job boxtest via box-ctl 2026-10-04 04:01:51 +00:00
operator-main 61d59de30d Box API design: timer and job endpoints\n\n- 14 endpoints with full schemas, JSON canonical (not YAML)\n- Allowlisted box-ctl.py helper (no raw systemctl over SSH)\n- Auto-confirmed vs agent-confirmed split for [REQ]/[CONFIRM] 2026-10-04 03:59:01 +00:00
operator-main 458314cbf6 Box UI design: operator dashboard and management pages\n\n- 7 sections: dashboard, timers, jobs, DMs, board/chat, requests, audit\n- Server-rendered + theme engine (not SPA)\n- Every mutation shows its API equivalent (steering made visible) 2026-10-04 03:58:36 +00:00
operator-main ef8e98abf0 Box API design: DM and message endpoints\n\n- POST /api/box/dms, /chat/send, /message, /board/post\n- Bearer token auth with spoof scope, idempotency via deterministic IDs\n- Rate limits mirror rate_limiter.py 2026-10-04 03:58:30 +00:00
operator-main 6fcd3bfb4e DOM reference: search functionality\n\n- Quick search dialog structure and data-value encoding\n- chat🧵<uuid> gives ready-made thread lookup\n- Radix gotchas: trusted events only, never touch input via JS 2026-10-04 03:54:16 +00:00
operator-main 13d231b86a DOM reference: message actions and thread interactions\n\n- Messages use .group/msg (no testid); action via More options radix menu\n- 6 quick reactions documented; Reply is composer-quote only, no Edit UI\n- Headless quirk: full pointer event sequence needed for radix 2026-10-04 03:53:52 +00:00
operator-main 265a76778b DOM reference: settings and profile\n\n- Dock rail structure, radix menu gotchas (synthetic click fails)\n- Settings dialog sections, appearance controls\n- No in-app account switching (profile-level only) 2026-10-04 03:53:01 +00:00
operator-main 664b66be93 DOM reference: edge states, loading, and error handling\n\n- S3 PARTIAL_LOAD dissected with timed probes\n- readyState useless; settled-state signature documented\n- False-positive traps for innerText.includes() 2026-10-04 03:51:05 +00:00
operator-main e470dfc244 DOM reference: notifications and activity\n\n- No bell icon; toast live region + Activity tab documented\n- Chat nav unread via aria-label flip (match on testid, not label) 2026-10-04 03:50:57 +00:00
operator-main a98fcfa64c DOM master index with quick-reference recipes\n\n- 50+ testids deduplicated across all docs\n- 6 copy-pasteable automation recipes\n- Resolves 4 contradictions (Ctrl+J superseded by click-based)\n- Flags 7 gaps for future mapping 2026-10-04 03:50:49 +00:00
operator-main 39e9db07b2 DOM reference: page structure, states, and approvals\n\n- 538-line map of 5 page states with detection logic\n- 57 data-testid values inventoried and categorized\n- check_approvals IP filtering documented 2026-10-04 03:48:33 +00:00
operator-main 6d737a48f1 DOM reference: messages, input, and chat activation\n\n- 332-line map of composer, send button, message list\n- Author encoding via data-message-id prefix documented\n- hatch-nav-chat as reliable Ctrl+J replacement 2026-10-04 03:48:18 +00:00
operator-main 0511e88b60 DOM reference: chat panel and sidechat structure\n\n- 367-line map of switcher, compose button, panel shell\n- 24 data-testid inventory with states and detection signals\n- Documents toggle behavior and false-positive traps 2026-10-04 03:47:00 +00:00
operator-main 72574baa4b Replace Ctrl+J with click-based chat activation\n\n- New _ensure_chat_active(): compose -> switcher -> nav-chat priority\n- hatch-nav-chat click recovers from stripped /thread/new state\n- Ctrl+J needed keyboard focus which stripped states lack 2026-10-04 03:46:47 +00:00
operator-main 7d48123835 Heartbeat to sidechat with reuse\n\n- Dispatcher: reuse existing sidechat by name (not create new each time)\n- Heartbeat job: sidechat.create=true, name_template=heartbeat (fixed) 2026-10-04 03:40:25 +00:00
operator-main dbc6ac6f3b DM_SPEC: converge operator reply into sections 4-6
Tiered request/command semantics with hard rule (no order at any tier
may demand channel abandonment or key exfiltration); policy adoption
out-of-band; per-agent private-key custody with dm-signers/ write
authority as the trust anchor; verification provisional by default;
single trust root (board allowed_signers, namespace dm).
Converges the three answers to the fd553ef5 operator DM.
Session: sidechat/dm-spec-convergence
2026-10-04 03:39:49 +00:00
operator-main 12dca45107 cmd_sidechat_create: navigate to main first\n\nReliability test found success poisons next run (browser left on\n/thread/new with stripped DOM). Now navigates to main via Ctrl+J\nat start for known good state. 2026-10-04 03:38:46 +00:00
operator-main f8b6475396 cmd_sidechat_create: exact header check for panel state\n\ninnerText.includes was always true (switcher button text).\nNow checks for exact Side chats header text node, loops up to 5x. 2026-10-04 03:38:22 +00:00
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 b46afcbaea refine-system: back to automated sidechat create\n\nDispatcher now nails the create via direct send. 2026-10-04 03:23:41 +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 b0d6bb3ad8 refine-system job: agent creates sidechat (not dispatcher)\n\nPragmatic pattern: DM instructs agent to create sidechat via UI.\nAvoids flaky browser automation for sidechat creation. 2026-10-04 03:21:54 +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