From 5ed1a6133bb7ba35efc388032f008dfc35265f85 Mon Sep 17 00:00:00 2001 From: yumoqing Date: Mon, 3 Aug 2026 16:46:18 +0800 Subject: [PATCH] docs: add README.md and skill/SKILL.md --- README.md | 19 +++++++++++++++++++ skill/SKILL.md | 28 ++++++++++++++++++++++++++++ 2 files changed, 47 insertions(+) create mode 100644 skill/SKILL.md diff --git a/README.md b/README.md index bec4e0c..aea41a5 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,21 @@ # pipeline_dist +产线分发模块 —— 管理分发商(Distributor)及其授权的产线关联。 + +## 功能 + +- **分发商管理**:分发商注册、API Key 生成 +- **产线授权**:将产线授权给指定分发商 + +## 数据表 + +| 表 | 说明 | +|---|------| +| distributors | 分发商信息 | +| distributor_pipeline | 分发商-产线授权关联 | + +## 安装 + +```bash +cd pkgs/pipeline_dist && pip install . +``` diff --git a/skill/SKILL.md b/skill/SKILL.md new file mode 100644 index 0000000..4eaa0f4 --- /dev/null +++ b/skill/SKILL.md @@ -0,0 +1,28 @@ +--- +name: pipeline-dist +description: "Pipeline distribution module — distributor management, API key generation, and pipeline authorization." +--- + +# pipeline_dist + +Manages distributors (downstream consumers) and their authorized pipeline access. + +## Data Model + +| Table | Key Fields | +|-------|-----------| +| `distributors` | id, name, api_key, status, org_id | +| `distributor_pipeline` | id, distributor_id, pipeline_id | + +## DSPY Endpoints + +- `distributors_create/update/delete.dspy` — distributor CRUD +- `distributor_generate_key.dspy` — generate API key +- `distributor_pipeline_create/update/delete.dspy` — grant/revoke pipeline access +- `get_search_distributor_id.dspy` — dropdown search + +## Pitfalls + +- API key uses `password_encode()` / `password_decode()` helpers. +- CRUD scoped by `org_id` — multi-tenant safe. +- Generated dirs (`wwwroot/distributors/`) are auto-generated by xls2ui.