github / github/copilot-sdk

Expose session-scoped in-memory skill providers

Ouverte
#2,651 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub
Langage dominant
Java
Étoiles
10.5k
Forks
1.5k
Merge moyen
1 j 14 h
PR mergées (30 j)
129

Description

## Use case

An SDK host may manage reusable skills in its own data store rather than in a project directory. We would like those skills to participate in Copilot's normal skill catalog and native `skill` tool, alongside file-based skills, without:

- materializing and synchronizing `SKILL.md` files;
- registering a second skill-loading tool;
- replacing the native skill tool and reimplementing its fallback/activation behavior.

Custom agents and MCP servers already have programmatic session configuration; skill content currently has no equivalent public provider in the .NET SDK.

## Existing runtime support

The published CLI 1.0.83 protocol already contains the internal/experimental `skillProvider.list` and `skillProvider.read` callbacks and the `hasSkillProvider` session flag. It identifies these as lazy, pathless, text-only SDK skills. The .NET SDK does not expose the corresponding handwritten session registration API.

I understand that keeping these transport callbacks out of the generated public handler surface is intentional: see github/copilot-sdk#2494. This proposal is for a small, idiomatic public facade, not for making the raw internal callbacks public or changing the generator.

## Proposed behavior for discussion

- An optional session-scoped provider lists skill metadata and reads complete Markdown on demand.
- Register the provider before create/resume so early runtime callbacks can be handled.
- The native `skill` tool performs activation; no extra tool or native-tool override.
- Re-supply the provider on resume; it is not serialized into session history.
- Leave sessions without a provider unchanged.
- Respect `EnableSkills = false`, native invocation flags, cancellation, and session ownership.
- Keep this text-only: no asset provider, virtual filesystem, or new storage layer.

A possible .NET shape is an experimental `SessionConfigBase.SkillProvider` backed by asynchronous `ListAsync` and `ReadAsync` methods. The exact API and cross-language equivalents should be aligned with the maintainers.

## Investigation and prototype

A local prototype using the existing CLI 1.0.83 runtime has exercised:

- lazy native activation without skill directories;
- coexistence with native file-based skills;
- create/resume binding and reloading updated content;
- native subagent invocation and assigned-skill preloading;
- source-generated .NET JSON serialization with reflection disabled.

This is not a claim that the internal protocol is a supported public contract. I would like to confirm whether exposing this capability is on the roadmap and what public API/compatibility policy the team prefers.

## Maintainer alignment

The contribution guide asks for feature discussion before a review-ready implementation and notes the need for language parity. I am opening this proposal first. A linked draft .NET PR can serve as a concrete, tested implementation for discussion; it would not imply that the feature or .NET-only rollout has been agreed.

Would the team be interested in this facade, and is there an existing planned implementation or issue it should align with?

Guide de contribution

Ouvrir le guide de contribution

Piste de recherche

Commencez par la configuration de session SessionConfigBase existante et les callbacks skillProvider.list/read de la CLI 1.0.83, en utilisant github/copilot-sdk#2494 comme contexte pour la surface des handlers générés. Le travail sera considéré comme terminé lorsqu’un accord des maintainers aura été obtenu sur une API de provider publique et limitée à la session, ainsi que sur ses exigences de compatibilité et de parité linguistique, avant l’implémentation.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
csharp
Domaine
api
Type d'issue
Fonctionnalité
Difficulté
5/5
Temps estimé
Plus d'une semaine
Activité
Active
Clarté
À clarifier
Accessibilité débutants
35/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.