From 588858ca45b2cf12b05a6200f06ec58f7aaff4a6 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 21 Apr 2026 18:19:58 +0000 Subject: [PATCH 1/3] Initial plan From 704f4ce5d7e7db385ea1f76759e3d6b5028c0ebd Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 21 Apr 2026 18:26:43 +0000 Subject: [PATCH 2/3] fix: embed labels directly in issue-triage prompt to fix agent failure The issue-triage agent was unable to read eng/common/config/labels.ts because the GitHub MCP server is configured with only the "issues" toolset, which does not include get_file_contents. The agent had no way to read repository files, causing it to produce no safe outputs. Replace the instruction to read the labels file with the actual label definitions embedded directly in the prompt. The prompt is loaded at runtime via runtime-import, so this change takes effect without regenerating the lock.yml. Agent-Logs-Url: https://github.com/microsoft/typespec/sessions/9221b9e3-5f1d-4f0b-bb1f-fcbe28f199af Co-authored-by: timotheeguerin <1031227+timotheeguerin@users.noreply.github.com> --- .github/workflows/issue-triage.md | 53 +++++++++++++++++++++++++------ 1 file changed, 44 insertions(+), 9 deletions(-) diff --git a/.github/workflows/issue-triage.md b/.github/workflows/issue-triage.md index a2e5ef7aee4..5ec277f9aa0 100644 --- a/.github/workflows/issue-triage.md +++ b/.github/workflows/issue-triage.md @@ -48,13 +48,48 @@ You're a triage assistant for the TypeSpec GitHub repository. Your task is to an ## Available Labels -To find the available labels for this repository, read the file `eng/common/config/labels.ts` in the repository. This file contains all the label definitions organized by category: - -- **Area labels** (`AreaLabels`): Used to categorize which area of the codebase the issue belongs to (e.g. `compiler:core`, `emitter:openapi3`, `ide`, etc.). Always try to assign the most specific area label that matches. -- **Issue kind labels** (`issue_kinds`): Used to classify the type of issue (`bug`, `feature`, `docs`). -- Other label categories are defined there as well. - -Only use labels defined in that file. +Use only the labels listed below. They are organized by category. + +### Area labels + +Assign the most specific area label that matches. Pick at most one. + +- `compiler:core` — Issues for @typespec/compiler +- `emitter-framework` — Issues for the emitter framework +- `ide` — Issues for VS, VSCode, Monaco, etc. +- `lib:http` — @typespec/http library +- `lib:openapi` — @typespec/openapi library +- `lib:rest` — @typespec/rest library +- `lib:versioning` — @typespec/versioning library +- `lib:http-specs` — @typespec/http-specs package +- `meta:blog` — Blog updates +- `meta:website` — TypeSpec.io updates +- `tspd` — Issues for the tspd tool +- `emitter:client:all` — General issue for client emitters +- `emitter:client:js` — JS client emitter (@typespec/http-client-js) +- `emitter:client:csharp` — C# client emitter (@typespec/http-client-csharp) +- `emitter:client:java` — Java client emitter (@typespec/http-client-java) +- `emitter:client:python` — Python client emitter (@typespec/http-client-python) +- `emitter:graphql` — @typespec/graphql emitter +- `emitter:json-schema` — @typespec/json-schema emitter +- `emitter:protobuf` — Protobuf emitter +- `emitter:openapi3` — @typespec/openapi3 emitter +- `openapi3:converter` — OpenAPI-to-TypeSpec converter +- `emitter:service:csharp` — C# service emitter +- `emitter:service:js` — JS service emitter +- `emitter:service:java` — Java service emitter +- `spector` — Issues related to spector and spec sets +- `eng` — Engineering/infrastructure +- `ui:playground` — TypeSpec playground +- `ui:type-graph-viewer` — Type graph viewer + +### Issue kind labels + +Assign one if the type is clear. + +- `bug` — Something isn't working +- `feature` — New feature or request +- `docs` — Improvements or additions to documentation ## Instructions @@ -78,10 +113,10 @@ Only use labels defined in that file. - User impact - Components affected -5. Select appropriate labels based on the labels defined in `eng/common/config/labels.ts`: +5. Select appropriate labels from the lists above: - Pick ONE area label that best matches the issue. If the issue spans multiple areas, pick the most relevant one. If no area label is clearly applicable, do not add one. - Pick ONE issue kind label (`bug`, `feature`, or `docs`) if the type is clear. - - Only use labels that are defined in the labels configuration file. + - Only use labels listed in the "Available Labels" section above. - It's okay to not add any labels if none are clearly applicable. 6. Apply the selected labels using the `add_labels` tool. If no labels are clearly applicable, do not apply any. From 6b2265a589d782b754ac86ceba52beb6377eaaca Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 21 Apr 2026 19:22:25 +0000 Subject: [PATCH 3/3] fix: add repos toolset to give agent get_file_contents access Instead of embedding labels in the prompt, add the repos toolset to the GitHub MCP server configuration so the agent can read eng/common/config/labels.ts directly using get_file_contents. Agent-Logs-Url: https://github.com/microsoft/typespec/sessions/bc9c6b6b-bccd-410f-b599-f1398e525f5d Co-authored-by: timotheeguerin <1031227+timotheeguerin@users.noreply.github.com> --- .github/workflows/issue-triage.md | 55 ++++++------------------------- 1 file changed, 10 insertions(+), 45 deletions(-) diff --git a/.github/workflows/issue-triage.md b/.github/workflows/issue-triage.md index 5ec277f9aa0..699c47ad98f 100644 --- a/.github/workflows/issue-triage.md +++ b/.github/workflows/issue-triage.md @@ -31,7 +31,7 @@ safe-outputs: tools: web-fetch: github: - toolsets: [issues] + toolsets: [issues, repos] # If in a public repo, setting `lockdown: false` allows # reading issues, pull requests and comments from 3rd-parties # If in a private repo this has no particular effect. @@ -48,48 +48,13 @@ You're a triage assistant for the TypeSpec GitHub repository. Your task is to an ## Available Labels -Use only the labels listed below. They are organized by category. - -### Area labels - -Assign the most specific area label that matches. Pick at most one. - -- `compiler:core` — Issues for @typespec/compiler -- `emitter-framework` — Issues for the emitter framework -- `ide` — Issues for VS, VSCode, Monaco, etc. -- `lib:http` — @typespec/http library -- `lib:openapi` — @typespec/openapi library -- `lib:rest` — @typespec/rest library -- `lib:versioning` — @typespec/versioning library -- `lib:http-specs` — @typespec/http-specs package -- `meta:blog` — Blog updates -- `meta:website` — TypeSpec.io updates -- `tspd` — Issues for the tspd tool -- `emitter:client:all` — General issue for client emitters -- `emitter:client:js` — JS client emitter (@typespec/http-client-js) -- `emitter:client:csharp` — C# client emitter (@typespec/http-client-csharp) -- `emitter:client:java` — Java client emitter (@typespec/http-client-java) -- `emitter:client:python` — Python client emitter (@typespec/http-client-python) -- `emitter:graphql` — @typespec/graphql emitter -- `emitter:json-schema` — @typespec/json-schema emitter -- `emitter:protobuf` — Protobuf emitter -- `emitter:openapi3` — @typespec/openapi3 emitter -- `openapi3:converter` — OpenAPI-to-TypeSpec converter -- `emitter:service:csharp` — C# service emitter -- `emitter:service:js` — JS service emitter -- `emitter:service:java` — Java service emitter -- `spector` — Issues related to spector and spec sets -- `eng` — Engineering/infrastructure -- `ui:playground` — TypeSpec playground -- `ui:type-graph-viewer` — Type graph viewer - -### Issue kind labels - -Assign one if the type is clear. - -- `bug` — Something isn't working -- `feature` — New feature or request -- `docs` — Improvements or additions to documentation +To find the available labels for this repository, read the file `eng/common/config/labels.ts` in the repository. This file contains all the label definitions organized by category: + +- **Area labels** (`AreaLabels`): Used to categorize which area of the codebase the issue belongs to (e.g. `compiler:core`, `emitter:openapi3`, `ide`, etc.). Always try to assign the most specific area label that matches. +- **Issue kind labels** (`issue_kinds`): Used to classify the type of issue (`bug`, `feature`, `docs`). +- Other label categories are defined there as well. + +Only use labels defined in that file. ## Instructions @@ -113,10 +78,10 @@ Assign one if the type is clear. - User impact - Components affected -5. Select appropriate labels from the lists above: +5. Select appropriate labels based on the labels defined in `eng/common/config/labels.ts`: - Pick ONE area label that best matches the issue. If the issue spans multiple areas, pick the most relevant one. If no area label is clearly applicable, do not add one. - Pick ONE issue kind label (`bug`, `feature`, or `docs`) if the type is clear. - - Only use labels listed in the "Available Labels" section above. + - Only use labels that are defined in the labels configuration file. - It's okay to not add any labels if none are clearly applicable. 6. Apply the selected labels using the `add_labels` tool. If no labels are clearly applicable, do not apply any.