Skip to content

Commit 9cbd4b2

Browse files
feat(context): add typed tool schemas and outputs (#3377)
* feat(context): add typed tool schemas and outputs Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * fix(context): preserve legacy input acceptance Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * test(context): preserve input schema roots and optionality Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * fix(context): validate direct team member calls Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * test(context): pin structured output and legacy text fixtures Describe profile timestamps and validate null and empty team outputs against modern schemas while retaining exact legacy text. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * fix(context): emit structured empty team collections Keep legacy null text while returning nonnil typed slices so modern clients receive structured content for empty successful results. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * fix(context): preserve legacy team input schemas Keep empty identifier rejection in the handler without tightening the published input schema. Pin modern text to structured output and preserve the legacy formatter fixtures. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * fix(context): preserve advertised input schema compatibility Keep legacy-visible schemas byte-compatible while applying unknown-field acceptance only to the cached runtime validation schema. Verify modern DTO text parity and preserve legacy formatted text. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * fix(context): reject explicit null team user arguments Preserve the legacy optional user type error before typed decoding, without changing omitted or empty user fallback. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * fix(context): preserve exact routing argument keys Ignore case-variant routing aliases before typed decoding while retaining canonical fields and unrelated unknown arguments. Cover direct handlers and legacy/modern registered calls, authenticated fallback, canonical null rejection, and missing identifiers. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
1 parent 18fb782 commit 9cbd4b2

5 files changed

Lines changed: 848 additions & 61 deletions

File tree

‎pkg/github/__toolsnaps__/get_me.snap‎

Lines changed: 92 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,96 @@
1818
"properties": {},
1919
"type": "object"
2020
},
21-
"name": "get_me"
21+
"name": "get_me",
22+
"outputSchema": {
23+
"additionalProperties": false,
24+
"properties": {
25+
"avatar_url": {
26+
"type": "string"
27+
},
28+
"details": {
29+
"additionalProperties": false,
30+
"properties": {
31+
"bio": {
32+
"type": "string"
33+
},
34+
"blog": {
35+
"type": "string"
36+
},
37+
"company": {
38+
"type": "string"
39+
},
40+
"created_at": {
41+
"description": "Account creation time in RFC3339 format.",
42+
"type": "string"
43+
},
44+
"email": {
45+
"type": "string"
46+
},
47+
"followers": {
48+
"type": "integer"
49+
},
50+
"following": {
51+
"type": "integer"
52+
},
53+
"hireable": {
54+
"type": "boolean"
55+
},
56+
"location": {
57+
"type": "string"
58+
},
59+
"name": {
60+
"type": "string"
61+
},
62+
"owned_private_repos": {
63+
"type": "integer"
64+
},
65+
"private_gists": {
66+
"type": "integer"
67+
},
68+
"public_gists": {
69+
"type": "integer"
70+
},
71+
"public_repos": {
72+
"type": "integer"
73+
},
74+
"total_private_repos": {
75+
"type": "integer"
76+
},
77+
"twitter_username": {
78+
"type": "string"
79+
},
80+
"updated_at": {
81+
"description": "Last profile update time in RFC3339 format.",
82+
"type": "string"
83+
}
84+
},
85+
"required": [
86+
"public_repos",
87+
"public_gists",
88+
"followers",
89+
"following",
90+
"created_at",
91+
"updated_at"
92+
],
93+
"type": [
94+
"null",
95+
"object"
96+
]
97+
},
98+
"id": {
99+
"type": "integer"
100+
},
101+
"login": {
102+
"type": "string"
103+
},
104+
"profile_url": {
105+
"type": "string"
106+
}
107+
},
108+
"required": [
109+
"login"
110+
],
111+
"type": "object"
112+
}
22113
}

‎pkg/github/__toolsnaps__/get_team_members.snap‎

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,14 @@
2222
],
2323
"type": "object"
2424
},
25-
"name": "get_team_members"
25+
"name": "get_team_members",
26+
"outputSchema": {
27+
"items": {
28+
"type": "string"
29+
},
30+
"type": [
31+
"null",
32+
"array"
33+
]
34+
}
2635
}

‎pkg/github/__toolsnaps__/get_teams.snap‎

Lines changed: 46 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,50 @@
1414
},
1515
"type": "object"
1616
},
17-
"name": "get_teams"
17+
"name": "get_teams",
18+
"outputSchema": {
19+
"items": {
20+
"additionalProperties": false,
21+
"properties": {
22+
"org": {
23+
"type": "string"
24+
},
25+
"teams": {
26+
"items": {
27+
"additionalProperties": false,
28+
"properties": {
29+
"description": {
30+
"type": "string"
31+
},
32+
"name": {
33+
"type": "string"
34+
},
35+
"slug": {
36+
"type": "string"
37+
}
38+
},
39+
"required": [
40+
"name",
41+
"slug",
42+
"description"
43+
],
44+
"type": "object"
45+
},
46+
"type": [
47+
"null",
48+
"array"
49+
]
50+
}
51+
},
52+
"required": [
53+
"org",
54+
"teams"
55+
],
56+
"type": "object"
57+
},
58+
"type": [
59+
"null",
60+
"array"
61+
]
62+
}
1863
}

0 commit comments

Comments
 (0)