Skip to content

Commit 15e4b32

Browse files
SamMorrowDrumsCopilotgithub-actions[bot]
authored
refactor(search): type repository, user, org and commit search tools (#3395)
* feat(repos): complete typed repository tool outputs Migrate the remaining 17 repository tools to concrete inputs and outputs. Preserve existing content, mutations, scopes, filtering, and protocol gating; add wire and schema conformance coverage. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * chore(repos): exclude unrelated snapshot formatting drift Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * refactor(repos): compact typed repository outputs Replace raw REST output schemas with compact repository DTOs, retain one canonical snapshot per tool, and align modern JSON text with structured output while pinning legacy content. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * feat(issues): add typed consolidated issue tool contracts Preserve raw helper APIs and exact legacy text while exposing concrete output unions for modern protocols. Retain explicit awaiting statuses and real null responses without exposing SDK-generated error fallbacks. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * chore: regenerate license files Auto-generated by license-check workflow * refactor(issues): minimize consolidated typed outputs Project compact method-discriminated DTOs from API responses while preserving the separate legacy text formatter and explicit app-awaiting status. Cache strict schemas and keep only canonical snapshots. Strengthen null-member presence, schema size, and lockdown projection regressions. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * fix(issues): keep union property schemas portable Preserve forbidden variant properties as annotated schema objects rather than boolean schemas emitted by jsonschema-go. Cover Inspector's input paths and IFC labels on every issue-read method across protocols. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * test(issues): cover strict sub-issue output variants Reject unknown methods, states, field types, opaque values and API URL properties while covering nullable and empty method data. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * test(issues): pin compact comment user redaction Pin unchanged legacy profile/avatar fields separately from compact modern user projections and assert identical lockdown filtering and sanitization across protocols. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * fix(issues): restore main-identical advertised input schema Remove added custom-field union constraints and sentinel enums from the advertised issue-write input. Preserve runtime exactly-one validation and private strict-schema tests. All three scoped input schemas compare exactly equal to main. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * fix(issues): restore protocol output parity Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * chore: regenerate license files Auto-generated by license-check workflow * refactor(issues): minimize granular structured outputs Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> # Conflicts: # pkg/github/__toolsnaps__/add_sub_issue.snap # pkg/github/__toolsnaps__/remove_sub_issue.snap # pkg/github/__toolsnaps__/reprioritize_sub_issue.snap # pkg/github/granular_issue_types.go # pkg/github/issues_granular.go # pkg/github/typed_granular_issue_outputs_test.go # Please enter the commit message for your changes. Lines starting # with '#' will be ignored, and an empty message aborts the commit. # # interactive rebase in progress; onto 1973eee # Last command done (1 command done): # pick 5b8f9d19 # refactor(issues): minimize granular structured outputs # No commands remaining. # You are currently rebasing. # # Changes to be committed: # modified: pkg/github/__toolsnaps__/add_issue_comment_reaction.snap # modified: pkg/github/__toolsnaps__/add_issue_reaction.snap # modified: pkg/github/__toolsnaps__/add_sub_issue.snap # modified: pkg/github/__toolsnaps__/create_issue.snap # modified: pkg/github/__toolsnaps__/hide_issue_comment.snap # modified: pkg/github/__toolsnaps__/remove_issue_comment_reaction.snap # modified: pkg/github/__toolsnaps__/remove_issue_reaction.snap # modified: pkg/github/__toolsnaps__/remove_sub_issue.snap # modified: pkg/github/__toolsnaps__/reprioritize_sub_issue.snap # modified: pkg/github/__toolsnaps__/set_issue_fields.snap # modified: pkg/github/__toolsnaps__/unhide_issue_comment.snap # modified: pkg/github/__toolsnaps__/update_issue_assignees.snap # modified: pkg/github/__toolsnaps__/update_issue_body.snap # modified: pkg/github/__toolsnaps__/update_issue_labels.snap # modified: pkg/github/__toolsnaps__/update_issue_milestone.snap # modified: pkg/github/__toolsnaps__/update_issue_state.snap # modified: pkg/github/__toolsnaps__/update_issue_title.snap # modified: pkg/github/__toolsnaps__/update_issue_type.snap # modified: pkg/github/comment_minimize_test.go # new file: pkg/github/granular_issue_types.go # modified: pkg/github/granular_tools_test.go # modified: pkg/github/issues_granular.go # new file: pkg/github/typed_granular_issue_outputs_test.go # * refactor(search): use typed account repository and commit tools Preserve legacy text and search semantics while publishing protocol-gated concrete structured outputs. Cover modern, legacy, and unknown clients, full repository JSON unions, defaults, IFC labels, and errors. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * refactor(search): compact typed repository search output Replace the full REST repository mirror with MinimalRepository-based structured items plus purpose-built full-mode details. Legacy text remains unchanged, and canonical snapshots now hold the modern output schema. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * refactor(search): expose repository visibility enum Remove the derivable node_id from compact full repository search output and publish the visibility enum in the static output schema. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * test(search): align snapshots with protocol wrapper Keep the modern text assertion aligned with structured content after the shared output wrapper change. 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 d6a8ac1 commit 15e4b32

8 files changed

Lines changed: 1363 additions & 109 deletions

‎pkg/github/__toolsnaps__/search_commits.snap‎

Lines changed: 354 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,5 +44,358 @@
4444
],
4545
"type": "object"
4646
},
47-
"name": "search_commits"
47+
"name": "search_commits",
48+
"outputSchema": {
49+
"additionalProperties": false,
50+
"properties": {
51+
"incomplete_results": {
52+
"type": "boolean"
53+
},
54+
"items": {
55+
"items": {
56+
"additionalProperties": false,
57+
"properties": {
58+
"author": {
59+
"additionalProperties": false,
60+
"properties": {
61+
"avatar_url": {
62+
"type": "string"
63+
},
64+
"details": {
65+
"additionalProperties": false,
66+
"properties": {
67+
"bio": {
68+
"type": "string"
69+
},
70+
"blog": {
71+
"type": "string"
72+
},
73+
"company": {
74+
"type": "string"
75+
},
76+
"created_at": {
77+
"description": "Account creation time in RFC3339 format.",
78+
"type": "string"
79+
},
80+
"email": {
81+
"type": "string"
82+
},
83+
"followers": {
84+
"type": "integer"
85+
},
86+
"following": {
87+
"type": "integer"
88+
},
89+
"hireable": {
90+
"type": "boolean"
91+
},
92+
"location": {
93+
"type": "string"
94+
},
95+
"name": {
96+
"type": "string"
97+
},
98+
"owned_private_repos": {
99+
"type": "integer"
100+
},
101+
"private_gists": {
102+
"type": "integer"
103+
},
104+
"public_gists": {
105+
"type": "integer"
106+
},
107+
"public_repos": {
108+
"type": "integer"
109+
},
110+
"total_private_repos": {
111+
"type": "integer"
112+
},
113+
"twitter_username": {
114+
"type": "string"
115+
},
116+
"updated_at": {
117+
"description": "Last profile update time in RFC3339 format.",
118+
"type": "string"
119+
}
120+
},
121+
"required": [
122+
"public_repos",
123+
"public_gists",
124+
"followers",
125+
"following",
126+
"created_at",
127+
"updated_at"
128+
],
129+
"type": [
130+
"null",
131+
"object"
132+
]
133+
},
134+
"id": {
135+
"type": "integer"
136+
},
137+
"login": {
138+
"type": "string"
139+
},
140+
"profile_url": {
141+
"type": "string"
142+
}
143+
},
144+
"required": [
145+
"login"
146+
],
147+
"type": [
148+
"null",
149+
"object"
150+
]
151+
},
152+
"commit": {
153+
"additionalProperties": false,
154+
"properties": {
155+
"author": {
156+
"additionalProperties": false,
157+
"properties": {
158+
"date": {
159+
"type": "string"
160+
},
161+
"email": {
162+
"type": "string"
163+
},
164+
"name": {
165+
"type": "string"
166+
}
167+
},
168+
"type": [
169+
"null",
170+
"object"
171+
]
172+
},
173+
"committer": {
174+
"additionalProperties": false,
175+
"properties": {
176+
"date": {
177+
"type": "string"
178+
},
179+
"email": {
180+
"type": "string"
181+
},
182+
"name": {
183+
"type": "string"
184+
}
185+
},
186+
"type": [
187+
"null",
188+
"object"
189+
]
190+
},
191+
"message": {
192+
"type": "string"
193+
}
194+
},
195+
"required": [
196+
"message"
197+
],
198+
"type": [
199+
"null",
200+
"object"
201+
]
202+
},
203+
"committer": {
204+
"additionalProperties": false,
205+
"properties": {
206+
"avatar_url": {
207+
"type": "string"
208+
},
209+
"details": {
210+
"additionalProperties": false,
211+
"properties": {
212+
"bio": {
213+
"type": "string"
214+
},
215+
"blog": {
216+
"type": "string"
217+
},
218+
"company": {
219+
"type": "string"
220+
},
221+
"created_at": {
222+
"description": "Account creation time in RFC3339 format.",
223+
"type": "string"
224+
},
225+
"email": {
226+
"type": "string"
227+
},
228+
"followers": {
229+
"type": "integer"
230+
},
231+
"following": {
232+
"type": "integer"
233+
},
234+
"hireable": {
235+
"type": "boolean"
236+
},
237+
"location": {
238+
"type": "string"
239+
},
240+
"name": {
241+
"type": "string"
242+
},
243+
"owned_private_repos": {
244+
"type": "integer"
245+
},
246+
"private_gists": {
247+
"type": "integer"
248+
},
249+
"public_gists": {
250+
"type": "integer"
251+
},
252+
"public_repos": {
253+
"type": "integer"
254+
},
255+
"total_private_repos": {
256+
"type": "integer"
257+
},
258+
"twitter_username": {
259+
"type": "string"
260+
},
261+
"updated_at": {
262+
"description": "Last profile update time in RFC3339 format.",
263+
"type": "string"
264+
}
265+
},
266+
"required": [
267+
"public_repos",
268+
"public_gists",
269+
"followers",
270+
"following",
271+
"created_at",
272+
"updated_at"
273+
],
274+
"type": [
275+
"null",
276+
"object"
277+
]
278+
},
279+
"id": {
280+
"type": "integer"
281+
},
282+
"login": {
283+
"type": "string"
284+
},
285+
"profile_url": {
286+
"type": "string"
287+
}
288+
},
289+
"required": [
290+
"login"
291+
],
292+
"type": [
293+
"null",
294+
"object"
295+
]
296+
},
297+
"files": {
298+
"items": {
299+
"additionalProperties": false,
300+
"properties": {
301+
"additions": {
302+
"type": "integer"
303+
},
304+
"changes": {
305+
"type": "integer"
306+
},
307+
"deletions": {
308+
"type": "integer"
309+
},
310+
"filename": {
311+
"type": "string"
312+
},
313+
"patch": {
314+
"type": "string"
315+
},
316+
"status": {
317+
"type": "string"
318+
}
319+
},
320+
"required": [
321+
"filename"
322+
],
323+
"type": "object"
324+
},
325+
"type": [
326+
"null",
327+
"array"
328+
]
329+
},
330+
"html_url": {
331+
"type": "string"
332+
},
333+
"repository": {
334+
"additionalProperties": false,
335+
"properties": {
336+
"full_name": {
337+
"type": "string"
338+
},
339+
"html_url": {
340+
"type": "string"
341+
},
342+
"private": {
343+
"type": "boolean"
344+
}
345+
},
346+
"required": [
347+
"full_name"
348+
],
349+
"type": [
350+
"null",
351+
"object"
352+
]
353+
},
354+
"sha": {
355+
"type": "string"
356+
},
357+
"stats": {
358+
"additionalProperties": false,
359+
"properties": {
360+
"additions": {
361+
"type": "integer"
362+
},
363+
"deletions": {
364+
"type": "integer"
365+
},
366+
"total": {
367+
"type": "integer"
368+
}
369+
},
370+
"type": [
371+
"null",
372+
"object"
373+
]
374+
}
375+
},
376+
"required": [
377+
"sha",
378+
"html_url"
379+
],
380+
"type": "object"
381+
},
382+
"type": [
383+
"null",
384+
"array"
385+
]
386+
},
387+
"total_count": {
388+
"type": "integer"
389+
}
390+
},
391+
"required": [
392+
"total_count",
393+
"incomplete_results",
394+
"items"
395+
],
396+
"type": [
397+
"null",
398+
"object"
399+
]
400+
}
48401
}

0 commit comments

Comments
 (0)