Skip to content

Commit 2c6d082

Browse files
test(github): strengthen typed Copilot and UI outputs
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
1 parent ace3354 commit 2c6d082

15 files changed

Lines changed: 849 additions & 828 deletions

‎docs/typed-tool-schemas.md‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,4 +58,7 @@ request-scoped server.
5858
If a handler intentionally returns non-JSON text or content blocks, set
5959
`PreserveHandlerContent` in `TypedSchemaOptions`, or call
6060
`inventory.PreserveToolHandlerContent(ctx)` from the handler middleware for
61-
request-dependent output such as CSV.
61+
request-dependent output such as CSV. This is for intentional non-DTO responses
62+
such as resources, errors, or CSV; ordinary declared structured success must
63+
retain shared DTO serialization, with modern JSON text equal to
64+
`structuredContent`, even when legacy handler text was a plain mutation message.

‎pkg/github/__toolsnaps__/assign_copilot_to_issue.snap‎

Lines changed: 56 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,5 +47,60 @@
4747
],
4848
"type": "object"
4949
},
50-
"name": "assign_copilot_to_issue"
50+
"name": "assign_copilot_to_issue",
51+
"outputSchema": {
52+
"additionalProperties": false,
53+
"properties": {
54+
"issue_number": {
55+
"description": "The assigned issue's number.",
56+
"type": "integer"
57+
},
58+
"message": {
59+
"description": "Assignment outcome or tool error message.",
60+
"type": "string"
61+
},
62+
"note": {
63+
"description": "Additional status detail when Copilot has not created a pull request yet.",
64+
"type": "string"
65+
},
66+
"owner": {
67+
"type": "string"
68+
},
69+
"pull_request": {
70+
"additionalProperties": false,
71+
"properties": {
72+
"number": {
73+
"type": "integer"
74+
},
75+
"state": {
76+
"enum": [
77+
"OPEN",
78+
"CLOSED",
79+
"MERGED"
80+
],
81+
"type": "string"
82+
},
83+
"title": {
84+
"type": "string"
85+
}
86+
},
87+
"required": [
88+
"number",
89+
"state",
90+
"title"
91+
],
92+
"type": "object"
93+
},
94+
"repo": {
95+
"type": "string"
96+
}
97+
},
98+
"required": [
99+
"issue_number",
100+
"message",
101+
"owner",
102+
"repo"
103+
],
104+
"type": "object"
105+
}
51106
}

‎pkg/github/__toolsnaps__/assign_copilot_to_issue_typed.snap‎

Lines changed: 0 additions & 106 deletions
This file was deleted.

‎pkg/github/__toolsnaps__/assign_copilot_to_issue_with_intent.snap‎

Lines changed: 60 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,5 +68,64 @@
6868
],
6969
"type": "object"
7070
},
71-
"name": "assign_copilot_to_issue_with_intent"
71+
"name": "assign_copilot_to_issue_with_intent",
72+
"outputSchema": {
73+
"additionalProperties": false,
74+
"properties": {
75+
"is_suggestion": {
76+
"type": "boolean"
77+
},
78+
"issue_number": {
79+
"description": "The assigned issue's number.",
80+
"type": "integer"
81+
},
82+
"message": {
83+
"description": "Assignment outcome or tool error message.",
84+
"type": "string"
85+
},
86+
"note": {
87+
"description": "Additional status detail when Copilot has not created a pull request yet.",
88+
"type": "string"
89+
},
90+
"owner": {
91+
"type": "string"
92+
},
93+
"pull_request": {
94+
"additionalProperties": false,
95+
"properties": {
96+
"number": {
97+
"type": "integer"
98+
},
99+
"state": {
100+
"enum": [
101+
"OPEN",
102+
"CLOSED",
103+
"MERGED"
104+
],
105+
"type": "string"
106+
},
107+
"title": {
108+
"type": "string"
109+
}
110+
},
111+
"required": [
112+
"number",
113+
"state",
114+
"title"
115+
],
116+
"type": "object"
117+
},
118+
"repo": {
119+
"type": "string"
120+
}
121+
},
122+
"required": [
123+
"is_suggestion",
124+
"issue_number",
125+
"message",
126+
"owner",
127+
"repo"
128+
],
129+
"type": "object"
130+
}
72131
}

‎pkg/github/__toolsnaps__/assign_copilot_to_issue_with_intent_typed.snap‎

Lines changed: 0 additions & 131 deletions
This file was deleted.

0 commit comments

Comments
 (0)