[Requests and ideas] Title: Let canvas extensions invoke host/app capabilities (e.
- Lenguaje dominante
- Sin datos de lenguaje
- Estrellas
- 2.1k
- Forks
- 153
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Descripción
**Mood:** 😔
**Category:** Requests and ideas
Title: Let canvas extensions invoke host/app capabilities (e.g. create_session) without round-tripping through an agent turn
What I'm building
I built a user-scoped canvas extension ("Quest Board") that turns my Daily Brief into gamified XP quests. Each quest card has a Start session button: it should open a new Copilot session seeded with that quest's full context so I can start working on it immediately.
The gap
A canvas extension runs as a forked Node process speaking the extension JSON-RPC protocol. It has no way to create a session. Session creation (create_session, plus the related orchestration tools like list_projects, open_pr_session, send_session_message) is an app/agent capability — it's exposed to the agent as a tool, but it is not on the extension SDK surface. I checked session.rpc: the available namespaces are send, abort, suspend, shutdown, auth, canvas, model, mode, plan, fleet, agent/tasks, schedule, etc. — none create an app project-session. The only createSession in the SDK lives on CopilotClient (the host that owns the runtime), which an extension can't reach.
The workaround (and why it's awkward)
The only lever an extension has is session.send(), which injects a user turn into the current session; the agent in that turn then calls create_session. So my button has to "send a message on the user's behalf." It works, but:
It pollutes the transcript with a turn the user didn't type (it reads like the extension is impersonating me).
It only works in an interactive session. From a non-interactive/automation run there's no agent to surface a turn, so I had to add a marker-file relay (session-request.json) that any other open interactive board claims and replays — extra moving parts for what should be one call.
I had to push the real instructions into a hidden onUserPromptSubmitted additionalContext hook just to keep the visible message clean. Clever, but clearly working around a missing API.
What I'd like
A sanctioned, capability-gated way for a canvas/extension to request host actions directly, e.g.:
session.host.createSession({ projectId, kickoffPrompt, mode }) (and friends: listProjects, openPr, openIssue, sendSessionMessage), or
a generic "request host tool invocation" bridge the user can permission-gate, so extensions can call the same orchestration tools the agent already has.
Ideally gated behind a capability flag (like elicitation is) so the host stays in control and can prompt for consent. This would let canvas buttons (Start session, open PR, jump to another session, schedule a workflow) work in one clean call — no synthetic user turns, no marker-file relays, and consistent behavior between interactive and automation contexts.
Why it matters
Canvas extensions are positioned as rich, interactive surfaces, but right now their buttons can only talk to the agent, not act on the host. Closing that gap would make them feel like first-class app UI instead of indirect prompt-injectors.
---
| Field | Value |
| --- | --- |
| App version | 1.0.2 |
| OS | Windows 10.0.26200 |
| Theme | GitHub |
| Path | /chat |
| Tenure | Week 2 |
Guía de contribución
Línea de trabajo
Empieza por el canvas extension JSON-RPC protocol, los session.rpc namespaces y CopilotClient.createSession para mapear el límite existente entre las extensiones y las capacidades del host. Define una ruta de acciones del host condicionada por capabilities para create_session y las acciones relacionadas, y demuestra la finalización haciendo que las solicitudes directas funcionen de forma coherente tanto en contextos interactivos como de automatización, sin turnos de usuario sintéticos.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- node.js
- Área
- api, developer-experience
- Tipo de issue
- Nueva funcionalidad
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Estado de actividad
- Tranquilo
- Claridad
- Bastante claro
- Aptitud para principiantes
- 35/100