feat(github-copilot-sdk): add workspace skills support (v0.9.0) (#51)

* feat(github-copilot-sdk): add workspace skills support

- Introduce ENABLE_WORKSPACE_SKILLS valve to enable/disable workspace custom tools discovery
- Modify _build_session_config() to auto-load tools from .copilot-skills/ directory
- Add workspace_skills_example.py template with 3 working example tools
- Update README.md and README_CN.md with Workspace Skills guide and usage examples
- Create v0.9.0.md and v0.9.0_CN.md release notes
- Sync version to all docs files (index.md, index.zh.md, and main docs)
- Bump version from 0.8.0 to 0.9.0 across all 7+ locations

* docs: establish temp files handling policy (project-based, not /tmp)

- Add TEMP_FILES_POLICY.md guideline for all skills and workflows
- Update pr-submitter skill to use .temp/ directory instead of /tmp
- Update release-prep skill documentation with temp file convention
- Add .temp/ and .build/ entries to .gitignore
- Create internal policy memo in /memories/repo/

This policy ensures:
- All temporary files stay within project workspace (not system /tmp)
- Alignment with OpenWebUI workspace isolation principles
- Multi-user safety and cleanup traceability
- Consistent handling across all skills and development workflows

* fix(terminology): rename 'workspace skills' to 'workspace custom tools' for accuracy

The term 'Skills' in Anthropic context refers to instruction-based frameworks
(SKILL.md files with YAML frontmatter + markdown), not custom tool functions.

Our implementation uses @define_tool decorator to define custom tools that the
SDK auto-discovers from .copilot-skills/ directory. These are Tools, not Skills.

Changes:
- Rename ENABLE_WORKSPACE_SKILLS valve -> ENABLE_WORKSPACE_TOOLS
- Update all documentation (README, README_CN, docs, release notes)
- Fix section headings and descriptions throughout
- Ensure consistent terminology across all files

This is a terminology-only change; functionality remains identical.

* feat(pipes): release v0.9.0 of GitHub Copilot SDK Pipe

- Integrated OpenWebUI Skills Bridge and manage_skills tool
- Reinforced status bar stability with session_finalized logic
- Added persistent SDK config directory support

* docs(pipes): add comprehensive guides and v0.9.0 notes for Copilot SDK

- Added skill manager and best practices guides
- Added publishing tool documentation
- Included v0.9.0 release notes and deployment script
- Updated usage guides
This commit is contained in:
Fu-Jie
2026-02-28 03:50:56 +08:00
committed by GitHub
parent f47c3f6354
commit 0c7201902c
26 changed files with 4564 additions and 441 deletions

View File

@@ -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)