diff --git a/website/src/content/docs/learning-hub/automating-with-hooks.md b/website/src/content/docs/learning-hub/automating-with-hooks.md index 866c0515..56ab02fa 100644 --- a/website/src/content/docs/learning-hub/automating-with-hooks.md +++ b/website/src/content/docs/learning-hub/automating-with-hooks.md @@ -3,7 +3,7 @@ title: 'Automating with Hooks' description: 'Learn how to use hooks to automate lifecycle events like formatting, linting, and governance checks during Copilot agent sessions.' authors: - GitHub Copilot Learning Hub Team -lastUpdated: 2026-06-25 +lastUpdated: 2026-07-13 estimatedReadingTime: '8 minutes' tags: - hooks @@ -392,6 +392,8 @@ Block dangerous commands before they execute. Use the `matcher` field to target The `preToolUse` hook receives JSON input with details about the tool being called. Your script can inspect this input and exit with a non-zero code to **deny** the tool execution, or exit with zero to **approve** it. +> **Exit code 2 — silent deny (v1.0.69+)**: A `preToolUse` hook that exits with code `2` **denies the tool call silently** — the agent receives a denial without any error message being surfaced to the user. This is useful when you want to block a tool call as a policy decision without triggering a noisy failure (for example, blocking network access in CI without alarming users). Exit with any other non-zero code (e.g., `1`) to deny and show an error message. + ### Modifying Tool Arguments with preToolUse Beyond approve/deny, `preToolUse` hooks can also **modify tool arguments** before they are passed to the tool, and inject **additional context** into the agent's reasoning. To do this, write JSON to stdout from your hook script: diff --git a/website/src/content/docs/learning-hub/copilot-configuration-basics.md b/website/src/content/docs/learning-hub/copilot-configuration-basics.md index 029501f2..6dac387b 100644 --- a/website/src/content/docs/learning-hub/copilot-configuration-basics.md +++ b/website/src/content/docs/learning-hub/copilot-configuration-basics.md @@ -3,7 +3,7 @@ title: 'Copilot Configuration Basics' description: 'Learn how to configure GitHub Copilot at user, workspace, and repository levels to optimize your AI-assisted development experience.' authors: - GitHub Copilot Learning Hub Team -lastUpdated: 2026-07-09 +lastUpdated: 2026-07-13 estimatedReadingTime: '10 minutes' tags: - configuration @@ -459,6 +459,17 @@ The `/settings` command (v1.0.61+) opens an interactive dialog to browse and edi The settings dialog supports search — type to filter settings by name. Changes take effect immediately. +*(v1.0.70+)* The `/settings` command and the `/model` command both support **`--repo` and `--local` flags** for explicitly scoping which layer of settings you want to view or edit: + +``` +/settings --repo # view/edit repository-scoped settings +/settings --local # view/edit local (user-level) settings +/model --repo # view/edit the model pinned for this repository +/model --local # view/edit your personal model preference +``` + +These flags mirror the **Repo** and **Repo (local)** scope tabs available in the `/settings` dashboard (v1.0.71+), making it easier to manage per-repository vs. user-global configuration without ambiguity. In v1.0.71+, the `/settings` dashboard also shows **Repo** and **Repo (local)** tabs alongside the existing user-level view, giving you a unified place to see which settings are applied at each layer. + GitHub Copilot CLI has two commands for managing session state, with distinct behaviours: | Command | Behaviour | @@ -570,6 +581,16 @@ The `/pr auto` command *(v1.0.66+)* starts a self-paced automation loop that dri `/pr auto` is ideal when you have a PR with failing tests or linting errors — let it work through failures one at a time while you focus on other things. `/pr automerge` extends this further: it continues until all CI checks pass, required reviews are approved, and the PR is successfully merged. Both commands can be monitored and stopped from `/loop` or `/every`, which register the running automation as a scheduleable loop task. +The `/delegate` command creates a **delegate PR** — a pull request that the coding agent works on autonomously. By default, the delegate PR targets your current branch. Use `--base` *(v1.0.69+)* to specify a different target base branch: + +``` +/delegate # create a delegate PR targeting the current branch +/delegate --base main # create a delegate PR targeting main +/delegate --base release/2.0 # target a specific release branch +``` + +This is useful when you want to hand off a task to the coding agent on a specific branch — for example, backporting a fix to an older release branch or targeting a long-lived feature branch for automated work. + The `/share html` command exports the current session — including conversation history and any research reports — as a **self-contained interactive HTML file**: ``` diff --git a/website/src/content/docs/learning-hub/creating-effective-skills.md b/website/src/content/docs/learning-hub/creating-effective-skills.md index 379ab599..d9ba88a4 100644 --- a/website/src/content/docs/learning-hub/creating-effective-skills.md +++ b/website/src/content/docs/learning-hub/creating-effective-skills.md @@ -3,7 +3,7 @@ title: 'Creating Effective Skills' description: 'Master the art of writing reusable, shareable skill folders that deliver consistent results across your team.' authors: - GitHub Copilot Learning Hub Team -lastUpdated: 2026-06-30 +lastUpdated: 2026-07-13 estimatedReadingTime: '9 minutes' tags: - skills @@ -405,7 +405,7 @@ A: Yes, for clarity. Show examples of desired output format, patterns to follow, **Q: How do I review agent-proposed skill changes?** -A: In v1.0.66+, the agent can propose draft skill additions or improvements as it discovers reusable patterns during a session. Review each draft interactively with: +A: In v1.0.66+, the agent can propose draft skill additions or improvements as it discovers reusable patterns during a session. In v1.0.70+, **Forge** actively identifies clear workflow patterns during your session and creates draft skills automatically — you don't need to ask. Review each draft interactively with: ``` /chronicle skills review diff --git a/website/src/content/docs/learning-hub/installing-and-using-plugins.md b/website/src/content/docs/learning-hub/installing-and-using-plugins.md index fe8a1d6c..4733a4ba 100644 --- a/website/src/content/docs/learning-hub/installing-and-using-plugins.md +++ b/website/src/content/docs/learning-hub/installing-and-using-plugins.md @@ -3,7 +3,7 @@ title: 'Installing and Using Plugins' description: 'Learn how to find, install, and manage plugins that extend GitHub Copilot CLI with reusable agents, skills, hooks, and integrations.' authors: - GitHub Copilot Learning Hub Team -lastUpdated: 2026-07-09 +lastUpdated: 2026-07-13 estimatedReadingTime: '8 minutes' tags: - plugins diff --git a/website/src/content/docs/learning-hub/understanding-mcp-servers.md b/website/src/content/docs/learning-hub/understanding-mcp-servers.md index 77cd140c..3e02a142 100644 --- a/website/src/content/docs/learning-hub/understanding-mcp-servers.md +++ b/website/src/content/docs/learning-hub/understanding-mcp-servers.md @@ -3,7 +3,7 @@ title: 'Understanding MCP Servers' description: 'Learn how Model Context Protocol servers extend GitHub Copilot with access to external tools, databases, and APIs.' authors: - GitHub Copilot Learning Hub Team -lastUpdated: 2026-07-06 +lastUpdated: 2026-07-13 estimatedReadingTime: '8 minutes' tags: - mcp @@ -147,6 +147,18 @@ The available RPCs are: These are especially useful for plugins and installer scripts that need to self-register or de-register their MCP server as part of install/uninstall flows, without requiring the user to manually edit config files. +### Reading MCP Server Resources via Session RPCs + +*(v1.0.70+)* In addition to config management, GitHub Copilot CLI exposes **paginated session RPCs** for reading resources exposed by connected MCP servers. These let agents and tooling access server-provided resource lists and templates without needing direct MCP protocol access: + +| RPC | Description | +|-----|-------------| +| `session.mcp.resources.read` | Read a specific resource from a connected MCP server | +| `session.mcp.resources.list` | List resources available on a connected MCP server (paginated) | +| `session.mcp.resources.listTemplates` | List resource templates exposed by a connected MCP server (paginated) | + +Pagination support means these RPCs work reliably even when a server exposes a large number of resources. This is particularly useful for MCP servers that expose dynamic resource collections (such as database schemas or file trees) that need to be enumerated programmatically by agents or scripts. + ### Common MCP Server Configurations **PostgreSQL** — Query databases and inspect schemas: