SPEC โ Worker ๐ Finder (Telegram BEE command + portal tile)
Owner lane: command-inbox / ops-api (the #042 session). Worker ๐ wrote this spec; the #042 session builds it. Paste-ready.
Goal: Sam, from his phone, can find the live Worker Bee session in one move โ no opening files, no transcript dig.
Created: 2026-06-12 by Worker ๐ (sessionae81915d). Pairs withdocs/WORKER_BEE.md(the beacon).
The one shared source of truth
A single ops-api KV key bee:beacon holding the current bee pointer as JSON:
{
"session_id": "ae81915d-7da1-4eef-9646-86435c46ed3d",
"cwd": "C:\\Users\\ztrei\\OneDrive\\2. Hook Street\\05. 2026 BH",
"started": "2026-06-12T16:00:00Z",
"last_active": "2026-06-12T16:54:00Z",
"state": "LIVE โ building the finder",
"next_action": "Sam picks phone-finder; bee wiring writer script",
"resume_cmd": "claude --resume ae81915d-7da1-4eef-9646-86435c46ed3d"
}
Both the Telegram command and the portal tile read THIS. Never two sources.
3 pieces to build
1. Endpoint โ POST /bee/beacon (writer) + GET /bee/beacon (reader)
POSTโ secret-auth (reuseINBOX_SECRETpattern). Body = the JSON above. Writes KVbee:beacon. Returns{ok:true}.GETโ secret-auth. Returns the stored JSON (for the portal). 404/{}if never set.
2. Telegram BEE command (command-inbox bot)
- First-word command
BEE(aliasFINDBEE,WORKERBEE). - Reads KV
bee:beaconโ replies, signedWorker ๐:
๐ Worker Bee โ LIVE (last active 12:54 PM) State: building the finder Resume on PC: claude --resume ae81915dโฆ Or: fresh session โ "you're Worker ๐, read docs/WORKER_BEE.md" - If
last_active> 6h old โ prefixโ ๏ธ may be dormant โ. - If KV empty โ
๐ No live bee registered. Spin a session + say "you're Worker ๐, read docs/WORKER_BEE.md".
3. Portal tile (outputs/home.html, extend โ don't build a new page)
- A
Worker ๐card: fetchesGET /bee/beacon, shows state + last-active + a copy-button for the resume command. Greys out + "may be dormant" if stale >6h.
Machine-side writer (Worker Bee's lane โ scripts/bee.ps1)
The bee POSTs its pointer to /bee/beacon at session-open, at milestones, and before going dormant โ keeping KV current the same way docs/WORKER_BEE.md is kept current. Reads the endpoint+secret from the gitignored command-inbox/.claude-notify.json. (Bee writes this script once the endpoint contract is confirmed.)
Done =
Sam texts BEE from the car โ gets the live session + resume command. Tile mirrors it. KV is the only source. No transcript archaeology, ever.