piracy-handler
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChinesePiracy Handler
Piracy Handler(盗版内容处理工具)
用于“综合页搜索完成后”的后置编排:盗版检测(只读)→ 子任务创建 → webhook 计划 upsert。
用于综合页搜索完成后的后置流程编排:盗版检测(只读)→ 子任务创建 → webhook计划更新或插入(upsert)。
路径约定
路径约定
统一安装与执行目录:。执行前先进入该目录:
~/.agents/skills/piracy-handler/bash
cd ~/.agents/skills/piracy-handler统一安装与执行目录:。执行前请先进入该目录:
~/.agents/skills/piracy-handler/bash
cd ~/.agents/skills/piracy-handlerQuick start
快速开始(Quick start)
在 目录运行:
~/.agents/skills/piracy-handler/bash
npx tsx scripts/piracy_detect.ts --task-id <TASK_ID>
npx tsx scripts/piracy_create_subtasks.ts --task-id <TASK_ID>
npx tsx scripts/piracy_upsert_webhook_plans.ts --task-id <TASK_ID>更完整命令与调试示例见 。
references/commands.md在目录中运行以下命令:
~/.agents/skills/piracy-handler/bash
npx tsx scripts/piracy_detect.ts --task-id <TASK_ID>
npx tsx scripts/piracy_create_subtasks.ts --task-id <TASK_ID>
npx tsx scripts/piracy_upsert_webhook_plans.ts --task-id <TASK_ID>更完整的命令与调试示例请查看。
references/commands.mdWorkflow(高层)
高层工作流(Workflow)
- 从本地 sqlite 读取综合页采集结果。
capture_results - 通过 从任务状态表补齐
TaskID(BookID不含 BookID)——委托capture_results。feishu-bitable-task-manager - 用 聚类。
GroupID={MapAppValue(任务App)}_{BookID}_{UserKey} - 从原始剧单按 BookID 查询总时长,换算后计算阈值并筛选命中分组。
- 为命中分组创建子任务(个人页必建,合集/锚点按条件)——委托 。
feishu-bitable-task-manager - 创建/更新 的 webhook 推送计划——委托
BizType=piracy_general_search。group-webhook-dispatch
- 从本地sqlite的表中读取综合页采集结果。
capture_results - 通过从任务状态表补充获取
TaskID(BookID表中不包含capture_results)——该操作委托给feishu-bitable-task-manager执行。BookID - 使用规则进行聚类。
GroupID={MapAppValue(任务App)}_{BookID}_{UserKey} - 根据从原始剧单中查询内容总时长,换算后计算阈值并筛选出符合条件的盗版分组。
BookID - 为命中的盗版分组创建子任务(个人页内容必创建子任务,合集/锚点内容按条件创建)——该操作委托给feishu-bitable-task-manager执行。
- 创建或更新的webhook推送计划——该操作委托给group-webhook-dispatch执行。
BizType=piracy_general_search
I/O(默认路径约定)
输入输出约定(I/O)
- 默认写入
piracy_detect.ts(避免多设备并行冲突)。~/.eval/<TaskID>/detect.json - 未指定 时,后续命令可用
--input从--task-id <TaskID>读取。~/.eval/<TaskID>/detect.json
- 默认将结果写入
piracy_detect.ts(避免多设备并行执行时产生冲突)。~/.eval/<TaskID>/detect.json - 若未指定参数,后续命令可通过
--input从--task-id <TaskID>读取数据。~/.eval/<TaskID>/detect.json
Required env
必需环境变量(Required env)
- ,
FEISHU_APP_IDFEISHU_APP_SECRET - (任务状态表)
TASK_BITABLE_URL - (原始剧单/元信息表)
DRAMA_BITABLE_URL - (推送计划表)
WEBHOOK_BITABLE_URL
- ,
FEISHU_APP_IDFEISHU_APP_SECRET - (任务状态表的链接)
TASK_BITABLE_URL - (原始剧单/元信息表的链接)
DRAMA_BITABLE_URL - (推送计划表的链接)
WEBHOOK_BITABLE_URL
Dependencies
依赖项(Dependencies)
- 调用其它 skills 时遵循各自的 /
Path Convention(统一安装路径:路径约定),推荐在脚本里使用单条 subshell 执行避免~/.agents/skills/<skill>/漂移:cd(cd ~/.agents/skills/feishu-bitable-task-manager && npx tsx scripts/bitable_task.ts ...)(cd ~/.agents/skills/feishu-bitable-task-manager && npx tsx scripts/drama_fetch.ts --format meta ...)(cd ~/.agents/skills/group-webhook-dispatch && npx tsx scripts/upsert_webhook_plan.ts ...)
- 调用其他skill时需遵循各自的路径约定(Path Convention),所有skill的统一安装路径为。推荐在脚本中使用单条子shell(subshell)执行命令,避免目录切换(cd)导致的路径异常:
~/.agents/skills/<skill>/(cd ~/.agents/skills/feishu-bitable-task-manager && npx tsx scripts/bitable_task.ts ...)(cd ~/.agents/skills/feishu-bitable-task-manager && npx tsx scripts/drama_fetch.ts --format meta ...)(cd ~/.agents/skills/group-webhook-dispatch && npx tsx scripts/upsert_webhook_plan.ts ...)
Resources
资源文件(Resources)
- : 阈值检测(输出 JSON)
scripts/piracy_detect.ts - : 子任务创建(写任务状态表)
scripts/piracy_create_subtasks.ts - : webhook 计划 upsert(写推送计划表)
scripts/piracy_upsert_webhook_plans.ts - Read for field conventions and debug flags.
references/commands.md
- :阈值检测工具(输出JSON格式结果)
scripts/piracy_detect.ts - :子任务创建工具(写入任务状态表)
scripts/piracy_create_subtasks.ts - :webhook计划更新/插入工具(写入推送计划表)
scripts/piracy_upsert_webhook_plans.ts - 如需了解字段约定与调试参数,请查看。
references/commands.md