# 🚀 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>
