Commit Graph

243 Commits

Author SHA1 Message Date
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
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 2b76863520 Add refine-system job: sidechat for infrastructure refinement\n\nSpawns sidechat for opm to review and improve the JOB/DM system. 2026-10-04 03:09:48 +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 0929a44736 Add heartbeat job: 5-min DM health check\n\nSystemd timer job-heartbeat.timer runs every 5 minutes,\ndispatches heartbeat DM to opm via job-dispatch.py. 2026-10-04 03:07:41 +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 6f1ed27a0d BOX-API-SPEC: Add board and chatroom API appendix\n\nAppendix C: Unified message API for populating boards and chatrooms.\nCovers board post/get, chatroom send/list, and unified /message endpoint\nwith target routing (board:#, chat:, dm:). 2026-10-04 03:02:06 +00:00
operator-main 706fe057a6 BOX-API-SPEC: Add confirmation system spec\n\nAPI requests result in DMs; DMs require explicit confirmations.\nCovers: [REQ id] -> [CONFIRM id] flow, pending request tracking,\nsweeper for timeouts, when to require confirmation. 2026-10-04 03:00:36 +00:00
operator-main ac6d7bf2d3 BOX-API-SPEC: Add UI/API design principle\n\nUI surfaces allow agent creativity but clearly steer toward API.\nThe UI teaches, the API is the source of truth. 2026-10-04 03:00:03 +00:00
operator-main e7aae05dbd BOX-API-SPEC: Add rich scheduling and DM metadata appendices\n\nAppendix A: Rich Linux scheduling (systemd, cron, at) with unified API.\nAppendix B: DM + metadata JSON (wire format, types, API endpoints). 2026-10-04 02:59:40 +00:00
operator-main b1247c530b Add BOX-API-SPEC.md: agentic timer management interface\n\nSpec for box.muse-dev.online API to manage systemd timers on bl.\nCovers: endpoints (list/create/start/stop/delete), auth (ops bearer),\nbackend (SSH to bl), rate limiting, web UI. 2026-10-04 02:57:55 +00:00
operator-main 372e9612db Add JOB-SPEC.md: hosted job scheduler and distributor\n\nSpec for cron-driven job system that injects prompts via DM.\nCovers: job YAML format, scheduler (systemd timers), dispatcher,\nagent handler convention, collector, sidechat integration,\nlogging, rate limiting. 2026-10-04 02:55:51 +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 89b9fdb9f8 Add DM-SPEC.md (work orders + server-side logging spec)\n\nCopied from frontdoor repo per 646 request. Spec covers:\n- Work orders as first-class DM kind\n- Server-level DM logging (append-only)\n- Box visibility via DMs tab 2026-10-04 02:42:23 +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