github / github/copilot-sdk

Feature Request: support fetching content from authenticated URLs supplied in a prompt

Đang mở
#2,682 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
Java
Star
10.5k
Fork
1.5k
Merge trung bình
1 ngày 14 giờ
Pull request đã merge (30 ngày)
129

Mô tả

## Problem

Prompts routinely reference documents by link — a specification, a design file, a dashboard, an internal wiki page. When the link requires authentication, the session cannot retrieve it. Anonymous links work, but internal engineering documents generally cannot be made anonymous, so the agent silently loses the most relevant context.

The failure mode is also unclear: an authorization failure, a missing connector, and an unsupported content type are not distinguishable from one another in the result.

## What is missing

- No supported mechanism for the caller to grant the session credentialed access to a referenced URL.
- No extension point for the host application to resolve a link on the session's behalf and return its content.
- No differentiated error reporting for fetch failures.

## Proposed behavior

- The host application can register a content resolver, so links matching a configured pattern are fetched by the host, using the host's own authentication, and returned to the session as context resources.
- Alternatively, the caller can supply scoped credentials for a specific host or domain.
- Fetch results are reported per link: fetched, unauthorized, unsupported type, or not attempted.
- Credentials are never exposed in prompts, model context, or logs.

## Example scenario

A prompt links to an internal specification page. The host application recognizes the domain, retrieves the content with the requesting user's authorization, and passes it to the session as a document resource.

## Acceptance criteria

- A documented extension point exists for host-mediated link resolution.
- Resolved content becomes session context with attribution to its source link.
- Failures are distinguishable by cause and surfaced to the caller.

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

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

Hướng nghiên cứu

Bắt đầu bằng cách xác định các API của SDK dành cho session, context-resource và host extension-point được mô tả trong issue. Theo dõi cách các liên kết được tham chiếu và các lỗi fetch hiện đang được biểu diễn, sau đó xác định contract của resolver, kết quả cho từng liên kết, việc quy nguồn và hành vi xử lý credential theo yêu cầu của các tiêu chí chấp nhận.

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

Đánh giá

Lĩnh vực
api, authentication, backend, security
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
Sôi nổ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.