2
>
* Copyright (c) Microsoft Corporation. All rights reserved.
3
>
* Licensed under the MIT License. See License.txt in the project root for license information.
4
>
*--------------------------------------------------------------------------------------------*/
5
>
6
>
import type { URI as ProtocolURI } from './state/sessionState.js';
7
>
import { createDecorator } from '../../instantiation/common/instantiation.js';
8
>
9
>
export const IAgentHostChangesetSubscriptionService = createDecorator<IAgentHostChangesetSubscriptionService>('agentHostChangesetSubscriptionService');
10
>
11
>
/**
12
>
* Shared changeset subscription registry. The coordinator records subscription
13
>
* lifecycle changes here; compute services read the current per-session set.
14
>
*/
15
>
export interface IAgentHostChangesetSubscriptionService {
16
>
readonly _serviceBrand: undefined;
17
>
18
>
/**
19
>
* Returns the set of changeset URIs currently subscribed for `session`.
20
>
* Empty when the session has no active changeset subscribers.
21
>
*/
22
>
getSessionSubscriptions(session: ProtocolURI): ReadonlySet<ProtocolURI>;
23
>
24
>
/**
25
>
* Adds `changeset` to the active subscription set for `session`.
26
>
*/
27
>
addSubscription(session: ProtocolURI, changeset: ProtocolURI): void;
28
>
29
>
/**
30
>
* Removes `changeset` from the active subscription set for `session`.
31
>
*/
32
>
removeSubscription(session: ProtocolURI, changeset: ProtocolURI): void;
33
>
34
>
/**
35
>
* Drops every active subscription for `session`.
36
>
*/
37
>
clearSessionSubscriptions(session: ProtocolURI): void;
38
>
}