result-bitable-reporter
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseResult Bitable Reporter
结果多维表格上报器
Use this skill for a deterministic result pipeline around .
sqlite -> Feishucapture_results本Skill用于构建围绕的确定性结果传输管道。
capture_resultssqlite -> 飞书Path Convention
路径约定
Canonical install and execution directory: . Run commands from this directory:
~/.agents/skills/result-bitable-reporter/bash
cd ~/.agents/skills/result-bitable-reporterOne-off (safe in scripts/loops from any working directory):
bash
(cd ~/.agents/skills/result-bitable-reporter && npx tsx scripts/result_reporter.ts --help)标准安装与执行目录:。请从该目录运行命令:
~/.agents/skills/result-bitable-reporter/bash
cd ~/.agents/skills/result-bitable-reporter一次性执行(可在脚本/循环中从任意工作目录安全运行):
bash
(cd ~/.agents/skills/result-bitable-reporter && npx tsx scripts/result_reporter.ts --help)Workflow
工作流
- Optional data collection:
- : start background
collect-startfor one device (evalpkgs run) withSerialNumber(digits only).TaskID - : stop that collector and print summary metrics (
collect-stop,delta,task_delta,records_jsonl,tracking_events).runtime_sec
- Data selection:
- : preview target sqlite rows (
filter) before upload.capture_results - Task-scoped selection: pass to constrain rows to one task.
--task-id <TASK_ID> - Default status filter is pending+failed ().
reported IN (0, -1)
- Data reporting:
- : batch create Feishu records and write back sqlite status.
report - Optional sets total cap for one report run (default: process all matched rows).
--max-rows <n> - For per-task workflows, always pass to avoid cross-task uploads.
--task-id <TASK_ID> - Success writeback: ,
reported=1,reported_at=now_ms.report_error=NULL - Failure writeback: ,
reported=-1,reported_at=now_ms.report_error=<truncated error>
- Retry:
- : move failed rows (
retry-reset) back to pending (reported=-1), then rerunreported=0.report
- 可选数据收集:
- :为指定设备(
collect-start)启动后台SerialNumber任务,需传入纯数字格式的evalpkgs run。TaskID - :停止该收集任务,并打印汇总指标(
collect-stop、delta、task_delta、records_jsonl、tracking_events)。runtime_sec
- 数据筛选:
- :在上传前预览目标sqlite中的
filter行数据。capture_results - 任务范围筛选:传入以将数据限定为单个任务的结果。
--task-id <TASK_ID> - 默认状态筛选条件为待上报+上报失败()。
reported IN (0, -1)
- 数据上报:
- :批量创建飞书记录,并将上报状态回写至sqlite。
report - 可选参数设置单次上报的最大行数限制(默认:处理所有匹配行)。
--max-rows <n> - 对于单任务工作流,请务必传入以避免跨任务上传。
--task-id <TASK_ID> - 上报成功回写:,
reported=1,reported_at=当前时间戳。report_error=NULL - 上报失败回写:,
reported=-1,reported_at=当前时间戳。report_error=<截断后的错误信息>
- 重试机制:
- :将上报失败的行(
retry-reset)重置为待上报状态(reported=-1),之后可重新运行reported=0命令。report
Run
运行方式
CLI entry:
bash
npx tsx scripts/result_reporter.ts <subcommand> [flags]Subcommands:
collect-startcollect-stopfilterreportretry-reset
Required env by phase:
- Collection: ,
BUNDLE_IDSerialNumber - Feishu report: ,
FEISHU_APP_ID,FEISHU_APP_SECRETRESULT_BITABLE_URL - Optional overrides: ,
FEISHU_BASE_URL,TRACKING_STORAGE_DB_PATHRESULT_SQLITE_TABLE
CLI入口:
bash
npx tsx scripts/result_reporter.ts <subcommand> [flags]子命令:
collect-startcollect-stopfilterreportretry-reset
各阶段所需环境变量:
- 数据收集阶段:、
BUNDLE_IDSerialNumber - 飞书上报阶段:、
FEISHU_APP_ID、FEISHU_APP_SECRETRESULT_BITABLE_URL - 可选覆盖配置:、
FEISHU_BASE_URL、TRACKING_STORAGE_DB_PATHRESULT_SQLITE_TABLE
Resources
相关资源
- : executable source of truth for flags and behavior.
scripts/result_reporter.ts - : sqlite schema, collect-start/collect-stop semantics, SQL operations, command examples.
references/sqlite-and-field-mapping.md - : Feishu APIs, URL rules, failures, field mapping env overrides, command examples.
references/feishu-api-and-errors.md
- :包含所有命令参数与行为逻辑的可执行源码。
scripts/result_reporter.ts - :sqlite表结构、collect-start/collect-stop语义、SQL操作及命令示例。
references/sqlite-and-field-mapping.md - :飞书API、URL规则、错误处理、字段映射环境变量覆盖及命令示例。
references/feishu-api-and-errors.md