-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathElicitationRequestedEvent.java
More file actions
54 lines (44 loc) · 1.88 KB
/
ElicitationRequestedEvent.java
File metadata and controls
54 lines (44 loc) · 1.88 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
*--------------------------------------------------------------------------------------------*/
package com.github.copilot.sdk.events;
import java.util.List;
import java.util.Map;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonProperty;
/**
* Event: elicitation.requested
* <p>
* Broadcast when the server or an MCP tool requests structured input from the
* user. Clients that have an elicitation handler should respond via
* {@code session.ui.handlePendingElicitation}.
*
* @since 1.0.0
*/
@JsonIgnoreProperties(ignoreUnknown = true)
public final class ElicitationRequestedEvent extends AbstractSessionEvent {
@JsonProperty("data")
private ElicitationRequestedData data;
@Override
public String getType() {
return "elicitation.requested";
}
public ElicitationRequestedData getData() {
return data;
}
public void setData(ElicitationRequestedData data) {
this.data = data;
}
@JsonIgnoreProperties(ignoreUnknown = true)
public record ElicitationRequestedData(@JsonProperty("requestId") String requestId,
@JsonProperty("toolCallId") String toolCallId, @JsonProperty("elicitationSource") String elicitationSource,
@JsonProperty("message") String message, @JsonProperty("mode") String mode,
@JsonProperty("requestedSchema") ElicitationRequestedSchema requestedSchema,
@JsonProperty("url") String url) {
}
@JsonIgnoreProperties(ignoreUnknown = true)
public record ElicitationRequestedSchema(@JsonProperty("type") String type,
@JsonProperty("properties") Map<String, Object> properties,
@JsonProperty("required") List<String> required) {
}
}