* feat(github-copilot-sdk): add workspace skills support - Introduce ENABLE_WORKSPACE_SKILLS valve to enable/disable workspace custom tools discovery - Modify _build_session_config() to auto-load tools from .copilot-skills/ directory - Add workspace_skills_example.py template with 3 working example tools - Update README.md and README_CN.md with Workspace Skills guide and usage examples - Create v0.9.0.md and v0.9.0_CN.md release notes - Sync version to all docs files (index.md, index.zh.md, and main docs) - Bump version from 0.8.0 to 0.9.0 across all 7+ locations * docs: establish temp files handling policy (project-based, not /tmp) - Add TEMP_FILES_POLICY.md guideline for all skills and workflows - Update pr-submitter skill to use .temp/ directory instead of /tmp - Update release-prep skill documentation with temp file convention - Add .temp/ and .build/ entries to .gitignore - Create internal policy memo in /memories/repo/ This policy ensures: - All temporary files stay within project workspace (not system /tmp) - Alignment with OpenWebUI workspace isolation principles - Multi-user safety and cleanup traceability - Consistent handling across all skills and development workflows * fix(terminology): rename 'workspace skills' to 'workspace custom tools' for accuracy The term 'Skills' in Anthropic context refers to instruction-based frameworks (SKILL.md files with YAML frontmatter + markdown), not custom tool functions. Our implementation uses @define_tool decorator to define custom tools that the SDK auto-discovers from .copilot-skills/ directory. These are Tools, not Skills. Changes: - Rename ENABLE_WORKSPACE_SKILLS valve -> ENABLE_WORKSPACE_TOOLS - Update all documentation (README, README_CN, docs, release notes) - Fix section headings and descriptions throughout - Ensure consistent terminology across all files This is a terminology-only change; functionality remains identical. * feat(pipes): release v0.9.0 of GitHub Copilot SDK Pipe - Integrated OpenWebUI Skills Bridge and manage_skills tool - Reinforced status bar stability with session_finalized logic - Added persistent SDK config directory support * docs(pipes): add comprehensive guides and v0.9.0 notes for Copilot SDK - Added skill manager and best practices guides - Added publishing tool documentation - Included v0.9.0 release notes and deployment script - Updated usage guides
102 lines
4.3 KiB
Markdown
102 lines
4.3 KiB
Markdown
# 🚀 GitHub Copilot SDK Pipe v0.9.0:Copilot SDK Skills 核心能力与扩展交付
|
||
|
||
**GitHub Copilot SDK Pipe v0.9.0** 的核心是将 **Copilot SDK Skills** 提升为一等能力(原生目录支持 + 双向同步 + `manage_skills` 确定性管理),并在此基础上增强发布交付体验。
|
||
|
||
---
|
||
|
||
## ⭐ 版本亮点
|
||
|
||
- **🧩 Copilot SDK Skills 原生支持(核心)**:原生支持 SDK 技能目录(`SKILL.md` + 可选资源文件),技能可作为一等运行时上下文加载。
|
||
- **🔄 OpenWebUI Skills 桥接(扩展)**:OpenWebUI 与本地 SDK 技能目录双向同步。
|
||
- **🛠️ `manage_skills` 工具(扩展)**:会话内以确定性方式完成 `list/install/create/edit/show/delete`。
|
||
- **📤 发布增强**:HTML 支持 `artifacts` / `richui`;PDF 统一 Markdown 链接交付。
|
||
- **📁 文件夹级技能**:一个技能可包含 `SKILL.md` 及模板/脚本/资源文件。
|
||
- **🧱 环境改造**:在 `/app/backend/data` 下重构配置、工作区与工具运行时布局,隔离性和可复现性显著提升。
|
||
|
||
---
|
||
|
||
## 📦 快速安装
|
||
|
||
- **GitHub Copilot SDK (Pipe 插件)**: [安装 v0.9.0](https://openwebui.com/posts/ce96f7b4-12fc-4ac3-9a01-875713e69359)
|
||
- **GitHub Copilot SDK (Filter 伴侣插件)**: [安装 v0.1.3](https://openwebui.com/posts/403a62ee-a596-45e7-be65-fab9cc249dd6)
|
||
|
||
---
|
||
|
||
## 🚀 v0.9.0 更新内容
|
||
|
||
### 1. OpenWebUI Skills ↔ SDK 双向同步
|
||
|
||
所有技能统一存放于 `{OPENWEBUI_SKILLS_SHARED_DIR}/shared/`,在数据库与文件之间自动同步。
|
||
|
||
### 2. `manage_skills` 工具
|
||
|
||
内置原生工具(不是 skill),支持:
|
||
|
||
- `list`
|
||
- `install`(单 URL / 多 URL)
|
||
- `create`
|
||
- `edit`
|
||
- `show`
|
||
- `delete`
|
||
|
||
### 3. 发布行为
|
||
|
||
- HTML:`artifacts`(输出代码块嵌入)或 `richui`(发射器自动渲染)两种模式。
|
||
- PDF:仅以 Markdown 链接交付(不嵌入 iframe)。
|
||
|
||
### 4. 环境改造(详细分析)
|
||
|
||
这一版本不只是功能更新,还做了较大规模的运行环境重构:
|
||
|
||
- **持久化 SDK 配置目录**
|
||
- 新增 `COPILOTSDK_CONFIG_DIR`。
|
||
- 解析优先级:Valve 显式配置 -> `/app/backend/data/.copilot` -> `~/.copilot` 回退。
|
||
- 标准 OpenWebUI 容器场景下,会话/配置状态可跨容器重启保留。
|
||
|
||
- **按用户 + 会话隔离的工作区模型**
|
||
- 工作区根目录统一到 `/app/backend/data/copilot_workspace`(容器模式)。
|
||
- 实际目录按用户与 chat 隔离:`/app/backend/data/copilot_workspace/{user_id}/{chat_id}`。
|
||
- `user_id` 与 `chat_id` 会进行清洗,避免路径穿越风险。
|
||
|
||
- **工具运行时固定到 data 卷(可持久)**
|
||
- 工具根目录:`/app/backend/data/.copilot_tools`。
|
||
- NPM 安装前缀固定为 `/app/backend/data/.copilot_tools/npm`(通过 `NPM_CONFIG_PREFIX`)。
|
||
- Python 工具执行固定在 `/app/backend/data/.copilot_tools/venv`(通过 `VIRTUAL_ENV`)。
|
||
- 同时清理 `PYTHONUSERBASE` 与 `PIP_USER`,防止 user-site 安装污染运行时。
|
||
- PATH 被重写优先指向 npm/venv bin,提升工具解析一致性。
|
||
|
||
- **CLI 启动链路加固**
|
||
- Copilot CLI 发现顺序:`COPILOT_CLI_PATH` -> 系统 `PATH` -> SDK 内置 bundled binary。
|
||
- 强制 `COPILOT_AUTO_UPDATE=false`,避免运行期自动更新导致行为漂移。
|
||
- 发现成功后自动将 CLI 目录注入 PATH。
|
||
|
||
- **系统提示词中的路径上下文强化**
|
||
- 会显式注入隔离工作区、技能目录、配置目录、工具目录。
|
||
- 让 Agent 的“可写路径”和“可读路径”更确定,减少越界写入风险。
|
||
|
||
- **普通用户权限边界细化**
|
||
- 普通用户仍禁止访问环境变量、数据库和无关系统内部信息。
|
||
- 允许读取**当前用户当前会话**在 `COPILOTSDK_CONFIG_DIR` 下的会话元数据用于排障。
|
||
- 仍严格禁止跨用户会话读取。
|
||
|
||
### 5. 新增 Valves
|
||
|
||
- `COPILOTSDK_CONFIG_DIR`
|
||
- `ENABLE_OPENWEBUI_SKILLS`
|
||
- `OPENWEBUI_SKILLS_SHARED_DIR`
|
||
- `DISABLED_SKILLS`
|
||
|
||
---
|
||
|
||
## 🔄 升级说明
|
||
|
||
- 从 v0.8.0 升级无破坏性变更。
|
||
- `ENABLE_WORKSPACE_TOOLS` 已由 `ENABLE_OPENWEBUI_SKILLS` 取代。
|
||
|
||
---
|
||
|
||
## 📚 详细文档
|
||
|
||
- README_CN: <https://github.com/Fu-Jie/openwebui-extensions/blob/main/plugins/pipes/github-copilot-sdk/README_CN.md>
|
||
- manage_skills 工具指南: <https://github.com/Fu-Jie/openwebui-extensions/blob/main/plugins/pipes/github-copilot-sdk/SKILLS_MANAGER_CN.md>
|