yumoqing e134cde44e feat(pipeline): 产线产品化接入 product_management——计费层+产品接口+定价映射表
产线使用费(订阅制)照 account_resource/storage_resource 范式接入产品层:
- models/pipeline_pricing_map.json: pipeline_id × charge_mode(month/year) → ppid
  (月付 months=1/valid_days=30;年付 months=10/valid_days=365,即月费×10 付10个月用12个月)
- pipeline_pricing.py: 定价映射 CRUD + calculate_pipeline_amount
  (buffered_charging(ppid, {months}) 算原价;无定价方案/金额0 均抛异常不静默)
- product_interface.py: 7 个标准接口(load_product_category_product 导入用;
  get_product_display 展示月/年双档价;execute_product_service 开订阅权益)
- init.py load_pipeline_core: 注册 env.product_interface(module_name='pipeline_core')
  + env.pipeline_pricing_map_save/get_pipeline_ppid/calculate_pipeline_amount

资源主表复用 pipelines(status='published' 才可售),不建 usage 表——
订阅购买是同步实时记账(purchase_realtime → product_accounting_generic 写 biz_order)。

用户定稿的商业模型(2026-09-06):账号免费只管并发配额;产线单独包月
(商机100/投标150/开发200,年付=月×10);模型按量加价;存储 1元/GB月。
2026-09-06 16:55:30 +08:00

pipeline_core

产线核心模块 —— 管理产线定义、步骤编排、版本控制、发布流程。

功能

  • 产线管理:产线 CRUD定义产线名称与描述
  • 步骤编排产线步骤的增删改查支持依赖关系DAG
  • 版本控制:产线版本发布与回滚
  • 编辑器:可视化产线步骤编排界面

数据表

说明
pipelines 产线定义
pipeline_steps 产线步骤(含 deps 依赖)
pipeline_versions 产线版本快照
llm 大模型配置

安装

cd pkgs/pipeline_core && pip install .

集成

伞仓 (pipeline-app) 通过 wwwroot symlink 加载本模块:

wwwroot/pipeline_core -> ../pkgs/pipeline_core/wwwroot

通用会话产线隔离2026-09-05

配合 pipeline-service 的 7 层隔离(详见其 README本模块承担

  • agent_config.load_agent_config(generic=True):不挂产线能力包, 并剔除 GENERAL_TOOLS 中 category=project/shell 的工具schema 层防线, LLM 根本看不见项目管理/命令执行工具)
  • upload_tools.resolve_upload_dir(generic=True):通用会话上传文件落 _general/{uid} 专属目录,与 AgentExecutor 的文件根一致 _resolve_ws_path 越界保护只认该目录)
  • wwwroot/api/agent_chat_generic.dspy纯通用会话入口generic=True
Description
No description provided
Readme 209 KiB
Languages
Python 100%