feat(box): add invite code handler, Settings RPA, and agent onboarding pipeline

- Support invite code discovery in main chat and redemption in settings menu
- Add Settings RPA primitives with Radix UI mouse dispatch and retry polling for async DOM
- Attribute 'has_redeemed' binary from the Additional tokens ticker / entrypoint visibility
- Unblock agent @646 by repairing warp-def/dev tunnels and redeeming REDCJ7 via dev (+1B tokens)
- Implement 'box onboard' pipeline to provision infra, authenticate, and auto-redeem queued codes
- Add 'box onboard feed-matrix' ranking all agents by work done over time, job count, and role
- Register 'InputType.SALVAGE' in loop modulation (CRITICAL priority, 600s timeout, 3 nudges to opm)
- Ingest recurring balance audits into canonical HEARTBEAT.md and TOOLS.md
This commit is contained in:
operator
2026-10-06 19:33:17 +00:00
parent 4998ffddb6
commit b824f6d405
30 changed files with 4516 additions and 0 deletions
+52
View File
@@ -0,0 +1,52 @@
"""Data controls tab: model-improvement switch (read-only otherwise).
The switch row label is not yet pinned from recon, so resolution
prefers the single switch on the tab and falls back to keyword
match. Import/Delete rows are inventoried, never touched.
"""
from hatch_menu import controls, dialog
TAB = "Data controls"
_KEYWORDS = ("improv", "train", "model", "data", "usage")
def _resolve(ws):
"""The improvement switch dict, or None when not resolvable."""
if not dialog.goto_tab(ws, TAB):
return None
switches = controls.list_switches(ws)
if len(switches) == 1:
return switches[0]
for kw in _KEYWORDS:
for s in switches:
blob = ((s.get("label") or "") + " "
+ (s.get("aria") or "")).lower()
if kw in blob:
return s
return None
def ai_improvement(ws):
"""Improvement-switch state: True/False, None when unreadable."""
sw = _resolve(ws)
return None if sw is None else bool(sw.get("checked"))
def set_ai_improvement(ws, on):
"""Set the improvement switch; verify-then-fallback. Bool."""
sw = _resolve(ws)
if sw is None:
return False
label = (sw.get("aria") or "").strip() \
or (sw.get("label") or "")[:40].strip()
if not label:
return False
return controls.set_switch(ws, label, on)
def describe(ws):
"""Inventory: switch state + row names (import/delete read-only)."""
state = ai_improvement(ws)
return {"ai_improvement":
("on" if state else "off") if state is not None else None,
"rows": dialog.describe_rows(ws, TAB)}