Skip to content

Commit 6bc16a2

Browse files
committed
Merge remote-tracking branch 'upstream/main' into stoub/updatedotnetbuild
# Conflicts: # dotnet/src/Types.cs # dotnet/test/Harness/E2ETestContext.cs # dotnet/test/ToolsTests.cs # nodejs/test/client.test.ts
2 parents f3246b5 + 87a54de commit 6bc16a2

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+3184
-524
lines changed

.github/aw/actions-lock.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,11 @@
2020
"version": "v7.0.0",
2121
"sha": "bbbca2ddaa5d8feaa63e36b76fdaad77386f024f"
2222
},
23+
"github/gh-aw/actions/setup@v0.50.5": {
24+
"repo": "github/gh-aw/actions/setup",
25+
"version": "v0.50.5",
26+
"sha": "a7d371cc7e68f270ded0592942424548e05bf1c2"
27+
},
2328
"github/gh-aw/actions/setup@v0.52.1": {
2429
"repo": "github/gh-aw/actions/setup",
2530
"version": "v0.52.1",

.github/dependabot.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,25 +7,32 @@ updates:
77
- package-ecosystem: 'github-actions'
88
directory: '/'
99
multi-ecosystem-group: 'all'
10+
patterns: ['*']
1011
- package-ecosystem: 'devcontainers'
1112
directory: '/'
1213
multi-ecosystem-group: 'all'
14+
patterns: ['*']
1315
# Node.js dependencies
1416
- package-ecosystem: 'npm'
1517
directory: '/nodejs'
1618
multi-ecosystem-group: 'all'
19+
patterns: ['*']
1720
- package-ecosystem: 'npm'
1821
directory: '/test/harness'
1922
multi-ecosystem-group: 'all'
23+
patterns: ['*']
2024
# Python dependencies
2125
- package-ecosystem: 'pip'
2226
directory: '/python'
2327
multi-ecosystem-group: 'all'
28+
patterns: ['*']
2429
# Go dependencies
2530
- package-ecosystem: 'gomod'
2631
directory: '/go'
2732
multi-ecosystem-group: 'all'
33+
patterns: ['*']
2834
# .NET dependencies
2935
- package-ecosystem: 'nuget'
3036
directory: '/dotnet'
3137
multi-ecosystem-group: 'all'
38+
patterns: ['*']

.github/workflows/cross-repo-issue-analysis.lock.yml

Lines changed: 1338 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 123 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,123 @@
1+
---
2+
description: Analyzes copilot-sdk issues to determine if a fix is needed in copilot-agent-runtime, then opens a linked issue and suggested-fix PR there
3+
on:
4+
issues:
5+
types: [labeled]
6+
workflow_dispatch:
7+
inputs:
8+
issue_number:
9+
description: "Issue number to analyze"
10+
required: true
11+
type: string
12+
if: "github.event_name == 'workflow_dispatch' || github.event.label.name == 'runtime triage'"
13+
permissions:
14+
contents: read
15+
issues: read
16+
pull-requests: read
17+
steps:
18+
- name: Clone copilot-agent-runtime
19+
run: git clone --depth 1 https://x-access-token:${{ secrets.RUNTIME_TRIAGE_TOKEN }}@github.com/github/copilot-agent-runtime.git ${{ github.workspace }}/copilot-agent-runtime
20+
tools:
21+
github:
22+
toolsets: [default]
23+
github-token: ${{ secrets.RUNTIME_TRIAGE_TOKEN }}
24+
edit:
25+
bash:
26+
- "grep:*"
27+
- "find:*"
28+
- "cat:*"
29+
- "head:*"
30+
- "tail:*"
31+
- "wc:*"
32+
- "ls:*"
33+
safe-outputs:
34+
github-token: ${{ secrets.RUNTIME_TRIAGE_TOKEN }}
35+
allowed-github-references: ["repo", "github/copilot-agent-runtime"]
36+
add-labels:
37+
allowed: [runtime, sdk-fix-only, needs-investigation]
38+
max: 3
39+
target: triggering
40+
create-issue:
41+
title-prefix: "[copilot-sdk] "
42+
labels: [upstream-from-sdk, ai-triaged]
43+
target-repo: "github/copilot-agent-runtime"
44+
max: 1
45+
create-pull-request:
46+
title-prefix: "[copilot-sdk] "
47+
labels: [upstream-from-sdk, ai-suggested-fix]
48+
draft: true
49+
target-repo: "github/copilot-agent-runtime"
50+
51+
timeout-minutes: 20
52+
---
53+
54+
# SDK Runtime Triage
55+
56+
You are an expert agent that analyzes issues filed in the **copilot-sdk** repository to determine whether the root cause and fix live in this repo or in the **copilot-agent-runtime** repo (`github/copilot-agent-runtime`).
57+
58+
## Context
59+
60+
- Repository: ${{ github.repository }}
61+
- Issue number: ${{ github.event.issue.number || inputs.issue_number }}
62+
- Issue title: ${{ github.event.issue.title }}
63+
64+
The **copilot-sdk** repo is a multi-language SDK (Node/TS, Python, Go, .NET) that communicates with the Copilot CLI via JSON-RPC. The **copilot-agent-runtime** repo contains the CLI/server that the SDK talks to. Many issues filed against the SDK are actually caused by behavior in the runtime.
65+
66+
## Your Task
67+
68+
### Step 1: Understand the Issue
69+
70+
Use GitHub tools to fetch the full issue body, comments, and any linked references for issue `${{ github.event.issue.number || inputs.issue_number }}` in `${{ github.repository }}`.
71+
72+
### Step 2: Analyze Against copilot-sdk
73+
74+
Search the copilot-sdk codebase on disk to understand whether the reported problem could originate here. The repo is checked out at the default working directory.
75+
76+
- Use bash tools (`grep`, `find`, `cat`) to search the relevant SDK language implementation (`nodejs/src/`, `python/copilot/`, `go/`, `dotnet/src/`)
77+
- Look at the JSON-RPC client layer, session management, event handling, and tool definitions
78+
- Check if the issue relates to SDK-side logic (type generation, streaming, event parsing, client options, etc.)
79+
80+
### Step 3: Investigate copilot-agent-runtime
81+
82+
If the issue does NOT appear to be caused by SDK code, or you suspect the runtime is involved, investigate the **copilot-agent-runtime** repo. It has been cloned to `./copilot-agent-runtime/` in the current working directory.
83+
84+
- Use bash tools (`grep`, `find`, `cat`) to search the runtime codebase at `./copilot-agent-runtime/`
85+
- Look at the server-side JSON-RPC handling, session management, tool execution, and response generation
86+
- Focus on the areas that correspond to the reported issue (e.g., if the issue is about streaming, look at the runtime's streaming implementation)
87+
88+
Common areas where runtime fixes are needed:
89+
- JSON-RPC protocol handling and response formatting
90+
- Session lifecycle (creation, persistence, compaction, destruction)
91+
- Tool execution and permission handling
92+
- Model/API interaction (prompt construction, response parsing)
93+
- Streaming event generation (deltas, completions)
94+
- Error handling and error response formatting
95+
96+
### Step 4: Make Your Determination
97+
98+
Classify the issue into one of these categories:
99+
100+
1. **SDK-fix-only**: The bug/feature is entirely in the SDK code. Label the issue `sdk-fix-only`.
101+
102+
2. **Runtime**: The root cause is in copilot-agent-runtime. Do ALL of the following:
103+
- Label the original issue `runtime`
104+
- Create an issue in `github/copilot-agent-runtime` that:
105+
- Clearly describes the problem and root cause
106+
- References the original SDK issue (e.g., `github/copilot-sdk#123`)
107+
- Includes the specific files and code paths involved
108+
- Suggests a fix approach
109+
- Create a draft PR in `github/copilot-agent-runtime` with a suggested fix:
110+
- Make the minimal, targeted code changes needed
111+
- Include a clear PR description linking back to both issues
112+
- If you're uncertain about the fix, still create the PR as a starting point for discussion
113+
114+
3. **Needs-investigation**: You cannot confidently determine the root cause. Label the issue `needs-investigation`.
115+
116+
## Guidelines
117+
118+
1. **Be thorough but focused**: Read enough code to be confident in your analysis, but don't read every file in both repos
119+
2. **Err on the side of creating the runtime issue**: If there's a reasonable chance the fix is in the runtime, create the issue. False positives are better than missed upstream bugs.
120+
3. **Make actionable PRs**: Even if the fix isn't perfect, a draft PR with a concrete starting point is more useful than just an issue description
121+
4. **Link everything**: Always cross-reference between the SDK issue, runtime issue, and runtime PR so maintainers can follow the trail
122+
5. **Be specific**: When describing the root cause, point to specific files, functions, and line numbers in both repos
123+
6. **Don't duplicate**: Before creating a runtime issue, search existing open issues in `github/copilot-agent-runtime` to avoid duplicates. If a related issue exists, reference it instead of creating a new one.

.github/workflows/issue-triage.lock.yml

Lines changed: 14 additions & 14 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.github/workflows/publish.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ jobs:
102102
- name: Pack
103103
run: npm pack
104104
- name: Upload artifact
105-
uses: actions/upload-artifact@v6
105+
uses: actions/upload-artifact@v7.0.0
106106
with:
107107
name: nodejs-package
108108
path: nodejs/*.tgz
@@ -127,7 +127,7 @@ jobs:
127127
- name: Build and pack
128128
run: dotnet pack src/GitHub.Copilot.SDK.csproj -c Release -p:Version=${{ needs.version.outputs.version }} -o ./artifacts
129129
- name: Upload artifact
130-
uses: actions/upload-artifact@v6
130+
uses: actions/upload-artifact@v7.0.0
131131
with:
132132
name: dotnet-package
133133
path: dotnet/artifacts/*.nupkg
@@ -170,7 +170,7 @@ jobs:
170170
- name: Build platform wheels
171171
run: node scripts/build-wheels.mjs --output-dir dist
172172
- name: Upload artifact
173-
uses: actions/upload-artifact@v6
173+
uses: actions/upload-artifact@v7.0.0
174174
with:
175175
name: python-package
176176
path: python/dist/*

.github/workflows/release-changelog.lock.yml

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)