feat(github-copilot-sdk): add workspace skills support (v0.9.0) (#51)
* 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
This commit is contained in:
29
docs/plugins/pipes/github-copilot-sdk-publish-file-tool.md
Normal file
29
docs/plugins/pipes/github-copilot-sdk-publish-file-tool.md
Normal file
@@ -0,0 +1,29 @@
|
||||
# GitHub Copilot SDK Pipe - `publish_file_from_workspace` Tool Guide
|
||||
|
||||
## Summary
|
||||
|
||||
`publish_file_from_workspace` is the file delivery tool used by the GitHub Copilot SDK Pipe to publish workspace-generated files into OpenWebUI storage and return stable preview/download links.
|
||||
|
||||
## Input
|
||||
|
||||
- `filename` (required): Relative file path under current workspace.
|
||||
|
||||
## Delivery Modes
|
||||
|
||||
- `artifacts` (default): Return `[Preview]` + `[Download]`, with optional `html_embed` rendering in HTML block.
|
||||
- `richui`: Return `[Preview]` + `[Download]`; integrated preview is rendered by Rich UI emitter.
|
||||
|
||||
## PDF Rule
|
||||
|
||||
For PDF outputs, always return markdown links only (`[Preview]`, `[Download]` when available). Do not embed PDF using iframe or HTML.
|
||||
|
||||
## Recommended Steps
|
||||
|
||||
1. Generate file in workspace.
|
||||
2. Publish via `publish_file_from_workspace(filename=...)`.
|
||||
3. Return links according to embed mode.
|
||||
4. Apply PDF link-only rule for `.pdf` files.
|
||||
|
||||
## Reference
|
||||
|
||||
- Plugin local guide: `plugins/pipes/github-copilot-sdk/PUBLISH_FILE_FROM_WORKSPACE.md`
|
||||
@@ -0,0 +1,29 @@
|
||||
# GitHub Copilot SDK Pipe - `publish_file_from_workspace` 工具指南
|
||||
|
||||
## 简介
|
||||
|
||||
`publish_file_from_workspace` 是 GitHub Copilot SDK Pipe 的文件交付工具,用于将工作区生成文件发布到 OpenWebUI 存储,并返回稳定的预览/下载链接。
|
||||
|
||||
## 输入参数
|
||||
|
||||
- `filename`(必填):当前工作区下的相对路径文件名。
|
||||
|
||||
## 交付模式
|
||||
|
||||
- `artifacts`(默认):返回 `[Preview]` + `[Download]`,可选在 HTML 代码块中渲染 `html_embed`。
|
||||
- `richui`:返回 `[Preview]` + `[Download]`,集成预览由 Rich UI 发射器自动渲染。
|
||||
|
||||
## PDF 规则
|
||||
|
||||
PDF 必须只返回 Markdown 链接(`[Preview]`、`[Download]` 可用时),禁止 iframe 或 HTML 嵌入。
|
||||
|
||||
## 推荐流程
|
||||
|
||||
1. 在工作区生成文件。
|
||||
2. 调用 `publish_file_from_workspace(filename=...)` 发布。
|
||||
3. 按当前模式返回链接。
|
||||
4. `.pdf` 严格执行仅链接规则。
|
||||
|
||||
## 参考
|
||||
|
||||
- 插件内完整指南:`plugins/pipes/github-copilot-sdk/PUBLISH_FILE_FROM_WORKSPACE_CN.md`
|
||||
185
docs/plugins/pipes/github-copilot-sdk-usage-guide.md
Normal file
185
docs/plugins/pipes/github-copilot-sdk-usage-guide.md
Normal file
@@ -0,0 +1,185 @@
|
||||
# GitHub Copilot SDK Pipe Detailed Usage Guide
|
||||
|
||||
**Author:** [Fu-Jie](https://github.com/Fu-Jie/openwebui-extensions) | **Version:** 0.9.0 | **Project:** [OpenWebUI Extensions](https://github.com/Fu-Jie/openwebui-extensions)
|
||||
|
||||
This guide is for production usage. README remains community-facing and concise; this page focuses on step-by-step operations and troubleshooting.
|
||||
|
||||
---
|
||||
|
||||
## 1. When to Use This Guide
|
||||
|
||||
Use this manual if you need to:
|
||||
|
||||
- Run GitHub Copilot official models in OpenWebUI
|
||||
- Use BYOK providers (OpenAI/Anthropic)
|
||||
- Generate and publish artifacts (Excel/CSV/HTML/PDF)
|
||||
- Manage Skills with OpenWebUI bridge and `manage_skills`
|
||||
|
||||
---
|
||||
|
||||
## 2. Pre-flight Checklist
|
||||
|
||||
### 2.1 Required components
|
||||
|
||||
- OpenWebUI is running (recommended `v0.8.0+` for Rich UI)
|
||||
- Pipe is installed: `plugins/pipes/github-copilot-sdk/github_copilot_sdk.py`
|
||||
- Recommended companion filter:
|
||||
- [GitHub Copilot SDK Files Filter](https://openwebui.com/posts/403a62ee-a596-45e7-be65-fab9cc249dd6)
|
||||
|
||||
### 2.2 Authentication (at least one)
|
||||
|
||||
You must configure one of the following:
|
||||
|
||||
1. `GH_TOKEN` for official GitHub Copilot models
|
||||
2. `BYOK_API_KEY` for OpenAI/Anthropic style providers
|
||||
|
||||
---
|
||||
|
||||
## 3. Installation Flow
|
||||
|
||||
1. Open OpenWebUI → **Workspace → Functions**
|
||||
2. Create function and paste `github_copilot_sdk.py`
|
||||
3. Save and enable
|
||||
4. In chat model selector, choose:
|
||||
- `github_copilot_official_sdk_pipe.*` (official)
|
||||
- or your BYOK model entries
|
||||
|
||||
---
|
||||
|
||||
## 4. Configuration Baseline
|
||||
|
||||
### 4.1 Minimal admin setup
|
||||
|
||||
- `GH_TOKEN` or `BYOK_API_KEY`
|
||||
- `ENABLE_OPENWEBUI_TOOLS = True`
|
||||
- `ENABLE_MCP_SERVER = True`
|
||||
- `ENABLE_OPENWEBUI_SKILLS = True`
|
||||
- `SHOW_THINKING = True`
|
||||
|
||||
### 4.2 Recommended production settings
|
||||
|
||||
- `COPILOTSDK_CONFIG_DIR=/app/backend/data/.copilot`
|
||||
- Persists SDK config/session state across restarts
|
||||
- `OPENWEBUI_SKILLS_SHARED_DIR=/app/backend/data/cache/copilot-openwebui-skills`
|
||||
- Shared skill cache directory
|
||||
- `DEBUG=True` during troubleshooting only
|
||||
|
||||
### 4.3 User-level overrides
|
||||
|
||||
Users can override `GH_TOKEN`, `REASONING_EFFORT`, `BYOK_API_KEY`, `DISABLED_SKILLS`, etc.
|
||||
|
||||
---
|
||||
|
||||
## 5. Model Access Modes
|
||||
|
||||
## 5.1 Official Copilot mode
|
||||
|
||||
- Set `GH_TOKEN`
|
||||
- Use official model catalog
|
||||
- Supports reasoning effort, tools, infinite session features
|
||||
|
||||
## 5.2 BYOK mode
|
||||
|
||||
- Set `BYOK_TYPE`, `BYOK_BASE_URL`, `BYOK_API_KEY`
|
||||
- Leave `BYOK_MODELS` empty for auto-fetch, or set explicit list
|
||||
- Best when no Copilot subscription is available
|
||||
|
||||
---
|
||||
|
||||
## 6. Artifact Publishing Workflow (Critical)
|
||||
|
||||
Use `publish_file_from_workspace` with the sequence: write → publish → return links.
|
||||
|
||||
### 6.1 HTML delivery modes
|
||||
|
||||
- `artifacts` (default)
|
||||
- Returns `[Preview]` + `[Download]`
|
||||
- `html_embed` can be rendered in a full-height iframe block
|
||||
- `richui`
|
||||
- Returns `[Preview]` + `[Download]`
|
||||
- Rich UI renders automatically (no iframe block in message)
|
||||
|
||||
### 6.2 PDF delivery rule
|
||||
|
||||
- Output Markdown links only (`[Preview]` + `[Download]` when available)
|
||||
- **Do not** embed PDF via iframe/html blocks
|
||||
|
||||
### 6.3 Images and other files
|
||||
|
||||
- Images: prefer direct display + download
|
||||
- Other artifacts (`xlsx/csv/docx`): provide download links
|
||||
|
||||
---
|
||||
|
||||
## 7. Skills Operations
|
||||
|
||||
> Key rule: `manage_skills` is a **tool**, not a skill; all skills are installed in **one directory**: `OPENWEBUI_SKILLS_SHARED_DIR/shared/`.
|
||||
|
||||
## 7.1 OpenWebUI Skills bridge
|
||||
|
||||
With `ENABLE_OPENWEBUI_SKILLS=True`:
|
||||
|
||||
- Skills from UI sync into SDK directories
|
||||
- Directory-side updates sync back according to sync policy
|
||||
|
||||
## 7.2 `manage_skills` quick actions
|
||||
|
||||
- `list`, `install`, `create`, `edit`, `show`, `delete`
|
||||
|
||||
## 7.3 Operational tips
|
||||
|
||||
- Use `DISABLED_SKILLS` to reduce noisy skill routing
|
||||
- Keep skill descriptions explicit for better intent matching
|
||||
|
||||
---
|
||||
|
||||
## 8. First-run Validation Checklist
|
||||
|
||||
1. Basic chat response works
|
||||
2. Tool call can be triggered
|
||||
3. CSV/XLSX can be published and downloaded
|
||||
4. HTML mode works (`artifacts` or `richui`)
|
||||
5. PDF returns links only (no embed)
|
||||
6. `manage_skills list` returns skill inventory
|
||||
|
||||
---
|
||||
|
||||
## 9. Troubleshooting
|
||||
|
||||
### 9.1 Empty model list
|
||||
|
||||
- Ensure at least one of `GH_TOKEN` / `BYOK_API_KEY` is set
|
||||
- Validate BYOK base URL and model names
|
||||
|
||||
### 9.2 Tools not executing
|
||||
|
||||
- Check `ENABLE_OPENWEBUI_TOOLS`, `ENABLE_MCP_SERVER`, `ENABLE_OPENAPI_SERVER`
|
||||
- Confirm session/model has tool access
|
||||
|
||||
### 9.3 Publish succeeded but link unavailable
|
||||
|
||||
- Use the original URLs returned by tool output
|
||||
- Verify storage/backend access policy
|
||||
- For PDF, do not attempt iframe embedding
|
||||
|
||||
### 9.4 Status appears stuck
|
||||
|
||||
- Upgrade to latest plugin code
|
||||
- Enable `DEBUG=True` temporarily
|
||||
- Verify frontend version compatibility for Rich UI
|
||||
|
||||
---
|
||||
|
||||
## 10. Practical Prompt Templates
|
||||
|
||||
- “Analyze `sales.csv`, summarize by month, export `monthly_summary.xlsx`, and give me the download link.”
|
||||
- “Generate an interactive HTML dashboard and publish it with Preview and Download links.”
|
||||
- “Create a reusable skill named `finance-reporting` from this workflow.”
|
||||
|
||||
---
|
||||
|
||||
For deeper architecture and examples:
|
||||
|
||||
- [Deep Dive](github-copilot-sdk-deep-dive.md)
|
||||
- [Advanced Tutorial](github-copilot-sdk-tutorial.md)
|
||||
- [Main Plugin Doc](github-copilot-sdk.md)
|
||||
192
docs/plugins/pipes/github-copilot-sdk-usage-guide.zh.md
Normal file
192
docs/plugins/pipes/github-copilot-sdk-usage-guide.zh.md
Normal file
@@ -0,0 +1,192 @@
|
||||
# GitHub Copilot SDK Pipe 详细使用手册
|
||||
|
||||
**Author:** [Fu-Jie](https://github.com/Fu-Jie/openwebui-extensions) | **Version:** 0.9.0 | **Project:** [OpenWebUI Extensions](https://github.com/Fu-Jie/openwebui-extensions)
|
||||
|
||||
本手册面向“实际落地使用”,覆盖从安装、鉴权、模型选择到文件发布、Skills 管理、故障排查的完整流程。README 侧重社区展示,本页专注操作细节。
|
||||
|
||||
---
|
||||
|
||||
## 1. 适用场景
|
||||
|
||||
适合以下需求:
|
||||
|
||||
- 在 OpenWebUI 内使用 GitHub Copilot 官方模型(含流式、工具调用、多轮会话)
|
||||
- 使用 BYOK(OpenAI/Anthropic)替代官方订阅
|
||||
- 让 Agent 生成并发布文件(Excel/CSV/HTML/PDF)
|
||||
- 使用 OpenWebUI Skills 与 `manage_skills` 做技能工程化管理
|
||||
|
||||
---
|
||||
|
||||
## 2. 部署前检查
|
||||
|
||||
### 2.1 OpenWebUI 与插件文件
|
||||
|
||||
- 已运行 OpenWebUI(建议 `v0.8.0+` 以获得 Rich UI 体验)
|
||||
- 已导入 Pipe 文件:`plugins/pipes/github-copilot-sdk/github_copilot_sdk.py`
|
||||
- 建议同时安装 Files Filter:
|
||||
- [GitHub Copilot SDK Files Filter](https://openwebui.com/posts/403a62ee-a596-45e7-be65-fab9cc249dd6)
|
||||
|
||||
### 2.2 必要鉴权(至少一种)
|
||||
|
||||
你必须配置下列其中一种凭据,否则模型列表为空:
|
||||
|
||||
1. `GH_TOKEN`(访问 GitHub Copilot 官方模型)
|
||||
2. `BYOK_API_KEY`(访问 OpenAI/Anthropic 等自有供应商)
|
||||
|
||||
---
|
||||
|
||||
## 3. 安装与启用
|
||||
|
||||
1. 进入 OpenWebUI:**工作区 → 函数**
|
||||
2. 新建函数并粘贴 `github_copilot_sdk.py` 全量内容
|
||||
3. 保存并启用
|
||||
4. 回到聊天页,在模型列表选择:
|
||||
- `github_copilot_official_sdk_pipe.*`(官方)
|
||||
- 或 BYOK 对应模型
|
||||
|
||||
---
|
||||
|
||||
## 4. 配置建议(先跑起来再精调)
|
||||
|
||||
### 4.1 管理员最小可用配置
|
||||
|
||||
- `GH_TOKEN` 或 `BYOK_API_KEY`
|
||||
- `ENABLE_OPENWEBUI_TOOLS = True`
|
||||
- `ENABLE_MCP_SERVER = True`
|
||||
- `ENABLE_OPENWEBUI_SKILLS = True`
|
||||
- `SHOW_THINKING = True`
|
||||
|
||||
### 4.2 推荐增强项
|
||||
|
||||
- `COPILOTSDK_CONFIG_DIR=/app/backend/data/.copilot`
|
||||
- 用于 SDK 配置/会话状态持久化(重启不丢)
|
||||
- `OPENWEBUI_SKILLS_SHARED_DIR=/app/backend/data/cache/copilot-openwebui-skills`
|
||||
- 统一 skills 缓存目录
|
||||
- `DEBUG=True`(排障阶段)
|
||||
|
||||
### 4.3 用户级覆盖(Profile)
|
||||
|
||||
普通用户可按需覆盖:`GH_TOKEN`、`REASONING_EFFORT`、`BYOK_API_KEY`、`DISABLED_SKILLS` 等。
|
||||
|
||||
---
|
||||
|
||||
## 5. 两种模型接入模式
|
||||
|
||||
## 5.1 官方模式(GitHub Copilot)
|
||||
|
||||
- 配置 `GH_TOKEN`
|
||||
- 模型来自 Copilot 官方可用列表
|
||||
- 支持推理强度、工具调用、无限会话等插件能力
|
||||
|
||||
## 5.2 BYOK 模式(OpenAI/Anthropic)
|
||||
|
||||
- 配置 `BYOK_TYPE`、`BYOK_BASE_URL`、`BYOK_API_KEY`
|
||||
- `BYOK_MODELS` 留空可自动拉取,或手动逗号分隔指定
|
||||
- 适合无官方订阅、或需要指定厂商模型时使用
|
||||
|
||||
---
|
||||
|
||||
## 6. 文件发布完整工作流(重点)
|
||||
|
||||
插件内置 `publish_file_from_workspace`,推荐遵循“写入 → 发布 → 返回链接”。
|
||||
|
||||
### 6.1 HTML 交付模式
|
||||
|
||||
- `artifacts`(默认)
|
||||
- 返回 `[Preview]` + `[Download]`
|
||||
- 可输出 `html_embed`(iframe)用于完整交互展示
|
||||
- `richui`
|
||||
- 返回 `[Preview]` + `[Download]`
|
||||
- 由 Rich UI 自动渲染,不在消息中输出 iframe 代码块
|
||||
|
||||
### 6.2 PDF 交付规则(务必遵守)
|
||||
|
||||
- 仅输出 Markdown 链接(可用时 `[Preview]` + `[Download]`)
|
||||
- **不要**输出 PDF iframe/embed HTML
|
||||
|
||||
### 6.3 图片与其他文件
|
||||
|
||||
- 图片:优先直接展示 + 下载
|
||||
- 其他文件(xlsx/csv/docx 等):返回下载链接为主
|
||||
|
||||
---
|
||||
|
||||
## 7. Skills 使用与管理
|
||||
|
||||
> 关键原则:`manage_skills` 是 **工具(tool)**,不是 skill;所有 skills 统一安装在 **一个目录**:`OPENWEBUI_SKILLS_SHARED_DIR/shared/`。
|
||||
|
||||
## 7.1 OpenWebUI Skills 双向桥接
|
||||
|
||||
当 `ENABLE_OPENWEBUI_SKILLS=True` 时:
|
||||
|
||||
- UI 中创建/编辑的 Skills 会同步到 SDK 目录
|
||||
- 目录内技能更新可回写到 OpenWebUI(按同步规则)
|
||||
|
||||
## 7.2 `manage_skills` 常用动作
|
||||
|
||||
- `list`:列出现有技能
|
||||
- `install`:从 GitHub URL / `.zip` / `.tar.gz` 安装
|
||||
- `create`:从当前上下文创建技能
|
||||
- `edit`:更新技能内容与附加文件
|
||||
- `show`:查看 `SKILL.md` 与附属文件
|
||||
- `delete`:删除本地目录并清理关联记录
|
||||
|
||||
### 7.3 生产建议
|
||||
|
||||
- 用 `DISABLED_SKILLS` 关闭不需要的技能,降低误触发
|
||||
- Skill 描述尽量明确(包含 Use when 语义),提高路由准确率
|
||||
|
||||
---
|
||||
|
||||
## 8. 首次验收清单
|
||||
|
||||
完成部署后,建议按顺序验证:
|
||||
|
||||
1. **基础对话**:确认模型能正常响应
|
||||
2. **工具调用**:执行一条会触发工具的指令(如文件分析)
|
||||
3. **文件发布**:生成一个 `csv` 并确认可下载
|
||||
4. **HTML 发布**:验证 `artifacts/richui` 至少一种模式
|
||||
5. **PDF 发布**:确认仅返回链接,无 iframe
|
||||
6. **Skills**:执行 `manage_skills list`,确认可见
|
||||
|
||||
---
|
||||
|
||||
## 9. 常见问题排查
|
||||
|
||||
### 9.1 模型列表为空
|
||||
|
||||
- 检查 `GH_TOKEN` / `BYOK_API_KEY` 是否至少配置一个
|
||||
- 检查 BYOK `BASE_URL` 是否可达、模型名是否有效
|
||||
|
||||
### 9.2 工具似乎不可用
|
||||
|
||||
- 检查 `ENABLE_OPENWEBUI_TOOLS`、`ENABLE_MCP_SERVER`、`ENABLE_OPENAPI_SERVER`
|
||||
- 检查当前模型/会话是否有工具权限
|
||||
|
||||
### 9.3 文件发布成功但无法打开
|
||||
|
||||
- 检查返回链接是否来自工具原始输出
|
||||
- 检查对象存储/本地存储权限与可访问性
|
||||
- PDF 场景不要尝试 iframe 嵌入
|
||||
|
||||
### 9.4 状态栏“卡住”
|
||||
|
||||
- 升级到最新插件代码
|
||||
- 打开 `DEBUG=True` 查看事件流
|
||||
- 确认前端版本与 Rich UI 能力匹配
|
||||
|
||||
---
|
||||
|
||||
## 10. 推荐操作模板(可直接对 AI 说)
|
||||
|
||||
- “读取当前目录下的 `sales.csv`,按月份汇总并导出 `monthly_summary.xlsx`,最后给我下载链接。”
|
||||
- “生成一个交互式 HTML 仪表盘并发布,给我 Preview 和 Download 链接。”
|
||||
- “把本次流程固化成一个 skill,命名为 `finance-reporting`,并写入使用说明。”
|
||||
|
||||
---
|
||||
|
||||
如需架构细节,请结合阅读:
|
||||
|
||||
- [深度解析](github-copilot-sdk-deep-dive.zh.md)
|
||||
- [进阶实战教程](github-copilot-sdk-tutorial.zh.md)
|
||||
- [插件主文档](github-copilot-sdk.zh.md)
|
||||
@@ -1,6 +1,6 @@
|
||||
# GitHub Copilot SDK Pipe for OpenWebUI
|
||||
|
||||
**Author:** [Fu-Jie](https://github.com/Fu-Jie) | **Version:** 0.8.0 | **Project:** [OpenWebUI Extensions](https://github.com/Fu-Jie/openwebui-extensions) | **License:** MIT
|
||||
**Author:** [Fu-Jie](https://github.com/Fu-Jie) | **Version:** 0.9.0 | **Project:** [OpenWebUI Extensions](https://github.com/Fu-Jie/openwebui-extensions) | **License:** MIT
|
||||
|
||||
This is an advanced Pipe function for [OpenWebUI](https://github.com/open-webui/open-webui) that integrates the official [GitHub Copilot SDK](https://github.com/github/copilot-sdk). It enables you to use **GitHub Copilot models** (e.g., `gpt-5.2-codex`, `claude-sonnet-4.5`,`gemini-3-pro`, `gpt-5-mini`) **AND** your own models via **BYOK** (OpenAI, Anthropic) directly within OpenWebUI, providing a unified agentic experience with **strict User & Chat-level Workspace Isolation**.
|
||||
|
||||
@@ -14,37 +14,31 @@ This is an advanced Pipe function for [OpenWebUI](https://github.com/open-webui/
|
||||
|
||||
---
|
||||
|
||||
## ✨ v0.8.0 Updates (What's New)
|
||||
## ✨ v0.9.0: The Skills Revolution & Stability Update
|
||||
|
||||
- **🎛️ Conditional Tool Filtering (P1~P4)**: Four-priority tool permission system. **Default ON**: If no tools are selected in Chat UI (P4), all enabled tools are active. **Whitelist Mode**: Once specific tools are checked, the whitelist strictly filters both OpenWebUI tools and MCP servers. Admin-level `config.enable` (P2) allows global server disabling. (v0.8.0)
|
||||
- **🔧 File Publish Reliability**: Fixed `Error getting file content` across all storage backends (local/S3/GCS/Azure) by using `Storage.upload_file()` directly in the fallback path. HTML files are no longer blocked by `ALLOWED_FILE_EXTENSIONS` (`?process=false` always applied). (v0.8.0)
|
||||
- **🌐 HTML Direct Access Link**: When `publish_file_from_workspace` publishes an HTML file, the plugin also provides a directly accessible HTML link for instant in-chat preview/opening. (v0.8.0)
|
||||
- **🔒 Strict File URL Format**: Published file links must be relative paths starting with `/api/v1/files/` (e.g., `/api/v1/files/{id}/content/html`). Do not use `api/...` and do not prepend any domain. (v0.8.0)
|
||||
- **🛠️ CLI Built-in Tools Always Available**: `available_tools` is now always `None`, ensuring Copilot CLI built-ins (e.g. `bash`, `create_file`) are never silently blocked regardless of MCP configuration. (v0.8.0)
|
||||
- **📌 Publish Tool Always Injected**: `publish_file_from_workspace` is no longer lost when `ENABLE_OPENWEBUI_TOOLS` is disabled. (v0.8.0)
|
||||
- **⚠️ Code Interpreter Limitation**: The `code_interpreter` tool runs in a remote, ephemeral environment. A system prompt warning now clarifies that it cannot access local files or persist changes. (v0.8.0)
|
||||
|
||||
### 🐞 Bug Fixes in v0.8.0
|
||||
|
||||
- Fixed `{"detail":"[ERROR: Error getting file content]"}` when publishing files under object storage backends by replacing fallback manual copy/DB writes with `Storage.upload_file()`.
|
||||
- Fixed HTML artifact upload being rejected by `ALLOWED_FILE_EXTENSIONS` by always appending `?process=false` on file upload API calls.
|
||||
- Fixed invalid artifact links generated as `api/...` or domain-prefixed absolute URLs; links are now constrained to `/api/v1/files/...` relative paths.
|
||||
- Fixed Copilot CLI built-ins being silently unavailable when no server tools were configured/loaded (which resulted in `available_tools=[]`); now `available_tools` remains `None`.
|
||||
- Fixed `publish_file_from_workspace` disappearing when `ENABLE_OPENWEBUI_TOOLS` was disabled.
|
||||
- **🧩 Copilot SDK Skills Support**: Native support for Copilot SDK skill directories (`SKILL.md` + resources).
|
||||
- **🔄 OpenWebUI Skills Bridge**: Full bidirectional sync between OpenWebUI Workspace > Skills and SDK skill directories.
|
||||
- **🛠️ Deterministic `manage_skills` Tool**: Expert tool for stable install/create/list/edit/delete skill operations.
|
||||
- **🌊 Reinforced Status Bar**: Multi-layered locking mechanism (`session_finalized` guard) and atomic async delivery to prevent "stuck" indicators.
|
||||
- **🗂️ Persistent Config Directory**: Added `COPILOTSDK_CONFIG_DIR` for stable session-state persistence across container restarts.
|
||||
|
||||
---
|
||||
|
||||
## ✨ Key Capabilities
|
||||
|
||||
- **🔑 Flexible Auth & BYOK**: Official Copilot subscriptions (PAT) or Bring Your Own Key (OpenAI/Anthropic).
|
||||
- **🔌 Universal Tool Protocol**: Native support for **MCP (Model Context Protocol)**, OpenAPI, and OpenWebUI built-in tools.
|
||||
- **🛡️ Sandbox Workspace Isolation**: Strict per-session sandboxing for data privacy and security.
|
||||
- **♾️ Infinite Session Management**: Smart context window management with automatic compaction for indefinite conversation capability.
|
||||
- **🧠 Deep Database Integration**: Real-time persistence of TOD·O lists for long-running workflows.
|
||||
- **🌊 Advanced Streaming**: Full support for thinking process/Chain of Thought visualization.
|
||||
- **🖼️ Intelligent Multimodal**: Vision capabilities and raw file analysis support (bypasses RAG for direct binary access).
|
||||
- **📤 Workspace Artifacts (`publish_file_from_workspace`)**: Agents can generate files (Excel, CSV, HTML reports, etc.) and provide **persistent download links** directly in the chat. For HTML files, a direct-access HTML link is also provided.
|
||||
- **🖼️ Interactive Artifacts**: Automatically renders HTML/JS apps generated by the agent directly in the chat interface.
|
||||
- **🔑 Unified Intelligence (Official + BYOK)**: Seamlessly switch between official GitHub Copilot models (o1, GPT-4o, Claude 3.5 Sonnet, Gemini 2.0 Flash) and your own models (OpenAI, Anthropic) via **Bring Your Own Key** mode.
|
||||
- **🛡️ Physical Workspace Isolation**: Every session runs in its own isolated directory sandbox. This ensures absolute data privacy and prevents cross-chat file contamination while allowing the Agent full filesystem access.
|
||||
- **🔌 Universal Tool Protocol**:
|
||||
- **Native MCP**: Direct, high-performance connection to Model Context Protocol servers.
|
||||
- **OpenAPI Bridge**: Connect to any external REST API as an Agent tool.
|
||||
- **OpenWebUI Native**: Zero-config bridge to your existing OpenWebUI tools and built-ins (Web Search, Memory, etc.).
|
||||
- **🧩 OpenWebUI Skills Bridge**: Transforms simple OpenWebUI Markdown instructions into powerful SDK skill folders complete with supporting scripts, templates, and data.
|
||||
- **♾️ Infinite Session Management**: Advanced context window management with automatic "Compaction" (summarization + list persistence). Carry out weeks-long projects without losing the core thread.
|
||||
- **📊 Interactive Artifacts & Publishing**:
|
||||
- **Live HTML/JS**: Instantly render and interact with apps, dashboards, or reports generated by the Agent.
|
||||
- **Persistent Publishing**: Agents can "publish" generated files (Excel, CSV, docs) to OpenWebUI's file storage, providing permanent download links.
|
||||
- **🌊 UX-First Streaming**: Full support for "Thinking" processes (Chain of Thought), status indicators, and real-time progress bars for long-running tasks.
|
||||
- **🧠 Deep Database Integration**: Real-time persistence of TOD·O lists and session metadata ensures your workflow state is always visible in the UI.
|
||||
|
||||
---
|
||||
|
||||
@@ -69,9 +63,14 @@ Administrators define the default behavior for all users in the function setting
|
||||
| Valve | Default | Description |
|
||||
| :--- | :--- | :--- |
|
||||
| `GH_TOKEN` | `""` | Global GitHub Token (Requires 'Copilot Requests' permission). |
|
||||
| `COPILOTSDK_CONFIG_DIR` | `""` | Persistent directory for SDK config and session state (e.g., `/app/backend/data/.copilot`). |
|
||||
| `ENABLE_OPENWEBUI_TOOLS` | `True` | Enable OpenWebUI Tools (includes defined Tools and Built-in Tools). |
|
||||
| `ENABLE_OPENAPI_SERVER` | `True` | Enable OpenAPI Tool Server connection. |
|
||||
| `ENABLE_MCP_SERVER` | `True` | Enable Direct MCP Client connection (Recommended). |
|
||||
| `ENABLE_OPENWEBUI_SKILLS` | `True` | Enable bidirectional sync with OpenWebUI Workspace > Skills. |
|
||||
| `OPENWEBUI_SKILLS_SHARED_DIR` | `/app/backend/data/cache/copilot-openwebui-skills` | Shared cache directory for skills. |
|
||||
| `GITHUB_SKILLS_SOURCE_URL` | `""` | Optional GitHub tree URL for batch skill import (e.g., anthropic/skills). |
|
||||
| `DISABLED_SKILLS` | `""` | Comma-separated skill names to disable in SDK session. |
|
||||
| `REASONING_EFFORT` | `medium` | Reasoning effort level: low, medium, high. |
|
||||
| `SHOW_THINKING` | `True` | Show model reasoning/thinking process. |
|
||||
| `INFINITE_SESSION` | `True` | Enable Infinite Sessions (automatic context compaction). |
|
||||
@@ -95,10 +94,64 @@ Standard users can override these settings in their individual Profile/Function
|
||||
| `SHOW_THINKING` | Show model reasoning/thinking process. |
|
||||
| `MAX_MULTIPLIER` | Maximum allowed billing multiplier override. |
|
||||
| `EXCLUDE_KEYWORDS` | Exclude models containing these keywords. |
|
||||
| `ENABLE_OPENWEBUI_SKILLS` | Enable loading all active OpenWebUI skills readable by you into SDK `SKILL.md` directories. |
|
||||
| `GITHUB_SKILLS_SOURCE_URL` | Optional GitHub tree URL for batch skill import in your own session. |
|
||||
| `DISABLED_SKILLS` | Comma-separated skill names to disable for your own session. |
|
||||
| `BYOK_API_KEY` | Use your personal OpenAI/Anthropic API Key. |
|
||||
|
||||
---
|
||||
|
||||
### 📤 Enhanced Publishing & Interactive Components
|
||||
|
||||
The `publish_file_from_workspace` tool now uses a clearer delivery contract for production use:
|
||||
|
||||
- **Artifacts mode (`artifacts`, default)**: Agent returns `[Preview]` + `[Download]` and may output `html_embed` in a ```html block for direct chat rendering.
|
||||
- **Rich UI mode (`richui`)**: Agent returns `[Preview]` + `[Download]` only; integrated preview is rendered automatically via emitter (no iframe block in message).
|
||||
- **📄 PDF delivery safety rule**: Always output Markdown links only (`[Preview]` + `[Download]` when available). **Do not embed PDF via iframe/html blocks.**
|
||||
- **⚡ Stable dual-channel publishing**: Keeps interactive viewing and persistent file download aligned across local/object-storage backends.
|
||||
- **✅ Status integration**: Emits real-time publishing progress and completion feedback to the OpenWebUI status bar.
|
||||
- **📘 Publishing Tool Guide (GitHub)**: [publish_file_from_workspace Guide](https://github.com/Fu-Jie/openwebui-extensions/blob/main/plugins/pipes/github-copilot-sdk/PUBLISH_FILE_FROM_WORKSPACE.md)
|
||||
|
||||
---
|
||||
|
||||
### 🧩 OpenWebUI Skills Bridge & `manage_skills` Tool
|
||||
|
||||
The SDK now features a bidirectional bridge with the OpenWebUI **Workspace > Skills** page:
|
||||
|
||||
- **🔄 Automatic Sync**: Skills created or updated in the OpenWebUI UI are automatically downloaded as `SKILL.md` folders into the SDK's shared cache on every request.
|
||||
- **🛠️ `manage_skills` Tool**: The Agent can deterministically manage skills using this tool.
|
||||
- `list`: List all installed skills and their descriptions.
|
||||
- `install`: Install a skill from a GitHub URL (auto-normalized to archive link) or a direct `.zip`/`.tar.gz`.
|
||||
- `create`: Create a new skill directory from context, writing `SKILL.md` and any extra resource files (scripts, templates).
|
||||
- `edit`: Update an existing skill folder.
|
||||
- `delete`: Atomically delete both the local directory and the linked OpenWebUI DB entry.
|
||||
- **📁 Full Folder Support**: Unlike the single-markdown storage in OpenWebUI DB, the SDK loads the **entire folder** for each skill. This allows skills to carry binary scripts, data files, or complex templates alongside the core instructions.
|
||||
- **🌐 Shared Persistent Cache**: Skills are stored in `OPENWEBUI_SKILLS_SHARED_DIR/shared/`, which is persistent across sessions and container restarts.
|
||||
- **📚 Full Skill Docs (GitHub)**: [manage_skills Tool Guide](https://github.com/Fu-Jie/openwebui-extensions/blob/main/plugins/pipes/github-copilot-sdk/SKILLS_MANAGER.md) | [Skills Best Practices](https://github.com/Fu-Jie/openwebui-extensions/blob/main/plugins/pipes/github-copilot-sdk/SKILLS_BEST_PRACTICES.md)
|
||||
|
||||
---
|
||||
|
||||
### 🌊 Fluid UX & Granular Status Feedback
|
||||
|
||||
Say goodbye to the "stuck" feeling during complex processing:
|
||||
|
||||
- **🔄 Real-Time Status Bubbles**: Maps internal SDK events (`turn_start`, `compaction`, `subagent_started`) directly to the OpenWebUI status bar.
|
||||
- **🧭 Richer Stage Descriptions**: Status text now explicitly reflects phases such as processing, skill invocation, tool execution, tool completion/failure, publishing, and final completion.
|
||||
- **⏱️ Long-Task Heartbeat**: During long waits, the status bar emits periodic "still processing" updates (elapsed-time style) to avoid silent stalls.
|
||||
- **📈 Tool Progress Tracking**: Long-running tool executions provide live progress percentages and descriptive sub-task updates in the status bar.
|
||||
- **⚡ Immediate Feedback**: Response starts with an instant "Assistant is processing" status, eliminating idle wait time before the first token.
|
||||
|
||||
---
|
||||
|
||||
### 🛡️ Smart Version Compatibility
|
||||
|
||||
The plugin automatically adapts its feature set based on your OpenWebUI version:
|
||||
|
||||
- **v0.8.0+**: Rich UI, live status bubbles, and integrated HTML preview.
|
||||
- **Older**: Automatic fallback to standard Markdown blocks for maximum stability.
|
||||
|
||||
---
|
||||
|
||||
## 🎯 Use Cases (What can you do?)
|
||||
|
||||
- **📁 Fully Autonomous DevOps**: Agent analyzes code, runs tests, and applies patches within its isolated sandbox.
|
||||
@@ -141,7 +194,7 @@ If neither is configured, the model list will not appear.
|
||||
## 📋 Troubleshooting & Dependencies
|
||||
|
||||
- **Agent ignores files?**: Ensure the Files Filter is enabled, otherwise RAG will interfere with raw binaries.
|
||||
- **No progress bar?**: The bar only appears when the Agent uses the `update_todo` tool.
|
||||
- **No status updates?**: Status bubbles are emitted for processing/tool phases; TODO progress bars specifically appear when the Agent uses `update_todo`.
|
||||
- **Dependencies**: This Pipe automatically manages `github-copilot-sdk` (Python) and utilizes the bundled binary CLI. No manual install required.
|
||||
|
||||
---
|
||||
|
||||
@@ -1,12 +1,24 @@
|
||||
# GitHub Copilot SDK 官方管道
|
||||
|
||||
**作者:** [Fu-Jie](https://github.com/Fu-Jie) | **版本:** 0.8.0 | **项目:** [OpenWebUI Extensions](https://github.com/Fu-Jie/openwebui-extensions) | **许可证:** MIT
|
||||
**作者:** [Fu-Jie](https://github.com/Fu-Jie/openwebui-extensions) | **版本:** 0.9.0 | **项目:** [OpenWebUI Extensions](https://github.com/Fu-Jie/openwebui-extensions) | **许可证:** MIT
|
||||
|
||||
这是一个用于 [OpenWebUI](https://github.com/open-webui/open-webui) 的高级 Pipe 函数,深度集成了 **GitHub Copilot SDK**。它不仅支持 **GitHub Copilot 官方模型**(如 `gpt-5.2-codex`, `claude-sonnet-4.5`, `gemini-3-pro`, `gpt-5-mini`),还支持 **BYOK (自带 Key)** 模式对接自定义服务商(OpenAI, Anthropic),并具备**严格的用户与会话级工作区隔离**能力,提供统一且安全的 Agent 交互体验。
|
||||
|
||||
> [!IMPORTANT]
|
||||
> **核心伴侣组件**
|
||||
> 如需启用文件处理与数据分析能力,请务必安装 [GitHub Copilot SDK Files Filter](https://openwebui.com/posts/403a62ee-a596-45e7-be65-fab9cc249dd6)。
|
||||
> 如需启用文件处理与数据分析能力,请务必安装 [GitHub Copilot SDK Files Filter](https://openwebui.com/posts/403a62ee-a596-45e7-be65-fab9cc24dd6)。
|
||||
>
|
||||
>## ✨ 0.9.0 核心更新:技能革命与稳定性加固
|
||||
|
||||
- **🧩 Copilot SDK Skills 原生支持**: 技能可作为一等上下文能力被加载和使用。
|
||||
- **🔄 OpenWebUI Skills 桥接**: 实现 OpenWebUI **工作区 > Skills** 与 SDK 技能目录的深度双向同步。
|
||||
- **🛠️ 确定性 `manage_skills` 工具**: 通过稳定工具契约完成技能的生命周期管理。
|
||||
- **🌊 状态栏逻辑加固**: 引入 `session_finalized` 多层锁定机制,彻底解决任务完成后状态栏回弹或卡死的问题。
|
||||
- **🗂️ 环境目录持久化**: 增强 `COPILOTSDK_CONFIG_DIR` 逻辑,确保会话状态跨容器重启稳定存在。
|
||||
- **🌐 持续化共享缓存(扩展)**: 技能统一存储在 `OPENWEBUI_SKILLS_SHARED_DIR/shared/`,跨会话与容器重启复用。
|
||||
- **🎯 智能意图路由(扩展)**: 自动识别技能管理请求并优先路由到 `manage_skills`,确保执行确定性。
|
||||
- **🗂️ 环境目录升级**: 新增 `COPILOTSDK_CONFIG_DIR`,并自动回退到 `/app/backend/data/.copilot`,确保 SDK 配置与会话状态在容器重启后稳定持久化。
|
||||
- **🧭 CLI 提示词护栏**: 系统提示词明确区分可执行的 **tools** 与不可调用的 **skills**,并要求技能生命周期操作优先走 `manage_skills`,同时强化 CLI/Python 执行规范。
|
||||
|
||||
> [!TIP]
|
||||
> **BYOK 模式无需订阅**
|
||||
@@ -14,37 +26,21 @@
|
||||
|
||||
---
|
||||
|
||||
## ✨ 0.8.0 更新内容 (What's New)
|
||||
|
||||
- **🎛️ 条件工具过滤 (P1~P4)**: 四优先级工具权限体系。**默认全开**: 若未在 Chat UI (P4) 勾选任何工具,则默认启用所有工具;**白名单模式**: 一旦勾选特定工具,即刻进入严格过滤模式,且 MCP server 同步受控;管理员亦可通过 `config.enable` (P2) 全局禁用工具服务器。(v0.8.0)
|
||||
- **🔧 文件发布全面修复**: 通过在回退路径直接调用 `Storage.upload_file()`,彻底修复了所有存储后端(local/S3/GCS/Azure)下的 `Error getting file content` 问题;同时上传时自动携带 `?process=false`,HTML 文件不再被 `ALLOWED_FILE_EXTENSIONS` 拦截。(v0.8.0)
|
||||
- **🌐 HTML 直达链接**: 当 `publish_file_from_workspace` 发布的是 HTML 文件时,插件会额外提供可直接访问的 HTML 链接,便于在聊天中即时预览/打开。(v0.8.0)
|
||||
- **🔒 文件链接格式严格约束**: 发布链接必须是以 `/api/v1/files/` 开头的相对路径(例如 `/api/v1/files/{id}/content/html`)。禁止使用 `api/...`,也禁止拼接任何域名。(v0.8.0)
|
||||
- **🛠️ CLI 内置工具始终可用**: `available_tools` 统一设为 `None`,Copilot CLI 内置工具(如 `bash`、`create_file`)无论 MCP 配置如何都不会被静默屏蔽。(v0.8.0)
|
||||
- **📌 发布工具始终注入**: 即使 `ENABLE_OPENWEBUI_TOOLS` 关闭,`publish_file_from_workspace` 工具也不再丢失。(v0.8.0)
|
||||
- **⚠️ 代码解释器限制**: `code_interpreter` 工具运行在远程临时环境中。系统提示词现已包含警告,明确指出该工具无法访问本地文件或持久化更改。(v0.8.0)
|
||||
|
||||
### 🐞 v0.8.0 Bug 修复说明
|
||||
|
||||
- 修复了对象存储后端发布文件时出现的 `{"detail":"[ERROR: Error getting file content]"}`,回退路径从手动复制/写库改为 `Storage.upload_file()`。
|
||||
- 修复了 HTML 产物被 `ALLOWED_FILE_EXTENSIONS` 拦截的问题,上传接口统一追加 `?process=false`。
|
||||
- 修复了产物链接偶发被生成成 `api/...` 或带域名绝对 URL 的问题,现统一限制为 `/api/v1/files/...` 相对路径。
|
||||
- 修复了在未配置/未加载任何 server 工具时(最终出现 `available_tools=[]`)Copilot CLI 内置工具被静默禁用的问题,现统一保持 `available_tools=None`。
|
||||
- 修复了 `ENABLE_OPENWEBUI_TOOLS` 关闭时 `publish_file_from_workspace` 工具丢失的问题。
|
||||
|
||||
---
|
||||
|
||||
## ✨ 核心能力 (Key Capabilities)
|
||||
|
||||
- **🔑 灵活鉴权与 BYOK**: 支持 GitHub Copilot 官方订阅 (PAT) 或自带 Key (OpenAI/Anthropic)。
|
||||
- **🔌 通用工具协议**: 原生支持 **MCP (Model Context Protocol)**、OpenAPI 以及 OpenWebUI 内置工具。
|
||||
- **🛡️ 物理级工作区隔离**: 强制执行严格的用户特定沙箱,确保数据隐私与文件安全。
|
||||
- **♾️ 无限会话管理**: 智能上下文窗口管理与自动压缩算法,支持无限时长的对话交互。
|
||||
- **🧠 深度数据库集成**: 实时持久化 TOD·O 列表到 UI 进度条。
|
||||
- **🌊 深度推理展示**: 完整支持模型思考过程 (Thinking Process) 的流式渲染。
|
||||
- **🖼️ 智能多模态**: 完整支持图像识别与附件上传分析(绕过 RAG 直接访问原始二进制内容)。
|
||||
- **📤 工作区产物工具 (`publish_file_from_workspace`)**: Agent 可生成文件(Excel、CSV、HTML 报告等)并直接提供**持久化下载链接**。管理员还可额外获得通过 `/content/html` 接口的**聊天内 HTML 预览**链接。
|
||||
- **🖼️ 交互式伪影 (Artifacts)**: 自动渲染 Agent 生成的 HTML/JS 应用程序,直接在聊天界面交互。
|
||||
- **🔑 统一智能体验 (官方 + BYOK)**: 自由切换官方模型(o1, GPT-4o, Claude 3.5 Sonnet, Gemini 2.0 Flash)与自定义服务商(OpenAI, Anthropic),支持 **BYOK (自带 Key)** 模式。
|
||||
- **🛡️ 物理级工作区隔离**: 每个会话在独立的沙箱目录中运行。确保绝对的数据隐私,防止不同聊天间的文件污染,同时给予 Agent 完整的文件系统操作权限。
|
||||
- **🔌 通用工具协议**:
|
||||
- **原生 MCP**: 高性能直连 Model Context Protocol 服务器。
|
||||
- **OpenAPI 桥接**: 将任何外部 REST API 一键转换为 Agent 可调用的工具。
|
||||
- **OpenWebUI 原生桥接**: 零配置接入现有的 OpenWebUI 工具及内置功能(网页搜索、记忆等)。
|
||||
- **🧩 OpenWebUI Skills 桥接**: 将简单的 OpenWebUI Markdown 指令转化为包含脚本、模板和数据的强大 SDK 技能文件夹。
|
||||
- **♾️ 无限会话管理**: 先进的上下文窗口管理,支持自动“压缩”(摘要提取 + TODO 列表持久化)。支持长达数周的项目跟踪而不会丢失核心上下文。
|
||||
- **📊 交互式产物与发布**:
|
||||
- **实时 HTML/JS**: 瞬间渲染并交互 Agent 生成的应用程序、可视化看板或报告。
|
||||
- **持久化发布**: Agent 可将生成的产物(Excel, CSV, 文档)发布至 OpenWebUI 文件存储,并在聊天中提供永久下载链接。
|
||||
- **🌊 极致交互体验**: 完整支持深度思考过程 (Thinking Process) 流式渲染、状态指示器以及长任务实时进度条。
|
||||
- **🧠 深度数据库集成**: TOD·O 列表与会话元数据的实时持久化,确保任务执行状态在 UI 上清晰可见。
|
||||
|
||||
---
|
||||
|
||||
@@ -69,9 +65,14 @@
|
||||
| 参数 | 默认值 | 说明 |
|
||||
| :--- | :--- | :--- |
|
||||
| `GH_TOKEN` | `""` | 全局 GitHub Token (需具备 'Copilot Requests' 权限)。 |
|
||||
| `COPILOTSDK_CONFIG_DIR` | `""` | SDK 配置与会话状态持久化目录 (例如: `/app/backend/data/.copilot`)。 |
|
||||
| `ENABLE_OPENWEBUI_TOOLS` | `True` | 启用 OpenWebUI 工具 (包括定义工具和内置工具)。 |
|
||||
| `ENABLE_OPENAPI_SERVER` | `True` | 启用 OpenAPI 工具服务器连接。 |
|
||||
| `ENABLE_MCP_SERVER` | `True` | 启用直接 MCP 客户端连接 (推荐)。 |
|
||||
| `ENABLE_OPENWEBUI_SKILLS` | `True` | 开启与 OpenWebUI **工作区 > Skills** 的双向同步桥接。 |
|
||||
| `OPENWEBUI_SKILLS_SHARED_DIR` | `/app/backend/data/cache/copilot-openwebui-skills` | OpenWebUI skills 转换后的共享缓存目录。 |
|
||||
| `GITHUB_SKILLS_SOURCE_URL` | `""` | 可选 GitHub tree 地址,用于批量导入 skills(例如 anthropic/skills)。 |
|
||||
| `DISABLED_SKILLS` | `""` | 逗号分隔的 skill 名称黑名单(如 `docs-writer,webapp-testing`)。 |
|
||||
| `REASONING_EFFORT` | `medium` | 推理强度:low, medium, high。 |
|
||||
| `SHOW_THINKING` | `True` | 显示模型推理/思考过程。 |
|
||||
| `INFINITE_SESSION` | `True` | 启用无限会话 (自动上下文压缩)。 |
|
||||
@@ -79,7 +80,7 @@
|
||||
| `EXCLUDE_KEYWORDS` | `""` | 排除包含这些关键字的模型 (逗号分隔)。 |
|
||||
| `TIMEOUT` | `300` | 每个流数据块的超时时间 (秒)。 |
|
||||
| `BYOK_TYPE` | `openai` | BYOK 服务商类型:`openai`, `anthropic`。 |
|
||||
| `BYOK_BASE_URL` | `""` | BYOK 基础 URL (例如: <https://api.openai.com/v1>)。 |
|
||||
| `BYOK_BASE_URL` | `""` | BYOK 基础 URL (例如: <https://api.openai.com/v1)。> |
|
||||
| `BYOK_MODELS` | `""` | BYOK 模型列表 (逗号分隔)。留空则从 API 获取。 |
|
||||
| `CUSTOM_ENV_VARS` | `""` | 自定义环境变量 (JSON 格式)。 |
|
||||
| `DEBUG` | `False` | 开启此项以在前端控制台输出详细调试日志。 |
|
||||
@@ -95,10 +96,34 @@
|
||||
| `SHOW_THINKING` | 显示模型推理/思考过程。 |
|
||||
| `MAX_MULTIPLIER` | 最大允许的模型计费倍率覆盖。 |
|
||||
| `EXCLUDE_KEYWORDS` | 排除包含这些关键字的模型。 |
|
||||
| `ENABLE_OPENWEBUI_SKILLS` | 启用将当前用户可读的全部已启用 OpenWebUI skills 转换并加载为 SDK `SKILL.md` 目录。 |
|
||||
| `GITHUB_SKILLS_SOURCE_URL` | 为当前用户会话设置可选 GitHub tree 地址以批量导入 skills。 |
|
||||
| `DISABLED_SKILLS` | 为当前用户会话禁用指定 skills(逗号分隔)。 |
|
||||
| `BYOK_API_KEY` | 使用个人的 OpenAI/Anthropic API Key。 |
|
||||
|
||||
---
|
||||
|
||||
### 🌊 细粒度反馈与流畅体验 (Fluid UX)
|
||||
|
||||
彻底告别复杂任务执行过程中的“卡顿”感:
|
||||
|
||||
- **🔄 实时状态气泡**: 将 SDK 内部事件(如 `turn_start`, `compaction`, `subagent_started`)直接映射为 OpenWebUI 的状态栏信息。
|
||||
- **🧭 分阶段状态描述增强**: 状态栏会明确显示处理阶段(处理中、技能触发、工具执行、工具完成/失败、发布中、任务完成)。
|
||||
- **⏱️ 长任务心跳提示**: 长时间处理中会周期性显示“仍在处理中(已耗时 X 秒)”,避免用户误判为卡死。
|
||||
- **📈 工具执行进度追踪**: 长耗时工具(如代码分析)会在状态栏实时显示进度百分比及当前子任务描述。
|
||||
- **⚡ 即时响应反馈**: 从响应开始第一秒即显示“助手正在处理您的请求...”,减少等待空窗感。
|
||||
|
||||
---
|
||||
|
||||
### 🛡️ 智能版本兼容
|
||||
|
||||
插件会自动根据您的 OpenWebUI 版本调整功能集:
|
||||
|
||||
- **v0.8.0+**: 开启 Rich UI、实时状态气泡及集成 HTML 预览。
|
||||
- **旧版本**: 自动回退至标准 Markdown 代码块模式,确保最大稳定性。
|
||||
|
||||
---
|
||||
|
||||
## 🎯 典型应用场景 (Use Cases)
|
||||
|
||||
- **📁 全自主仓库维护**: Agent 在隔离工作区内自动分析代码、运行测试并应用补丁。
|
||||
@@ -136,12 +161,46 @@
|
||||
|
||||
如果两者都未配置,模型列表将不会出现。
|
||||
|
||||
### 4) 配套插件 (强烈推荐)
|
||||
|
||||
为了获得最佳的文件处理体验,请安装 [GitHub Copilot SDK Files Filter](https://openwebui.com/posts/403a62ee-a596-45e7-be65-fab9cc249dd6)。
|
||||
|
||||
---
|
||||
|
||||
### 📤 增强型发布工具与交互式组件
|
||||
|
||||
`publish_file_from_workspace` 现采用更清晰、可落地的交付规范:
|
||||
|
||||
- **Artifacts 模式(`artifacts`,默认)**:返回 `[Preview]` + `[Download]`,并可附带 `html_embed`,在 ```html 代码块中直接渲染。
|
||||
- **Rich UI 模式(`richui`)**:仅返回 `[Preview]` + `[Download]`,由发射器自动触发集成式预览(消息中不输出 iframe 代码块)。
|
||||
- **📄 PDF 安全交付规则**:仅输出 Markdown 链接(可用时为 `[Preview]` + `[Download]`)。**禁止通过 iframe/html 方式嵌入 PDF。**
|
||||
- **⚡ 稳定双通道发布**:在本地与对象存储后端下,保持交互预览与持久下载链接一致可用。
|
||||
- **✅ 状态集成**:通过 OpenWebUI 状态栏实时反馈发布进度与完成状态。
|
||||
- **📘 发布工具指南(GitHub)**:[publish_file_from_workspace 工具指南(中文)](https://github.com/Fu-Jie/openwebui-extensions/blob/main/plugins/pipes/github-copilot-sdk/PUBLISH_FILE_FROM_WORKSPACE_CN.md)
|
||||
|
||||
---
|
||||
|
||||
### 🧩 OpenWebUI Skills 桥接与 `manage_skills` 工具
|
||||
|
||||
SDK 现在具备与 OpenWebUI **工作区 > Skills** 的双向同步能力:
|
||||
|
||||
- **🔄 自动同步**: 每次请求时,前端定义的技能会自动作为 `SKILL.md` 文件夹同步至 SDK 共享缓存,Agent 可直接调用。
|
||||
- **🛠️ `manage_skills` 工具**: 内置专业工具,赋予 Agent (或用户) 绝对的技能管理权。
|
||||
- `list`: 列出所有已安装技能及描述。
|
||||
- `install`: 从 GitHub URL (自动转换归档链接) 或直接从 `.zip`/`.tar.gz` 安装。
|
||||
- `create`: 从当前会话内容创建新技能目录,支持写入 `SKILL.md` 及辅助资源文件 (脚本、模板)。
|
||||
- `edit`: 更新现有技能文件夹。
|
||||
- `delete`: 原子化删除本地目录及关联的数据库条目,防止僵尸技能复活。
|
||||
- **📁 完整的文件夹支持**: 不同于数据库中单文件存储,SDK 会加载技能的**整个目录**。这使得技能可以携带二进制脚本、数据文件或复杂模板。
|
||||
- **🌐 持久化共享缓存**: 技能存储在 `OPENWEBUI_SKILLS_SHARED_DIR/shared/`,跨会话及容器重启持久存在。
|
||||
- **📚 技能完整文档(GitHub)**: [manage_skills 工具指南(中文)](https://github.com/Fu-Jie/openwebui-extensions/blob/main/plugins/pipes/github-copilot-sdk/SKILLS_MANAGER_CN.md) | [Skills Best Practices(中文)](https://github.com/Fu-Jie/openwebui-extensions/blob/main/plugins/pipes/github-copilot-sdk/SKILLS_BEST_PRACTICES_CN.md)
|
||||
|
||||
---
|
||||
|
||||
## 📋 常见问题与依赖 (Troubleshooting)
|
||||
|
||||
- **Agent 无法识别文件?**: 请确保已安装并启用了 Files Filter 插件,否则原始文件会被 RAG 干扰。
|
||||
- **看不到 TODO 进度条?**: 进度条仅在 Agent 使用 `update_todo` 工具(通常是处理复杂任务)时出现。
|
||||
- **看不到状态更新或 TODO 进度条?**: 状态气泡会覆盖处理/工具阶段;而 TODO 进度条仅在 Agent 使用 `update_todo` 工具(通常是复杂任务)时出现。
|
||||
- **依赖安装**: 本管道会自动管理 `github-copilot-sdk` (Python 包) 并优先直接使用内置的二进制 CLI,无需手动干预。
|
||||
|
||||
---
|
||||
|
||||
@@ -15,7 +15,7 @@ Pipes allow you to:
|
||||
|
||||
## Available Pipe Plugins
|
||||
|
||||
- [GitHub Copilot SDK](github-copilot-sdk.md) (v0.8.0) - Official GitHub Copilot SDK integration. Features **Workspace Isolation**, **Database Persistence**, **Zero-config OpenWebUI Tool Bridge**, **BYOK** support, and **dynamic MCP discovery**. Supports streaming, multimodal, and infinite sessions. [View Deep Dive](github-copilot-sdk-deep-dive.md) | [**View Advanced Tutorial**](github-copilot-sdk-tutorial.md).
|
||||
- [GitHub Copilot SDK](github-copilot-sdk.md) (v0.9.0) - Official GitHub Copilot SDK integration. Features **Workspace Isolation**, **Zero-config OpenWebUI Tool Bridge**, **BYOK** support, and **dynamic MCP discovery**. **NEW in v0.9.0: OpenWebUI Skills Bridge**, reinforced status bar stability, and persistent SDK config management. [View Deep Dive](github-copilot-sdk-deep-dive.md) | [**View Advanced Tutorial**](github-copilot-sdk-tutorial.md) | [**View Detailed Usage Guide**](github-copilot-sdk-usage-guide.md).
|
||||
- **[Case Study: GitHub 100 Star Growth Analysis](star-prediction-example.md)** - Learn how to use the GitHub Copilot SDK Pipe with Minimax 2.1 to automatically analyze CSV data and generate project growth reports.
|
||||
- **[Case Study: High-Quality Video to GIF Conversion](video-processing-example.md)** - See how the model uses system-level FFmpeg to accelerate, scale, and optimize colors for screen recordings.
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ Pipes 可以用于:
|
||||
|
||||
## 可用的 Pipe 插件
|
||||
|
||||
- [GitHub Copilot SDK](github-copilot-sdk.zh.md) (v0.8.0) - GitHub Copilot SDK 官方集成。具备**工作区安全隔离**、**数据库持久化**、**零配置工具桥接**与**BYOK (自带 Key) 支持**。支持流式输出、打字机思考过程及无限会话。[查看深度架构解析](github-copilot-sdk-deep-dive.zh.md) | [**查看进阶实战教程**](github-copilot-sdk-tutorial.zh.md)。
|
||||
- [GitHub Copilot SDK](github-copilot-sdk.zh.md) (v0.9.0) - GitHub Copilot SDK 官方集成。具备**工作区安全隔离**、**零配置工具桥接**与**BYOK (自带 Key) 支持**。**v0.9.0 重量级更新:OpenWebUI Skills 桥接**、状态栏稳定性加固,以及持久化 SDK 配置目录管理(`COPILOTSDK_CONFIG_DIR`)。[查看深度架构解析](github-copilot-sdk-deep-dive.zh.md) | [**查看进阶实战教程**](github-copilot-sdk-tutorial.zh.md) | [**查看详细使用手册**](github-copilot-sdk-usage-guide.zh.md)。
|
||||
- **[实战案例:GitHub 100 Star 增长预测](star-prediction-example.zh.md)** - 展示如何使用 GitHub Copilot SDK Pipe 结合 Minimax 2.1 模型,自动编写脚本分析 CSV 数据并生成详细的项目增长报告。
|
||||
- **[实战案例:视频高质量 GIF 转换与加速](video-processing-example.zh.md)** - 演示模型如何通过底层 FFmpeg 工具对录屏进行加速、缩放及双阶段色彩优化处理。
|
||||
|
||||
|
||||
Reference in New Issue
Block a user