Skip to content

Commit 5e737b4

Browse files
SamMorrowDrumsCopilotgithub-actions[bot]
authored
feat(issues): add typed metadata, comment, and dependency outputs (#3391)
* feat(issues): add typed metadata comment and dependency outputs Preserve legacy text and argument coercions while exposing protocol-gated structured issue outputs. Add modern, legacy, unknown-version, union-schema and API-error contracts. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * chore: regenerate license files Auto-generated by license-check workflow * chore: regenerate license files Auto-generated by license-check workflow * fix(issues): preserve zero pagination for duplicate search Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * refactor(issues): preserve compact typed output contracts Cache DTO schema inference, retain byte-exact handler text, and cover protocol, pagination and schema contracts. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * test(issues): bound encoded schema parity registration work Reuse immutable HTTP comparison servers and the SDK schema cache across the full parity matrix. Refresh inherited user timestamp descriptions in issue snapshots. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
1 parent c4ed8cb commit 5e737b4

18 files changed

Lines changed: 3396 additions & 311 deletions

‎README.md‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -616,6 +616,8 @@ The following sets of tools are available:
616616

617617
## Tools
618618

619+
The issue metadata (`list_issue_types`, `list_issue_fields`), comment (`add_issue_comment`, `update_issue_comment`), dependency (`issue_dependency_read`, `issue_dependency_write`), and duplicate-detection (`find_duplicate`) tools provide typed `outputSchema` and `structuredContent` for protocol `2026-07-28` and newer. Older or unknown protocol versions retain the same text responses without these fields. Tool errors do not return structured content. Dependency and duplicate-detection tools retain their existing feature gates.
620+
619621
<!-- START AUTOMATED TOOLS -->
620622
<details>
621623

‎docs/feature-flags.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -402,8 +402,8 @@ as output formatting) won't appear here.
402402
- `confidence_threshold`: Minimum similarity threshold a candidate must meet to be returned; higher values are stricter. When omitted, the API's high-precision default is used. The scale is defined by the API, so no client-side bounds are enforced. (number, optional)
403403
- `issue_number`: The number of the existing issue to find duplicates for (number, required)
404404
- `owner`: The owner of the repository (string, required)
405-
- `page`: Page number for pagination (min 1) (number, optional)
406-
- `perPage`: Results per page for pagination (min 1, max 100) (number, optional)
405+
- `page`: Page number for pagination (min 1). An explicit 0 is forwarded to the API as-is rather than being replaced with 1. (number, optional)
406+
- `perPage`: Results per page for pagination (min 1, max 100). An explicit 0 is forwarded to the API as-is rather than being replaced with 30. (number, optional)
407407
- `repo`: The name of the repository (string, required)
408408

409409
### `thread_resolution_reason`

‎pkg/github/__toolsnaps__/add_issue_comment.snap‎

Lines changed: 84 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,5 +51,88 @@
5151
],
5252
"type": "object"
5353
},
54-
"name": "add_issue_comment"
54+
"name": "add_issue_comment",
55+
"outputSchema": {
56+
"oneOf": [
57+
{
58+
"type": "null"
59+
},
60+
{
61+
"additionalProperties": false,
62+
"properties": {
63+
"html_url": {
64+
"description": "The web URL of the created issue comment.",
65+
"type": "string"
66+
},
67+
"id": {
68+
"description": "The ID of the created comment or reaction.",
69+
"type": "string"
70+
}
71+
},
72+
"required": [
73+
"id",
74+
"html_url"
75+
],
76+
"type": "object"
77+
},
78+
{
79+
"additionalProperties": false,
80+
"properties": {
81+
"id": {
82+
"description": "The ID of the created reaction.",
83+
"type": "string"
84+
}
85+
},
86+
"required": [
87+
"id"
88+
],
89+
"type": "object"
90+
},
91+
{
92+
"additionalProperties": false,
93+
"properties": {
94+
"comment": {
95+
"additionalProperties": false,
96+
"properties": {
97+
"html_url": {
98+
"description": "The web URL of the created issue comment.",
99+
"type": "string"
100+
},
101+
"id": {
102+
"description": "The ID of the created comment or reaction.",
103+
"type": "string"
104+
}
105+
},
106+
"required": [
107+
"id",
108+
"html_url"
109+
],
110+
"type": "object"
111+
},
112+
"reaction": {
113+
"additionalProperties": false,
114+
"properties": {
115+
"id": {
116+
"description": "The ID of the created reaction.",
117+
"type": "string"
118+
}
119+
},
120+
"required": [
121+
"id"
122+
],
123+
"type": "object"
124+
}
125+
},
126+
"required": [
127+
"comment",
128+
"reaction"
129+
],
130+
"type": "object"
131+
}
132+
],
133+
"type": [
134+
"object",
135+
"null"
136+
]
137+
}
55138
}

‎pkg/github/__toolsnaps__/find_duplicate_ff_duplicate_detection.snap‎

Lines changed: 64 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,12 @@
2020
"type": "string"
2121
},
2222
"page": {
23-
"description": "Page number for pagination (min 1)",
23+
"description": "Page number for pagination (min 1). An explicit 0 is forwarded to the API as-is rather than being replaced with 1.",
2424
"minimum": 1,
2525
"type": "number"
2626
},
2727
"perPage": {
28-
"description": "Results per page for pagination (min 1, max 100)",
28+
"description": "Results per page for pagination (min 1, max 100). An explicit 0 is forwarded to the API as-is rather than being replaced with 30.",
2929
"maximum": 100,
3030
"minimum": 1,
3131
"type": "number"
@@ -42,5 +42,66 @@
4242
],
4343
"type": "object"
4444
},
45-
"name": "find_duplicate"
45+
"name": "find_duplicate",
46+
"outputSchema": {
47+
"items": {
48+
"additionalProperties": false,
49+
"properties": {
50+
"confidence": {
51+
"description": "The API-provided confidence category.",
52+
"type": "string"
53+
},
54+
"issue": {
55+
"additionalProperties": false,
56+
"properties": {
57+
"html_url": {
58+
"description": "The web URL of the candidate issue.",
59+
"type": "string"
60+
},
61+
"number": {
62+
"description": "The candidate issue number.",
63+
"type": "integer"
64+
},
65+
"state": {
66+
"description": "The candidate issue state.",
67+
"type": "string"
68+
},
69+
"title": {
70+
"description": "The sanitized candidate issue title.",
71+
"type": "string"
72+
}
73+
},
74+
"required": [
75+
"number",
76+
"title",
77+
"state",
78+
"html_url"
79+
],
80+
"type": "object"
81+
},
82+
"likely_duplicate": {
83+
"description": "Whether the API considers this candidate a likely duplicate.",
84+
"type": "boolean"
85+
},
86+
"score": {
87+
"description": "Similarity score on the API-defined scale; null when the API does not return a score.",
88+
"type": [
89+
"null",
90+
"number"
91+
]
92+
}
93+
},
94+
"required": [
95+
"issue",
96+
"score",
97+
"confidence",
98+
"likely_duplicate"
99+
],
100+
"type": "object"
101+
},
102+
"type": [
103+
"null",
104+
"array"
105+
]
106+
}
46107
}

‎pkg/github/__toolsnaps__/issue_dependency_read_ff_issue_dependencies.snap‎

Lines changed: 71 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,5 +47,75 @@
4747
],
4848
"type": "object"
4949
},
50-
"name": "issue_dependency_read"
50+
"name": "issue_dependency_read",
51+
"outputSchema": {
52+
"additionalProperties": false,
53+
"properties": {
54+
"issues": {
55+
"description": "Related issues in the requested dependency direction.",
56+
"items": {
57+
"additionalProperties": false,
58+
"properties": {
59+
"html_url": {
60+
"description": "The web URL of the related issue.",
61+
"type": "string"
62+
},
63+
"number": {
64+
"description": "The related issue number.",
65+
"type": "integer"
66+
},
67+
"repository": {
68+
"description": "The related repository in owner/name form.",
69+
"type": "string"
70+
},
71+
"state": {
72+
"description": "The related issue state.",
73+
"type": "string"
74+
},
75+
"title": {
76+
"description": "The sanitized title of the related issue.",
77+
"type": "string"
78+
}
79+
},
80+
"required": [
81+
"number",
82+
"title",
83+
"state",
84+
"html_url"
85+
],
86+
"type": "object"
87+
},
88+
"type": [
89+
"null",
90+
"array"
91+
]
92+
},
93+
"pageInfo": {
94+
"additionalProperties": false,
95+
"properties": {
96+
"hasNextPage": {
97+
"description": "Whether another page of related issues is available.",
98+
"type": "boolean"
99+
},
100+
"nextPage": {
101+
"description": "The next page number, or 0 when no next page exists.",
102+
"type": "integer"
103+
}
104+
},
105+
"required": [
106+
"hasNextPage",
107+
"nextPage"
108+
],
109+
"type": "object"
110+
}
111+
},
112+
"required": [
113+
"issues",
114+
"pageInfo"
115+
],
116+
"type": [
117+
"null",
118+
"object"
119+
]
120+
}
51121
}

‎pkg/github/__toolsnaps__/issue_dependency_write_ff_issue_dependencies.snap‎

Lines changed: 83 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,5 +58,87 @@
5858
],
5959
"type": "object"
6060
},
61-
"name": "issue_dependency_write"
61+
"name": "issue_dependency_write",
62+
"outputSchema": {
63+
"additionalProperties": false,
64+
"properties": {
65+
"blocked_issue": {
66+
"additionalProperties": false,
67+
"properties": {
68+
"html_url": {
69+
"description": "The web URL of the issue.",
70+
"type": "string"
71+
},
72+
"number": {
73+
"description": "The issue number.",
74+
"type": "integer"
75+
},
76+
"repository": {
77+
"description": "The repository in owner/name form.",
78+
"type": "string"
79+
},
80+
"state": {
81+
"description": "The issue state.",
82+
"type": "string"
83+
},
84+
"title": {
85+
"description": "The sanitized issue title.",
86+
"type": "string"
87+
}
88+
},
89+
"required": [
90+
"number",
91+
"title",
92+
"state",
93+
"html_url"
94+
],
95+
"type": "object"
96+
},
97+
"blocking_issue": {
98+
"additionalProperties": false,
99+
"properties": {
100+
"html_url": {
101+
"description": "The web URL of the issue.",
102+
"type": "string"
103+
},
104+
"number": {
105+
"description": "The issue number.",
106+
"type": "integer"
107+
},
108+
"repository": {
109+
"description": "The repository in owner/name form.",
110+
"type": "string"
111+
},
112+
"state": {
113+
"description": "The issue state.",
114+
"type": "string"
115+
},
116+
"title": {
117+
"description": "The sanitized issue title.",
118+
"type": "string"
119+
}
120+
},
121+
"required": [
122+
"number",
123+
"title",
124+
"state",
125+
"html_url"
126+
],
127+
"type": "object"
128+
},
129+
"message": {
130+
"description": "Whether the dependency relationship was added or removed.",
131+
"type": "string"
132+
}
133+
},
134+
"required": [
135+
"blocked_issue",
136+
"blocking_issue",
137+
"message"
138+
],
139+
"type": [
140+
"null",
141+
"object"
142+
]
143+
}
62144
}

0 commit comments

Comments
 (0)