datahive-installer
Automates installation of DataHive node.
DataHive context (for operators)
DataHive is a platform for high-quality AI training datasets and analytics use cases across domains such as e-commerce, reviews, audio, image, and video, with an emphasis on decentralized and passive data collection workflows. This skill is limited to dashboard authentication automation, specifically requesting a magic link, retrieving it, and opening the login tab, and does not cover dataset management.
Trigger phrases
Use this skill when the user says things like:
- - "run datahive-installer"
- "log me into DataHive"
- "start DataHive login flow"
- "execute DataHive installer"
- "setup DataHive"
- "install DataHive"
Execution rule
Always execute this skill in the exact sequence defined in strict order, exactly as written in this SKILL.md.
Do not skip, reorder, or parallelize steps unless the user explicitly asks to change the sequence.
What this skill does
- 0. Detect platform (ubuntu or macos) and stop with an error for any other OS.
- Install runtime prerequisites for the detected platform.
- Launch Chrome in persistent background mode with CDP enabled.
- Read your authenticated gog account email.
- Request a DataHive magic link via API.
- Find the latest DataHive login email in Gmail.
- Extract the magic login URL.
- Open the magic URL in a new browser tab over CDP.
Step 0 — Detect platform
Run:
CODEBLOCK0
Expected output:
- -
ubuntu for Ubuntu hosts - INLINECODE2 for macOS hosts
Any other value or non-zero exit means unsupported platform.
Step 1 — Install prerequisites (platform-aware)
Run:
CODEBLOCK1
Behavior by platform:
- -
ubuntu: installs Chrome + xvfb via apt, applies managed extension policy, installs websocat. - INLINECODE6 : installs Chrome via Homebrew cask (if missing), applies managed extension policy in
/Library/Managed Preferences/com.google.Chrome.plist, installs websocat.
Step 2 — Launch browser in persistent background mode (platform-aware)
Run:
CODEBLOCK2
Behavior by platform:
- -
ubuntu: launches google-chrome under xvfb-run. - INLINECODE12 : launches
/Applications/Google Chrome.app/Contents/MacOS/Google Chrome directly.
Optional checks:
CODEBLOCK3
CODEBLOCK4
Step 3 — Get email from gog
CODEBLOCK5
Use the default account email from output (example: peter@gmail.com).
Step 4 — Request magic link
Use the helper script with your gog email:
CODEBLOCK6
(or EMAIL=<EMAIL> ./scripts/4_request_magic_link.sh)
Expected response:
CODEBLOCK7
Step 5 — Find latest DataHive magic-link email
CODEBLOCK8
Take the top/latest message ID and fetch it:
CODEBLOCK9
Extract the URL from the HTML body:
INLINECODE16
Step 6 — Open magic link
Run:
CODEBLOCK10
Notes
- - Magic links expire quickly (about 15 minutes).
- Treat magic links as secrets; do not share them.
- If CDP is not available, start Chrome with remote debugging enabled.
技能名称: datahive-installer
详细描述:
datahive-installer
自动化安装DataHive节点。
DataHive背景(面向运维人员)
DataHive是一个面向高质量AI训练数据集和分析用例的平台,涵盖电子商务、评论、音频、图像和视频等领域,专注于去中心化和被动式数据收集工作流。本技能仅限于仪表板认证自动化,具体包括请求魔法链接、检索链接并打开登录标签页,不涉及数据集管理。
触发短语
当用户说出以下内容时使用此技能:
- - 运行datahive-installer
- 登录DataHive
- 启动DataHive登录流程
- 执行DataHive安装程序
- 设置DataHive
- 安装DataHive
执行规则
始终按照SKILL.md中定义的严格顺序精确执行此技能。
除非用户明确要求更改顺序,否则不得跳过、重新排序或并行执行步骤。
技能功能
- 0. 检测平台(ubuntu或macos),其他操作系统则报错停止。
- 为检测到的平台安装运行时依赖项。
- 在启用CDP的持久后台模式下启动Chrome。
- 读取已认证的gog账户邮箱。
- 通过API请求DataHive魔法链接。
- 在Gmail中查找最新的DataHive登录邮件。
- 提取魔法登录URL。
- 通过CDP在新浏览器标签页中打开魔法URL。
步骤0 — 检测平台
运行:
bash
./scripts/0detectplatform.sh
预期输出:
- - ubuntu 适用于Ubuntu主机
- macos 适用于macOS主机
任何其他值或非零退出码表示不支持的平台。
步骤1 — 安装依赖项(平台感知)
运行:
bash
PLATFORM=$(./scripts/0detectplatform.sh) ./scripts/1installprerequisites.sh
各平台行为:
- - ubuntu:通过apt安装Chrome + xvfb,应用托管扩展策略,安装websocat。
- macos:通过Homebrew cask安装Chrome(如缺失),在/Library/Managed Preferences/com.google.Chrome.plist中应用托管扩展策略,安装websocat。
步骤2 — 在持久后台模式下启动浏览器(平台感知)
运行:
bash
PLATFORM=$(./scripts/0detectplatform.sh) ./scripts/2launchchrome_supervisor.sh
各平台行为:
- - ubuntu:在xvfb-run下启动google-chrome。
- macos:直接启动/Applications/Google Chrome.app/Contents/MacOS/Google Chrome。
可选检查:
bash
curl -sf http://localhost:9222/json/version
bash
tail -f $HOME/.chrome-datahive/chrome.log
步骤3 — 从gog获取邮箱
bash
gog auth list --json
使用输出中的默认账户邮箱(示例:peter@gmail.com)。
步骤4 — 请求魔法链接
使用包含gog邮箱的辅助脚本:
bash
./scripts/4requestmagic_link.sh
(或 EMAIL= ./scripts/4requestmagic_link.sh)
预期响应:
json
{message:如果此邮箱存在,登录链接已发送}
步骤5 — 查找最新的DataHive魔法链接邮件
bash
gog gmail messages search from:datahive newer_than:7d --max 10 --account
获取顶部/最新的消息ID并提取:
bash
gog gmail get --account --json
从HTML正文中提取URL:
https://dashboard.datahive.ai/auth?token=...
步骤6 — 打开魔法链接
运行:
bash
TARGETURL=https://dashboard.datahive.ai/auth?token= ./scripts/6openmagiclink.sh
注意事项
- - 魔法链接过期很快(约15分钟)。
- 将魔法链接视为机密信息,请勿分享。
- 如果CDP不可用,请启用远程调试启动Chrome。