diff --git a/.claude/CLAUDE.md b/.claude/CLAUDE.md deleted file mode 120000 index ff807266877..00000000000 --- a/.claude/CLAUDE.md +++ /dev/null @@ -1 +0,0 @@ -../.github/copilot-instructions.md \ No newline at end of file diff --git a/.claude/skills/launch b/.claude/skills/launch deleted file mode 120000 index b41e2b420ad..00000000000 --- a/.claude/skills/launch +++ /dev/null @@ -1 +0,0 @@ -../../.agents/skills/launch \ No newline at end of file diff --git a/.gitignore b/.gitignore index e5ca4dd32cc..65cb1937168 100644 --- a/.gitignore +++ b/.gitignore @@ -30,21 +30,16 @@ test/componentFixtures/.screenshots/* !test/componentFixtures/.screenshots/baseline/ dist .playwright-cli +.claude/ .agents/agents/*.local.md -.claude/agents/*.local.md .github/agents/*.local.md .agents/agents/*.local.agent.md -.claude/agents/*.local.agent.md .github/agents/*.local.agent.md .agents/hooks/*.local.json -.claude/hooks/*.local.json .github/hooks/*.local.json .agents/instructions/*.local.instructions.md -.claude/instructions/*.local.instructions.md .github/instructions/*.local.instructions.md .agents/prompts/*.local.prompt.md -.claude/prompts/*.local.prompt.md .github/prompts/*.local.prompt.md .agents/skills/.local/ -.claude/skills/.local/ .github/skills/.local/ diff --git a/build/npm/postinstall.ts b/build/npm/postinstall.ts index ae2651cd188..5ab9d682857 100644 --- a/build/npm/postinstall.ts +++ b/build/npm/postinstall.ts @@ -288,6 +288,37 @@ async function main() { fs.writeFileSync(stateFile, JSON.stringify(_state)); fs.writeFileSync(stateContentsFile, JSON.stringify(computeContents())); + + // Symlink .claude/ files to their canonical locations to test Claude agent harness + const claudeDir = path.join(root, '.claude'); + fs.mkdirSync(claudeDir, { recursive: true }); + + const claudeMdLink = path.join(claudeDir, 'CLAUDE.md'); + if (!fs.existsSync(claudeMdLink)) { + fs.symlinkSync(path.join('..', '.github', 'copilot-instructions.md'), claudeMdLink); + log('.', 'Symlinked .claude/CLAUDE.md -> .github/copilot-instructions.md'); + } + + const claudeSkillsLink = path.join(claudeDir, 'skills'); + if (!fs.existsSync(claudeSkillsLink)) { + fs.symlinkSync(path.join('..', '.agents', 'skills'), claudeSkillsLink); + log('.', 'Symlinked .claude/skills -> .agents/skills'); + } + + // Temporary: patch @github/copilot-sdk session.js to fix ESM import + // (missing .js extension on vscode-jsonrpc/node). Fixed upstream in v0.1.32. + // TODO: Remove once @github/copilot-sdk is updated to >=0.1.32 + for (const dir of ['', 'remote']) { + const sessionFile = path.join(root, dir, 'node_modules', '@github', 'copilot-sdk', 'dist', 'session.js'); + if (fs.existsSync(sessionFile)) { + const content = fs.readFileSync(sessionFile, 'utf8'); + const patched = content.replace(/from "vscode-jsonrpc\/node"/g, 'from "vscode-jsonrpc/node.js"'); + if (content !== patched) { + fs.writeFileSync(sessionFile, patched); + log(dir || '.', 'Patched @github/copilot-sdk session.js (vscode-jsonrpc ESM import fix)'); + } + } + } } main().catch(err => {