github / github/app

[Requests and ideas] Title: Let canvas extensions invoke host/app capabilities (e.

Đang mở
#1,284 0 bình luận 3 reaction 0 người được giao Xem trên GitHub
Requests and ideas
Ngôn ngữ chính
Không có dữ liệu ngôn ngữ
Star
2.1k
Fork
153
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

**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 |

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Hướng nghiên cứu

Start with the canvas extension JSON-RPC protocol, session.rpc namespaces, and CopilotClient.createSession to map the existing boundary between extensions and host capabilities. Define a capability-gated host-action path for create_session and related actions, with completion shown by direct requests working consistently in interactive and automation contexts without synthetic user turns.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
node.js
Lĩnh vực
api, developer-experience
Loại issue
Tính năng
Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức độ hoạt động
Ít trao đổi
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
35/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.