Compare commits
18 Commits
v2026.02.2
...
v2026.02.2
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d0eb72467d | ||
|
|
6b6e62398a | ||
|
|
fd22ed8fa0 | ||
|
|
4fccd1893e | ||
|
|
a74e03fff8 | ||
|
|
850838226d | ||
|
|
a52ac34d59 | ||
|
|
3263ab9db6 | ||
|
|
7c7daef30b | ||
|
|
64754ba26b | ||
|
|
4188410d61 | ||
|
|
0c7201902c | ||
|
|
f47c3f6354 | ||
|
|
272245d911 | ||
|
|
ce93464f47 | ||
|
|
c658e379c0 | ||
|
|
ab28465dd5 | ||
|
|
d22ba88f33 |
64
.agent/skills/test-copilot-pipe/SKILL.md
Normal file
64
.agent/skills/test-copilot-pipe/SKILL.md
Normal file
@@ -0,0 +1,64 @@
|
||||
---
|
||||
name: test-copilot-pipe
|
||||
description: Automotive deployment and testing of GitHub Copilot SDK Pipe plugin for frontend/backend status stability.
|
||||
---
|
||||
|
||||
# 🤖 Skill: Test Copilot Pipe
|
||||
|
||||
This is a **universal testing framework** for publishing the latest `github_copilot_sdk.py` (Pipe) code to a local OpenWebUI instance and verifying it via an automated agent (`browser_subagent`).
|
||||
|
||||
## 🎯 Core Principles
|
||||
|
||||
- **Fixed Infrastructure**: The deployment script and the test entry URL are always static.
|
||||
- **Dynamic Test Planning**: Specific test prompts and expectations (acceptance criteria) **must** be dynamically planned by you based on the code changes or specific user requests before execution.
|
||||
|
||||
---
|
||||
|
||||
## 🛠️ Static Environment Info
|
||||
|
||||
| Attribute | Fixed Value |
|
||||
|------|--------|
|
||||
| **Deployment Script** | `/Users/fujie/app/python/oui/openwebui-extensions/scripts/update_pipe.py` |
|
||||
| **Python Path** | `/opt/homebrew/Caskroom/miniconda/base/envs/ai/bin/python3` |
|
||||
| **Test URL** | `http://localhost:3003/?model=github_copilot_official_sdk_pipe.github_copilot_sdk-gpt-4.1` |
|
||||
|
||||
---
|
||||
|
||||
## 📋 Standard Workflow
|
||||
|
||||
### Step 1: Analyze Changes & Plan Test (Plan)
|
||||
|
||||
Before triggering the test, you must define the purpose of this test turn.
|
||||
Example: *Modified tool calling logic -> Test prompt should trigger a specific tool; observe if the tool executes and returns the correct result.*
|
||||
|
||||
### Step 2: Deploy Latest Code (Deploy)
|
||||
|
||||
Use the `run_command` tool to execute the fixed update task:
|
||||
|
||||
```bash
|
||||
/opt/homebrew/Caskroom/miniconda/base/envs/ai/bin/python3 /Users/fujie/app/python/oui/openwebui-extensions/scripts/update_pipe.py
|
||||
```
|
||||
|
||||
> **Mechanism**: `update_pipe.py` automatically loads the API Key from `scripts/.env` in the same directory.
|
||||
> **Verification**: Look for `✅ Successfully updated... version X.X.X`. If a 401 error occurs, remind the user to generate a new API Key in OpenWebUI and update `.env`.
|
||||
|
||||
### Step 3: Verify via Browser Subagent (Verify)
|
||||
|
||||
Use the `browser_subagent` tool. **You must fill in the `[Dynamic Content]` slots based on Step 1**:
|
||||
|
||||
```text
|
||||
Task:
|
||||
1. Access The Fixed URL: http://localhost:3003/?model=github_copilot_official_sdk_pipe.github_copilot_sdk-gpt-4.1
|
||||
2. RELIABILITY WAIT: Wait until the page fully loads. Wait until the chat input text area (`#chat-input`) is present in the DOM.
|
||||
3. ACTION - FAST INPUT: Use the `execute_browser_javascript` tool to instantly inject the query and submit it. Use exactly this script format to ensure stability:
|
||||
`const input = document.getElementById('chat-input'); input.value = "[YOUR_DYNAMIC_TEST_PROMPT]"; input.dispatchEvent(new Event('input', { bubbles: true })); const e = new KeyboardEvent('keydown', { key: 'Enter', code: 'Enter', keyCode: 13, which: 13, bubbles: true }); input.dispatchEvent(e);`
|
||||
4. WAITING: Wait patiently for the streaming response to stop completely. You should wait for the Stop button to disappear, or wait for the system to settle (approximately 10-15 seconds depending on the query).
|
||||
5. CHECK THE OUTCOME: [List the phenomena you expect to see, e.g., status bar shows specific text, tool card appears, result contains specific keywords, etc.]
|
||||
6. CAPTURE: Take a screenshot of the settled state to prove the outcome.
|
||||
7. REPORT: Report the EXACT outcome matching the criteria from step 5.
|
||||
```
|
||||
|
||||
### Step 4: Evaluate & Iterate (Evaluate)
|
||||
|
||||
- **PASS**: Screenshot and phenomena match expectations. Report success to the user.
|
||||
- **FAIL**: Analyze the issue based on screenshots/logs (e.g., race condition reappeared, API error). Modify the code and **re-run the entire skill workflow**.
|
||||
@@ -36,6 +36,33 @@ This folder contains reusable Agent Skills for GitHub Copilot / VS Code custom a
|
||||
- Purpose: Single-file spreadsheet operations workflow without LibreOffice.
|
||||
- Entry: `xlsx-single-file/SKILL.md`
|
||||
|
||||
---
|
||||
|
||||
## Release Pipeline Skills
|
||||
|
||||
These four skills form a complete release pipeline and are designed to be used in sequence:
|
||||
|
||||
```
|
||||
release-prep → pr-submitter → pr-reviewer → release-finalizer
|
||||
(prepare) (push & PR) (respond to review) (merge & close issue)
|
||||
```
|
||||
|
||||
- **release-prep**
|
||||
- Purpose: Full release preparation — version sync across 7+ files, bilingual release notes creation, consistency check, and commit.
|
||||
- Entry: `release-prep/SKILL.md`
|
||||
|
||||
- **pr-submitter**
|
||||
- Purpose: Shell-escape-safe PR submission — writes body to temp file, validates sections, pushes branch, creates PR via `gh pr create --body-file`.
|
||||
- Entry: `pr-submitter/SKILL.md`
|
||||
|
||||
- **pr-reviewer**
|
||||
- Purpose: Fetch PR review comments, categorize feedback, implement fixes, commit and push, reply to reviewers.
|
||||
- Entry: `pr-reviewer/SKILL.md`
|
||||
|
||||
- **release-finalizer**
|
||||
- Purpose: Merge release PR to main with proper commit message, auto-link and close related issues, post closing messages.
|
||||
- Entry: `release-finalizer/SKILL.md`
|
||||
|
||||
## Notes
|
||||
|
||||
- Skill definitions follow the expected location pattern:
|
||||
|
||||
59
.gemini/skills/openwebui-community-publisher/SKILL.md
Normal file
59
.gemini/skills/openwebui-community-publisher/SKILL.md
Normal file
@@ -0,0 +1,59 @@
|
||||
---
|
||||
name: openwebui-community-publisher
|
||||
description: Automatically publishes plugin update posts to openwebui.com.
|
||||
---
|
||||
|
||||
# OpenWebUI Community Publisher
|
||||
|
||||
## Overview
|
||||
|
||||
This skill automates the process of creating **new** plugin release notes and announcements directly on the OpenWebUI Community (openwebui.com).
|
||||
|
||||
**Note**: This skill is exclusively for **new post creation**. Do NOT use this for updating existing posts, as updates are managed separately via dedicated scripts.
|
||||
|
||||
## Prerequisites
|
||||
|
||||
- User must be logged into [openwebui.com](https://openwebui.com) in the browser session.
|
||||
- The content must be prepared in Markdown format (typically following the structure of the plugin's changelog or a dedicated release `.md` file).
|
||||
|
||||
## Execution Workflow
|
||||
|
||||
### 1. Verification
|
||||
|
||||
- Use `browser_subagent` to navigate to `https://openwebui.com`.
|
||||
- Verify the logged-in user status (look for profile icons or "@Fu-Jie").
|
||||
|
||||
### 2. Post Creation
|
||||
|
||||
- Navigate to `https://openwebui.com/post`.
|
||||
- **Post Type Selection**:
|
||||
- Choose the appropriate tab based on content:
|
||||
- **Text**: General announcements and documentation.
|
||||
- **Tool**: Standalone tool plugins.
|
||||
- **Function**: Pipes, Filters, or Actions.
|
||||
- **Prompt**: Chat prompt templates.
|
||||
- **Model**: GGUF/Ollama model files.
|
||||
- Unless otherwise specified, default to **Text** for general release introductions.
|
||||
- **Community Selection**:
|
||||
- For general OpenWebUI related posts, select **o/openwebui**.
|
||||
- For specialized topics, select the relevant community (e.g., **o/ollama** for models).
|
||||
- **Metadata Mapping**:
|
||||
- **Title**: Use the main header from the source file.
|
||||
- **Content/Description**: Paste the Markdown body.
|
||||
- **Source Code (for Function/Pipe)**: If publishing a `Function`, retrieve the corresponding `.py` file content and paste it into the code area.
|
||||
- **Tags**: Leave empty by default unless relevant keywords are explicitly provided.
|
||||
- **Media**: Optional, only attach if provided.
|
||||
- **Settings**: Ensure "Adult content" is unchecked.
|
||||
|
||||
### 3. Submission & Validation
|
||||
|
||||
- Click the "Create" (创建) button.
|
||||
- Wait for redirection to the final post URL.
|
||||
- **CRITICAL**: Use `capture_browser_screenshot` to verify the rendering.
|
||||
- Return the final URL to the user.
|
||||
|
||||
## Design Standards
|
||||
|
||||
- **Rich Aesthetics**: Use emojis in titles.
|
||||
- **Structured Data**: Ensure tables and code blocks in the Markdown are preserved.
|
||||
- **Internal Linking**: Link back to the OpenWebUI market or GitHub repository where applicable.
|
||||
180
.gemini/skills/pr-reviewer/SKILL.md
Normal file
180
.gemini/skills/pr-reviewer/SKILL.md
Normal file
@@ -0,0 +1,180 @@
|
||||
---
|
||||
name: pr-reviewer
|
||||
description: Fetches PR review comments, analyzes requested changes, implements fixes, commits and pushes the resolution. Use after a reviewer has left comments on an open PR to close the feedback loop efficiently.
|
||||
---
|
||||
|
||||
# PR Reviewer
|
||||
|
||||
## Overview
|
||||
|
||||
This skill automates the response cycle for code review. When a reviewer leaves comments on a Pull Request, this skill fetches all pending feedback, categorizes issues by severity, implements fixes, and submits a follow-up commit with appropriate review response comments.
|
||||
|
||||
## Prerequisites
|
||||
|
||||
- An open PR exists with pending review comments
|
||||
- The local branch matches the PR's head branch
|
||||
- `gh` CLI is authenticated
|
||||
|
||||
---
|
||||
|
||||
## Workflow
|
||||
|
||||
### Step 1 — Fetch Review State
|
||||
|
||||
Retrieve all review comments and overall review status:
|
||||
|
||||
```bash
|
||||
# Get overall review decisions
|
||||
PAGER=cat GH_PAGER=cat gh pr view <PR-NUMBER> --json reviews,reviewDecision,headRefName \
|
||||
--jq '{decision: .reviewDecision, reviews: [.reviews[] | {author: .author.login, state: .state, body: .body}]}'
|
||||
|
||||
# Get inline code comments (specific line comments)
|
||||
PAGER=cat GH_PAGER=cat gh api repos/Fu-Jie/openwebui-extensions/pulls/<PR-NUMBER>/comments \
|
||||
--jq '[.[] | {path: .path, line: .line, body: .body, author: .user.login, id: .id}]'
|
||||
|
||||
# Get general issue comments
|
||||
PAGER=cat GH_PAGER=cat gh issue view <PR-NUMBER> --comments --json comments \
|
||||
--jq '[.comments[] | {author: .author.login, body: .body}]'
|
||||
```
|
||||
|
||||
Confirm the current local branch matches the PR head:
|
||||
```bash
|
||||
git branch --show-current
|
||||
```
|
||||
If mismatched, checkout the correct branch first.
|
||||
|
||||
### Step 2 — Categorize Review Feedback
|
||||
|
||||
Group feedback into categories:
|
||||
|
||||
| Category | Examples | Action |
|
||||
|----------|---------|--------|
|
||||
| **Code Bug** | Logic error, incorrect variable, broken condition | Fix code immediately |
|
||||
| **Style / Formatting** | Indentation, naming convention, missing blank line | Fix code |
|
||||
| **Documentation** | Missing i18n key, wrong version in README, typo | Fix docs |
|
||||
| **Design Question** | Suggestion to restructure, alternative approach | Discuss with user before implementing |
|
||||
| **Nitpick / Optional** | Minor style preferences reviewer marked as optional | Fix if quick; document if skipped |
|
||||
| **Blocking** | Reviewer explicitly blocks merge | Must fix before proceeding |
|
||||
|
||||
Present the full categorized list to the user and confirm the resolution plan.
|
||||
|
||||
### Step 3 — Implement Fixes
|
||||
|
||||
For each accepted fix:
|
||||
|
||||
1. Read the affected file at the commented line for context:
|
||||
```bash
|
||||
sed -n '<line-5>,<line+10>p' <file-path>
|
||||
```
|
||||
2. Apply the fix using appropriate file edit tools
|
||||
3. After editing, verify the specific area looks correct
|
||||
|
||||
**For code changes that might affect behavior:**
|
||||
- Check if tests exist: `ls tests/test_*.py`
|
||||
- If tests exist, run them: `python -m pytest tests/ -v`
|
||||
|
||||
**For documentation fixes:**
|
||||
- If modifying README.md, check if `docs/` mirror needs the same fix
|
||||
- Apply the same fix to both locations
|
||||
|
||||
### Step 4 — Run Consistency Checks
|
||||
|
||||
After all fixes are applied:
|
||||
|
||||
```bash
|
||||
# Version consistency (if any version files were touched)
|
||||
python3 scripts/check_version_consistency.py
|
||||
|
||||
# Quick syntax check for Python files
|
||||
python3 -m py_compile plugins/{type}/{name}/{name}.py && echo "✅ Syntax OK"
|
||||
```
|
||||
|
||||
### Step 5 — Stage and Commit
|
||||
|
||||
Create a new commit (do NOT amend if the branch has already been pushed, to avoid force-push):
|
||||
|
||||
```bash
|
||||
git add -A
|
||||
git status
|
||||
```
|
||||
|
||||
Draft a Conventional Commits message for the fixup:
|
||||
|
||||
Format: `fix(scope): address review feedback`
|
||||
|
||||
Body should list what was fixed, referencing reviewer concerns:
|
||||
```
|
||||
fix(github-copilot-sdk): address review feedback from @reviewer
|
||||
|
||||
- Fix X per review comment on line Y of file Z
|
||||
- Update README to clarify auth requirement
|
||||
- Correct edge case in _parse_mcp_servers logic
|
||||
```
|
||||
|
||||
```bash
|
||||
git commit -m "<fixup commit message>"
|
||||
```
|
||||
|
||||
### Step 6 — Push the Fix Commit
|
||||
|
||||
```bash
|
||||
git push origin $(git branch --show-current)
|
||||
```
|
||||
|
||||
**Force-push policy:**
|
||||
- Use `git push` (non-force) by default
|
||||
- Only use `git push --force-with-lease` if:
|
||||
1. The user explicitly requests it, AND
|
||||
2. The only change is an amended commit squash (cosmetic, no logic change)
|
||||
3. Never use `--force` (without `--lease`)
|
||||
|
||||
### Step 7 — Respond to Reviewers
|
||||
|
||||
For each addressed review comment, post a reply:
|
||||
|
||||
```bash
|
||||
# Reply to inline comment
|
||||
gh api repos/Fu-Jie/openwebui-extensions/pulls/<PR-NUMBER>/comments/<COMMENT-ID>/replies \
|
||||
-X POST -f body="Fixed in commit <SHORT-SHA>. <Brief explanation of what was changed.>"
|
||||
|
||||
# General comment to summarize all fixes
|
||||
gh issue comment <PR-NUMBER> --body "All review feedback addressed in commit <SHORT-SHA>:
|
||||
- Fixed: <item 1>
|
||||
- Fixed: <item 2>
|
||||
Ready for re-review. 🙏"
|
||||
```
|
||||
|
||||
### Step 8 — Re-Request Review (Optional)
|
||||
|
||||
If the reviewer had submitted a `CHANGES_REQUESTED` review, request a new review after fixes:
|
||||
|
||||
```bash
|
||||
PAGER=cat GH_PAGER=cat gh api repos/Fu-Jie/openwebui-extensions/pulls/<PR-NUMBER>/requested_reviewers \
|
||||
-X POST -f reviewers[]='<reviewer-login>'
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Decision Guide
|
||||
|
||||
### When NOT to implement a suggestion immediately
|
||||
|
||||
- **Design questions**: "Should this be a separate class?" — Present to user for decision
|
||||
- **Optional nitpicks**: Reviewer marked as `nit:` — Ask user if they want to include it
|
||||
- **Large refactors**: If fix would require changing >50 lines, propose a separate follow-up issue instead
|
||||
|
||||
### When to ask the user before proceeding
|
||||
|
||||
- Any fix involving behavioral changes to plugin logic
|
||||
- Renaming Valve keys (breaking change — requires migration notes)
|
||||
- Changes that affect the bilingual release notes already committed
|
||||
|
||||
---
|
||||
|
||||
## Anti-Patterns to Avoid
|
||||
|
||||
- ❌ Do NOT `git commit --amend` on a pushed commit without user approval for force-push
|
||||
- ❌ Do NOT silently skip a reviewer's comment; always acknowledge it (implement or explain why not)
|
||||
- ❌ Do NOT use `--force` (only `--force-with-lease` when absolutely necessary)
|
||||
- ❌ Do NOT make unrelated changes in the fixup commit; keep scope focused on review feedback
|
||||
- ❌ Do NOT respond to reviewer comments in Chinese if the PR language context is English
|
||||
179
.gemini/skills/pr-submitter/SKILL.md
Normal file
179
.gemini/skills/pr-submitter/SKILL.md
Normal file
@@ -0,0 +1,179 @@
|
||||
---
|
||||
name: pr-submitter
|
||||
description: Submits a feature branch as a Pull Request with a validated, properly formatted bilingual PR body. Handles shell-escape-safe body writing via temp files. Use after release-prep has committed all changes.
|
||||
---
|
||||
|
||||
# PR Submitter
|
||||
|
||||
## Overview
|
||||
|
||||
This skill handles the final step of pushing a feature branch and creating a validated Pull Request on GitHub. Its primary purpose is to avoid the shell-escaping pitfalls (backticks, special characters in `gh pr create --body`) by always writing the PR body to a **temp file** first.
|
||||
|
||||
## Prerequisites
|
||||
|
||||
- All changes are committed (use `release-prep` skill first)
|
||||
- The `gh` CLI is authenticated (`gh auth status`)
|
||||
- Current branch is NOT `main` or `master`
|
||||
|
||||
---
|
||||
|
||||
## Workflow
|
||||
|
||||
### Step 1 — Pre-Flight Checks
|
||||
|
||||
Run these checks before any push:
|
||||
|
||||
```bash
|
||||
# 1. Confirm not on protected branch
|
||||
git branch --show-current
|
||||
|
||||
# 2. Verify there are commits to push
|
||||
git log origin/$(git branch --show-current)..HEAD --oneline 2>/dev/null || echo "No remote tracking branch yet"
|
||||
|
||||
# 3. Check gh CLI auth
|
||||
gh auth status
|
||||
```
|
||||
|
||||
If any check fails, stop and report clearly.
|
||||
|
||||
### Step 2 — Collect PR Metadata
|
||||
|
||||
Gather:
|
||||
- **PR Title**: Must follow Conventional Commits format, English only (e.g., `feat(github-copilot-sdk): release v0.8.0 with conditional tool filtering`)
|
||||
- **Target base branch**: Default is `main`
|
||||
- **Plugin name + version** (to build body sections)
|
||||
- **Key changes** (reuse from release-prep or the latest What's New section)
|
||||
|
||||
### Step 3 — Build PR Body File (Shell-Escape-Safe)
|
||||
|
||||
**Always write the body to a temp file.** Never embed multi-line markdown with special characters directly in a shell command.
|
||||
|
||||
```bash
|
||||
cat > /tmp/pr_body.md << 'HEREDOC'
|
||||
## Summary
|
||||
|
||||
Brief one-sentence description of what this PR accomplishes.
|
||||
|
||||
## Changes
|
||||
|
||||
### New Features
|
||||
- Feature 1 description
|
||||
- Feature 2 description
|
||||
|
||||
### Bug Fixes
|
||||
- Fix 1 description
|
||||
|
||||
## Plugin Version
|
||||
- `PluginName` bumped to `vX.X.X`
|
||||
|
||||
## Documentation
|
||||
- README.md / README_CN.md updated
|
||||
- docs/ mirrors synced
|
||||
|
||||
## Testing
|
||||
- [ ] Tested locally in OpenWebUI
|
||||
- [ ] i18n validated (all language keys present)
|
||||
- [ ] Version consistency check passed (`python3 scripts/check_version_consistency.py`)
|
||||
|
||||
---
|
||||
|
||||
## 变更摘要(中文)
|
||||
|
||||
简要描述本次 PR 的改动内容。
|
||||
|
||||
### 新功能
|
||||
- 功能1描述
|
||||
- 功能2描述
|
||||
|
||||
### 问题修复
|
||||
- 修复1描述
|
||||
HEREDOC
|
||||
```
|
||||
|
||||
**Critical rules for the body file:**
|
||||
- Use `<< 'HEREDOC'` (quoted heredoc) to prevent variable expansion
|
||||
- Keep all backticks literal — they are safe inside a heredoc
|
||||
- Paths like `/api/v1/files/` are safe too since heredoc doesn't interpret them as commands
|
||||
|
||||
### Step 4 — Validate PR Body
|
||||
|
||||
Before submitting, verify the body file contains expected sections:
|
||||
|
||||
```bash
|
||||
# Check key sections exist
|
||||
grep -q "## Summary" /tmp/pr_body.md && echo "✅ Summary" || echo "❌ Summary missing"
|
||||
grep -q "## Changes" /tmp/pr_body.md && echo "✅ Changes" || echo "❌ Changes missing"
|
||||
grep -q "## 变更摘要" /tmp/pr_body.md && echo "✅ CN Section" || echo "❌ CN Section missing"
|
||||
|
||||
# Preview the body
|
||||
cat /tmp/pr_body.md
|
||||
```
|
||||
|
||||
Ask the user to confirm the body content before proceeding.
|
||||
|
||||
### Step 5 — Push Branch
|
||||
|
||||
```bash
|
||||
git push -u origin $(git branch --show-current)
|
||||
```
|
||||
|
||||
If push is rejected (non-fast-forward), report to user and ask whether to force-push. **Do NOT force-push without explicit confirmation.**
|
||||
|
||||
### Step 6 — Create Pull Request
|
||||
|
||||
```bash
|
||||
gh pr create \
|
||||
--base main \
|
||||
--head $(git branch --show-current) \
|
||||
--title "<PR title from Step 2>" \
|
||||
--body-file /tmp/pr_body.md
|
||||
```
|
||||
|
||||
Always use `--body-file`, never `--body` with inline markdown.
|
||||
|
||||
### Step 7 — Verify PR Creation
|
||||
|
||||
```bash
|
||||
PAGER=cat GH_PAGER=cat gh pr view --json number,url,title,body --jq '{number: .number, url: .url, title: .title, body_preview: .body[:200]}'
|
||||
```
|
||||
|
||||
Confirm:
|
||||
- PR number and URL
|
||||
- Title matches intended Conventional Commits format
|
||||
- Body preview includes key sections (not truncated/corrupted)
|
||||
|
||||
If the body appears corrupted (empty sections, missing backtick content), use edit:
|
||||
|
||||
```bash
|
||||
gh pr edit <PR-NUMBER> --body-file /tmp/pr_body.md
|
||||
```
|
||||
|
||||
### Step 8 — Cleanup
|
||||
|
||||
```bash
|
||||
rm -f /tmp/pr_body.md
|
||||
```
|
||||
|
||||
Report final PR URL to the user.
|
||||
|
||||
---
|
||||
|
||||
## Shell-Escape Safety Rules
|
||||
|
||||
| Risk | Safe Approach |
|
||||
|------|--------------|
|
||||
| Backticks in `--body` | Write to file, use `--body-file` |
|
||||
| Paths like `/api/...` | Safe in heredoc; risky in inline `--body` |
|
||||
| Newlines in `--body` | File-based only |
|
||||
| `$variable` expansion | Use `<< 'HEREDOC'` (quoted) |
|
||||
| Double quotes in body | Safe in heredoc file |
|
||||
|
||||
---
|
||||
|
||||
## Anti-Patterns to Avoid
|
||||
|
||||
- ❌ Never use `--body "..."` with multi-line content directly in shell command
|
||||
- ❌ Never interpolate variables directly into heredoc without quoting the delimiter
|
||||
- ❌ Never force-push (`--force`) without explicit user confirmation
|
||||
- ❌ Never target `main` as the source branch (only as base)
|
||||
- ❌ Never skip the body validation step — a PR with empty body is worse than a delayed PR
|
||||
208
.gemini/skills/release-finalizer/SKILL.md
Normal file
208
.gemini/skills/release-finalizer/SKILL.md
Normal file
@@ -0,0 +1,208 @@
|
||||
---
|
||||
name: release-finalizer
|
||||
description: Merges a release PR, associates it with resolved issues, replies to issue reporters, and closes issues. Use after PR review is complete and ready for merge. Closes the release cycle.
|
||||
---
|
||||
|
||||
# Release Finalizer
|
||||
|
||||
## Overview
|
||||
|
||||
This skill completes the final step of the release cycle: merging the release PR to `main`, replying to all related issues with solutions, and automatically closing them using GitHub's issue linking mechanism.
|
||||
|
||||
## Prerequisites
|
||||
|
||||
- The PR is in `OPEN` state and ready to merge
|
||||
- All status checks have passed (CI green)
|
||||
- All review feedback has been addressed
|
||||
- The PR relates to one or more GitHub issues (either in PR description or through commits)
|
||||
|
||||
---
|
||||
|
||||
## Workflow
|
||||
|
||||
### Step 1 — Pre-Merge Verification
|
||||
|
||||
Verify that the PR is ready:
|
||||
|
||||
```bash
|
||||
PAGER=cat GH_PAGER=cat gh pr view <PR-NUMBER> --json state,statusCheckRollup,reviewDecision
|
||||
```
|
||||
|
||||
Checklist:
|
||||
- ✅ `state` is `OPEN`
|
||||
- ✅ `statusCheckRollup` all have `conclusion: SUCCESS`
|
||||
- ✅ `reviewDecision` is `APPROVED` or empty (no blocking reviews)
|
||||
|
||||
If any check fails, **do NOT merge**. Report the issue to the user.
|
||||
|
||||
### Step 2 — Identify Related Issues
|
||||
|
||||
Issues can be linked to a PR in multiple ways. Check the PR description and commit messages for keywords:
|
||||
|
||||
```bash
|
||||
PAGER=cat GH_PAGER=cat gh pr view <PR-NUMBER> --json body,commits
|
||||
```
|
||||
|
||||
Look for patterns like:
|
||||
- `Closes #XX`, `Fixes #XX`, `Resolves #XX` (in description or commit bodies)
|
||||
- `#XX` mentioned as "related to" or "addresses"
|
||||
|
||||
**Manual input**: If issue links are not in the PR, ask the user which issue(s) this PR resolves.
|
||||
|
||||
Extract all issue numbers into a list: `[#48, #52, ...]`
|
||||
|
||||
### Step 3 — Select Merge Strategy
|
||||
|
||||
Offer the user three options:
|
||||
|
||||
| Strategy | Git Behavior | Use Case |
|
||||
|----------|-------------|----------|
|
||||
| **Squash** | All commits squashed into one commit on main | Clean history, recommended for release PRs |
|
||||
| **Rebase** | Linear history, no merge commit | Preserve commit granularity |
|
||||
| **Merge** | Merge commit created | Preserve full PR context |
|
||||
|
||||
**Recommendation for release PRs**: Use `--squash` to create a single clean commit.
|
||||
|
||||
If user doesn't specify, default to `--squash`.
|
||||
|
||||
### Step 4 — Prepare Merge Commit Message
|
||||
|
||||
If using `--squash`, craft a single comprehensive commit message:
|
||||
|
||||
**Format** (Conventional Commits + Github linking):
|
||||
```
|
||||
type(scope): description
|
||||
|
||||
- Bullet point 1
|
||||
- Bullet point 2
|
||||
|
||||
Closes #48
|
||||
Closes #52
|
||||
```
|
||||
|
||||
The `Closes #XX` keyword tells GitHub to automatically close those issues when the commit lands on `main`.
|
||||
|
||||
Example:
|
||||
```
|
||||
feat(pipes,filters): release Copilot SDK Pipe v0.8.0 and Files Filter v0.1.3
|
||||
|
||||
- Implement P1~P4 conditional tool filtering system
|
||||
- Fix file publishing reliability across all storage backends
|
||||
- Add strict file URL validation
|
||||
- Update bilingual documentation
|
||||
|
||||
Closes #48
|
||||
```
|
||||
|
||||
### Step 5 — Execute Merge
|
||||
|
||||
```bash
|
||||
gh pr merge <PR-NUMBER> \
|
||||
--squash \
|
||||
--delete-branch \
|
||||
-m "type(scope): description" \
|
||||
-b "- Bullet 1\n- Bullet 2\n\nCloses #48"
|
||||
```
|
||||
|
||||
**Key flags:**
|
||||
- `--squash`: Squash commits (recommended for releases)
|
||||
- `--delete-branch`: Delete the feature branch after merge
|
||||
- `-m`: Commit subject
|
||||
- `-b`: Commit body (supports `\n` for newlines)
|
||||
|
||||
Confirm the merge is successful; GitHub will automatically close related issues with `Closes #XX` keyword.
|
||||
|
||||
### Step 6 — Verify Auto-Close
|
||||
|
||||
GitHub automatically closes issues when a commit with `Closes #XX` lands on the default branch (`main`).
|
||||
|
||||
To verify:
|
||||
```bash
|
||||
PAGER=cat GH_PAGER=cat gh issue view <ISSUE-NUMBER> --json state
|
||||
```
|
||||
|
||||
Should show `state: CLOSED`.
|
||||
|
||||
### Step 7 — Post Closing Message (Optional but Recommended)
|
||||
|
||||
For better UX, manually post a summary comment to **each issue** before it auto-closes (since auto-close happens silently):
|
||||
|
||||
```bash
|
||||
gh issue comment <ISSUE-NUMBER> --body "
|
||||
This has been fixed in PR #<PR-NUMBER>, which is now merged to main.
|
||||
|
||||
**Solution Summary:**
|
||||
- <Key fix 1>
|
||||
- <Key fix 2>
|
||||
|
||||
The fix will be available in the next plugin release. Thank you for reporting! ⭐
|
||||
"
|
||||
```
|
||||
|
||||
### Step 8 — (Optional) Regenerate Release Notes
|
||||
|
||||
If the merge revealed any final tweaks to release notes:
|
||||
|
||||
```bash
|
||||
# Re-export release notes from merged commit
|
||||
git log --oneline -1 <merged-commit-sha>
|
||||
```
|
||||
|
||||
If needed, create a follow-up PR with doc polish (do NOT force-push the merged commit).
|
||||
|
||||
---
|
||||
|
||||
## Merge Strategy Decision Tree
|
||||
|
||||
```
|
||||
Is this a patch/hotfix release?
|
||||
├─ YES → Use --squash
|
||||
└─ NO → Multi-feature release?
|
||||
├─ YES → Use --squash (cleaner history)
|
||||
└─ NO → Preserve detail?
|
||||
├─ YES → Use --rebase
|
||||
└─ NO → Use --merge (preserve PR context)
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Issue Auto-Close Keywords
|
||||
|
||||
These keywords in commit/PR messages will auto-close issues when merged to `main`:
|
||||
|
||||
- `Closes #XX`
|
||||
- `Fixes #XX`
|
||||
- `Resolves #XX`
|
||||
- `close #XX` (case-insensitive)
|
||||
- `fix #XX`
|
||||
- `resolve #XX`
|
||||
|
||||
**Important**: The keyword must be on the **final commit that lands on** `main`. For squash merges, it must be in the squash commit message body.
|
||||
|
||||
---
|
||||
|
||||
## Anti-Patterns to Avoid
|
||||
|
||||
- ❌ Do NOT merge if any status checks are PENDING or FAILED
|
||||
- ❌ Do NOT merge if there are blocking reviews (reviewDecision: `CHANGES_REQUESTED`)
|
||||
- ❌ Do NOT merge without verifying the Conventional Commits format in the merge message
|
||||
- ❌ Do NOT merge without including `Closes #XX` keywords for all related issues
|
||||
- ❌ Do NOT assume issues will auto-close silently — post a courtesy comment first
|
||||
- ❌ Do NOT delete the branch if it might be needed for cherry-pick or hotfixes later
|
||||
|
||||
---
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
### Issue did not auto-close after merge
|
||||
- Verify the `Closes #XX` keyword is in the **final commit message** (use `git log` to check)
|
||||
- Ensure the commit is on the `main` branch
|
||||
- GitHub sometimes takes a few seconds to process; refresh the issue page
|
||||
|
||||
### Multiple issues to close
|
||||
- List all in separate `Closes #XX` lines in the commit body
|
||||
- Each one will be independently auto-closed
|
||||
|
||||
### Want to close issue without merge?
|
||||
- Use `gh issue close <ISSUE-NUMBER>` manually
|
||||
- Only recommended if the PR was manually reverted or deemed invalid
|
||||
137
.gemini/skills/release-prep/SKILL.md
Normal file
137
.gemini/skills/release-prep/SKILL.md
Normal file
@@ -0,0 +1,137 @@
|
||||
---
|
||||
name: release-prep
|
||||
description: Orchestrates the full release preparation flow for a plugin — version sync across 7+ files, bilingual release notes creation, and commit message drafting. Use before submitting a PR. Does NOT push or create a PR; that is handled by pr-submitter.
|
||||
---
|
||||
|
||||
# Release Prep
|
||||
|
||||
## Overview
|
||||
|
||||
This skill drives the complete pre-PR release pipeline. It enforces the repository rule that every release must synchronize the version number and changelog across **at least 7 locations** before a commit is created.
|
||||
|
||||
## Scope
|
||||
|
||||
This skill covers:
|
||||
1. Version sync (delegates detail to `version-bumper` if needed)
|
||||
2. Bilingual release notes file creation
|
||||
3. 7-location consistency verification
|
||||
4. Conventional Commits message drafting
|
||||
5. `git add -A && git commit` execution
|
||||
|
||||
It **stops before** `git push` or `gh pr create`. Use the `pr-submitter` skill for those steps.
|
||||
|
||||
---
|
||||
|
||||
## Workflow
|
||||
|
||||
### Step 1 — Collect Release Info
|
||||
|
||||
Ask the user (or infer from current state) the following:
|
||||
- **Plugin name** and **type** (actions / filters / pipes / tools)
|
||||
- **New version number** (e.g., `0.8.0`)
|
||||
- **Key changes** in English and Chinese (1-5 bullet points each)
|
||||
|
||||
If a `What's New` section already exists in README.md, extract it as the source of truth.
|
||||
|
||||
### Step 2 — Sync Version Across 7 Locations
|
||||
|
||||
Verify AND update the version string in all of the following. Mark each as ✅ or ❌:
|
||||
|
||||
| # | File | Location |
|
||||
|---|------|----------|
|
||||
| 1 | `plugins/{type}/{name}/{name}.py` | `version:` in docstring |
|
||||
| 2 | `plugins/{type}/{name}/README.md` | `**Version:** x.x.x` metadata line |
|
||||
| 3 | `plugins/{type}/{name}/README_CN.md` | `**Version:** x.x.x` metadata line |
|
||||
| 4 | `docs/plugins/{type}/{name}.md` | `**Version:** x.x.x` metadata line |
|
||||
| 5 | `docs/plugins/{type}/{name}.zh.md` | `**Version:** x.x.x` metadata line |
|
||||
| 6 | `docs/plugins/{type}/index.md` | version badge for this plugin |
|
||||
| 7 | `docs/plugins/{type}/index.zh.md` | version badge for this plugin |
|
||||
|
||||
Additionally update the root-level **updated date badge** in:
|
||||
- `README.md` — ``
|
||||
- `README_CN.md` — same badge format
|
||||
|
||||
Use today's date (`YYYY-MM-DD`) for the badge.
|
||||
|
||||
### Step 3 — Update What's New (All 4 Doc Files)
|
||||
|
||||
The `What's New` / `最新更新` section must contain **only the most recent release's changes**. Previous entries should be removed from this section (they live in CHANGELOG or release notes files).
|
||||
|
||||
Update these 4 files' `What's New` / `最新更新` block consistently:
|
||||
- `plugins/{type}/{name}/README.md`
|
||||
- `plugins/{type}/{name}/README_CN.md`
|
||||
- `docs/plugins/{type}/{name}.md`
|
||||
- `docs/plugins/{type}/{name}.zh.md`
|
||||
|
||||
### Step 4 — Create Bilingual Release Notes Files
|
||||
|
||||
Create two versioned release notes files:
|
||||
|
||||
**Path**: `plugins/{type}/{name}/v{version}.md`
|
||||
**Path**: `plugins/{type}/{name}/v{version}_CN.md`
|
||||
|
||||
#### Required Sections
|
||||
|
||||
Each file must include:
|
||||
1. **Title**: `# v{version} Release Notes` (EN) / `# v{version} 版本发布说明` (CN)
|
||||
2. **Overview**: One paragraph summarizing this release
|
||||
3. **New Features** / **新功能**: Bulleted list of features
|
||||
4. **Bug Fixes** / **问题修复**: Bulleted list of fixes
|
||||
5. **Migration Notes** / **迁移说明**: Breaking changes or Valve key renames (omit section if none)
|
||||
6. **Companion Plugins** / **配套插件** (optional): If a companion plugin was updated
|
||||
|
||||
If a release notes file already exists for this version, update it rather than creating a new one.
|
||||
|
||||
### Step 5 — Verify Consistency (Pre-Commit Check)
|
||||
|
||||
Run the consistency check script:
|
||||
|
||||
```bash
|
||||
python3 scripts/check_version_consistency.py
|
||||
```
|
||||
|
||||
If issues are found, fix them before proceeding. Do not commit with inconsistencies.
|
||||
|
||||
### Step 6 — Draft Conventional Commits Message
|
||||
|
||||
Generate the commit message following `commit-message.instructions.md` rules:
|
||||
- **Language**: English ONLY
|
||||
- **Format**: `type(scope): subject` + blank line + body bullets
|
||||
- **Scope**: use plugin folder name (e.g., `github-copilot-sdk`)
|
||||
- **Body**: 1-3 bullets summarizing key changes
|
||||
- Explicitly mention "READMEs and docs synced" if version was bumped
|
||||
|
||||
Present the full commit message to the user for review before executing.
|
||||
|
||||
### Step 7 — Stage and Commit
|
||||
|
||||
After user approval (or if user says "commit it"):
|
||||
|
||||
```bash
|
||||
git add -A
|
||||
git commit -m "<approved commit message>"
|
||||
```
|
||||
|
||||
Confirm the commit hash and list the number of files changed.
|
||||
|
||||
---
|
||||
|
||||
## Checklist (Auto-Verify Before Commit)
|
||||
|
||||
- [ ] `version:` in `.py` docstring matches target version
|
||||
- [ ] `**Version:**` in all 4 README/docs files matches
|
||||
- [ ] Both `index.md` version badges updated
|
||||
- [ ] Root `README.md` and `README_CN.md` date badges updated to today
|
||||
- [ ] `What's New` / `最新更新` contains ONLY the latest release
|
||||
- [ ] `v{version}.md` and `v{version}_CN.md` created or updated
|
||||
- [ ] `python3 scripts/check_version_consistency.py` returns no errors
|
||||
- [ ] Commit message is English-only Conventional Commits format
|
||||
|
||||
---
|
||||
|
||||
## Anti-Patterns to Avoid
|
||||
|
||||
- ❌ Do NOT add extra features or refactor code during release prep — only version/doc updates
|
||||
- ❌ Do NOT push or create PR in this skill — use `pr-submitter`
|
||||
- ❌ Do NOT use today's date in commit messages; only in badge URLs
|
||||
- ❌ Do NOT leave stale What's New content from prior versions
|
||||
121
.github/TEMP_FILES_POLICY.md
vendored
Normal file
121
.github/TEMP_FILES_POLICY.md
vendored
Normal file
@@ -0,0 +1,121 @@
|
||||
# Temporary Files Handling Policy
|
||||
|
||||
**Last Updated**: 2026-02-26
|
||||
**Status**: Active Guideline
|
||||
|
||||
## Overview
|
||||
|
||||
All temporary files created during skill execution or development workflows must follow this centralized policy to maintain project cleanliness and workspace isolation alignment.
|
||||
|
||||
## Core Rule
|
||||
|
||||
**Temporary files MUST be stored in the project's `.temp/` directory, NOT in system directories like `/tmp`.**
|
||||
|
||||
## Rationale
|
||||
|
||||
1. **Workspace Isolation**: Aligns with OpenWebUI's workspace-per-user model
|
||||
2. **Project Cohesion**: All project artifacts (temporary or permanent) stay within project boundaries
|
||||
3. **Multi-User Safety**: Avoids conflicts between multiple developers using the same system
|
||||
4. **Cleanup Traceability**: Easy to verify all temp files are cleaned up via single `.temp/` directory
|
||||
5. **Debugging**: Inspectable before deletion if issues occur
|
||||
|
||||
## Usage Pattern
|
||||
|
||||
### Creating Temp File
|
||||
|
||||
```bash
|
||||
# Step 1: Ensure temp directory exists
|
||||
mkdir -p .temp
|
||||
|
||||
# Step 2: Write temp file
|
||||
cat > .temp/my_temp_file.md << 'EOF'
|
||||
...content...
|
||||
EOF
|
||||
|
||||
# Step 3: Use the file in your workflow
|
||||
# (e.g., pass to gh CLI, process with script, etc.)
|
||||
```
|
||||
|
||||
### Cleanup After Use
|
||||
|
||||
```bash
|
||||
# Remove individual temp files
|
||||
rm -f .temp/my_temp_file.md
|
||||
|
||||
# Or full cleanup of entire temp directory
|
||||
rm -rf .temp/
|
||||
```
|
||||
|
||||
## Skills Affected
|
||||
|
||||
| Skill | Implementation | Status |
|
||||
|-------|----------------|--------|
|
||||
| `pr-submitter` | PR body file (`.temp/pr_body.md`) | ✅ Updated |
|
||||
| `release-prep` | Draft notes (if any) | ✅ Policy Added |
|
||||
| `version-bumper` | Backup files (if any) | ℹ️ Check needed |
|
||||
| Future skills | TBD | 📋 Must follow policy |
|
||||
|
||||
## .gitignore Configuration
|
||||
|
||||
The following entry in `.gitignore` ensures temp files are never committed:
|
||||
|
||||
```
|
||||
# Temporary files
|
||||
.temp/
|
||||
.build/
|
||||
```
|
||||
|
||||
## Examples
|
||||
|
||||
### Example 1: PR Submitter Skill
|
||||
```bash
|
||||
# Create PR body in temp directory
|
||||
mkdir -p .temp
|
||||
cat > .temp/pr_body.md << 'EOF'
|
||||
## Summary
|
||||
New feature implementation
|
||||
EOF
|
||||
|
||||
# Use with gh CLI
|
||||
gh pr create --body-file .temp/pr_body.md --title "feat: new feature"
|
||||
|
||||
# Cleanup
|
||||
rm -f .temp/pr_body.md
|
||||
```
|
||||
|
||||
### Example 2: Release Prepare Workflow
|
||||
```bash
|
||||
# Create draft changelog
|
||||
mkdir -p .temp
|
||||
cat > .temp/changelog_draft.md << 'EOF'
|
||||
# v1.0.0 Release Notes
|
||||
EOF
|
||||
|
||||
# Edit, validate, then integrate into real files
|
||||
# ...
|
||||
|
||||
# Cleanup
|
||||
rm -f .temp/changelog_draft.md
|
||||
```
|
||||
|
||||
## Anti-Patterns (❌ Don't Do This)
|
||||
|
||||
- ❌ Writing temp files to `/tmp` — will be lost/orphaned
|
||||
- ❌ Writing to root directory or `plugins/` — pollutes repo
|
||||
- ❌ Not cleaning up temp files — accumulates clutter
|
||||
- ❌ Committing `.temp/` files to git — defeats the purpose
|
||||
- ❌ Using absolute paths — breaks workflow portability
|
||||
|
||||
## Enforcement
|
||||
|
||||
1. **Code Review**: PRs should verify no `/tmp` references in scripts
|
||||
2. **CI/CD**: Setup can validate `.temp/` cleanup via git status before commit
|
||||
3. **Documentation**: All skill docs must reference this policy (link to this file)
|
||||
4. **Automated**: Consider adding pre-commit hook to ensure `.temp/` is not staged
|
||||
|
||||
## Questions / Clarifications
|
||||
|
||||
For questions about this policy, refer to:
|
||||
- `.github/skills/pr-submitter/SKILL.md` — Practical example
|
||||
- `.github/skills/release-prep/SKILL.md` — Policy integration
|
||||
- `/memories/repo/temp-file-handling-convention.md` — Internal notes
|
||||
27
.github/skills/README.md
vendored
27
.github/skills/README.md
vendored
@@ -36,6 +36,33 @@ This folder contains reusable Agent Skills for GitHub Copilot / VS Code custom a
|
||||
- Purpose: Single-file spreadsheet operations workflow without LibreOffice.
|
||||
- Entry: `xlsx-single-file/SKILL.md`
|
||||
|
||||
---
|
||||
|
||||
## Release Pipeline Skills
|
||||
|
||||
These four skills form a complete release pipeline and are designed to be used in sequence:
|
||||
|
||||
```
|
||||
release-prep → pr-submitter → pr-reviewer → release-finalizer
|
||||
(prepare) (push & PR) (respond to review) (merge & close issue)
|
||||
```
|
||||
|
||||
- **release-prep**
|
||||
- Purpose: Full release preparation — version sync across 7+ files, bilingual release notes creation, consistency check, and commit.
|
||||
- Entry: `release-prep/SKILL.md`
|
||||
|
||||
- **pr-submitter**
|
||||
- Purpose: Shell-escape-safe PR submission — writes body to temp file, validates sections, pushes branch, creates PR via `gh pr create --body-file`.
|
||||
- Entry: `pr-submitter/SKILL.md`
|
||||
|
||||
- **pr-reviewer**
|
||||
- Purpose: Fetch PR review comments, categorize feedback, implement fixes, commit and push, reply to reviewers.
|
||||
- Entry: `pr-reviewer/SKILL.md`
|
||||
|
||||
- **release-finalizer**
|
||||
- Purpose: Merge release PR to main with proper commit message, auto-link and close related issues, post closing messages.
|
||||
- Entry: `release-finalizer/SKILL.md`
|
||||
|
||||
## Notes
|
||||
|
||||
- Skill definitions follow the expected location pattern:
|
||||
|
||||
180
.github/skills/pr-reviewer/SKILL.md
vendored
Normal file
180
.github/skills/pr-reviewer/SKILL.md
vendored
Normal file
@@ -0,0 +1,180 @@
|
||||
---
|
||||
name: pr-reviewer
|
||||
description: Fetches PR review comments, analyzes requested changes, implements fixes, commits and pushes the resolution. Use after a reviewer has left comments on an open PR to close the feedback loop efficiently.
|
||||
---
|
||||
|
||||
# PR Reviewer
|
||||
|
||||
## Overview
|
||||
|
||||
This skill automates the response cycle for code review. When a reviewer leaves comments on a Pull Request, this skill fetches all pending feedback, categorizes issues by severity, implements fixes, and submits a follow-up commit with appropriate review response comments.
|
||||
|
||||
## Prerequisites
|
||||
|
||||
- An open PR exists with pending review comments
|
||||
- The local branch matches the PR's head branch
|
||||
- `gh` CLI is authenticated
|
||||
|
||||
---
|
||||
|
||||
## Workflow
|
||||
|
||||
### Step 1 — Fetch Review State
|
||||
|
||||
Retrieve all review comments and overall review status:
|
||||
|
||||
```bash
|
||||
# Get overall review decisions
|
||||
PAGER=cat GH_PAGER=cat gh pr view <PR-NUMBER> --json reviews,reviewDecision,headRefName \
|
||||
--jq '{decision: .reviewDecision, reviews: [.reviews[] | {author: .author.login, state: .state, body: .body}]}'
|
||||
|
||||
# Get inline code comments (specific line comments)
|
||||
PAGER=cat GH_PAGER=cat gh api repos/Fu-Jie/openwebui-extensions/pulls/<PR-NUMBER>/comments \
|
||||
--jq '[.[] | {path: .path, line: .line, body: .body, author: .user.login, id: .id}]'
|
||||
|
||||
# Get general issue comments
|
||||
PAGER=cat GH_PAGER=cat gh issue view <PR-NUMBER> --comments --json comments \
|
||||
--jq '[.comments[] | {author: .author.login, body: .body}]'
|
||||
```
|
||||
|
||||
Confirm the current local branch matches the PR head:
|
||||
```bash
|
||||
git branch --show-current
|
||||
```
|
||||
If mismatched, checkout the correct branch first.
|
||||
|
||||
### Step 2 — Categorize Review Feedback
|
||||
|
||||
Group feedback into categories:
|
||||
|
||||
| Category | Examples | Action |
|
||||
|----------|---------|--------|
|
||||
| **Code Bug** | Logic error, incorrect variable, broken condition | Fix code immediately |
|
||||
| **Style / Formatting** | Indentation, naming convention, missing blank line | Fix code |
|
||||
| **Documentation** | Missing i18n key, wrong version in README, typo | Fix docs |
|
||||
| **Design Question** | Suggestion to restructure, alternative approach | Discuss with user before implementing |
|
||||
| **Nitpick / Optional** | Minor style preferences reviewer marked as optional | Fix if quick; document if skipped |
|
||||
| **Blocking** | Reviewer explicitly blocks merge | Must fix before proceeding |
|
||||
|
||||
Present the full categorized list to the user and confirm the resolution plan.
|
||||
|
||||
### Step 3 — Implement Fixes
|
||||
|
||||
For each accepted fix:
|
||||
|
||||
1. Read the affected file at the commented line for context:
|
||||
```bash
|
||||
sed -n '<line-5>,<line+10>p' <file-path>
|
||||
```
|
||||
2. Apply the fix using appropriate file edit tools
|
||||
3. After editing, verify the specific area looks correct
|
||||
|
||||
**For code changes that might affect behavior:**
|
||||
- Check if tests exist: `ls tests/test_*.py`
|
||||
- If tests exist, run them: `python -m pytest tests/ -v`
|
||||
|
||||
**For documentation fixes:**
|
||||
- If modifying README.md, check if `docs/` mirror needs the same fix
|
||||
- Apply the same fix to both locations
|
||||
|
||||
### Step 4 — Run Consistency Checks
|
||||
|
||||
After all fixes are applied:
|
||||
|
||||
```bash
|
||||
# Version consistency (if any version files were touched)
|
||||
python3 scripts/check_version_consistency.py
|
||||
|
||||
# Quick syntax check for Python files
|
||||
python3 -m py_compile plugins/{type}/{name}/{name}.py && echo "✅ Syntax OK"
|
||||
```
|
||||
|
||||
### Step 5 — Stage and Commit
|
||||
|
||||
Create a new commit (do NOT amend if the branch has already been pushed, to avoid force-push):
|
||||
|
||||
```bash
|
||||
git add -A
|
||||
git status
|
||||
```
|
||||
|
||||
Draft a Conventional Commits message for the fixup:
|
||||
|
||||
Format: `fix(scope): address review feedback`
|
||||
|
||||
Body should list what was fixed, referencing reviewer concerns:
|
||||
```
|
||||
fix(github-copilot-sdk): address review feedback from @reviewer
|
||||
|
||||
- Fix X per review comment on line Y of file Z
|
||||
- Update README to clarify auth requirement
|
||||
- Correct edge case in _parse_mcp_servers logic
|
||||
```
|
||||
|
||||
```bash
|
||||
git commit -m "<fixup commit message>"
|
||||
```
|
||||
|
||||
### Step 6 — Push the Fix Commit
|
||||
|
||||
```bash
|
||||
git push origin $(git branch --show-current)
|
||||
```
|
||||
|
||||
**Force-push policy:**
|
||||
- Use `git push` (non-force) by default
|
||||
- Only use `git push --force-with-lease` if:
|
||||
1. The user explicitly requests it, AND
|
||||
2. The only change is an amended commit squash (cosmetic, no logic change)
|
||||
3. Never use `--force` (without `--lease`)
|
||||
|
||||
### Step 7 — Respond to Reviewers
|
||||
|
||||
For each addressed review comment, post a reply:
|
||||
|
||||
```bash
|
||||
# Reply to inline comment
|
||||
gh api repos/Fu-Jie/openwebui-extensions/pulls/<PR-NUMBER>/comments/<COMMENT-ID>/replies \
|
||||
-X POST -f body="Fixed in commit <SHORT-SHA>. <Brief explanation of what was changed.>"
|
||||
|
||||
# General comment to summarize all fixes
|
||||
gh issue comment <PR-NUMBER> --body "All review feedback addressed in commit <SHORT-SHA>:
|
||||
- Fixed: <item 1>
|
||||
- Fixed: <item 2>
|
||||
Ready for re-review. 🙏"
|
||||
```
|
||||
|
||||
### Step 8 — Re-Request Review (Optional)
|
||||
|
||||
If the reviewer had submitted a `CHANGES_REQUESTED` review, request a new review after fixes:
|
||||
|
||||
```bash
|
||||
PAGER=cat GH_PAGER=cat gh api repos/Fu-Jie/openwebui-extensions/pulls/<PR-NUMBER>/requested_reviewers \
|
||||
-X POST -f reviewers[]='<reviewer-login>'
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Decision Guide
|
||||
|
||||
### When NOT to implement a suggestion immediately
|
||||
|
||||
- **Design questions**: "Should this be a separate class?" — Present to user for decision
|
||||
- **Optional nitpicks**: Reviewer marked as `nit:` — Ask user if they want to include it
|
||||
- **Large refactors**: If fix would require changing >50 lines, propose a separate follow-up issue instead
|
||||
|
||||
### When to ask the user before proceeding
|
||||
|
||||
- Any fix involving behavioral changes to plugin logic
|
||||
- Renaming Valve keys (breaking change — requires migration notes)
|
||||
- Changes that affect the bilingual release notes already committed
|
||||
|
||||
---
|
||||
|
||||
## Anti-Patterns to Avoid
|
||||
|
||||
- ❌ Do NOT `git commit --amend` on a pushed commit without user approval for force-push
|
||||
- ❌ Do NOT silently skip a reviewer's comment; always acknowledge it (implement or explain why not)
|
||||
- ❌ Do NOT use `--force` (only `--force-with-lease` when absolutely necessary)
|
||||
- ❌ Do NOT make unrelated changes in the fixup commit; keep scope focused on review feedback
|
||||
- ❌ Do NOT respond to reviewer comments in Chinese if the PR language context is English
|
||||
194
.github/skills/pr-submitter/SKILL.md
vendored
Normal file
194
.github/skills/pr-submitter/SKILL.md
vendored
Normal file
@@ -0,0 +1,194 @@
|
||||
---
|
||||
name: pr-submitter
|
||||
description: Submits a feature branch as a Pull Request with a validated, properly formatted bilingual PR body. Handles shell-escape-safe body writing via temp files. Use after release-prep has committed all changes.
|
||||
---
|
||||
|
||||
# PR Submitter
|
||||
|
||||
## Overview
|
||||
|
||||
This skill handles the final step of pushing a feature branch and creating a validated Pull Request on GitHub. Its primary purpose is to avoid the shell-escaping pitfalls (backticks, special characters in `gh pr create --body`) by always writing the PR body to a **temp file** first.
|
||||
|
||||
## Prerequisites
|
||||
|
||||
- All changes are committed (use `release-prep` skill first)
|
||||
- The `gh` CLI is authenticated (`gh auth status`)
|
||||
- Current branch is NOT `main` or `master`
|
||||
|
||||
---
|
||||
|
||||
## Workflow
|
||||
|
||||
### Step 0 — Initialize Temp Directory (Project-Based)
|
||||
|
||||
For all temporary files, use the project's `.temp/` directory instead of system `/tmp`:
|
||||
|
||||
```bash
|
||||
# Create temp directory if it doesn't exist
|
||||
mkdir -p .temp
|
||||
```
|
||||
|
||||
**Why**: All temporary files stay within the project workspace, avoiding system `/tmp` pollution and better aligning with OpenWebUI workspace isolation principles.
|
||||
|
||||
### Step 1 — Pre-Flight Checks
|
||||
|
||||
Run these checks before any push:
|
||||
|
||||
```bash
|
||||
# 1. Confirm not on protected branch
|
||||
git branch --show-current
|
||||
|
||||
# 2. Verify there are commits to push
|
||||
git log origin/$(git branch --show-current)..HEAD --oneline 2>/dev/null || echo "No remote tracking branch yet"
|
||||
|
||||
# 3. Check gh CLI auth
|
||||
gh auth status
|
||||
```
|
||||
|
||||
If any check fails, stop and report clearly.
|
||||
|
||||
### Step 2 — Collect PR Metadata
|
||||
|
||||
Gather:
|
||||
- **PR Title**: Must follow Conventional Commits format, English only (e.g., `feat(github-copilot-sdk): release v0.8.0 with conditional tool filtering`)
|
||||
- **Target base branch**: Default is `main`
|
||||
- **Plugin name + version** (to build body sections)
|
||||
- **Key changes** (reuse from release-prep or the latest What's New section)
|
||||
|
||||
### Step 3 — Build PR Body File (Shell-Escape-Safe)
|
||||
|
||||
**Always write the body to a temp file in `.temp/` directory.** Never embed multi-line markdown with special characters directly in a shell command.
|
||||
|
||||
```bash
|
||||
cat > .temp/pr_body.md << 'HEREDOC'
|
||||
## Summary
|
||||
|
||||
Brief one-sentence description of what this PR accomplishes.
|
||||
|
||||
## Changes
|
||||
|
||||
### New Features
|
||||
- Feature 1 description
|
||||
- Feature 2 description
|
||||
|
||||
### Bug Fixes
|
||||
- Fix 1 description
|
||||
|
||||
## Plugin Version
|
||||
- `PluginName` bumped to `vX.X.X`
|
||||
|
||||
## Documentation
|
||||
- README.md / README_CN.md updated
|
||||
- docs/ mirrors synced
|
||||
|
||||
## Testing
|
||||
- [ ] Tested locally in OpenWebUI
|
||||
- [ ] i18n validated (all language keys present)
|
||||
- [ ] Version consistency check passed (`python3 scripts/check_version_consistency.py`)
|
||||
|
||||
---
|
||||
|
||||
## 变更摘要(中文)
|
||||
|
||||
简要描述本次 PR 的改动内容。
|
||||
|
||||
### 新功能
|
||||
- 功能1描述
|
||||
- 功能2描述
|
||||
|
||||
### 问题修复
|
||||
- 修复1描述
|
||||
HEREDOC
|
||||
```
|
||||
|
||||
**Critical rules for the body file:**
|
||||
- Use `<< 'HEREDOC'` (quoted heredoc) to prevent variable expansion
|
||||
- Keep all backticks literal — they are safe inside a heredoc
|
||||
- Paths like `/api/v1/files/` are safe too since heredoc doesn't interpret them as commands
|
||||
|
||||
### Step 4 — Validate PR Body
|
||||
|
||||
Before submitting, verify the body file contains expected sections:
|
||||
|
||||
```bash
|
||||
# Check key sections exist
|
||||
grep -q "## Summary" .temp/pr_body.md && echo "✅ Summary" || echo "❌ Summary missing"
|
||||
grep -q "## Changes" .temp/pr_body.md && echo "✅ Changes" || echo "❌ Changes missing"
|
||||
grep -q "## 变更摘要" .temp/pr_body.md && echo "✅ CN Section" || echo "❌ CN Section missing"
|
||||
|
||||
# Preview the body
|
||||
cat .temp/pr_body.md
|
||||
```
|
||||
|
||||
Ask the user to confirm the body content before proceeding.
|
||||
|
||||
### Step 5 — Push Branch
|
||||
|
||||
```bash
|
||||
git push -u origin $(git branch --show-current)
|
||||
```
|
||||
|
||||
If push is rejected (non-fast-forward), report to user and ask whether to force-push. **Do NOT force-push without explicit confirmation.**
|
||||
|
||||
### Step 6 — Create Pull Request
|
||||
|
||||
```bash
|
||||
gh pr create \
|
||||
--base main \
|
||||
--head $(git branch --show-current) \
|
||||
--title "<PR title from Step 2>" \
|
||||
--body-file .temp/pr_body.md
|
||||
```
|
||||
|
||||
Always use `--body-file`, never `--body` with inline markdown.
|
||||
|
||||
### Step 7 — Verify PR Creation
|
||||
|
||||
```bash
|
||||
PAGER=cat GH_PAGER=cat gh pr view --json number,url,title,body --jq '{number: .number, url: .url, title: .title, body_preview: .body[:200]}'
|
||||
```
|
||||
|
||||
Confirm:
|
||||
- PR number and URL
|
||||
- Title matches intended Conventional Commits format
|
||||
- Body preview includes key sections (not truncated/corrupted)
|
||||
|
||||
If the body appears corrupted (empty sections, missing backtick content), use edit:
|
||||
|
||||
```bash
|
||||
gh pr edit <PR-NUMBER> --body-file /tmp/pr_body.md
|
||||
```
|
||||
|
||||
### Step 8 — Cleanup
|
||||
|
||||
```bash
|
||||
rm -f .temp/pr_body.md
|
||||
```
|
||||
|
||||
**Note**: The `.temp/` directory itself is preserved for reuse; only the individual PR body file is deleted. To fully clean up: `rm -rf .temp/`
|
||||
|
||||
Report final PR URL to the user.
|
||||
|
||||
---
|
||||
|
||||
## Shell-Escape Safety Rules
|
||||
|
||||
| Risk | Safe Approach |
|
||||
|------|--------------|
|
||||
| Backticks in `--body` | Write to file, use `--body-file` |
|
||||
| Paths like `/api/...` | Safe in heredoc; risky in inline `--body` |
|
||||
| Newlines in `--body` | File-based only |
|
||||
| `$variable` expansion | Use `<< 'HEREDOC'` (quoted) |
|
||||
| Double quotes in body | Safe in heredoc file |
|
||||
| Temp file storage | Use `.temp/` dir, not `/tmp` |
|
||||
| Cleanup after use | Always delete temp file (keep dir) |
|
||||
|
||||
---
|
||||
|
||||
## Anti-Patterns to Avoid
|
||||
|
||||
- ❌ Never use `--body "..."` with multi-line content directly in shell command
|
||||
- ❌ Never interpolate variables directly into heredoc without quoting the delimiter
|
||||
- ❌ Never force-push (`--force`) without explicit user confirmation
|
||||
- ❌ Never target `main` as the source branch (only as base)
|
||||
- ❌ Never skip the body validation step — a PR with empty body is worse than a delayed PR
|
||||
208
.github/skills/release-finalizer/SKILL.md
vendored
Normal file
208
.github/skills/release-finalizer/SKILL.md
vendored
Normal file
@@ -0,0 +1,208 @@
|
||||
---
|
||||
name: release-finalizer
|
||||
description: Merges a release PR, associates it with resolved issues, replies to issue reporters, and closes issues. Use after PR review is complete and ready for merge. Closes the release cycle.
|
||||
---
|
||||
|
||||
# Release Finalizer
|
||||
|
||||
## Overview
|
||||
|
||||
This skill completes the final step of the release cycle: merging the release PR to `main`, replying to all related issues with solutions, and automatically closing them using GitHub's issue linking mechanism.
|
||||
|
||||
## Prerequisites
|
||||
|
||||
- The PR is in `OPEN` state and ready to merge
|
||||
- All status checks have passed (CI green)
|
||||
- All review feedback has been addressed
|
||||
- The PR relates to one or more GitHub issues (either in PR description or through commits)
|
||||
|
||||
---
|
||||
|
||||
## Workflow
|
||||
|
||||
### Step 1 — Pre-Merge Verification
|
||||
|
||||
Verify that the PR is ready:
|
||||
|
||||
```bash
|
||||
PAGER=cat GH_PAGER=cat gh pr view <PR-NUMBER> --json state,statusCheckRollup,reviewDecision
|
||||
```
|
||||
|
||||
Checklist:
|
||||
- ✅ `state` is `OPEN`
|
||||
- ✅ `statusCheckRollup` all have `conclusion: SUCCESS`
|
||||
- ✅ `reviewDecision` is `APPROVED` or empty (no blocking reviews)
|
||||
|
||||
If any check fails, **do NOT merge**. Report the issue to the user.
|
||||
|
||||
### Step 2 — Identify Related Issues
|
||||
|
||||
Issues can be linked to a PR in multiple ways. Check the PR description and commit messages for keywords:
|
||||
|
||||
```bash
|
||||
PAGER=cat GH_PAGER=cat gh pr view <PR-NUMBER> --json body,commits
|
||||
```
|
||||
|
||||
Look for patterns like:
|
||||
- `Closes #XX`, `Fixes #XX`, `Resolves #XX` (in description or commit bodies)
|
||||
- `#XX` mentioned as "related to" or "addresses"
|
||||
|
||||
**Manual input**: If issue links are not in the PR, ask the user which issue(s) this PR resolves.
|
||||
|
||||
Extract all issue numbers into a list: `[#48, #52, ...]`
|
||||
|
||||
### Step 3 — Select Merge Strategy
|
||||
|
||||
Offer the user three options:
|
||||
|
||||
| Strategy | Git Behavior | Use Case |
|
||||
|----------|-------------|----------|
|
||||
| **Squash** | All commits squashed into one commit on main | Clean history, recommended for release PRs |
|
||||
| **Rebase** | Linear history, no merge commit | Preserve commit granularity |
|
||||
| **Merge** | Merge commit created | Preserve full PR context |
|
||||
|
||||
**Recommendation for release PRs**: Use `--squash` to create a single clean commit.
|
||||
|
||||
If user doesn't specify, default to `--squash`.
|
||||
|
||||
### Step 4 — Prepare Merge Commit Message
|
||||
|
||||
If using `--squash`, craft a single comprehensive commit message:
|
||||
|
||||
**Format** (Conventional Commits + Github linking):
|
||||
```
|
||||
type(scope): description
|
||||
|
||||
- Bullet point 1
|
||||
- Bullet point 2
|
||||
|
||||
Closes #48
|
||||
Closes #52
|
||||
```
|
||||
|
||||
The `Closes #XX` keyword tells GitHub to automatically close those issues when the commit lands on `main`.
|
||||
|
||||
Example:
|
||||
```
|
||||
feat(pipes,filters): release Copilot SDK Pipe v0.8.0 and Files Filter v0.1.3
|
||||
|
||||
- Implement P1~P4 conditional tool filtering system
|
||||
- Fix file publishing reliability across all storage backends
|
||||
- Add strict file URL validation
|
||||
- Update bilingual documentation
|
||||
|
||||
Closes #48
|
||||
```
|
||||
|
||||
### Step 5 — Execute Merge
|
||||
|
||||
```bash
|
||||
gh pr merge <PR-NUMBER> \
|
||||
--squash \
|
||||
--delete-branch \
|
||||
-m "type(scope): description" \
|
||||
-b "- Bullet 1\n- Bullet 2\n\nCloses #48"
|
||||
```
|
||||
|
||||
**Key flags:**
|
||||
- `--squash`: Squash commits (recommended for releases)
|
||||
- `--delete-branch`: Delete the feature branch after merge
|
||||
- `-m`: Commit subject
|
||||
- `-b`: Commit body (supports `\n` for newlines)
|
||||
|
||||
Confirm the merge is successful; GitHub will automatically close related issues with `Closes #XX` keyword.
|
||||
|
||||
### Step 6 — Verify Auto-Close
|
||||
|
||||
GitHub automatically closes issues when a commit with `Closes #XX` lands on the default branch (`main`).
|
||||
|
||||
To verify:
|
||||
```bash
|
||||
PAGER=cat GH_PAGER=cat gh issue view <ISSUE-NUMBER> --json state
|
||||
```
|
||||
|
||||
Should show `state: CLOSED`.
|
||||
|
||||
### Step 7 — Post Closing Message (Optional but Recommended)
|
||||
|
||||
For better UX, manually post a summary comment to **each issue** before it auto-closes (since auto-close happens silently):
|
||||
|
||||
```bash
|
||||
gh issue comment <ISSUE-NUMBER> --body "
|
||||
This has been fixed in PR #<PR-NUMBER>, which is now merged to main.
|
||||
|
||||
**Solution Summary:**
|
||||
- <Key fix 1>
|
||||
- <Key fix 2>
|
||||
|
||||
The fix will be available in the next plugin release. Thank you for reporting! ⭐
|
||||
"
|
||||
```
|
||||
|
||||
### Step 8 — (Optional) Regenerate Release Notes
|
||||
|
||||
If the merge revealed any final tweaks to release notes:
|
||||
|
||||
```bash
|
||||
# Re-export release notes from merged commit
|
||||
git log --oneline -1 <merged-commit-sha>
|
||||
```
|
||||
|
||||
If needed, create a follow-up PR with doc polish (do NOT force-push the merged commit).
|
||||
|
||||
---
|
||||
|
||||
## Merge Strategy Decision Tree
|
||||
|
||||
```
|
||||
Is this a patch/hotfix release?
|
||||
├─ YES → Use --squash
|
||||
└─ NO → Multi-feature release?
|
||||
├─ YES → Use --squash (cleaner history)
|
||||
└─ NO → Preserve detail?
|
||||
├─ YES → Use --rebase
|
||||
└─ NO → Use --merge (preserve PR context)
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Issue Auto-Close Keywords
|
||||
|
||||
These keywords in commit/PR messages will auto-close issues when merged to `main`:
|
||||
|
||||
- `Closes #XX`
|
||||
- `Fixes #XX`
|
||||
- `Resolves #XX`
|
||||
- `close #XX` (case-insensitive)
|
||||
- `fix #XX`
|
||||
- `resolve #XX`
|
||||
|
||||
**Important**: The keyword must be on the **final commit that lands on** `main`. For squash merges, it must be in the squash commit message body.
|
||||
|
||||
---
|
||||
|
||||
## Anti-Patterns to Avoid
|
||||
|
||||
- ❌ Do NOT merge if any status checks are PENDING or FAILED
|
||||
- ❌ Do NOT merge if there are blocking reviews (reviewDecision: `CHANGES_REQUESTED`)
|
||||
- ❌ Do NOT merge without verifying the Conventional Commits format in the merge message
|
||||
- ❌ Do NOT merge without including `Closes #XX` keywords for all related issues
|
||||
- ❌ Do NOT assume issues will auto-close silently — post a courtesy comment first
|
||||
- ❌ Do NOT delete the branch if it might be needed for cherry-pick or hotfixes later
|
||||
|
||||
---
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
### Issue did not auto-close after merge
|
||||
- Verify the `Closes #XX` keyword is in the **final commit message** (use `git log` to check)
|
||||
- Ensure the commit is on the `main` branch
|
||||
- GitHub sometimes takes a few seconds to process; refresh the issue page
|
||||
|
||||
### Multiple issues to close
|
||||
- List all in separate `Closes #XX` lines in the commit body
|
||||
- Each one will be independently auto-closed
|
||||
|
||||
### Want to close issue without merge?
|
||||
- Use `gh issue close <ISSUE-NUMBER>` manually
|
||||
- Only recommended if the PR was manually reverted or deemed invalid
|
||||
144
.github/skills/release-prep/SKILL.md
vendored
Normal file
144
.github/skills/release-prep/SKILL.md
vendored
Normal file
@@ -0,0 +1,144 @@
|
||||
---
|
||||
name: release-prep
|
||||
description: Orchestrates the full release preparation flow for a plugin — version sync across 7+ files, bilingual release notes creation, and commit message drafting. Use before submitting a PR. Does NOT push or create a PR; that is handled by pr-submitter.
|
||||
---
|
||||
|
||||
# Release Prep
|
||||
|
||||
## Overview
|
||||
|
||||
This skill drives the complete pre-PR release pipeline. It enforces the repository rule that every release must synchronize the version number and changelog across **at least 7 locations** before a commit is created.
|
||||
|
||||
## Scope
|
||||
|
||||
This skill covers:
|
||||
1. Version sync (delegates detail to `version-bumper` if needed)
|
||||
2. Bilingual release notes file creation
|
||||
3. 7-location consistency verification
|
||||
4. Conventional Commits message drafting
|
||||
5. `git add -A && git commit` execution
|
||||
|
||||
It **stops before** `git push` or `gh pr create`. Use the `pr-submitter` skill for those steps.
|
||||
|
||||
### Temporary File Convention
|
||||
|
||||
Any temporary files created during release prep (e.g., draft changelogs) must:
|
||||
- Be written to the project's `.temp/` directory, **NOT** system `/tmp`
|
||||
- Be cleaned up before commit using `rm -f .temp/file_name`
|
||||
- Never be committed to git (add `.temp/` to `.gitignore`)
|
||||
|
||||
---
|
||||
|
||||
## Workflow
|
||||
|
||||
### Step 1 — Collect Release Info
|
||||
|
||||
Ask the user (or infer from current state) the following:
|
||||
- **Plugin name** and **type** (actions / filters / pipes / tools)
|
||||
- **New version number** (e.g., `0.8.0`)
|
||||
- **Key changes** in English and Chinese (1-5 bullet points each)
|
||||
|
||||
If a `What's New` section already exists in README.md, extract it as the source of truth.
|
||||
|
||||
### Step 2 — Sync Version Across 7 Locations
|
||||
|
||||
Verify AND update the version string in all of the following. Mark each as ✅ or ❌:
|
||||
|
||||
| # | File | Location |
|
||||
|---|------|----------|
|
||||
| 1 | `plugins/{type}/{name}/{name}.py` | `version:` in docstring |
|
||||
| 2 | `plugins/{type}/{name}/README.md` | `**Version:** x.x.x` metadata line |
|
||||
| 3 | `plugins/{type}/{name}/README_CN.md` | `**Version:** x.x.x` metadata line |
|
||||
| 4 | `docs/plugins/{type}/{name}.md` | `**Version:** x.x.x` metadata line |
|
||||
| 5 | `docs/plugins/{type}/{name}.zh.md` | `**Version:** x.x.x` metadata line |
|
||||
| 6 | `docs/plugins/{type}/index.md` | version badge for this plugin |
|
||||
| 7 | `docs/plugins/{type}/index.zh.md` | version badge for this plugin |
|
||||
|
||||
Additionally update the root-level **updated date badge** in:
|
||||
- `README.md` — ``
|
||||
- `README_CN.md` — same badge format
|
||||
|
||||
Use today's date (`YYYY-MM-DD`) for the badge.
|
||||
|
||||
### Step 3 — Update What's New (All 4 Doc Files)
|
||||
|
||||
The `What's New` / `最新更新` section must contain **only the most recent release's changes**. Previous entries should be removed from this section (they live in CHANGELOG or release notes files).
|
||||
|
||||
Update these 4 files' `What's New` / `最新更新` block consistently:
|
||||
- `plugins/{type}/{name}/README.md`
|
||||
- `plugins/{type}/{name}/README_CN.md`
|
||||
- `docs/plugins/{type}/{name}.md`
|
||||
- `docs/plugins/{type}/{name}.zh.md`
|
||||
|
||||
### Step 4 — Create Bilingual Release Notes Files
|
||||
|
||||
Create two versioned release notes files:
|
||||
|
||||
**Path**: `plugins/{type}/{name}/v{version}.md`
|
||||
**Path**: `plugins/{type}/{name}/v{version}_CN.md`
|
||||
|
||||
#### Required Sections
|
||||
|
||||
Each file must include:
|
||||
1. **Title**: `# v{version} Release Notes` (EN) / `# v{version} 版本发布说明` (CN)
|
||||
2. **Overview**: One paragraph summarizing this release
|
||||
3. **New Features** / **新功能**: Bulleted list of features
|
||||
4. **Bug Fixes** / **问题修复**: Bulleted list of fixes
|
||||
5. **Migration Notes** / **迁移说明**: Breaking changes or Valve key renames (omit section if none)
|
||||
6. **Companion Plugins** / **配套插件** (optional): If a companion plugin was updated
|
||||
|
||||
If a release notes file already exists for this version, update it rather than creating a new one.
|
||||
|
||||
### Step 5 — Verify Consistency (Pre-Commit Check)
|
||||
|
||||
Run the consistency check script:
|
||||
|
||||
```bash
|
||||
python3 scripts/check_version_consistency.py
|
||||
```
|
||||
|
||||
If issues are found, fix them before proceeding. Do not commit with inconsistencies.
|
||||
|
||||
### Step 6 — Draft Conventional Commits Message
|
||||
|
||||
Generate the commit message following `commit-message.instructions.md` rules:
|
||||
- **Language**: English ONLY
|
||||
- **Format**: `type(scope): subject` + blank line + body bullets
|
||||
- **Scope**: use plugin folder name (e.g., `github-copilot-sdk`)
|
||||
- **Body**: 1-3 bullets summarizing key changes
|
||||
- Explicitly mention "READMEs and docs synced" if version was bumped
|
||||
|
||||
Present the full commit message to the user for review before executing.
|
||||
|
||||
### Step 7 — Stage and Commit
|
||||
|
||||
After user approval (or if user says "commit it"):
|
||||
|
||||
```bash
|
||||
git add -A
|
||||
git commit -m "<approved commit message>"
|
||||
```
|
||||
|
||||
Confirm the commit hash and list the number of files changed.
|
||||
|
||||
---
|
||||
|
||||
## Checklist (Auto-Verify Before Commit)
|
||||
|
||||
- [ ] `version:` in `.py` docstring matches target version
|
||||
- [ ] `**Version:**` in all 4 README/docs files matches
|
||||
- [ ] Both `index.md` version badges updated
|
||||
- [ ] Root `README.md` and `README_CN.md` date badges updated to today
|
||||
- [ ] `What's New` / `最新更新` contains ONLY the latest release
|
||||
- [ ] `v{version}.md` and `v{version}_CN.md` created or updated
|
||||
- [ ] `python3 scripts/check_version_consistency.py` returns no errors
|
||||
- [ ] Commit message is English-only Conventional Commits format
|
||||
|
||||
---
|
||||
|
||||
## Anti-Patterns to Avoid
|
||||
|
||||
- ❌ Do NOT add extra features or refactor code during release prep — only version/doc updates
|
||||
- ❌ Do NOT push or create PR in this skill — use `pr-submitter`
|
||||
- ❌ Do NOT use today's date in commit messages; only in badge URLs
|
||||
- ❌ Do NOT leave stale What's New content from prior versions
|
||||
2
.gitignore
vendored
2
.gitignore
vendored
@@ -136,6 +136,8 @@ logs/
|
||||
# Temporary files
|
||||
*.tmp
|
||||
*.temp
|
||||
.temp/
|
||||
.build/
|
||||
|
||||
# OpenWebUI specific
|
||||
# Add any specific ignores for OpenWebUI plugins if needed
|
||||
|
||||
29
README.md
29
README.md
@@ -24,19 +24,13 @@ A collection of enhancements, plugins, and prompts for [OpenWebUI](https://githu
|
||||
|
||||
| Rank | Plugin | Version | Downloads | Views | 📅 Updated |
|
||||
| :---: | :--- | :---: | :---: | :---: | :---: |
|
||||
| 🥇 | [Smart Mind Map](https://openwebui.com/posts/turn_any_text_into_beautiful_mind_maps_3094c59a) |  |  |  |  |
|
||||
| 🥇 | [Smart Mind Map](https://openwebui.com/posts/turn_any_text_into_beautiful_mind_maps_3094c59a) |  |  |  |  |
|
||||
| 🥈 | [Smart Infographic](https://openwebui.com/posts/smart_infographic_ad6f0c7f) |  |  |  |  |
|
||||
| 🥉 | [Markdown Normalizer](https://openwebui.com/posts/markdown_normalizer_baaa8732) |  |  |  |  |
|
||||
| 🥉 | [Markdown Normalizer](https://openwebui.com/posts/markdown_normalizer_baaa8732) |  |  |  |  |
|
||||
| 4️⃣ | [Export to Word Enhanced](https://openwebui.com/posts/export_to_word_enhanced_formatting_fca6a315) |  |  |  |  |
|
||||
| 5️⃣ | [Async Context Compression](https://openwebui.com/posts/async_context_compression_b1655bc8) |  |  |  |  |
|
||||
| 6️⃣ | [Export to Excel](https://openwebui.com/posts/export_mulit_table_to_excel_244b8f9d) |  |  |  |  |
|
||||
|
||||
### 🛠️ Actively Developed Projects
|
||||
|
||||
| Status | Plugin | Version | Downloads | Views | 📅 Updated |
|
||||
| :---: | :--- | :---: | :---: | :---: | :---: |
|
||||
| 🆕 | [GitHub Copilot SDK Pipe](https://openwebui.com/posts/github_copilot_official_sdk_pipe_ce96f7b4) |  |  |  |  |
|
||||
|
||||
### 📈 Total Downloads Trend
|
||||
|
||||

|
||||
@@ -48,10 +42,23 @@ A collection of enhancements, plugins, and prompts for [OpenWebUI](https://githu
|
||||
|
||||
### 1. [GitHub Copilot SDK Pipe](https://openwebui.com/posts/github_copilot_official_sdk_pipe_ce96f7b4) [](https://openwebui.com/posts/github_copilot_official_sdk_pipe_ce96f7b4)
|
||||
|
||||
**The ultimate Agent for OpenWebUI.** Supports native code execution (Python/Pandas), raw file analysis, and interactive artifacts.
|
||||
**The ultimate autonomous Agent for OpenWebUI.** Transforming your LLM into a powerful OS-level engineer with native code execution, deep tool autonomy, and professional skill management.
|
||||
|
||||
> [!TIP]
|
||||
> **No GitHub Copilot subscription required!** Supports **BYOK (Bring Your Own Key)** mode using your own OpenAI/Anthropic API keys.
|
||||
|
||||
#### 🚀 Key Leap (v0.9.0+)
|
||||
|
||||
- **🧩 Skills Revolution**: Native support for **SKILL directories** (scripts, templates, resources) coupled with a **Bidirectional Bridge** to OpenWebUI Workspace Skills.
|
||||
- **🛡️ Secure Isolation**: Strict user/session-level **Workspace Sandboxing** with persistent configuration.
|
||||
- **📊 Interactive Delivery**: Professional **File Delivery Protocol** for instant HTML artifacts and persistent downloadable results.
|
||||
- **🛠️ Deterministic Toolchain**: Built-in specialized tools for skill lifecycles (`manage_skills`) and system optimization.
|
||||
|
||||
#### 📺 Demo: Visual Skills & Data Analysis
|
||||
|
||||

|
||||
> *In this demo, the Agent installs a visual enhancement skill and automatically generates an interactive dashboard from World Cup data.*
|
||||
|
||||
#### 🌟 Featured Real-World Cases
|
||||
|
||||
- **[GitHub Star Forecasting](./docs/plugins/pipes/star-prediction-example.md)**: Automatically parsing CSV data, writing analysis scripts, and generating interactive growth dashboards.
|
||||
@@ -125,7 +132,9 @@ System Prompts are managed in the `docs/prompts/` directory:
|
||||
|
||||
Standalone frontend extensions to supercharge your Open WebUI:
|
||||
|
||||
- **[Open WebUI Prompt Plus](https://github.com/Fu-Jie/open-webui-prompt-plus)**: An all-in-one prompt management suite featuring AI-powered prompt generation, spotlight-style quick search, and advanced category organization.
|
||||
- **[Open WebUI Prompt Plus](https://github.com/Fu-Jie/open-webui-prompt-plus)**
|
||||
|
||||
[](https://openwebui.com/blog/newsletter-january-28-2026): An all-in-one prompt management suite featuring AI-powered prompt generation, spotlight-style quick search, and advanced category organization.
|
||||
|
||||
## 📖 Documentation
|
||||
|
||||
|
||||
27
README_CN.md
27
README_CN.md
@@ -21,19 +21,13 @@ OpenWebUI 增强功能集合。包含个人开发与收集的插件、提示词
|
||||
|
||||
| 排名 | 插件 | 版本 | 下载 | 浏览 | 📅 更新 |
|
||||
| :---: | :--- | :---: | :---: | :---: | :---: |
|
||||
| 🥇 | [Smart Mind Map](https://openwebui.com/posts/turn_any_text_into_beautiful_mind_maps_3094c59a) |  |  |  |  |
|
||||
| 🥇 | [Smart Mind Map](https://openwebui.com/posts/turn_any_text_into_beautiful_mind_maps_3094c59a) |  |  |  |  |
|
||||
| 🥈 | [Smart Infographic](https://openwebui.com/posts/smart_infographic_ad6f0c7f) |  |  |  |  |
|
||||
| 🥉 | [Markdown Normalizer](https://openwebui.com/posts/markdown_normalizer_baaa8732) |  |  |  |  |
|
||||
| 🥉 | [Markdown Normalizer](https://openwebui.com/posts/markdown_normalizer_baaa8732) |  |  |  |  |
|
||||
| 4️⃣ | [Export to Word Enhanced](https://openwebui.com/posts/export_to_word_enhanced_formatting_fca6a315) |  |  |  |  |
|
||||
| 5️⃣ | [Async Context Compression](https://openwebui.com/posts/async_context_compression_b1655bc8) |  |  |  |  |
|
||||
| 6️⃣ | [Export to Excel](https://openwebui.com/posts/export_mulit_table_to_excel_244b8f9d) |  |  |  |  |
|
||||
|
||||
### 🛠️ 积极开发的项目
|
||||
|
||||
| 状态 | 插件 | 版本 | 下载 | 浏览 | 📅 更新 |
|
||||
| :---: | :--- | :---: | :---: | :---: | :---: |
|
||||
| 🆕 | [GitHub Copilot SDK Pipe](https://openwebui.com/posts/github_copilot_official_sdk_pipe_ce96f7b4) |  |  |  |  |
|
||||
|
||||
### 📈 总下载量累计趋势
|
||||
|
||||

|
||||
@@ -45,10 +39,23 @@ OpenWebUI 增强功能集合。包含个人开发与收集的插件、提示词
|
||||
|
||||
### 1. [GitHub Copilot SDK Pipe](https://openwebui.com/posts/github_copilot_official_sdk_pipe_ce96f7b4) [](https://openwebui.com/posts/github_copilot_official_sdk_pipe_ce96f7b4)
|
||||
|
||||
**OpenWebUI 终极 Agent 增强。** 支持原生代码执行(Python/Pandas)、原始文件直接分析以及交互式 Artifacts。
|
||||
**OpenWebUI 终极自主 Agent 增强。** 将 LLM 转化为具备 OS 级操作能力的专业工程师,支持原生代码执行、深度工具自治以及专业技能管理。
|
||||
|
||||
> [!TIP]
|
||||
> **无需 GitHub Copilot 订阅!** 支持 **BYOK (Bring Your Own Key)** 模式,使用你自己的 OpenAI/Anthropic API Key。
|
||||
|
||||
#### 🚀 核心进化 (v0.9.0+)
|
||||
|
||||
- **🧩 技能革命**: 原生支持 **SKILL 目录**(含脚本、模板与资源),并实现与 OpenWebUI **工作区 > Skills** 的深度双向桥接。
|
||||
- **🛡️ 安全沙箱**: 严格的用户/会话级 **工作区隔离** 与持久化配置环境。
|
||||
- **📊 交互交付**: 专业 **文件交付协议**,支持即时预览交互式 HTML Artifacts 与持久化结果下载。
|
||||
- **🛠️ 确定性工具链**: 内置 `manage_skills` 等专业工具,赋予 Agent 完整的技能生命周期管理能力。
|
||||
|
||||
#### 📺 演示:可视化技能与数据分析
|
||||
|
||||

|
||||
> *在此演示中,Agent 自动安装可视化增强技能,并根据世界杯表格数据瞬间生成交互式看板。*
|
||||
|
||||
#### 🌟 核心实战案例
|
||||
|
||||
- **[GitHub Star 增长预测](./docs/plugins/pipes/star-prediction-example.zh.md)**:自动解析 CSV 数据,编写 Python 分析脚本并生成动态增长看板。
|
||||
@@ -122,7 +129,7 @@ OpenWebUI 增强功能集合。包含个人开发与收集的插件、提示词
|
||||
|
||||
Open WebUI 的前端增强扩展:
|
||||
|
||||
- **[Open WebUI Prompt Plus](https://github.com/Fu-Jie/open-webui-prompt-plus)**: 一站式提示词管理套件,支持 AI 提示词生成、Spotlight 风格快速搜索及高级分类管理。
|
||||
- **[Open WebUI Prompt Plus](https://github.com/Fu-Jie/open-webui-prompt-plus)** [](https://openwebui.com/blog/newsletter-january-28-2026):一站式提示词管理套件,支持 AI 提示词生成、Spotlight 风格快速搜索及高级分类管理。
|
||||
|
||||
## 📖 开发文档
|
||||
|
||||
|
||||
BIN
docs/assets/videos/skill.gif
Normal file
BIN
docs/assets/videos/skill.gif
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 15 MiB |
BIN
docs/assets/videos/skill_visual_agents.mov
Normal file
BIN
docs/assets/videos/skill_visual_agents.mov
Normal file
Binary file not shown.
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"schemaVersion": 1,
|
||||
"label": "downloads",
|
||||
"message": "5.6k",
|
||||
"message": "6.4k",
|
||||
"color": "blue",
|
||||
"namedLogo": "openwebui"
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"schemaVersion": 1,
|
||||
"label": "followers",
|
||||
"message": "270",
|
||||
"message": "295",
|
||||
"color": "blue"
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"schemaVersion": 1,
|
||||
"label": "plugins",
|
||||
"message": "23",
|
||||
"message": "25",
|
||||
"color": "green"
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"schemaVersion": 1,
|
||||
"label": "points",
|
||||
"message": "285",
|
||||
"message": "299",
|
||||
"color": "orange"
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"schemaVersion": 1,
|
||||
"label": "upvotes",
|
||||
"message": "241",
|
||||
"message": "254",
|
||||
"color": "brightgreen"
|
||||
}
|
||||
@@ -1,15 +1,15 @@
|
||||
{
|
||||
"total_posts": 23,
|
||||
"total_downloads": 5629,
|
||||
"total_views": 61059,
|
||||
"total_upvotes": 241,
|
||||
"total_posts": 25,
|
||||
"total_downloads": 6379,
|
||||
"total_views": 67827,
|
||||
"total_upvotes": 254,
|
||||
"total_downvotes": 3,
|
||||
"total_saves": 321,
|
||||
"total_comments": 55,
|
||||
"total_saves": 337,
|
||||
"total_comments": 58,
|
||||
"by_type": {
|
||||
"action": 12,
|
||||
"post": 4,
|
||||
"post": 6,
|
||||
"pipe": 1,
|
||||
"action": 12,
|
||||
"filter": 4,
|
||||
"prompt": 1,
|
||||
"review": 1
|
||||
@@ -22,13 +22,13 @@
|
||||
"version": "1.0.0",
|
||||
"author": "Fu-Jie",
|
||||
"description": "Intelligently analyzes text content and generates interactive mind maps to help users structure and visualize knowledge.",
|
||||
"downloads": 1207,
|
||||
"views": 10434,
|
||||
"upvotes": 22,
|
||||
"downloads": 1328,
|
||||
"views": 11410,
|
||||
"upvotes": 23,
|
||||
"saves": 59,
|
||||
"comments": 13,
|
||||
"comments": 15,
|
||||
"created_at": "2025-12-30",
|
||||
"updated_at": "2026-02-22",
|
||||
"updated_at": "2026-02-27",
|
||||
"url": "https://openwebui.com/posts/turn_any_text_into_beautiful_mind_maps_3094c59a"
|
||||
},
|
||||
{
|
||||
@@ -38,10 +38,10 @@
|
||||
"version": "1.5.0",
|
||||
"author": "Fu-Jie",
|
||||
"description": "AI-powered infographic generator based on AntV Infographic. Supports professional templates, auto-icon matching, and SVG/PNG downloads.",
|
||||
"downloads": 966,
|
||||
"views": 9501,
|
||||
"upvotes": 24,
|
||||
"saves": 39,
|
||||
"downloads": 1076,
|
||||
"views": 10746,
|
||||
"upvotes": 25,
|
||||
"saves": 40,
|
||||
"comments": 10,
|
||||
"created_at": "2025-12-28",
|
||||
"updated_at": "2026-02-13",
|
||||
@@ -51,16 +51,16 @@
|
||||
"title": "Markdown Normalizer",
|
||||
"slug": "markdown_normalizer_baaa8732",
|
||||
"type": "filter",
|
||||
"version": "1.2.4",
|
||||
"version": "1.2.7",
|
||||
"author": "Fu-Jie",
|
||||
"description": "A content normalizer filter that fixes common Markdown formatting issues in LLM outputs, such as broken code blocks, LaTeX formulas, and list formatting.",
|
||||
"downloads": 513,
|
||||
"views": 6087,
|
||||
"upvotes": 17,
|
||||
"saves": 36,
|
||||
"description": "A content normalizer filter that fixes common Markdown formatting issues in LLM outputs, such as broken code blocks, LaTeX formulas, and list formatting. Including LaTeX command protection.",
|
||||
"downloads": 609,
|
||||
"views": 6795,
|
||||
"upvotes": 18,
|
||||
"saves": 37,
|
||||
"comments": 5,
|
||||
"created_at": "2026-01-12",
|
||||
"updated_at": "2026-02-13",
|
||||
"updated_at": "2026-02-27",
|
||||
"url": "https://openwebui.com/posts/markdown_normalizer_baaa8732"
|
||||
},
|
||||
{
|
||||
@@ -70,10 +70,10 @@
|
||||
"version": "0.4.4",
|
||||
"author": "Fu-Jie",
|
||||
"description": "Export current conversation from Markdown to Word (.docx) with Mermaid diagrams rendered client-side (Mermaid.js, SVG+PNG), LaTeX math, real hyperlinks, improved tables, syntax highlighting, and blockquote support.",
|
||||
"downloads": 511,
|
||||
"views": 4090,
|
||||
"upvotes": 15,
|
||||
"saves": 29,
|
||||
"downloads": 578,
|
||||
"views": 4611,
|
||||
"upvotes": 16,
|
||||
"saves": 30,
|
||||
"comments": 5,
|
||||
"created_at": "2026-01-03",
|
||||
"updated_at": "2026-02-13",
|
||||
@@ -86,10 +86,10 @@
|
||||
"version": "1.3.0",
|
||||
"author": "Fu-Jie",
|
||||
"description": "Reduces token consumption in long conversations while maintaining coherence through intelligent summarization and message compression.",
|
||||
"downloads": 486,
|
||||
"views": 4865,
|
||||
"downloads": 559,
|
||||
"views": 5452,
|
||||
"upvotes": 15,
|
||||
"saves": 40,
|
||||
"saves": 41,
|
||||
"comments": 0,
|
||||
"created_at": "2025-11-08",
|
||||
"updated_at": "2026-02-21",
|
||||
@@ -102,10 +102,10 @@
|
||||
"version": "0.3.7",
|
||||
"author": "Fu-Jie",
|
||||
"description": "Extracts tables from chat messages and exports them to Excel (.xlsx) files with smart formatting.",
|
||||
"downloads": 445,
|
||||
"views": 2377,
|
||||
"upvotes": 9,
|
||||
"saves": 7,
|
||||
"downloads": 492,
|
||||
"views": 2693,
|
||||
"upvotes": 10,
|
||||
"saves": 8,
|
||||
"comments": 0,
|
||||
"created_at": "2025-05-30",
|
||||
"updated_at": "2026-02-13",
|
||||
@@ -118,10 +118,10 @@
|
||||
"version": "",
|
||||
"author": "",
|
||||
"description": "",
|
||||
"downloads": 381,
|
||||
"views": 4636,
|
||||
"downloads": 473,
|
||||
"views": 5498,
|
||||
"upvotes": 9,
|
||||
"saves": 11,
|
||||
"saves": 14,
|
||||
"comments": 0,
|
||||
"created_at": "2026-01-28",
|
||||
"updated_at": "2026-01-28",
|
||||
@@ -134,8 +134,8 @@
|
||||
"version": "0.2.4",
|
||||
"author": "Fu-Jie",
|
||||
"description": "Quickly generates beautiful flashcards from text, extracting key points and categories.",
|
||||
"downloads": 264,
|
||||
"views": 3924,
|
||||
"downloads": 285,
|
||||
"views": 4128,
|
||||
"upvotes": 13,
|
||||
"saves": 18,
|
||||
"comments": 2,
|
||||
@@ -147,16 +147,16 @@
|
||||
"title": "GitHub Copilot Official SDK Pipe",
|
||||
"slug": "github_copilot_official_sdk_pipe_ce96f7b4",
|
||||
"type": "pipe",
|
||||
"version": "0.7.0",
|
||||
"version": "0.9.0",
|
||||
"author": "Fu-Jie",
|
||||
"description": "Integrate GitHub Copilot SDK. Supports dynamic models, multi-turn conversation, streaming, multimodal input, infinite sessions, and frontend debug logging.",
|
||||
"downloads": 205,
|
||||
"views": 3522,
|
||||
"description": "Integrate GitHub Copilot SDK. Supports dynamic models, multi-turn conversation, streaming, multimodal input, infinite sessions, bidirectional OpenWebUI Skills bridge, and manage_skills tool.",
|
||||
"downloads": 263,
|
||||
"views": 4106,
|
||||
"upvotes": 14,
|
||||
"saves": 9,
|
||||
"saves": 10,
|
||||
"comments": 6,
|
||||
"created_at": "2026-01-26",
|
||||
"updated_at": "2026-02-22",
|
||||
"updated_at": "2026-02-27",
|
||||
"url": "https://openwebui.com/posts/github_copilot_official_sdk_pipe_ce96f7b4"
|
||||
},
|
||||
{
|
||||
@@ -166,8 +166,8 @@
|
||||
"version": "1.0.0",
|
||||
"author": "Fu-Jie",
|
||||
"description": "A comprehensive thinking lens that dives deep into any content - from context to logic, insights, and action paths.",
|
||||
"downloads": 185,
|
||||
"views": 1519,
|
||||
"downloads": 204,
|
||||
"views": 1631,
|
||||
"upvotes": 6,
|
||||
"saves": 13,
|
||||
"comments": 0,
|
||||
@@ -182,8 +182,8 @@
|
||||
"version": "0.4.4",
|
||||
"author": "Fu-Jie",
|
||||
"description": "将对话导出为 Word (.docx),支持 Mermaid 图表 (客户端渲染 SVG+PNG)、LaTeX 数学公式、真实超链接、增强表格格式、代码高亮和引用块。",
|
||||
"downloads": 145,
|
||||
"views": 2507,
|
||||
"downloads": 153,
|
||||
"views": 2631,
|
||||
"upvotes": 14,
|
||||
"saves": 7,
|
||||
"comments": 4,
|
||||
@@ -198,8 +198,8 @@
|
||||
"version": "0.1.0",
|
||||
"author": "Fu-Jie",
|
||||
"description": "Automatically extracts project rules from conversations and injects them into the folder's system prompt.",
|
||||
"downloads": 92,
|
||||
"views": 1721,
|
||||
"downloads": 99,
|
||||
"views": 1839,
|
||||
"upvotes": 7,
|
||||
"saves": 11,
|
||||
"comments": 0,
|
||||
@@ -214,8 +214,8 @@
|
||||
"version": "1.5.0",
|
||||
"author": "Fu-Jie",
|
||||
"description": "基于 AntV Infographic 的智能信息图生成插件。支持多种专业模板,自动图标匹配,并提供 SVG/PNG 下载功能。",
|
||||
"downloads": 62,
|
||||
"views": 1235,
|
||||
"downloads": 65,
|
||||
"views": 1304,
|
||||
"upvotes": 10,
|
||||
"saves": 1,
|
||||
"comments": 0,
|
||||
@@ -223,6 +223,22 @@
|
||||
"updated_at": "2026-02-13",
|
||||
"url": "https://openwebui.com/posts/智能信息图_e04a48ff"
|
||||
},
|
||||
{
|
||||
"title": "GitHub Copilot SDK Files Filter",
|
||||
"slug": "github_copilot_sdk_files_filter_403a62ee",
|
||||
"type": "filter",
|
||||
"version": "0.1.3",
|
||||
"author": "Fu-Jie",
|
||||
"description": "A specialized filter to bypass OpenWebUI's default RAG for GitHub Copilot SDK models. It moves uploaded files to a safe location ('copilot_files') so the Copilot Pipe can process them natively without interference.",
|
||||
"downloads": 54,
|
||||
"views": 2098,
|
||||
"upvotes": 3,
|
||||
"saves": 1,
|
||||
"comments": 0,
|
||||
"created_at": "2026-02-09",
|
||||
"updated_at": "2026-02-25",
|
||||
"url": "https://openwebui.com/posts/github_copilot_sdk_files_filter_403a62ee"
|
||||
},
|
||||
{
|
||||
"title": "思维导图",
|
||||
"slug": "智能生成交互式思维导图帮助用户可视化知识_8d4b097b",
|
||||
@@ -230,8 +246,8 @@
|
||||
"version": "0.9.2",
|
||||
"author": "Fu-Jie",
|
||||
"description": "智能分析文本内容,生成交互式思维导图,帮助用户结构化和可视化知识。",
|
||||
"downloads": 41,
|
||||
"views": 658,
|
||||
"downloads": 45,
|
||||
"views": 691,
|
||||
"upvotes": 6,
|
||||
"saves": 2,
|
||||
"comments": 0,
|
||||
@@ -246,8 +262,8 @@
|
||||
"version": "1.2.2",
|
||||
"author": "Fu-Jie",
|
||||
"description": "通过智能摘要和消息压缩,降低长对话的 token 消耗,同时保持对话连贯性。",
|
||||
"downloads": 36,
|
||||
"views": 748,
|
||||
"downloads": 38,
|
||||
"views": 783,
|
||||
"upvotes": 7,
|
||||
"saves": 5,
|
||||
"comments": 0,
|
||||
@@ -255,22 +271,6 @@
|
||||
"updated_at": "2026-02-13",
|
||||
"url": "https://openwebui.com/posts/异步上下文压缩_5c0617cb"
|
||||
},
|
||||
{
|
||||
"title": "GitHub Copilot SDK Files Filter",
|
||||
"slug": "github_copilot_sdk_files_filter_403a62ee",
|
||||
"type": "filter",
|
||||
"version": "0.1.2",
|
||||
"author": "Fu-Jie",
|
||||
"description": "A specialized filter to bypass OpenWebUI's default RAG for GitHub Copilot SDK models. It moves uploaded files to a safe location ('copilot_files') so the Copilot Pipe can process them natively without interference.",
|
||||
"downloads": 35,
|
||||
"views": 1907,
|
||||
"upvotes": 3,
|
||||
"saves": 0,
|
||||
"comments": 0,
|
||||
"created_at": "2026-02-09",
|
||||
"updated_at": "2026-02-13",
|
||||
"url": "https://openwebui.com/posts/github_copilot_sdk_files_filter_403a62ee"
|
||||
},
|
||||
{
|
||||
"title": "闪记卡 (Flash Card)",
|
||||
"slug": "闪记卡生成插件_4a31eac3",
|
||||
@@ -278,9 +278,9 @@
|
||||
"version": "0.2.4",
|
||||
"author": "Fu-Jie",
|
||||
"description": "快速将文本提炼为精美的学习记忆卡片,支持核心要点提取与分类。",
|
||||
"downloads": 30,
|
||||
"views": 783,
|
||||
"upvotes": 8,
|
||||
"downloads": 32,
|
||||
"views": 830,
|
||||
"upvotes": 7,
|
||||
"saves": 1,
|
||||
"comments": 0,
|
||||
"created_at": "2025-12-30",
|
||||
@@ -294,8 +294,8 @@
|
||||
"version": "1.0.0",
|
||||
"author": "Fu-Jie",
|
||||
"description": "全方位的思维透镜 —— 从背景全景到逻辑脉络,从深度洞察到行动路径。",
|
||||
"downloads": 25,
|
||||
"views": 545,
|
||||
"downloads": 26,
|
||||
"views": 581,
|
||||
"upvotes": 5,
|
||||
"saves": 1,
|
||||
"comments": 0,
|
||||
@@ -303,6 +303,38 @@
|
||||
"updated_at": "2026-01-08",
|
||||
"url": "https://openwebui.com/posts/精读_99830b0f"
|
||||
},
|
||||
{
|
||||
"title": "🚀 GitHub Copilot SDK Pipe v0.9.0: Copilot SDK Skills Core Capabilities & Extended Delivery",
|
||||
"slug": "github_copilot_sdk_pipe_v090_copilot_sdk_skills_co_99a42452",
|
||||
"type": "post",
|
||||
"version": "",
|
||||
"author": "",
|
||||
"description": "",
|
||||
"downloads": 0,
|
||||
"views": 7,
|
||||
"upvotes": 0,
|
||||
"saves": 0,
|
||||
"comments": 0,
|
||||
"created_at": "2026-02-27",
|
||||
"updated_at": "2026-02-27",
|
||||
"url": "https://openwebui.com/posts/github_copilot_sdk_pipe_v090_copilot_sdk_skills_co_99a42452"
|
||||
},
|
||||
{
|
||||
"title": "🚀 GitHub Copilot SDK Pipe v0.8.0: Conditional Tool Filtering & Publish Reliability 🎛️",
|
||||
"slug": "github_copilot_sdk_pipe_v080_conditional_tool_filt_a5a3322d",
|
||||
"type": "post",
|
||||
"version": "",
|
||||
"author": "",
|
||||
"description": "",
|
||||
"downloads": 0,
|
||||
"views": 1059,
|
||||
"upvotes": 2,
|
||||
"saves": 2,
|
||||
"comments": 0,
|
||||
"created_at": "2026-02-25",
|
||||
"updated_at": "2026-02-25",
|
||||
"url": "https://openwebui.com/posts/github_copilot_sdk_pipe_v080_conditional_tool_filt_a5a3322d"
|
||||
},
|
||||
{
|
||||
"title": "🚀 GitHub Copilot SDK Pipe v0.7.0: Native Tool UI & Zero-Config CLI 🛠️",
|
||||
"slug": "github_copilot_sdk_pipe_v070_native_tool_ui_zero_c_4af38131",
|
||||
@@ -311,10 +343,10 @@
|
||||
"author": "",
|
||||
"description": "",
|
||||
"downloads": 0,
|
||||
"views": 24,
|
||||
"upvotes": 2,
|
||||
"saves": 0,
|
||||
"comments": 0,
|
||||
"views": 2162,
|
||||
"upvotes": 7,
|
||||
"saves": 2,
|
||||
"comments": 1,
|
||||
"created_at": "2026-02-22",
|
||||
"updated_at": "2026-02-22",
|
||||
"url": "https://openwebui.com/posts/github_copilot_sdk_pipe_v070_native_tool_ui_zero_c_4af38131"
|
||||
@@ -327,9 +359,9 @@
|
||||
"author": "",
|
||||
"description": "",
|
||||
"downloads": 0,
|
||||
"views": 2108,
|
||||
"views": 2257,
|
||||
"upvotes": 7,
|
||||
"saves": 3,
|
||||
"saves": 4,
|
||||
"comments": 0,
|
||||
"created_at": "2026-02-10",
|
||||
"updated_at": "2026-02-10",
|
||||
@@ -343,7 +375,7 @@
|
||||
"author": "",
|
||||
"description": "",
|
||||
"downloads": 0,
|
||||
"views": 1767,
|
||||
"views": 1839,
|
||||
"upvotes": 12,
|
||||
"saves": 19,
|
||||
"comments": 8,
|
||||
@@ -359,7 +391,7 @@
|
||||
"author": "",
|
||||
"description": "",
|
||||
"downloads": 0,
|
||||
"views": 222,
|
||||
"views": 234,
|
||||
"upvotes": 2,
|
||||
"saves": 0,
|
||||
"comments": 0,
|
||||
@@ -375,9 +407,9 @@
|
||||
"author": "",
|
||||
"description": "",
|
||||
"downloads": 0,
|
||||
"views": 1475,
|
||||
"upvotes": 14,
|
||||
"saves": 10,
|
||||
"views": 1502,
|
||||
"upvotes": 16,
|
||||
"saves": 11,
|
||||
"comments": 2,
|
||||
"created_at": "2026-01-10",
|
||||
"updated_at": "2026-01-10",
|
||||
@@ -389,11 +421,11 @@
|
||||
"name": "Fu-Jie",
|
||||
"profile_url": "https://openwebui.com/u/Fu-Jie",
|
||||
"profile_image": "https://community.s3.openwebui.com/uploads/users/b15d1348-4347-42b4-b815-e053342d6cb0/profile_d9510745-4bd4-4f8f-a997-4a21847d9300.webp",
|
||||
"followers": 270,
|
||||
"following": 5,
|
||||
"total_points": 285,
|
||||
"post_points": 238,
|
||||
"comment_points": 47,
|
||||
"contributions": 51
|
||||
"followers": 295,
|
||||
"following": 6,
|
||||
"total_points": 299,
|
||||
"post_points": 251,
|
||||
"comment_points": 48,
|
||||
"contributions": 54
|
||||
}
|
||||
}
|
||||
@@ -8,7 +8,7 @@
|
||||
> *Blue: Downloads | Purple: Views (Real-time dynamic)*
|
||||
|
||||
### 📂 Content Distribution
|
||||

|
||||

|
||||
|
||||
|
||||
## 📈 Overview
|
||||
@@ -25,9 +25,9 @@
|
||||
|
||||
## 📂 By Type
|
||||
|
||||
- 
|
||||
- 
|
||||
- 
|
||||
- 
|
||||
- 
|
||||
- 
|
||||
- 
|
||||
- 
|
||||
@@ -36,26 +36,28 @@
|
||||
|
||||
| Rank | Title | Type | Version | Downloads | Views | Upvotes | Saves | Updated |
|
||||
|:---:|------|:---:|:---:|:---:|:---:|:---:|:---:|:---:|
|
||||
| 1 | [Smart Mind Map](https://openwebui.com/posts/turn_any_text_into_beautiful_mind_maps_3094c59a) | action |  |  |  |  |  | 2026-02-22 |
|
||||
| 1 | [Smart Mind Map](https://openwebui.com/posts/turn_any_text_into_beautiful_mind_maps_3094c59a) | action |  |  |  |  |  | 2026-02-27 |
|
||||
| 2 | [Smart Infographic](https://openwebui.com/posts/smart_infographic_ad6f0c7f) | action |  |  |  |  |  | 2026-02-13 |
|
||||
| 3 | [Markdown Normalizer](https://openwebui.com/posts/markdown_normalizer_baaa8732) | filter |  |  |  |  |  | 2026-02-13 |
|
||||
| 3 | [Markdown Normalizer](https://openwebui.com/posts/markdown_normalizer_baaa8732) | filter |  |  |  |  |  | 2026-02-27 |
|
||||
| 4 | [Export to Word Enhanced](https://openwebui.com/posts/export_to_word_enhanced_formatting_fca6a315) | action |  |  |  |  |  | 2026-02-13 |
|
||||
| 5 | [Async Context Compression](https://openwebui.com/posts/async_context_compression_b1655bc8) | filter |  |  |  |  |  | 2026-02-21 |
|
||||
| 6 | [Export to Excel](https://openwebui.com/posts/export_mulit_table_to_excel_244b8f9d) | action |  |  |  |  |  | 2026-02-13 |
|
||||
| 7 | [AI Task Instruction Generator](https://openwebui.com/posts/ai_task_instruction_generator_9bab8b37) | prompt |  |  |  |  |  | 2026-01-28 |
|
||||
| 8 | [Flash Card](https://openwebui.com/posts/flash_card_65a2ea8f) | action |  |  |  |  |  | 2026-02-13 |
|
||||
| 9 | [GitHub Copilot Official SDK Pipe](https://openwebui.com/posts/github_copilot_official_sdk_pipe_ce96f7b4) | pipe |  |  |  |  |  | 2026-02-22 |
|
||||
| 9 | [GitHub Copilot Official SDK Pipe](https://openwebui.com/posts/github_copilot_official_sdk_pipe_ce96f7b4) | pipe |  |  |  |  |  | 2026-02-27 |
|
||||
| 10 | [Deep Dive](https://openwebui.com/posts/deep_dive_c0b846e4) | action |  |  |  |  |  | 2026-01-08 |
|
||||
| 11 | [导出为Word增强版](https://openwebui.com/posts/导出为_word_支持公式流程图表格和代码块_8a6306c0) | action |  |  |  |  |  | 2026-02-13 |
|
||||
| 12 | [📂 Folder Memory – Auto-Evolving Project Context](https://openwebui.com/posts/folder_memory_auto_evolving_project_context_4a9875b2) | filter |  |  |  |  |  | 2026-01-20 |
|
||||
| 13 | [智能信息图](https://openwebui.com/posts/智能信息图_e04a48ff) | action |  |  |  |  |  | 2026-02-13 |
|
||||
| 14 | [思维导图](https://openwebui.com/posts/智能生成交互式思维导图帮助用户可视化知识_8d4b097b) | action |  |  |  |  |  | 2026-02-13 |
|
||||
| 15 | [异步上下文压缩](https://openwebui.com/posts/异步上下文压缩_5c0617cb) | action |  |  |  |  |  | 2026-02-13 |
|
||||
| 16 | [GitHub Copilot SDK Files Filter](https://openwebui.com/posts/github_copilot_sdk_files_filter_403a62ee) | filter |  |  |  |  |  | 2026-02-13 |
|
||||
| 14 | [GitHub Copilot SDK Files Filter](https://openwebui.com/posts/github_copilot_sdk_files_filter_403a62ee) | filter |  |  |  |  |  | 2026-02-25 |
|
||||
| 15 | [思维导图](https://openwebui.com/posts/智能生成交互式思维导图帮助用户可视化知识_8d4b097b) | action |  |  |  |  |  | 2026-02-13 |
|
||||
| 16 | [异步上下文压缩](https://openwebui.com/posts/异步上下文压缩_5c0617cb) | action |  |  |  |  |  | 2026-02-13 |
|
||||
| 17 | [闪记卡 (Flash Card)](https://openwebui.com/posts/闪记卡生成插件_4a31eac3) | action |  |  |  |  |  | 2026-02-13 |
|
||||
| 18 | [精读](https://openwebui.com/posts/精读_99830b0f) | action |  |  |  |  |  | 2026-01-08 |
|
||||
| 19 | [🚀 GitHub Copilot SDK Pipe v0.7.0: Native Tool UI & Zero-Config CLI 🛠️](https://openwebui.com/posts/github_copilot_sdk_pipe_v070_native_tool_ui_zero_c_4af38131) | post |  |  |  |  |  | 2026-02-22 |
|
||||
| 20 | [🚀 GitHub Copilot SDK Pipe: AI That Executes, Not Just Talks](https://openwebui.com/posts/github_copilot_sdk_for_openwebui_elevate_your_ai_t_a140f293) | post |  |  |  |  |  | 2026-02-10 |
|
||||
| 21 | [🚀 Open WebUI Prompt Plus: AI-Powered Prompt Manager](https://openwebui.com/posts/open_webui_prompt_plus_ai_powered_prompt_manager_s_15fa060e) | post |  |  |  |  |  | 2026-01-28 |
|
||||
| 22 | [Review of Claude Haiku 4.5](https://openwebui.com/posts/review_of_claude_haiku_45_41b0db39) | review |  |  |  |  |  | 2026-01-14 |
|
||||
| 23 | [ 🛠️ Debug Open WebUI Plugins in Your Browser](https://openwebui.com/posts/debug_open_webui_plugins_in_your_browser_81bf7960) | post |  |  |  |  |  | 2026-01-10 |
|
||||
| 19 | [🚀 GitHub Copilot SDK Pipe v0.9.0: Copilot SDK Skills Core Capabilities & Extended Delivery](https://openwebui.com/posts/github_copilot_sdk_pipe_v090_copilot_sdk_skills_co_99a42452) | post |  |  |  |  |  | 2026-02-27 |
|
||||
| 20 | [🚀 GitHub Copilot SDK Pipe v0.8.0: Conditional Tool Filtering & Publish Reliability 🎛️](https://openwebui.com/posts/github_copilot_sdk_pipe_v080_conditional_tool_filt_a5a3322d) | post |  |  |  |  |  | 2026-02-25 |
|
||||
| 21 | [🚀 GitHub Copilot SDK Pipe v0.7.0: Native Tool UI & Zero-Config CLI 🛠️](https://openwebui.com/posts/github_copilot_sdk_pipe_v070_native_tool_ui_zero_c_4af38131) | post |  |  |  |  |  | 2026-02-22 |
|
||||
| 22 | [🚀 GitHub Copilot SDK Pipe: AI That Executes, Not Just Talks](https://openwebui.com/posts/github_copilot_sdk_for_openwebui_elevate_your_ai_t_a140f293) | post |  |  |  |  |  | 2026-02-10 |
|
||||
| 23 | [🚀 Open WebUI Prompt Plus: AI-Powered Prompt Manager](https://openwebui.com/posts/open_webui_prompt_plus_ai_powered_prompt_manager_s_15fa060e) | post |  |  |  |  |  | 2026-01-28 |
|
||||
| 24 | [Review of Claude Haiku 4.5](https://openwebui.com/posts/review_of_claude_haiku_45_41b0db39) | review |  |  |  |  |  | 2026-01-14 |
|
||||
| 25 | [ 🛠️ Debug Open WebUI Plugins in Your Browser](https://openwebui.com/posts/debug_open_webui_plugins_in_your_browser_81bf7960) | post |  |  |  |  |  | 2026-01-10 |
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
> *蓝色: 总下载量 | 紫色: 总浏览量 (实时动态生成)*
|
||||
|
||||
### 📂 内容分类占比 (Distribution)
|
||||

|
||||

|
||||
|
||||
|
||||
## 📈 总览
|
||||
@@ -25,9 +25,9 @@
|
||||
|
||||
## 📂 按类型分类
|
||||
|
||||
- 
|
||||
- 
|
||||
- 
|
||||
- 
|
||||
- 
|
||||
- 
|
||||
- 
|
||||
- 
|
||||
@@ -36,26 +36,28 @@
|
||||
|
||||
| 排名 | 标题 | 类型 | 版本 | 下载 | 浏览 | 点赞 | 收藏 | 更新日期 |
|
||||
|:---:|------|:---:|:---:|:---:|:---:|:---:|:---:|:---:|
|
||||
| 1 | [Smart Mind Map](https://openwebui.com/posts/turn_any_text_into_beautiful_mind_maps_3094c59a) | action |  |  |  |  |  | 2026-02-22 |
|
||||
| 1 | [Smart Mind Map](https://openwebui.com/posts/turn_any_text_into_beautiful_mind_maps_3094c59a) | action |  |  |  |  |  | 2026-02-27 |
|
||||
| 2 | [Smart Infographic](https://openwebui.com/posts/smart_infographic_ad6f0c7f) | action |  |  |  |  |  | 2026-02-13 |
|
||||
| 3 | [Markdown Normalizer](https://openwebui.com/posts/markdown_normalizer_baaa8732) | filter |  |  |  |  |  | 2026-02-13 |
|
||||
| 3 | [Markdown Normalizer](https://openwebui.com/posts/markdown_normalizer_baaa8732) | filter |  |  |  |  |  | 2026-02-27 |
|
||||
| 4 | [Export to Word Enhanced](https://openwebui.com/posts/export_to_word_enhanced_formatting_fca6a315) | action |  |  |  |  |  | 2026-02-13 |
|
||||
| 5 | [Async Context Compression](https://openwebui.com/posts/async_context_compression_b1655bc8) | filter |  |  |  |  |  | 2026-02-21 |
|
||||
| 6 | [Export to Excel](https://openwebui.com/posts/export_mulit_table_to_excel_244b8f9d) | action |  |  |  |  |  | 2026-02-13 |
|
||||
| 7 | [AI Task Instruction Generator](https://openwebui.com/posts/ai_task_instruction_generator_9bab8b37) | prompt |  |  |  |  |  | 2026-01-28 |
|
||||
| 8 | [Flash Card](https://openwebui.com/posts/flash_card_65a2ea8f) | action |  |  |  |  |  | 2026-02-13 |
|
||||
| 9 | [GitHub Copilot Official SDK Pipe](https://openwebui.com/posts/github_copilot_official_sdk_pipe_ce96f7b4) | pipe |  |  |  |  |  | 2026-02-22 |
|
||||
| 9 | [GitHub Copilot Official SDK Pipe](https://openwebui.com/posts/github_copilot_official_sdk_pipe_ce96f7b4) | pipe |  |  |  |  |  | 2026-02-27 |
|
||||
| 10 | [Deep Dive](https://openwebui.com/posts/deep_dive_c0b846e4) | action |  |  |  |  |  | 2026-01-08 |
|
||||
| 11 | [导出为Word增强版](https://openwebui.com/posts/导出为_word_支持公式流程图表格和代码块_8a6306c0) | action |  |  |  |  |  | 2026-02-13 |
|
||||
| 12 | [📂 Folder Memory – Auto-Evolving Project Context](https://openwebui.com/posts/folder_memory_auto_evolving_project_context_4a9875b2) | filter |  |  |  |  |  | 2026-01-20 |
|
||||
| 13 | [智能信息图](https://openwebui.com/posts/智能信息图_e04a48ff) | action |  |  |  |  |  | 2026-02-13 |
|
||||
| 14 | [思维导图](https://openwebui.com/posts/智能生成交互式思维导图帮助用户可视化知识_8d4b097b) | action |  |  |  |  |  | 2026-02-13 |
|
||||
| 15 | [异步上下文压缩](https://openwebui.com/posts/异步上下文压缩_5c0617cb) | action |  |  |  |  |  | 2026-02-13 |
|
||||
| 16 | [GitHub Copilot SDK Files Filter](https://openwebui.com/posts/github_copilot_sdk_files_filter_403a62ee) | filter |  |  |  |  |  | 2026-02-13 |
|
||||
| 14 | [GitHub Copilot SDK Files Filter](https://openwebui.com/posts/github_copilot_sdk_files_filter_403a62ee) | filter |  |  |  |  |  | 2026-02-25 |
|
||||
| 15 | [思维导图](https://openwebui.com/posts/智能生成交互式思维导图帮助用户可视化知识_8d4b097b) | action |  |  |  |  |  | 2026-02-13 |
|
||||
| 16 | [异步上下文压缩](https://openwebui.com/posts/异步上下文压缩_5c0617cb) | action |  |  |  |  |  | 2026-02-13 |
|
||||
| 17 | [闪记卡 (Flash Card)](https://openwebui.com/posts/闪记卡生成插件_4a31eac3) | action |  |  |  |  |  | 2026-02-13 |
|
||||
| 18 | [精读](https://openwebui.com/posts/精读_99830b0f) | action |  |  |  |  |  | 2026-01-08 |
|
||||
| 19 | [🚀 GitHub Copilot SDK Pipe v0.7.0: Native Tool UI & Zero-Config CLI 🛠️](https://openwebui.com/posts/github_copilot_sdk_pipe_v070_native_tool_ui_zero_c_4af38131) | post |  |  |  |  |  | 2026-02-22 |
|
||||
| 20 | [🚀 GitHub Copilot SDK Pipe: AI That Executes, Not Just Talks](https://openwebui.com/posts/github_copilot_sdk_for_openwebui_elevate_your_ai_t_a140f293) | post |  |  |  |  |  | 2026-02-10 |
|
||||
| 21 | [🚀 Open WebUI Prompt Plus: AI-Powered Prompt Manager](https://openwebui.com/posts/open_webui_prompt_plus_ai_powered_prompt_manager_s_15fa060e) | post |  |  |  |  |  | 2026-01-28 |
|
||||
| 22 | [Review of Claude Haiku 4.5](https://openwebui.com/posts/review_of_claude_haiku_45_41b0db39) | review |  |  |  |  |  | 2026-01-14 |
|
||||
| 23 | [ 🛠️ Debug Open WebUI Plugins in Your Browser](https://openwebui.com/posts/debug_open_webui_plugins_in_your_browser_81bf7960) | post |  |  |  |  |  | 2026-01-10 |
|
||||
| 19 | [🚀 GitHub Copilot SDK Pipe v0.9.0: Copilot SDK Skills Core Capabilities & Extended Delivery](https://openwebui.com/posts/github_copilot_sdk_pipe_v090_copilot_sdk_skills_co_99a42452) | post |  |  |  |  |  | 2026-02-27 |
|
||||
| 20 | [🚀 GitHub Copilot SDK Pipe v0.8.0: Conditional Tool Filtering & Publish Reliability 🎛️](https://openwebui.com/posts/github_copilot_sdk_pipe_v080_conditional_tool_filt_a5a3322d) | post |  |  |  |  |  | 2026-02-25 |
|
||||
| 21 | [🚀 GitHub Copilot SDK Pipe v0.7.0: Native Tool UI & Zero-Config CLI 🛠️](https://openwebui.com/posts/github_copilot_sdk_pipe_v070_native_tool_ui_zero_c_4af38131) | post |  |  |  |  |  | 2026-02-22 |
|
||||
| 22 | [🚀 GitHub Copilot SDK Pipe: AI That Executes, Not Just Talks](https://openwebui.com/posts/github_copilot_sdk_for_openwebui_elevate_your_ai_t_a140f293) | post |  |  |  |  |  | 2026-02-10 |
|
||||
| 23 | [🚀 Open WebUI Prompt Plus: AI-Powered Prompt Manager](https://openwebui.com/posts/open_webui_prompt_plus_ai_powered_prompt_manager_s_15fa060e) | post |  |  |  |  |  | 2026-01-28 |
|
||||
| 24 | [Review of Claude Haiku 4.5](https://openwebui.com/posts/review_of_claude_haiku_45_41b0db39) | review |  |  |  |  |  | 2026-01-14 |
|
||||
| 25 | [ 🛠️ Debug Open WebUI Plugins in Your Browser](https://openwebui.com/posts/debug_open_webui_plugins_in_your_browser_81bf7960) | post |  |  |  |  |  | 2026-01-10 |
|
||||
|
||||
@@ -5,6 +5,8 @@
|
||||
|
||||
Intelligently analyzes text content and generates interactive mind maps for better visualization and understanding.
|
||||
|
||||
> 🏆 **Featured by OpenWebUI Official** — Recommended in the official OpenWebUI Community Newsletter: [February 3, 2026](https://openwebui.com/blog/open-webui-community-newsletter-february-3rd-2026)
|
||||
|
||||
---
|
||||
|
||||
## Overview
|
||||
|
||||
@@ -5,6 +5,8 @@
|
||||
|
||||
智能分析文本内容,生成交互式思维导图,帮助你更直观地理解信息结构。
|
||||
|
||||
> 🏆 **OpenWebUI 官方推荐** — 获得 OpenWebUI 社区 Newsletter 官方推荐:[2026 年 2 月 3 日](https://openwebui.com/blog/open-webui-community-newsletter-february-3rd-2026)
|
||||
|
||||
---
|
||||
|
||||
## 概览
|
||||
|
||||
@@ -4,6 +4,8 @@
|
||||
|
||||
A content normalizer filter for Open WebUI that fixes common Markdown formatting issues in LLM outputs. It ensures that code blocks, LaTeX formulas, Mermaid diagrams, and other Markdown elements are rendered correctly.
|
||||
|
||||
> 🏆 **Featured by OpenWebUI Official** — Recommended in the official OpenWebUI Community Newsletter: [January 28, 2026](https://openwebui.com/blog/newsletter-january-28-2026)
|
||||
|
||||
## 🔥 What's New in v1.2.7
|
||||
|
||||
* **LaTeX Formula Protection**: Enhanced escape character cleaning to protect LaTeX commands like `\times`, `\nu`, and `\theta` from being corrupted.
|
||||
|
||||
@@ -4,6 +4,8 @@
|
||||
|
||||
这是一个用于 Open WebUI 的内容格式化过滤器,旨在修复 LLM 输出中常见的 Markdown 格式问题。它能确保代码块、LaTeX 公式、Mermaid 图表和其他 Markdown 元素被正确渲染。
|
||||
|
||||
> 🏆 **OpenWebUI 官方推荐** — 获得 OpenWebUI 社区 Newsletter 官方推荐:[2026 年 1 月 28 日](https://openwebui.com/blog/newsletter-january-28-2026)
|
||||
|
||||
## 🔥 最新更新 v1.2.7
|
||||
|
||||
* **LaTeX 公式保护**: 增强了转义字符清理逻辑,自动保护 `$ $` 或 `$$ $$` 内的 LaTeX 命令(如 `\times`、`\nu`、`\theta`),防止渲染失效。
|
||||
|
||||
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 工具对录屏进行加速、缩放及双阶段色彩优化处理。
|
||||
|
||||
|
||||
7
docs/plugins/tools/index.md
Normal file
7
docs/plugins/tools/index.md
Normal file
@@ -0,0 +1,7 @@
|
||||
# Tools
|
||||
|
||||
OpenWebUI native Tool plugins that can be used across models.
|
||||
|
||||
## Available Tool Plugins
|
||||
|
||||
- [OpenWebUI Skills Manager Tool](openwebui-skills-manager-tool.md) (v0.2.0) - Simple native skill management (`list/show/install/create/update/delete`).
|
||||
7
docs/plugins/tools/index.zh.md
Normal file
7
docs/plugins/tools/index.zh.md
Normal file
@@ -0,0 +1,7 @@
|
||||
# Tools(工具)
|
||||
|
||||
可跨模型使用的 OpenWebUI 原生 Tool 插件。
|
||||
|
||||
## 可用 Tool 插件
|
||||
|
||||
- [OpenWebUI Skills 管理工具](openwebui-skills-manager-tool.zh.md) (v0.2.0) - 简化技能管理(`list/show/install/create/update/delete`)。
|
||||
27
docs/plugins/tools/openwebui-skills-manager-tool.md
Normal file
27
docs/plugins/tools/openwebui-skills-manager-tool.md
Normal file
@@ -0,0 +1,27 @@
|
||||
# OpenWebUI Skills Manager Tool
|
||||
|
||||
**Author:** [Fu-Jie](https://github.com/Fu-Jie/openwebui-extensions) | **Version:** 0.2.0 | **Project:** [OpenWebUI Extensions](https://github.com/Fu-Jie/openwebui-extensions)
|
||||
|
||||
A standalone OpenWebUI Tool plugin for managing native Workspace Skills across models.
|
||||
|
||||
## Key Features
|
||||
|
||||
- Native skill management
|
||||
- User-scoped list/show/install/create/update/delete operations
|
||||
- Status-bar feedback for each operation
|
||||
|
||||
## Methods
|
||||
|
||||
- `list_skills`
|
||||
- `show_skill`
|
||||
- `install_skill`
|
||||
- `create_skill`
|
||||
- `update_skill`
|
||||
- `delete_skill`
|
||||
|
||||
## Installation
|
||||
|
||||
1. Open OpenWebUI → Workspace → Tools
|
||||
2. Create Tool and paste:
|
||||
- `plugins/tools/openwebui-skills-manager/openwebui_skills_manager.py`
|
||||
3. Save and enable for your chat/model
|
||||
27
docs/plugins/tools/openwebui-skills-manager-tool.zh.md
Normal file
27
docs/plugins/tools/openwebui-skills-manager-tool.zh.md
Normal file
@@ -0,0 +1,27 @@
|
||||
# OpenWebUI Skills 管理工具
|
||||
|
||||
**Author:** [Fu-Jie](https://github.com/Fu-Jie/openwebui-extensions) | **Version:** 0.2.0 | **Project:** [OpenWebUI Extensions](https://github.com/Fu-Jie/openwebui-extensions)
|
||||
|
||||
一个可跨模型使用的 OpenWebUI 原生 Tool 插件,用于管理 Workspace Skills。
|
||||
|
||||
## 核心特性
|
||||
|
||||
- 原生技能管理
|
||||
- 用户范围内的 list/show/install/create/update/delete
|
||||
- 每步操作提供状态栏反馈
|
||||
|
||||
## 方法
|
||||
|
||||
- `list_skills`
|
||||
- `show_skill`
|
||||
- `install_skill`
|
||||
- `create_skill`
|
||||
- `update_skill`
|
||||
- `delete_skill`
|
||||
|
||||
## 安装方式
|
||||
|
||||
1. 打开 OpenWebUI → Workspace → Tools
|
||||
2. 新建 Tool 并粘贴:
|
||||
- `plugins/tools/openwebui-skills-manager/openwebui_skills_manager.py`
|
||||
3. 保存并在模型/聊天中启用
|
||||
@@ -4,6 +4,8 @@ Smart Mind Map is a powerful OpenWebUI action plugin that intelligently analyzes
|
||||
|
||||
**Author:** [Fu-Jie](https://github.com/Fu-Jie) | **Version:** 1.0.0 | **Project:** [OpenWebUI Extensions](https://github.com/Fu-Jie/openwebui-extensions) | **License:** MIT
|
||||
|
||||
> 🏆 **Featured by OpenWebUI Official** — This plugin was recommended in the official OpenWebUI Community Newsletter: [February 3, 2026](https://openwebui.com/blog/open-webui-community-newsletter-february-3rd-2026)
|
||||
|
||||
## What's New in v1.0.0
|
||||
|
||||
### Direct Embed & UI Refinements
|
||||
|
||||
@@ -4,6 +4,8 @@
|
||||
|
||||
**作者:** [Fu-Jie](https://github.com/Fu-Jie) | **版本:** 1.0.0 | **项目:** [OpenWebUI Extensions](https://github.com/Fu-Jie/openwebui-extensions) | **许可证:** MIT
|
||||
|
||||
> 🏆 **OpenWebUI 官方推荐** — 本插件获得 OpenWebUI 社区 Newsletter 官方推荐:[2026 年 2 月 3 日](https://openwebui.com/blog/open-webui-community-newsletter-february-3rd-2026)
|
||||
|
||||
## v1.0.0 最新更新
|
||||
|
||||
### 嵌入式直出与 UI 细节全线重构
|
||||
|
||||
@@ -4,6 +4,8 @@
|
||||
|
||||
A content normalizer filter for Open WebUI that fixes common Markdown formatting issues in LLM outputs. It ensures that code blocks, LaTeX formulas, Mermaid diagrams, and other Markdown elements are rendered correctly.
|
||||
|
||||
> 🏆 **Featured by OpenWebUI Official** — This plugin was recommended in the official OpenWebUI Community Newsletter: [January 28, 2026](https://openwebui.com/blog/newsletter-january-28-2026)
|
||||
|
||||
## 🔥 What's New in v1.2.7
|
||||
|
||||
* **LaTeX Formula Protection**: Enhanced escape character cleaning to protect LaTeX commands like `\times`, `\nu`, and `\theta` from being corrupted.
|
||||
|
||||
@@ -4,6 +4,8 @@
|
||||
|
||||
这是一个用于 Open WebUI 的内容格式化过滤器,旨在修复 LLM 输出中常见的 Markdown 格式问题。它能确保代码块、LaTeX 公式、Mermaid 图表和其他 Markdown 元素被正确渲染。
|
||||
|
||||
> 🏆 **OpenWebUI 官方推荐** — 本插件获得 OpenWebUI 社区 Newsletter 官方推荐:[2026 年 1 月 28 日](https://openwebui.com/blog/newsletter-january-28-2026)
|
||||
|
||||
## 🔥 最新更新 v1.2.7
|
||||
|
||||
* **LaTeX 公式保护**: 增强了转义字符清理逻辑,自动保护 `$ $` 或 `$$ $$` 内的 LaTeX 命令(如 `\times`、`\nu`、`\theta`),防止渲染失效。
|
||||
|
||||
@@ -0,0 +1,76 @@
|
||||
# 📤 `publish_file_from_workspace` Tool Guide
|
||||
|
||||
This document explains the recommended usage contract of the built-in `publish_file_from_workspace` tool in the GitHub Copilot SDK Pipe.
|
||||
|
||||
## Tool Purpose
|
||||
|
||||
Use this tool when the agent has generated a file in the current workspace and needs to:
|
||||
|
||||
- Save the file into OpenWebUI file storage.
|
||||
- Return stable links for preview and download.
|
||||
- Keep rendering behavior consistent across local disk and object storage backends.
|
||||
|
||||
## Required Input
|
||||
|
||||
- `filename`: Relative filename under current workspace.
|
||||
- ✅ Example: `report.xlsx`
|
||||
- ✅ Example: `output/summary.html`
|
||||
- ❌ Avoid temporary paths outside workspace (e.g. `/tmp/...`).
|
||||
|
||||
## Output Contract
|
||||
|
||||
The tool typically returns structured fields used by the pipe to build user-facing links:
|
||||
|
||||
- `filename`
|
||||
- `download_url`
|
||||
- `preview_url` (if preview is available)
|
||||
- metadata used by renderer (including optional `html_embed` for HTML previews)
|
||||
|
||||
## Embed Modes
|
||||
|
||||
### 1) `artifacts` (default)
|
||||
|
||||
- Message should include `[Preview]` + `[Download]` links.
|
||||
- For HTML-capable content, `html_embed` may be rendered in a ```html block.
|
||||
- Best for inline interactive previews in chat.
|
||||
|
||||
### 2) `richui`
|
||||
|
||||
- Message should include `[Preview]` + `[Download]` links.
|
||||
- Integrated preview is emitted by Rich UI renderer automatically.
|
||||
- Do not output iframe/html preview block in chat body.
|
||||
|
||||
## PDF Safety Rule (Mandatory)
|
||||
|
||||
For PDF files, always output markdown links only:
|
||||
|
||||
- `[Preview](...)`
|
||||
- `[Download](...)` (if available)
|
||||
|
||||
Do NOT embed PDFs with iframe or raw HTML blocks.
|
||||
|
||||
## Recommended Workflow
|
||||
|
||||
1. Generate file in workspace.
|
||||
2. Call `publish_file_from_workspace(filename=...)`.
|
||||
3. Return links according to selected embed mode.
|
||||
4. Follow PDF safety rule for any `.pdf` output.
|
||||
|
||||
## Practical Example
|
||||
|
||||
### Example A: HTML report (artifacts)
|
||||
|
||||
- Publish `analysis.html`.
|
||||
- Return links.
|
||||
- Allow `html_embed` block rendering for direct preview.
|
||||
|
||||
### Example B: PDF report
|
||||
|
||||
- Publish `audit.pdf`.
|
||||
- Return links only.
|
||||
- Skip iframe/html embedding entirely.
|
||||
|
||||
## Related Docs
|
||||
|
||||
- [Skills Manager Guide](./SKILLS_MANAGER.md)
|
||||
- [Skills Best Practices](./SKILLS_BEST_PRACTICES.md)
|
||||
@@ -0,0 +1,76 @@
|
||||
# 📤 `publish_file_from_workspace` 工具指南
|
||||
|
||||
本文档说明 GitHub Copilot SDK Pipe 内置工具 `publish_file_from_workspace` 的推荐使用规范。
|
||||
|
||||
## 工具用途
|
||||
|
||||
当 Agent 在当前工作区生成文件后,使用此工具可实现:
|
||||
|
||||
- 将文件发布到 OpenWebUI 文件存储。
|
||||
- 返回稳定可用的预览/下载链接。
|
||||
- 在本地磁盘与对象存储后端保持一致交付行为。
|
||||
|
||||
## 必填参数
|
||||
|
||||
- `filename`:工作区内的相对路径文件名。
|
||||
- ✅ 示例:`report.xlsx`
|
||||
- ✅ 示例:`output/summary.html`
|
||||
- ❌ 避免工作区外临时路径(如 `/tmp/...`)。
|
||||
|
||||
## 返回结构(常见字段)
|
||||
|
||||
该工具通常返回用于构建前端链接与渲染的数据:
|
||||
|
||||
- `filename`
|
||||
- `download_url`
|
||||
- `preview_url`(如可预览)
|
||||
- 渲染元数据(HTML 场景可含 `html_embed`)
|
||||
|
||||
## 发布模式
|
||||
|
||||
### 1) `artifacts`(默认)
|
||||
|
||||
- 消息中返回 `[Preview]` + `[Download]`。
|
||||
- 对于 HTML 可预览内容,可在 ```html 代码块中渲染 `html_embed`。
|
||||
- 适用于聊天内联交互式预览。
|
||||
|
||||
### 2) `richui`
|
||||
|
||||
- 消息中返回 `[Preview]` + `[Download]`。
|
||||
- 由 Rich UI 渲染器自动输出集成预览。
|
||||
- 聊天正文中不输出 iframe/html 预览块。
|
||||
|
||||
## PDF 安全规则(强制)
|
||||
|
||||
针对 PDF 文件,必须只输出 Markdown 链接:
|
||||
|
||||
- `[Preview](...)`
|
||||
- `[Download](...)`(可用时)
|
||||
|
||||
禁止使用 iframe 或 HTML 代码块嵌入 PDF。
|
||||
|
||||
## 推荐流程
|
||||
|
||||
1. 在工作区生成文件。
|
||||
2. 调用 `publish_file_from_workspace(filename=...)`。
|
||||
3. 按模式返回链接。
|
||||
4. 若为 `.pdf`,严格执行“仅链接”规则。
|
||||
|
||||
## 示例
|
||||
|
||||
### 示例 A:HTML 报告(artifacts)
|
||||
|
||||
- 发布 `analysis.html`。
|
||||
- 返回链接。
|
||||
- 允许渲染 `html_embed` 进行直接预览。
|
||||
|
||||
### 示例 B:PDF 报告
|
||||
|
||||
- 发布 `audit.pdf`。
|
||||
- 仅返回链接。
|
||||
- 完全跳过 iframe/html 嵌入。
|
||||
|
||||
## 相关文档
|
||||
|
||||
- [manage_skills 工具指南](./SKILLS_MANAGER_CN.md)
|
||||
- [Skills 最佳实践](./SKILLS_BEST_PRACTICES_CN.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,33 @@ 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). Skills can now be loaded as first-class runtime context.
|
||||
- **🔄 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.
|
||||
- **⚡ Asynchronous Integrity**: Refactored status emission to route all updates through a centralized helper, ensuring atomic delivery and preventing race conditions in parallel execution streams.
|
||||
- **💓 Pulse-Lock Refresh**: Implemented a hardware-inspired "pulse" logic that forces a final UI state refresh at the end of each session, ensuring the status bar settling on "Task completed."
|
||||
- **🗂️ 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 +65,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 +96,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 +196,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,50 +1,43 @@
|
||||
# GitHub Copilot SDK 官方管道
|
||||
|
||||
**作者:** [Fu-Jie](https://github.com/Fu-Jie/openwebui-extensions) | **版本:** 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)。
|
||||
|
||||
> [!TIP]
|
||||
> **BYOK 模式无需订阅**
|
||||
> 如果您使用自带的 API Key (BYOK 模式对接 OpenAI/Anthropic),**您不需要 GitHub Copilot 官方订阅**。只有在访问 GitHub 官方模型时才需要订阅。
|
||||
|
||||
---
|
||||
|
||||
## ✨ 0.8.0 更新内容 (What's New)
|
||||
## ✨ 0.9.0 核心更新:技能革命与稳定性加固
|
||||
|
||||
- **🎛️ 条件工具过滤 (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` 工具丢失的问题。
|
||||
- **🧩 Copilot SDK Skills 原生支持**: 技能可作为一等上下文能力被加载和使用。
|
||||
- **🔄 OpenWebUI Skills 桥接**: 实现 OpenWebUI **工作区 > Skills** 与 SDK 技能目录的深度双向同步。
|
||||
- **🛠️ 确定性 `manage_skills` 工具**: 通过稳定工具契约完成技能的生命周期管理。
|
||||
- **🌊 状态栏逻辑加固**: 引入 `session_finalized` 多层锁定机制,彻底解决任务完成后状态栏回弹或卡死的问题。
|
||||
- **🗂️ 环境目录持久化**: 增强 `COPILOTSDK_CONFIG_DIR` 逻辑,确保会话状态跨容器重启稳定存在。
|
||||
|
||||
---
|
||||
|
||||
## ✨ 核心能力 (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 报告等)并直接在聊天中提供**持久化下载链接**。若为 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 +62,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` | 启用无限会话 (自动上下文压缩)。 |
|
||||
@@ -91,14 +89,38 @@
|
||||
| 参数 | 说明 |
|
||||
| :--- | :--- |
|
||||
| `GH_TOKEN` | 使用个人的 GitHub Token。 |
|
||||
| `REASONING_EFFORT`| 个人偏好的推理强度。 |
|
||||
| `REASONING_EFFORT` | 个人偏好的推理强度。 |
|
||||
| `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 在隔离工作区内自动分析代码、运行测试并应用补丁。
|
||||
@@ -142,10 +164,40 @@
|
||||
|
||||
---
|
||||
|
||||
### 📤 增强型发布工具与交互式组件
|
||||
|
||||
`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,无需手动干预。
|
||||
|
||||
---
|
||||
|
||||
209
plugins/pipes/github-copilot-sdk/SKILLS_BEST_PRACTICES.md
Normal file
209
plugins/pipes/github-copilot-sdk/SKILLS_BEST_PRACTICES.md
Normal file
@@ -0,0 +1,209 @@
|
||||
# Skills Best Practices
|
||||
|
||||
A concise guide to writing, organizing, and maintaining Copilot SDK skills effectively.
|
||||
|
||||
---
|
||||
|
||||
## Understanding How Skills Work
|
||||
|
||||
Skills are **not command-line tools**. They are context-injected instruction sets:
|
||||
|
||||
1. The Copilot SDK daemon reads every `SKILL.md` file from your `skill_directories`
|
||||
2. It extracts the YAML `description` field from each skill
|
||||
3. When the user sends a message, the SDK compares intent against all descriptions
|
||||
4. If a match is found, the SDK fires `skill.invoked` and **injects the full SKILL.md body** into the conversation as instructions
|
||||
5. The agent reads those instructions and executes them using `bash`, `create_file`, `view_file`, etc.
|
||||
|
||||
**Key implication**: never run a skill's name as a bash command (e.g., `finance-reporting`). The skill IS the instructions, not an executable.
|
||||
|
||||
---
|
||||
|
||||
## Writing a Good `description` Field
|
||||
|
||||
The `description` in `SKILL.md` frontmatter is the **primary trigger mechanism**. The SDK uses it like a semantic router.
|
||||
|
||||
### Do ✅
|
||||
|
||||
- Start with a verb: "Manage…", "Generate…", "Analyze…"
|
||||
- Include explicit "Use when:" scenarios — this is the most reliable trigger signal
|
||||
- Cover all the intent variations a user might express
|
||||
|
||||
```yaml
|
||||
description: Generate a PowerPoint presentation from an outline or topic.
|
||||
Use when: creating slides, building a deck, making a presentation, exporting to PPTX.
|
||||
```
|
||||
|
||||
### Don't ❌
|
||||
|
||||
- Vague descriptions: "A useful skill for various things"
|
||||
- Overlapping descriptions with other skills (causes misfires)
|
||||
- Omitting "Use when:" examples (reduces trigger reliability significantly)
|
||||
|
||||
### Rule of Thumb
|
||||
|
||||
If two people would phrase the same request differently (e.g., "make slides" vs. "create a deck"), both phrasings should appear somewhere in the description.
|
||||
|
||||
---
|
||||
|
||||
## Structure: What Goes Where
|
||||
|
||||
```
|
||||
skill-name/
|
||||
├── SKILL.md ← Required. Frontmatter + core instructions
|
||||
├── .owui_id ← Auto-generated. DO NOT edit or delete
|
||||
├── references/ ← Optional. Supplementary docs, loaded on demand
|
||||
│ └── advanced.md
|
||||
├── scripts/ ← Optional. Helper shell/Python scripts
|
||||
└── assets/ ← Optional. Templates, sample files, static data
|
||||
```
|
||||
|
||||
### When to Use `references/`
|
||||
|
||||
Put content in `references/` when it is:
|
||||
|
||||
- Only needed for edge cases or advanced usage
|
||||
- Too long to read every time (> ~100 lines)
|
||||
- Reference material (API specs, format docs, examples)
|
||||
|
||||
Use progressive disclosure: the agent reads `SKILL.md` first, then loads a specific reference file only when the task requires it.
|
||||
|
||||
```markdown
|
||||
## Advanced Export Options
|
||||
|
||||
See [references/export-options.md](references/export-options.md) for the full list.
|
||||
```
|
||||
|
||||
### When to Inline in `SKILL.md`
|
||||
|
||||
Keep content in `SKILL.md` when it is:
|
||||
|
||||
- Needed for every run of the skill
|
||||
- Short enough not to slow down context injection (< ~150 lines total)
|
||||
- Core to the skill's main workflow
|
||||
|
||||
---
|
||||
|
||||
## Naming Conventions
|
||||
|
||||
| Item | Convention | Example |
|
||||
|---|---|---|
|
||||
| Skill directory name | `kebab-case` | `export-to-pptx` |
|
||||
| `name` field in frontmatter | `kebab-case`, matches dir name | `export-to-pptx` |
|
||||
| Script filenames | `snake_case.py` or `snake_case.sh` | `build_slide.py` |
|
||||
| Reference filenames | `kebab-case.md` | `advanced-options.md` |
|
||||
|
||||
Avoid spaces and uppercase in skill directory names — the SDK uses the directory name as the skill identifier.
|
||||
|
||||
---
|
||||
|
||||
## Writing Effective SKILL.md Instructions
|
||||
|
||||
### Open With a Role Statement
|
||||
|
||||
Tell the agent who it is in this skill context:
|
||||
|
||||
```markdown
|
||||
# Export to PowerPoint
|
||||
|
||||
You are a presentation builder. Your job is to convert the user's content into a well-structured PPTX file using the scripts in this skill directory.
|
||||
```
|
||||
|
||||
### Use Imperative Steps
|
||||
|
||||
Write instructions as numbered steps, not prose:
|
||||
|
||||
```markdown
|
||||
1. Ask the user for the outline if not provided.
|
||||
2. Run `python3 {scripts_dir}/build_slide.py --title "..." --output "{cwd}/output.pptx"`
|
||||
3. Confirm success by checking the file exists.
|
||||
4. Provide the user with the download path.
|
||||
```
|
||||
|
||||
### Handle Errors Explicitly
|
||||
|
||||
Tell the agent what to do when things go wrong:
|
||||
|
||||
```markdown
|
||||
If the script exits with a non-zero code, show the user the stderr output and ask how to proceed.
|
||||
```
|
||||
|
||||
### End With a Closing Instruction
|
||||
|
||||
```markdown
|
||||
After completing the task, summarize what was created and remind the user where to find the file.
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Skill Scope
|
||||
|
||||
Each skill should do **one thing well**. Signs a skill is too broad:
|
||||
|
||||
- The description has more than 4–5 "Use when:" entries covering unrelated domains
|
||||
- The SKILL.md is > 300 lines
|
||||
- You've added more than 3 reference files
|
||||
|
||||
When a skill grows too large, split it: one parent skill for routing + separate child skills per major function.
|
||||
|
||||
---
|
||||
|
||||
## Managing the `shared/` Directory
|
||||
|
||||
The `shared/` directory is **bidirectionally synced** with the OpenWebUI database:
|
||||
|
||||
- Skills created via the OpenWebUI UI are automatically imported into `shared/`
|
||||
- Skills created by the agent in `shared/` are exported back to OpenWebUI at session start
|
||||
|
||||
### Safe operations
|
||||
|
||||
| Operation | Method |
|
||||
|---|---|
|
||||
| Install from URL | `python3 {scripts_dir}/install_skill.py --url <url> --dest {shared_dir}` |
|
||||
| Create new skill | `mkdir -p {shared_dir}/<name>/ && create SKILL.md` |
|
||||
| Edit skill | Read → modify → write `SKILL.md` |
|
||||
| Delete skill | `rm -rf {shared_dir}/<name>/` (does NOT delete from OpenWebUI UI — do that separately) |
|
||||
| List skills | `python3 {scripts_dir}/list_skills.py --path {shared_dir}` |
|
||||
|
||||
### The `.owui_id` file
|
||||
|
||||
Every skill synced with OpenWebUI has a `.owui_id` file containing the database UUID. **Never edit or delete this file** — it is the link between the filesystem and OpenWebUI DB. If deleted, the skill will be treated as new on next sync and may create a duplicate.
|
||||
|
||||
---
|
||||
|
||||
## Session Lifecycle Awareness
|
||||
|
||||
Skills are loaded **once at session start**. Changes made during a session take effect in the **next session**.
|
||||
|
||||
| When | What happens |
|
||||
|---|---|
|
||||
| Session starts | SDK daemon reads all `SKILL.md` files; `_sync_openwebui_skills` runs bidirectional DB↔file sync |
|
||||
| During a session | New/edited/deleted skill files exist on disk but are NOT yet loaded by the daemon |
|
||||
| After user starts new session | New skills become available; edited descriptions take effect |
|
||||
|
||||
**Always tell the user** after any create/edit/delete: "This change will take effect when you start a new session."
|
||||
|
||||
---
|
||||
|
||||
## Anti-Patterns to Avoid
|
||||
|
||||
| Anti-pattern | Why it's bad | Fix |
|
||||
|---|---|---|
|
||||
| Running `<skill-name>` as a bash command | Skills are not executables | Read the SKILL.md instructions and act with standard tools |
|
||||
| Editing `.owui_id` | Breaks DB sync | Never touch it |
|
||||
| Storing per-session state in `SKILL.md` | SKILL.md is static instructions, not a state file | Use separate workspace files for session state |
|
||||
| Ultra-broad skill descriptions | Causes false positives on every message | Narrow to specific intent with "Use when:" |
|
||||
| Putting all logic in one 500-line SKILL.md | Slow context injection, hard to maintain | Split into SKILL.md + `references/*.md` |
|
||||
| Creating skills in `/tmp` | Not persisted, not found by SDK | Always create in `{shared_dir}/` |
|
||||
|
||||
---
|
||||
|
||||
## Quick Checklist for a New Skill
|
||||
|
||||
- [ ] Directory name is `kebab-case` and matches the `name` field
|
||||
- [ ] `description` starts with a verb and has "Use when:" examples
|
||||
- [ ] SKILL.md opens with a role statement for the agent
|
||||
- [ ] Instructions use imperative numbered steps
|
||||
- [ ] Long reference content moved to `references/`
|
||||
- [ ] Scripts placed in `scripts/`
|
||||
- [ ] Confirmed: skill does NOT overlap in description with other loaded skills
|
||||
- [ ] User informed: "new skill takes effect next session"
|
||||
209
plugins/pipes/github-copilot-sdk/SKILLS_BEST_PRACTICES_CN.md
Normal file
209
plugins/pipes/github-copilot-sdk/SKILLS_BEST_PRACTICES_CN.md
Normal file
@@ -0,0 +1,209 @@
|
||||
# Skills 使用最佳实践
|
||||
|
||||
编写、组织和维护 Copilot SDK Skills 的简明指南。
|
||||
|
||||
---
|
||||
|
||||
## 理解 Skills 的工作机制
|
||||
|
||||
Skills **不是命令行工具**,而是**上下文注入的指令集**:
|
||||
|
||||
1. Copilot SDK 守护进程读取 `skill_directories` 中每个 `SKILL.md` 文件
|
||||
2. 提取每个 skill 的 YAML `description` 字段
|
||||
3. 用户发消息时,SDK 将用户意图与所有 description 进行语义匹配
|
||||
4. 匹配成功后,SDK 触发 `skill.invoked` 事件,将完整的 **SKILL.md 正文注入对话上下文**
|
||||
5. Agent 读取这些指令,使用 `bash`、`create_file`、`view_file` 等工具来执行
|
||||
|
||||
**关键理解**:永远不要把 skill 的名字当作 bash 命令来运行(例如 `finance-reporting`)。Skill 本身就是指令,而不是可执行文件。
|
||||
|
||||
---
|
||||
|
||||
## 写好 `description` 字段
|
||||
|
||||
`SKILL.md` frontmatter 中的 `description` 是 **主要触发机制**,SDK 用它做语义路由。
|
||||
|
||||
### 应该这样做 ✅
|
||||
|
||||
- 以动词开头:"管理…"、"生成…"、"分析…"
|
||||
- 明确写出 "Use when:" 场景——这是最可靠的触发信号
|
||||
- 覆盖用户可能表达同一需求的多种说法
|
||||
|
||||
```yaml
|
||||
description: 根据大纲或主题生成 PowerPoint 演示文稿。
|
||||
Use when: 创建幻灯片、制作演讲稿、导出 PPTX 文件、做 PPT。
|
||||
```
|
||||
|
||||
### 不要这样做 ❌
|
||||
|
||||
- 模糊描述:"一个有用的多功能工具"
|
||||
- 与其他 skill 描述重叠(会造成误触发)
|
||||
- 省略 "Use when:" 示例(大幅降低触发准确率)
|
||||
|
||||
### 实用经验
|
||||
|
||||
如果两个人会用不同方式表达同一需求(如"做个幻灯片"vs"制作一个演讲 deck"),两种说法都应该出现在 description 中。
|
||||
|
||||
---
|
||||
|
||||
## 目录结构:什么放在哪里
|
||||
|
||||
```
|
||||
skill-name/
|
||||
├── SKILL.md ← 必须。Frontmatter + 核心指令
|
||||
├── .owui_id ← 自动生成,禁止编辑或删除
|
||||
├── references/ ← 可选。补充文档,按需加载
|
||||
│ └── advanced.md
|
||||
├── scripts/ ← 可选。辅助脚本(Shell/Python)
|
||||
└── assets/ ← 可选。模板、样例文件、静态数据
|
||||
```
|
||||
|
||||
### 何时用 `references/`
|
||||
|
||||
当内容属于以下情况时放入 `references/`:
|
||||
|
||||
- 仅边缘场景或高级用法才需要
|
||||
- 内容太长,每次都注入会浪费上下文(> 约 100 行)
|
||||
- 纯参考资料(API 规格、格式文档、示例)
|
||||
|
||||
使用"渐进式披露":Agent 先读 `SKILL.md`,仅在任务需要时才加载特定 reference 文件:
|
||||
|
||||
```markdown
|
||||
## 高级导出选项
|
||||
|
||||
详见 [references/export-options.md](references/export-options.md)。
|
||||
```
|
||||
|
||||
### 何时内联在 `SKILL.md`
|
||||
|
||||
当内容属于以下情况时留在 `SKILL.md`:
|
||||
|
||||
- 每次运行 skill 都需要
|
||||
- 足够短,不会拖慢上下文注入(总计 < 约 150 行)
|
||||
- 是 skill 主流程的核心内容
|
||||
|
||||
---
|
||||
|
||||
## 命名约定
|
||||
|
||||
| 内容 | 规范 | 示例 |
|
||||
|---|---|---|
|
||||
| Skill 目录名 | `kebab-case` | `export-to-pptx` |
|
||||
| Frontmatter `name` 字段 | `kebab-case`,与目录名一致 | `export-to-pptx` |
|
||||
| 脚本文件名 | `snake_case.py` 或 `.sh` | `build_slide.py` |
|
||||
| Reference 文件名 | `kebab-case.md` | `advanced-options.md` |
|
||||
|
||||
Skill 目录名避免空格和大写字母——SDK 使用目录名作为 skill 标识符。
|
||||
|
||||
---
|
||||
|
||||
## 编写高效的 SKILL.md 指令
|
||||
|
||||
### 以角色声明开头
|
||||
|
||||
告诉 Agent 在这个 skill 上下文中扮演什么角色:
|
||||
|
||||
```markdown
|
||||
# 导出为 PowerPoint
|
||||
|
||||
你是一个演示文稿构建器。你的任务是使用本 skill 目录中的脚本,将用户的内容转换为结构清晰的 PPTX 文件。
|
||||
```
|
||||
|
||||
### 使用祈使句步骤
|
||||
|
||||
用编号步骤写指令,而不是大段散文:
|
||||
|
||||
```markdown
|
||||
1. 如果用户未提供大纲,先询问。
|
||||
2. 运行 `python3 {scripts_dir}/build_slide.py --title "..." --output "{cwd}/output.pptx"`
|
||||
3. 检查文件是否存在,确认成功。
|
||||
4. 向用户提供文件的下载路径。
|
||||
```
|
||||
|
||||
### 明确处理错误
|
||||
|
||||
告诉 Agent 出错时怎么做:
|
||||
|
||||
```markdown
|
||||
如果脚本以非零状态码退出,将 stderr 输出展示给用户并询问如何处理。
|
||||
```
|
||||
|
||||
### 以收尾指令结束
|
||||
|
||||
```markdown
|
||||
任务完成后,总结创建的内容,并提醒用户文件的存放位置。
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Skill 的适用范围
|
||||
|
||||
每个 skill 应该**只做一件事**。以下迹象说明 skill 太宽泛了:
|
||||
|
||||
- description 包含 4–5 个以上涵盖不同领域的 "Use when:" 条目
|
||||
- SKILL.md 超过 300 行
|
||||
- 已添加超过 3 个 reference 文件
|
||||
|
||||
当 skill 变得过大时,进行拆分:一个父 skill 负责路由,各子 skill 负责具体功能。
|
||||
|
||||
---
|
||||
|
||||
## 管理 `shared/` 目录
|
||||
|
||||
`shared/` 目录与 OpenWebUI 数据库**双向同步**:
|
||||
|
||||
- 通过 OpenWebUI UI 创建的 skill 会自动导入 `shared/`
|
||||
- Agent 在 `shared/` 中创建的 skill 在下次会话启动时导出到 OpenWebUI
|
||||
|
||||
### 安全操作方式
|
||||
|
||||
| 操作 | 方法 |
|
||||
|---|---|
|
||||
| 从 URL 安装 | `python3 {scripts_dir}/install_skill.py --url <url> --dest {shared_dir}` |
|
||||
| 新建 skill | `mkdir -p {shared_dir}/<name>/ && 创建 SKILL.md` |
|
||||
| 编辑 skill | 读取 → 修改 → 写回 `SKILL.md` |
|
||||
| 删除 skill | `rm -rf {shared_dir}/<name>/`(不会删除 OpenWebUI UI 中的记录,需单独删除) |
|
||||
| 列出 skills | `python3 {scripts_dir}/list_skills.py --path {shared_dir}` |
|
||||
|
||||
### `.owui_id` 文件
|
||||
|
||||
每个与 OpenWebUI 同步的 skill 都有一个 `.owui_id` 文件,里面存储数据库 UUID。**绝对不要编辑或删除此文件**——它是文件系统与 OpenWebUI 数据库之间的关联纽带。一旦删除,下次同步时该 skill 会被视为新建项,可能产生重复。
|
||||
|
||||
---
|
||||
|
||||
## 会话生命周期意识
|
||||
|
||||
Skills 在**会话开始时加载一次**。在会话期间做的修改,**下次会话才会生效**。
|
||||
|
||||
| 时间点 | 发生的事 |
|
||||
|---|---|
|
||||
| 会话启动 | SDK 守护进程读取所有 `SKILL.md`;`_sync_openwebui_skills` 执行双向 DB↔文件同步 |
|
||||
| 会话期间 | 新建/编辑/删除的 skill 文件已在磁盘上,但守护进程尚未加载 |
|
||||
| 用户开启新会话 | 新 skill 生效;修改后的 description 开始触发 |
|
||||
|
||||
**每次创建/编辑/删除后,必须告知用户**:"此更改将在您开启新会话后生效。"
|
||||
|
||||
---
|
||||
|
||||
## 需要避免的反模式
|
||||
|
||||
| 反模式 | 问题所在 | 解决方式 |
|
||||
|---|---|---|
|
||||
| 把 `<skill名>` 当 bash 命令运行 | Skill 不是可执行文件 | 阅读 SKILL.md 指令,用标准工具执行 |
|
||||
| 编辑 `.owui_id` | 破坏数据库同步 | 永远不要碰这个文件 |
|
||||
| 在 SKILL.md 中存储会话状态 | SKILL.md 是静态指令,不是状态文件 | 使用工作区中的独立文件保存会话状态 |
|
||||
| description 过于宽泛 | 对每条消息都误触发 | 用 "Use when:" 缩窄到具体意图 |
|
||||
| 把所有逻辑写进一个 500 行的 SKILL.md | 上下文注入慢,难以维护 | 拆分为 SKILL.md + `references/*.md` |
|
||||
| 在 `/tmp` 创建 skill | 不持久,SDK 找不到 | 始终在 `{shared_dir}/` 中创建 |
|
||||
|
||||
---
|
||||
|
||||
## 新建 Skill 快速检查清单
|
||||
|
||||
- [ ] 目录名为 `kebab-case`,与 `name` 字段一致
|
||||
- [ ] `description` 以动词开头,包含 "Use when:" 示例
|
||||
- [ ] SKILL.md 以角色声明开头
|
||||
- [ ] 指令使用祈使句编号步骤
|
||||
- [ ] 过长的参考内容已移至 `references/`
|
||||
- [ ] 脚本已放入 `scripts/`
|
||||
- [ ] 确认:description 与其他已加载 skill 无重叠
|
||||
- [ ] 已告知用户:"新 skill 在下次会话后生效"
|
||||
128
plugins/pipes/github-copilot-sdk/SKILLS_MANAGER.md
Normal file
128
plugins/pipes/github-copilot-sdk/SKILLS_MANAGER.md
Normal file
@@ -0,0 +1,128 @@
|
||||
# manage_skills Tool Guide
|
||||
|
||||
This document describes the `manage_skills` **tool** in GitHub Copilot SDK Pipe.
|
||||
|
||||
> Important: `manage_skills` is a tool, not a skill.
|
||||
|
||||
---
|
||||
|
||||
## Core Model
|
||||
|
||||
The plugin uses **one** install/sync location for skills:
|
||||
|
||||
- `OPENWEBUI_SKILLS_SHARED_DIR/shared/`
|
||||
|
||||
There is no separate install target for "manager skill" or per-workspace skill buckets.
|
||||
|
||||
---
|
||||
|
||||
## Skill Directory Layout
|
||||
|
||||
All skills live under the same directory:
|
||||
|
||||
```text
|
||||
{OPENWEBUI_SKILLS_SHARED_DIR}/shared/
|
||||
├── finance-reporting/
|
||||
│ ├── SKILL.md
|
||||
│ ├── .owui_id
|
||||
│ ├── scripts/
|
||||
│ └── templates/
|
||||
├── docs-writer/
|
||||
│ ├── SKILL.md
|
||||
│ └── .owui_id
|
||||
└── ...
|
||||
```
|
||||
|
||||
- `SKILL.md` is required.
|
||||
- `.owui_id` links local folder to OpenWebUI DB record.
|
||||
- Extra files (`scripts/`, `templates/`, `references/`) are optional resources.
|
||||
|
||||
---
|
||||
|
||||
## What `manage_skills` Does
|
||||
|
||||
`manage_skills` provides deterministic skill lifecycle operations:
|
||||
|
||||
- `list`
|
||||
- `install`
|
||||
- `create`
|
||||
- `edit`
|
||||
- `show`
|
||||
- `delete`
|
||||
|
||||
Use this tool for all skill CRUD operations instead of ad-hoc shell workflows.
|
||||
|
||||
---
|
||||
|
||||
## Sync Mechanism (Local Files ↔ OpenWebUI DB)
|
||||
|
||||
The SDK performs **real-time bidirectional sync** between the local filesystem and the OpenWebUI database to ensure consistency.
|
||||
|
||||
### How it works
|
||||
|
||||
1. **Identity Link**: Each local skill folder contains a hidden `.owui_id` file. This is the "glue" that links the folder to a specific record in the OpenWebUI database.
|
||||
2. **Conflict Resolution**:
|
||||
- **Content Hash**: The SDK first compares the MD5 hash of the local `SKILL.md` content against the DB record. If they match, no sync occurs.
|
||||
- **Timestamp Check**: If content differs, it compares the file's `mtime` with the database's `updated_at`. The newer version wins.
|
||||
3. **Operation Sync**:
|
||||
- **Manual Edit (Filesystem)**: If you edit `SKILL.md` via VS Code or terminal, the next SDK request will push those changes to the OpenWebUI UI.
|
||||
- **UI Edit (OpenWebUI)**: If you update instructions in the OpenWebUI workspace, the SDK will pull those changes and overwrite the local `SKILL.md`.
|
||||
- **Tool Actions**: Actions like `manage_skills(action="create")` or `action="delete"` trigger an immediate atomic sync to the database.
|
||||
|
||||
> **Warning**: Do not manually delete the `.owui_id` file unless you want to "unlink" the skill and force the SDK to re-register it as a new entry.
|
||||
|
||||
---
|
||||
|
||||
## Typical Flows (Example Queries)
|
||||
|
||||
### 1. Install Skill from GitHub URL
|
||||
|
||||
**User Query:** "Help me install the data-visualizer skill from `https://github.com/user/skills/blob/main/data-visualizer/SKILL.md`"
|
||||
**Tool Call:** `manage_skills(action="install", url="https://github.com/user/skills/blob/main/data-visualizer/SKILL.md")`
|
||||
**Result:**
|
||||
|
||||
- Files downloaded to `{OPENWEBUI_SKILLS_SHARED_DIR}/shared/data-visualizer/`
|
||||
- Skill metadata automatically synced to OpenWebUI Database.
|
||||
|
||||
### 2. Install Multiple Skills from Different URLs at Once
|
||||
|
||||
**User Query:** "Install these three skills: URL1, URL2, URL3"
|
||||
**Tool Call:** `manage_skills(action="install", url=["URL1", "URL2", "URL3"])`
|
||||
**Result:**
|
||||
|
||||
- Each URL is downloaded, extracted, and installed sequentially into `shared/`.
|
||||
- A single DB sync runs after all installs complete.
|
||||
- If one URL fails, the others still proceed. Failed URLs are listed in `errors`.
|
||||
|
||||
### 3. Install All Skills from One Repository
|
||||
|
||||
**User Query:** "Install everything under `https://github.com/myorg/skill-pack/tree/main/`"
|
||||
**Tool Call:** `manage_skills(action="install", url="https://github.com/myorg/skill-pack/tree/main/")`
|
||||
**Result:**
|
||||
|
||||
- All subdirectories containing a `SKILL.md` are discovered and installed in one shot.
|
||||
|
||||
### 4. Create Skill from Current Conversation
|
||||
|
||||
**User Query:** "Remember the Python cleanup logic we just discussed as a new skill called 'py-clean'"
|
||||
**Tool Call:** `manage_skills(action="create", name="py-clean", content="...")`
|
||||
**Result:**
|
||||
|
||||
- New directory `{OPENWEBUI_SKILLS_SHARED_DIR}/shared/py-clean/` created.
|
||||
- `SKILL.md` written and synced to Database.
|
||||
|
||||
---
|
||||
|
||||
## Recommended Settings
|
||||
|
||||
- `ENABLE_OPENWEBUI_SKILLS=True`
|
||||
- `OPENWEBUI_SKILLS_SHARED_DIR=/app/backend/data/cache/copilot-openwebui-skills`
|
||||
- Optional blacklist: `DISABLED_SKILLS=skill-a,skill-b`
|
||||
|
||||
---
|
||||
|
||||
## Notes
|
||||
|
||||
- Do not run skill names as shell commands.
|
||||
- Use `manage_skills` for lifecycle control.
|
||||
- Keep all installed skills in one directory: `.../shared/`.
|
||||
128
plugins/pipes/github-copilot-sdk/SKILLS_MANAGER_CN.md
Normal file
128
plugins/pipes/github-copilot-sdk/SKILLS_MANAGER_CN.md
Normal file
@@ -0,0 +1,128 @@
|
||||
# manage_skills 工具指南
|
||||
|
||||
本文档说明 GitHub Copilot SDK Pipe 中的 `manage_skills` **工具**。
|
||||
|
||||
> 重点:`manage_skills` 是工具(tool),不是 skill。
|
||||
|
||||
---
|
||||
|
||||
## 核心模型
|
||||
|
||||
插件只使用**一个** skill 安装/同步目录:
|
||||
|
||||
- `OPENWEBUI_SKILLS_SHARED_DIR/shared/`
|
||||
|
||||
不存在额外的“manager skill 目录”或按工作区分裂的安装目录。
|
||||
|
||||
---
|
||||
|
||||
## Skill 目录结构
|
||||
|
||||
所有 skills 统一放在同一个目录下:
|
||||
|
||||
```text
|
||||
{OPENWEBUI_SKILLS_SHARED_DIR}/shared/
|
||||
├── finance-reporting/
|
||||
│ ├── SKILL.md
|
||||
│ ├── .owui_id
|
||||
│ ├── scripts/
|
||||
│ └── templates/
|
||||
├── docs-writer/
|
||||
│ ├── SKILL.md
|
||||
│ └── .owui_id
|
||||
└── ...
|
||||
```
|
||||
|
||||
- `SKILL.md` 为必需文件。
|
||||
- `.owui_id` 用于关联 OpenWebUI 数据库记录。
|
||||
- `scripts/`、`templates/`、`references/` 等为可选资源文件。
|
||||
|
||||
---
|
||||
|
||||
## `manage_skills` 可以做什么
|
||||
|
||||
`manage_skills` 提供确定性的 skill 生命周期操作:
|
||||
|
||||
- `list`
|
||||
- `install`
|
||||
- `create`
|
||||
- `edit`
|
||||
- `show`
|
||||
- `delete`
|
||||
|
||||
建议将 skill 的增删改查统一通过该工具完成,避免脆弱的临时 shell 流程。
|
||||
|
||||
---
|
||||
|
||||
## 同步机制 (本地文件 ↔ OpenWebUI 数据库)
|
||||
|
||||
SDK 在本地文件系统与 OpenWebUI 数据库之间执行**实时双向同步**,以确保一致性。
|
||||
|
||||
### 工作原理
|
||||
|
||||
1. **身份绑定**:每个本地 skill 文件夹内包含一个隐藏的 `.owui_id` 文件。它是将文件夹链接到 OpenWebUI 数据库中特定记录的“粘合剂”。
|
||||
2. **冲突处理**:
|
||||
- **内容哈希**:SDK 首先比较本地 `SKILL.md` 与数据库中指令的内容哈希 (MD5)。若一致,则不执行同步。
|
||||
- **时间戳校验**:若内容不同,则比较文件的 `mtime` 与数据库的 `updated_at`。时间较新的一方将覆盖另一方。
|
||||
3. **操作同步场景**:
|
||||
- **手动编辑 (文件系统)**:若你通过 VS Code 或终端修改了 `SKILL.md`,下次 SDK 请求时会自动将改动推送到 OpenWebUI 前端。
|
||||
- **界面编辑 (OpenWebUI)**:若你在 OpenWebUI 工作区中修改了指令内容,SDK 会拉取变更并覆写本地的 `SKILL.md`。
|
||||
- **工具操作**:调用 `manage_skills(action="create")` 或 `action="delete"` 会立即触发与数据库的原子同步。
|
||||
|
||||
> **警告**:除非你想“取消关联”并强制 SDK 将该技能注册为新条目,否则请勿手动删除 `.owui_id` 文件。
|
||||
|
||||
---
|
||||
|
||||
## 典型工作流 (典型问题示例)
|
||||
|
||||
### 1. 从 GitHub URL 安装 Skill
|
||||
|
||||
**用户提问:** "帮我安装这个数据分析 skill:`https://github.com/user/skills/blob/main/data-visualizer/SKILL.md`"
|
||||
**工具调用:** `manage_skills(action="install", url="https://github.com/user/skills/blob/main/data-visualizer/SKILL.md")`
|
||||
**结果:**
|
||||
|
||||
- 文件下载至 `{OPENWEBUI_SKILLS_SHARED_DIR}/shared/data-visualizer/`
|
||||
- Skill 元数据自动同步至 OpenWebUI 数据库。
|
||||
|
||||
### 2. 一次安装多个来自不同 URL 的 Skills
|
||||
|
||||
**用户提问:** "帮我安装这三个 skill:URL1、URL2、URL3"
|
||||
**工具调用:** `manage_skills(action="install", url=["URL1", "URL2", "URL3"])`
|
||||
**结果:**
|
||||
|
||||
- Agent 将 `url` 传入为列表,SDK 依次下载、解压并安装每个 URL 对应的 skill 到 `shared/` 目录。
|
||||
- 所有安装完成后,执行一次统一的数据库同步,避免重复触发。
|
||||
- 若某个 URL 失败,其余 URL 的安装仍会继续,失败信息汇总在 `errors` 字段中返回。
|
||||
|
||||
### 3. 从单个仓库一次安装所有 Skills
|
||||
|
||||
**用户提问:** "安装 `https://github.com/myorg/skill-pack/tree/main/` 下的所有 skill"
|
||||
**工具调用:** `manage_skills(action="install", url="https://github.com/myorg/skill-pack/tree/main/")`
|
||||
**结果:**
|
||||
|
||||
- SDK 自动扫描目录下所有包含 `SKILL.md` 的子文件夹,一次性批量安装。
|
||||
|
||||
### 4. 从当前对话创建新 Skill
|
||||
|
||||
**用户提问:** "把我们刚才讨论的 Python 代码清理逻辑保存为一个名为 'py-clean' 的新 skill"
|
||||
**工具调用:** `manage_skills(action="create", name="py-clean", content="...")`
|
||||
**结果:**
|
||||
|
||||
- 在 `{OPENWEBUI_SKILLS_SHARED_DIR}/shared/py-clean/` 创建新目录。
|
||||
- 写入 `SKILL.md` 并同步至数据库。
|
||||
|
||||
---
|
||||
|
||||
## 推荐配置
|
||||
|
||||
- `ENABLE_OPENWEBUI_SKILLS=True`
|
||||
- `OPENWEBUI_SKILLS_SHARED_DIR=/app/backend/data/cache/copilot-openwebui-skills`
|
||||
- 可选黑名单:`DISABLED_SKILLS=skill-a,skill-b`
|
||||
|
||||
---
|
||||
|
||||
## 注意事项
|
||||
|
||||
- 不要把 skill 名称当作 shell 命令执行。
|
||||
- skill 生命周期管理请优先使用 `manage_skills` 工具。
|
||||
- 所有已安装 skills 统一维护在一个目录:`.../shared/`。
|
||||
File diff suppressed because it is too large
Load Diff
101
plugins/pipes/github-copilot-sdk/v0.9.0.md
Normal file
101
plugins/pipes/github-copilot-sdk/v0.9.0.md
Normal file
@@ -0,0 +1,101 @@
|
||||
# 🚀 GitHub Copilot SDK Pipe v0.9.0: Copilot SDK Skills Core Capabilities & Extended Delivery
|
||||
|
||||
**GitHub Copilot SDK Pipe v0.9.0** centers on making **Copilot SDK Skills** a first-class capability (native directory support + bidirectional sync + deterministic `manage_skills` lifecycle), then extends delivery with improved publishing behavior.
|
||||
|
||||
---
|
||||
|
||||
## ⭐ Release Highlights
|
||||
|
||||
- **🧩 Copilot SDK Skills Support (Core)**: Native support for SDK skill directories (`SKILL.md` + optional resources), so skills are loaded as first-class runtime context.
|
||||
- **🔄 OpenWebUI Skills Bridge (Extension)**: Bidirectional sync between OpenWebUI and local SDK skill folders.
|
||||
- **🛠️ `manage_skills` Tool (Extension)**: In-session deterministic skill lifecycle tool for `list/install/create/edit/show/delete`.
|
||||
- **📤 Publishing Update**: HTML supports `artifacts` / `richui`; PDF is delivered via Markdown links.
|
||||
- **📁 Folder-based Skills**: A skill can include `SKILL.md` plus templates/scripts/resources.
|
||||
- **🧱 Environment Refactor**: New persistent config/workspace/toolchain layout under `/app/backend/data` with stricter isolation and better reproducibility.
|
||||
|
||||
---
|
||||
|
||||
## 📦 Quick Installation
|
||||
|
||||
- **GitHub Copilot SDK (Pipe)**: [Install v0.9.0](https://openwebui.com/posts/ce96f7b4-12fc-4ac3-9a01-875713e69359)
|
||||
- **GitHub Copilot SDK (Filter)**: [Install v0.1.3](https://openwebui.com/posts/403a62ee-a596-45e7-be65-fab9cc249dd6)
|
||||
|
||||
---
|
||||
|
||||
## 🚀 What's New in v0.9.0
|
||||
|
||||
### 1. OpenWebUI Skills ↔ SDK Sync
|
||||
|
||||
All skills are unified under `{OPENWEBUI_SKILLS_SHARED_DIR}/shared/` and synced automatically between DB and files.
|
||||
|
||||
### 2. `manage_skills` Tool
|
||||
|
||||
The built-in tool (not a skill) supports:
|
||||
|
||||
- `list`
|
||||
- `install` (single URL / multiple URLs)
|
||||
- `create`
|
||||
- `edit`
|
||||
- `show`
|
||||
- `delete`
|
||||
|
||||
### 3. Publishing Behavior
|
||||
|
||||
- HTML: `artifacts` (code-block embed output) or `richui` (emitter auto-render) mode.
|
||||
- PDF: Markdown links only (no iframe embed).
|
||||
|
||||
### 4. Environment Refactor (Detailed)
|
||||
|
||||
This release includes a substantial runtime environment redesign:
|
||||
|
||||
- **Persistent SDK config directory**
|
||||
- Introduced `COPILOTSDK_CONFIG_DIR`.
|
||||
- Resolution order: Valve override -> `/app/backend/data/.copilot` -> `~/.copilot` fallback.
|
||||
- Ensures session/config state survives container restarts in standard OpenWebUI deployments.
|
||||
|
||||
- **User + Chat isolated workspace model**
|
||||
- Workspace root is now `/app/backend/data/copilot_workspace` (container mode).
|
||||
- Effective path is isolated per user and chat: `/app/backend/data/copilot_workspace/{user_id}/{chat_id}`.
|
||||
- `user_id`/`chat_id` are sanitized to prevent traversal.
|
||||
|
||||
- **Deterministic CLI tool runtime under data volume**
|
||||
- Global tool root: `/app/backend/data/.copilot_tools`.
|
||||
- NPM prefix is forced to `/app/backend/data/.copilot_tools/npm` via `NPM_CONFIG_PREFIX`.
|
||||
- Python tool execution is isolated in `/app/backend/data/.copilot_tools/venv` via `VIRTUAL_ENV`.
|
||||
- `PYTHONUSERBASE` and `PIP_USER` are cleared to avoid leaking user-site installs.
|
||||
- PATH is rewritten to prioritize npm/venv bins for consistent tool resolution.
|
||||
|
||||
- **CLI bootstrap hardening**
|
||||
- Copilot CLI discovery chain: `COPILOT_CLI_PATH` -> system `PATH` -> SDK bundled binary.
|
||||
- `COPILOT_AUTO_UPDATE=false` to prevent uncontrolled runtime drift.
|
||||
- Successful discovery auto-injects CLI bin dir into PATH.
|
||||
|
||||
- **System prompt path context hardening**
|
||||
- Session context now injects explicit paths: isolated workspace, skills directory, config directory, and tools path.
|
||||
- This reduces ambiguity and prevents accidental writes outside the approved workspace.
|
||||
|
||||
- **Regular-user security boundary refinement**
|
||||
- Non-admin users still cannot access env vars/db/global internals.
|
||||
- They can read **their own current chat session metadata** under `COPILOTSDK_CONFIG_DIR` for troubleshooting.
|
||||
- Cross-user session access remains forbidden.
|
||||
|
||||
### 5. New Valves
|
||||
|
||||
- `COPILOTSDK_CONFIG_DIR`
|
||||
- `ENABLE_OPENWEBUI_SKILLS`
|
||||
- `OPENWEBUI_SKILLS_SHARED_DIR`
|
||||
- `DISABLED_SKILLS`
|
||||
|
||||
---
|
||||
|
||||
## 🔄 Migration
|
||||
|
||||
- No breaking changes from v0.8.0.
|
||||
- `ENABLE_WORKSPACE_TOOLS` replaced by `ENABLE_OPENWEBUI_SKILLS`.
|
||||
|
||||
---
|
||||
|
||||
## 📚 Detailed Docs
|
||||
|
||||
- README: <https://github.com/Fu-Jie/openwebui-extensions/blob/main/plugins/pipes/github-copilot-sdk/README.md>
|
||||
- manage_skills Tool Guide: <https://github.com/Fu-Jie/openwebui-extensions/blob/main/plugins/pipes/github-copilot-sdk/SKILLS_MANAGER.md>
|
||||
101
plugins/pipes/github-copilot-sdk/v0.9.0_CN.md
Normal file
101
plugins/pipes/github-copilot-sdk/v0.9.0_CN.md
Normal file
@@ -0,0 +1,101 @@
|
||||
# 🚀 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>
|
||||
260
plugins/pipes/github-copilot-sdk/workspace_skills_example.py
Normal file
260
plugins/pipes/github-copilot-sdk/workspace_skills_example.py
Normal file
@@ -0,0 +1,260 @@
|
||||
"""
|
||||
Workspace Skills Example - Custom Tools for GitHub Copilot SDK
|
||||
|
||||
This file demonstrates how to create custom tools using the @define_tool decorator
|
||||
for use in your workspace's .copilot-skills/ directory.
|
||||
|
||||
USAGE:
|
||||
======
|
||||
1. Create a .copilot-skills/ directory at the root of your workspace:
|
||||
```
|
||||
your-workspace/
|
||||
└── .copilot-skills/
|
||||
├── custom_search.py (copy and modify this example)
|
||||
├── data_processor.py (your custom tools)
|
||||
└── README.md (optional: document your skills)
|
||||
```
|
||||
|
||||
2. Copy this file (or your modified version) to .copilot-skills/
|
||||
|
||||
3. Define your tools using @define_tool decorator:
|
||||
```python
|
||||
from pydantic import BaseModel, Field
|
||||
from copilot import define_tool
|
||||
|
||||
class SearchParams(BaseModel):
|
||||
query: str = Field(..., description="Search query")
|
||||
limit: int = Field(default=10, description="Max results")
|
||||
|
||||
@define_tool(description="Search your custom database")
|
||||
async def search_custom_db(query: str, limit: int = 10) -> dict:
|
||||
# Your implementation here
|
||||
return {"results": [...]}
|
||||
|
||||
# Register as tool (tool name will be snake_case of function name)
|
||||
custom_search = define_tool(
|
||||
name="search_custom_db",
|
||||
description="Search your custom database for documents or data",
|
||||
params_type=SearchParams,
|
||||
)(search_custom_db)
|
||||
```
|
||||
|
||||
4. The SDK will automatically discover and register your tools from .copilot-skills/
|
||||
|
||||
5. Use them in your conversation: "Use the search_custom_db tool to find..."
|
||||
|
||||
REQUIREMENTS:
|
||||
=============
|
||||
- Python 3.9+
|
||||
- github-copilot-sdk (v0.1.25+)
|
||||
- Any external dependencies your custom tools need
|
||||
"""
|
||||
|
||||
from pydantic import BaseModel, Field
|
||||
from copilot import define_tool
|
||||
|
||||
|
||||
# ============================================================================
|
||||
# Example 1: Simple Math Helper Tool
|
||||
# ============================================================================
|
||||
|
||||
@define_tool(description="Perform common mathematical calculations")
|
||||
async def calculate_math(operation: str, value1: float, value2: float = 0) -> dict:
|
||||
"""
|
||||
Performs basic mathematical operations.
|
||||
|
||||
Args:
|
||||
operation: One of 'add', 'subtract', 'multiply', 'divide', 'power', 'sqrt'
|
||||
value1: First number
|
||||
value2: Second number (for binary operations)
|
||||
|
||||
Returns:
|
||||
Dictionary with 'result' and 'operation' keys
|
||||
"""
|
||||
import math
|
||||
|
||||
op_map = {
|
||||
"add": lambda a, b: a + b,
|
||||
"subtract": lambda a, b: a - b,
|
||||
"multiply": lambda a, b: a * b,
|
||||
"divide": lambda a, b: a / b if b != 0 else None,
|
||||
"power": lambda a, b: a ** b,
|
||||
"sqrt": lambda a, _: math.sqrt(a) if a >= 0 else None,
|
||||
}
|
||||
|
||||
result = None
|
||||
if operation in op_map:
|
||||
try:
|
||||
result = op_map[operation](value1, value2)
|
||||
except Exception as e:
|
||||
return {"success": False, "error": str(e)}
|
||||
else:
|
||||
return {"success": False, "error": f"Unknown operation: {operation}"}
|
||||
|
||||
return {
|
||||
"success": True,
|
||||
"operation": operation,
|
||||
"value1": value1,
|
||||
"value2": value2,
|
||||
"result": result,
|
||||
}
|
||||
|
||||
|
||||
# ============================================================================
|
||||
# Example 2: Text Processing Tool with Parameter Model
|
||||
# ============================================================================
|
||||
|
||||
class TextProcessParams(BaseModel):
|
||||
"""Parameters for text processing operations."""
|
||||
text: str = Field(..., description="The text to process")
|
||||
operation: str = Field(
|
||||
default="count_words",
|
||||
description="Operation: 'count_words', 'to_uppercase', 'to_lowercase', 'reverse', 'count_lines'"
|
||||
)
|
||||
|
||||
|
||||
@define_tool(description="Process and analyze text content")
|
||||
async def process_text(text: str, operation: str = "count_words") -> dict:
|
||||
"""
|
||||
Processes text with various operations.
|
||||
|
||||
Args:
|
||||
text: Input text to process
|
||||
operation: Type of processing to apply
|
||||
|
||||
Returns:
|
||||
Dictionary with processing results
|
||||
"""
|
||||
results = {
|
||||
"operation": operation,
|
||||
"input_length": len(text),
|
||||
"result": None,
|
||||
}
|
||||
|
||||
if operation == "count_words":
|
||||
results["result"] = len(text.split())
|
||||
elif operation == "to_uppercase":
|
||||
results["result"] = text.upper()
|
||||
elif operation == "to_lowercase":
|
||||
results["result"] = text.lower()
|
||||
elif operation == "reverse":
|
||||
results["result"] = text[::-1]
|
||||
elif operation == "count_lines":
|
||||
results["result"] = len(text.split("\n"))
|
||||
else:
|
||||
results["error"] = f"Unknown operation: {operation}"
|
||||
|
||||
return results
|
||||
|
||||
|
||||
# ============================================================================
|
||||
# Example 3: Advanced Tool with Complex Return Type
|
||||
# ============================================================================
|
||||
|
||||
class DataAnalysisParams(BaseModel):
|
||||
"""Parameters for data analysis."""
|
||||
data_points: list = Field(..., description="List of numbers to analyze")
|
||||
include_stats: bool = Field(default=True, description="Include statistical analysis")
|
||||
|
||||
|
||||
@define_tool(description="Analyze numerical data and compute statistics")
|
||||
async def analyze_data(data_points: list, include_stats: bool = True) -> dict:
|
||||
"""
|
||||
Analyzes a list of numerical values.
|
||||
|
||||
Args:
|
||||
data_points: List of numbers to analyze
|
||||
include_stats: Whether to include statistical analysis
|
||||
|
||||
Returns:
|
||||
Dictionary with analysis results
|
||||
"""
|
||||
if not data_points or not all(isinstance(x, (int, float)) for x in data_points):
|
||||
return {
|
||||
"error": "data_points must be a non-empty list of numbers",
|
||||
"success": False,
|
||||
}
|
||||
|
||||
results = {
|
||||
"success": True,
|
||||
"count": len(data_points),
|
||||
"min": min(data_points),
|
||||
"max": max(data_points),
|
||||
"sum": sum(data_points),
|
||||
}
|
||||
|
||||
if include_stats:
|
||||
import statistics
|
||||
try:
|
||||
results["mean"] = statistics.mean(data_points)
|
||||
results["median"] = statistics.median(data_points)
|
||||
if len(data_points) > 1:
|
||||
results["stdev"] = statistics.stdev(data_points)
|
||||
except Exception as e:
|
||||
results["stats_error"] = str(e)
|
||||
|
||||
return results
|
||||
|
||||
|
||||
# ============================================================================
|
||||
# Tool Registration (Optional: explicit naming)
|
||||
# ============================================================================
|
||||
# The SDK will auto-discover tools from @define_tool decorated functions.
|
||||
# You can optionally register them explicitly by assigning to variables:
|
||||
|
||||
math_tool = define_tool(
|
||||
name="calculate_math",
|
||||
description="Perform mathematical calculations (add, subtract, multiply, divide, power, sqrt)",
|
||||
params_type=BaseModel, # Can be complex if needed
|
||||
)(calculate_math)
|
||||
|
||||
text_processor = define_tool(
|
||||
name="process_text",
|
||||
description="Process and analyze text (count words, case conversion, etc.)",
|
||||
params_type=TextProcessParams,
|
||||
)(process_text)
|
||||
|
||||
data_analyzer = define_tool(
|
||||
name="analyze_data",
|
||||
description="Analyze numerical data and compute statistics",
|
||||
params_type=DataAnalysisParams,
|
||||
)(analyze_data)
|
||||
|
||||
|
||||
# ============================================================================
|
||||
# Example: Custom Implementation from Scratch
|
||||
# ============================================================================
|
||||
# If you need more control, implement the Tool class directly:
|
||||
#
|
||||
# from copilot.types import Tool
|
||||
#
|
||||
# async def my_custom_handler(query: str) -> str:
|
||||
# """Your tool logic here."""
|
||||
# return f"Processed: {query}"
|
||||
#
|
||||
# my_tool = Tool(
|
||||
# name="my_custom_tool",
|
||||
# description="My custom tool description",
|
||||
# handler=my_custom_handler,
|
||||
# parameters={} # Add JSON Schema if complex params needed
|
||||
# )
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
"""Test the example tools locally."""
|
||||
import asyncio
|
||||
|
||||
async def main():
|
||||
# Test math tool
|
||||
result1 = await calculate_math("add", 10, 5)
|
||||
print("Math (10 + 5):", result1)
|
||||
|
||||
# Test text processor
|
||||
result2 = await process_text("Hello World", "count_words")
|
||||
print("Text (count words):", result2)
|
||||
|
||||
# Test data analyzer
|
||||
result3 = await analyze_data([1, 2, 3, 4, 5], include_stats=True)
|
||||
print("Data Analysis:", result3)
|
||||
|
||||
asyncio.run(main())
|
||||
10
plugins/tools/README.md
Normal file
10
plugins/tools/README.md
Normal file
@@ -0,0 +1,10 @@
|
||||
# Tools
|
||||
|
||||
This directory contains OpenWebUI native Tool plugins.
|
||||
|
||||
- Tool plugins can be enabled for any model that supports OpenWebUI Tools.
|
||||
- Each tool plugin follows single-file implementation with bilingual docs.
|
||||
|
||||
## Available Tools
|
||||
|
||||
- [OpenWebUI Skills Manager Tool](./openwebui-skills-manager/README.md)
|
||||
10
plugins/tools/README_CN.md
Normal file
10
plugins/tools/README_CN.md
Normal file
@@ -0,0 +1,10 @@
|
||||
# Tools(工具)
|
||||
|
||||
此目录包含 OpenWebUI 原生 Tool 插件。
|
||||
|
||||
- Tool 插件可用于任何启用了 OpenWebUI Tools 的模型。
|
||||
- 每个 Tool 插件采用单文件实现并提供中英文文档。
|
||||
|
||||
## 可用工具
|
||||
|
||||
- [OpenWebUI Skills 管理工具](./openwebui-skills-manager/README_CN.md)
|
||||
56
plugins/tools/openwebui-skills-manager/README.md
Normal file
56
plugins/tools/openwebui-skills-manager/README.md
Normal file
@@ -0,0 +1,56 @@
|
||||
# 🧰 OpenWebUI Skills Manager Tool
|
||||
|
||||
**Author:** [Fu-Jie](https://github.com/Fu-Jie) | **Version:** 0.2.0 | **Project:** [OpenWebUI Extensions](https://github.com/Fu-Jie/openwebui-extensions)
|
||||
|
||||
A standalone OpenWebUI Tool plugin to manage native **Workspace > Skills** for any model.
|
||||
|
||||
## Key Features
|
||||
|
||||
- **🌐 Model-agnostic**: Can be enabled for any model that supports OpenWebUI Tools.
|
||||
- **🛠️ Simple Skill Management**: Directly manage OpenWebUI skill records.
|
||||
- **🔐 User-scoped Safety**: Operates on current user's accessible skills.
|
||||
- **📡 Friendly Status Feedback**: Emits status bubbles for each operation.
|
||||
|
||||
## How to Use
|
||||
|
||||
1. Open OpenWebUI and go to **Workspace > Tools**.
|
||||
2. Create a new Tool and paste `openwebui_skills_manager.py`.
|
||||
3. Enable this tool for your model/chat.
|
||||
4. Ask the model to call tool operations, for example:
|
||||
- "List my skills"
|
||||
- "Show skill named docs-writer"
|
||||
- "Create a skill named meeting-notes with content ..."
|
||||
- "Update skill ..."
|
||||
- "Delete skill ..."
|
||||
|
||||
## Configuration (Valves)
|
||||
|
||||
| Parameter | Default | Description |
|
||||
|---|---:|---|
|
||||
| `SHOW_STATUS` | `True` | Show operation status updates in OpenWebUI status bar. |
|
||||
| `ALLOW_OVERWRITE_ON_CREATE` | `False` | Allow `create_skill`/`install_skill` to overwrite same-name skill by default. |
|
||||
| `INSTALL_FETCH_TIMEOUT` | `12.0` | URL fetch timeout in seconds for skill installation. |
|
||||
|
||||
## Supported Tool Methods
|
||||
|
||||
| Method | Purpose |
|
||||
|---|---|
|
||||
| `list_skills` | List current user's skills. |
|
||||
| `show_skill` | Show one skill by `skill_id` or `name`. |
|
||||
| `install_skill` | Install skill from URL into OpenWebUI native skills. |
|
||||
| `create_skill` | Create a new skill (or overwrite when allowed). |
|
||||
| `update_skill` | Update skill fields (`new_name`, `description`, `content`, `is_active`). |
|
||||
| `delete_skill` | Delete a skill by `skill_id` or `name`. |
|
||||
|
||||
## Support
|
||||
|
||||
If this plugin has been useful, a star on [OpenWebUI Extensions](https://github.com/Fu-Jie/openwebui-extensions) is a big motivation for me. Thank you for the support.
|
||||
|
||||
## Others
|
||||
|
||||
- This tool manages OpenWebUI native skill records and supports direct URL installation.
|
||||
- For advanced orchestration, combine with other Pipe/Tool workflows.
|
||||
|
||||
## Changelog
|
||||
|
||||
See full history in the GitHub repository releases and commits.
|
||||
56
plugins/tools/openwebui-skills-manager/README_CN.md
Normal file
56
plugins/tools/openwebui-skills-manager/README_CN.md
Normal file
@@ -0,0 +1,56 @@
|
||||
# 🧰 OpenWebUI Skills 管理工具
|
||||
|
||||
**Author:** [Fu-Jie](https://github.com/Fu-Jie) | **Version:** 0.2.0 | **Project:** [OpenWebUI Extensions](https://github.com/Fu-Jie/openwebui-extensions)
|
||||
|
||||
一个 OpenWebUI 原生 Tool 插件,用于让任意模型直接管理 **Workspace > Skills**。
|
||||
|
||||
## 核心特性
|
||||
|
||||
- **🌐 全模型可用**:只要模型启用了 OpenWebUI Tools,即可调用。
|
||||
- **🛠️ 简化技能管理**:直接管理 OpenWebUI Skills 记录。
|
||||
- **🔐 用户范围安全**:仅操作当前用户可访问的技能。
|
||||
- **📡 友好状态反馈**:每一步操作都有状态栏提示。
|
||||
|
||||
## 使用方法
|
||||
|
||||
1. 打开 OpenWebUI,进入 **Workspace > Tools**。
|
||||
2. 新建 Tool,粘贴 `openwebui_skills_manager.py`。
|
||||
3. 为当前模型/聊天启用该工具。
|
||||
4. 在对话中让模型调用,例如:
|
||||
- “列出我的 skills”
|
||||
- “显示名为 docs-writer 的 skill”
|
||||
- “创建一个 meeting-notes 技能,内容是 ...”
|
||||
- “更新某个 skill ...”
|
||||
- “删除某个 skill ...”
|
||||
|
||||
## 配置参数(Valves)
|
||||
|
||||
| 参数 | 默认值 | 说明 |
|
||||
|---|---:|---|
|
||||
| `SHOW_STATUS` | `True` | 是否在 OpenWebUI 状态栏显示操作状态。 |
|
||||
| `ALLOW_OVERWRITE_ON_CREATE` | `False` | 是否允许 `create_skill`/`install_skill` 默认覆盖同名技能。 |
|
||||
| `INSTALL_FETCH_TIMEOUT` | `12.0` | 从 URL 安装技能时的请求超时时间(秒)。 |
|
||||
|
||||
## 支持的方法
|
||||
|
||||
| 方法 | 用途 |
|
||||
|---|---|
|
||||
| `list_skills` | 列出当前用户的技能。 |
|
||||
| `show_skill` | 通过 `skill_id` 或 `name` 查看单个技能。 |
|
||||
| `install_skill` | 通过 URL 安装技能到 OpenWebUI 原生 Skills。 |
|
||||
| `create_skill` | 创建新技能(或在允许时覆盖同名技能)。 |
|
||||
| `update_skill` | 更新技能字段(`new_name`、`description`、`content`、`is_active`)。 |
|
||||
| `delete_skill` | 通过 `skill_id` 或 `name` 删除技能。 |
|
||||
|
||||
## 支持
|
||||
|
||||
如果这个插件对你有帮助,欢迎到 [OpenWebUI Extensions](https://github.com/Fu-Jie/openwebui-extensions) 点个 Star,这将是我持续改进的动力,感谢支持。
|
||||
|
||||
## 其他说明
|
||||
|
||||
- 本工具管理 OpenWebUI 原生 Skills 记录,并支持通过 URL 直接安装。
|
||||
- 如需更复杂的工作流编排,可结合其他 Pipe/Tool 方案使用。
|
||||
|
||||
## 更新记录
|
||||
|
||||
完整历史请查看 GitHub 仓库的 commits 与 releases。
|
||||
1241
plugins/tools/openwebui-skills-manager/openwebui_skills_manager.py
Normal file
1241
plugins/tools/openwebui-skills-manager/openwebui_skills_manager.py
Normal file
File diff suppressed because it is too large
Load Diff
110
scripts/update_pipe.py
Normal file
110
scripts/update_pipe.py
Normal file
@@ -0,0 +1,110 @@
|
||||
import requests
|
||||
import json
|
||||
import os
|
||||
import re
|
||||
from pathlib import Path
|
||||
|
||||
# ─── Configuration ───────────────────────────────────────────────────────────
|
||||
SCRIPT_DIR = Path(__file__).parent
|
||||
ENV_FILE = SCRIPT_DIR / ".env"
|
||||
|
||||
URL = (
|
||||
"http://localhost:3003/api/v1/functions/id/github_copilot_official_sdk_pipe/update"
|
||||
)
|
||||
FILE_PATH = SCRIPT_DIR.parent / "plugins/pipes/github-copilot-sdk/github_copilot_sdk.py"
|
||||
|
||||
|
||||
def _load_api_key() -> str:
|
||||
"""Load API key from .env file in the same directory as this script.
|
||||
|
||||
The .env file should contain a line like:
|
||||
api_key=sk-xxxxxxxxxxxx
|
||||
"""
|
||||
if not ENV_FILE.exists():
|
||||
raise FileNotFoundError(
|
||||
f".env file not found at {ENV_FILE}. "
|
||||
"Please create it with: api_key=sk-xxxxxxxxxxxx"
|
||||
)
|
||||
|
||||
for line in ENV_FILE.read_text(encoding="utf-8").splitlines():
|
||||
line = line.strip()
|
||||
if line.startswith("api_key="):
|
||||
key = line.split("=", 1)[1].strip()
|
||||
if key:
|
||||
return key
|
||||
|
||||
raise ValueError("api_key not found in .env file.")
|
||||
|
||||
|
||||
def update_pipe() -> None:
|
||||
"""Push the latest local github_copilot_sdk.py content to OpenWebUI."""
|
||||
# 1. Load API key
|
||||
try:
|
||||
api_key = _load_api_key()
|
||||
except (FileNotFoundError, ValueError) as e:
|
||||
print(f"[ERROR] {e}")
|
||||
return
|
||||
|
||||
# 2. Read local source file
|
||||
if not FILE_PATH.exists():
|
||||
print(f"[ERROR] Source file not found: {FILE_PATH}")
|
||||
return
|
||||
|
||||
content = FILE_PATH.read_text(encoding="utf-8")
|
||||
|
||||
# 3. Extract version from docstring
|
||||
version_match = re.search(r"version:\s*([\d.]+)", content)
|
||||
version = version_match.group(1) if version_match else "0.9.0"
|
||||
|
||||
# 4. Build payload
|
||||
payload = {
|
||||
"id": "github_copilot_official_sdk_pipe",
|
||||
"name": "GitHub Copilot Official SDK Pipe",
|
||||
"meta": {
|
||||
"description": (
|
||||
"Integrate GitHub Copilot SDK. Supports dynamic models, "
|
||||
"multi-turn conversation, streaming, multimodal input, "
|
||||
"infinite sessions, and frontend debug logging."
|
||||
),
|
||||
"manifest": {
|
||||
"title": "GitHub Copilot Official SDK Pipe",
|
||||
"author": "Fu-Jie",
|
||||
"author_url": "https://github.com/Fu-Jie/openwebui-extensions",
|
||||
"funding_url": "https://github.com/open-webui",
|
||||
"openwebui_id": "ce96f7b4-12fc-4ac3-9a01-875713e69359",
|
||||
"description": (
|
||||
"Integrate GitHub Copilot SDK. Supports dynamic models, "
|
||||
"multi-turn conversation, streaming, multimodal input, "
|
||||
"infinite sessions, bidirectional OpenWebUI Skills bridge, "
|
||||
"and manage_skills tool."
|
||||
),
|
||||
"version": version,
|
||||
"requirements": "github-copilot-sdk==0.1.25",
|
||||
},
|
||||
"type": "pipe",
|
||||
},
|
||||
"content": content,
|
||||
}
|
||||
|
||||
# 5. Build headers — use long-lived API key instead of short-lived JWT
|
||||
headers = {
|
||||
"Accept": "application/json",
|
||||
"Content-Type": "application/json",
|
||||
"Authorization": f"Bearer {api_key}",
|
||||
}
|
||||
|
||||
# 6. Send update request
|
||||
print(f"Updating pipe with version {version}...")
|
||||
try:
|
||||
response = requests.post(URL, headers=headers, data=json.dumps(payload))
|
||||
if response.status_code == 200:
|
||||
print("✅ Successfully updated GitHub Copilot Official SDK Pipe!")
|
||||
else:
|
||||
print(f"❌ Failed to update. Status: {response.status_code}")
|
||||
print(f" Response: {response.text[:500]}")
|
||||
except Exception as e:
|
||||
print(f"❌ Request error: {e}")
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
update_pipe()
|
||||
Reference in New Issue
Block a user