import { AgentProvider } from "../../../../../../platform/agentHost/common/agent.js"; import { ProtectedResourceMetadata } from "../../../../../../platform/agentHost/common/state/protocol/state.js"; import { Event } from "../../../../../../sessions/sessions.web.main.internal.js"; export declare const IAgentHostProtectedResourcesService: import("../../../../../../platform/instantiation/common/instantiation.js").ServiceIdentifier; /** * Tracks the protected resources each live agent-host provider currently * advertises, and signals — with the provider in the payload — when that set * changes. Consumers derive higher-level facts from the raw resources (e.g. * whether a session type requires GitHub Copilot sign-in right now: Claude in * native mode / Codex on OpenAI advertise the Copilot resource with * `required: false`, so they are usable without signing in) and filter * {@link onDidChange} to the provider they care about. * * This is the single source for that "resources + change signal" so consumers * don't each re-watch root state. */ export interface IAgentHostProtectedResourcesService { readonly _serviceBrand: undefined; /** * Fires the {@link AgentProvider provider id} whose advertised * protected-resource set just changed. The payload lets a consumer filter to * the single provider it cares about (`Event.filter(onDidChange, p => p === id)`) * rather than depending on the service to scope it. */ readonly onDidChange: Event; /** * The protected resources the agent for `providerId` currently advertises, or * `undefined` when no such agent is resolved yet (callers treat this as * "not known" and fall back to a conservative default). */ getProtectedResources(providerId: AgentProvider): readonly ProtectedResourceMetadata[] | undefined; }