From 78dd88afd14647359fafd223fbeef6d41770da5e Mon Sep 17 00:00:00 2001 From: nirholas Date: Tue, 31 Mar 2026 11:13:13 +0000 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20Add=20qrcode=20dependency=20to=20pa?= =?UTF-8?q?ckage.json?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 4 ++++ prompts/04-fix-mcp-server.md | 40 ++++++++++++++++++++++++++++++++++++ scripts/build-bundle.ts | 2 ++ scripts/tsconfig.json | 0 tsconfig.json | 2 +- 5 files changed, 47 insertions(+), 1 deletion(-) create mode 100644 scripts/tsconfig.json diff --git a/package.json b/package.json index 74c1254..914795d 100644 --- a/package.json +++ b/package.json @@ -38,12 +38,15 @@ "diff": "^7.0.0", "execa": "^9.5.0", "figures": "^6.1.0", + "fuse.js": "^7.0.0", "highlight.js": "^11.11.0", + "ignore": "^6.0.0", "lodash-es": "^4.17.21", "marked": "^15.0.0", "p-map": "^7.0.0", "picomatch": "^4.0.0", "proper-lockfile": "^4.1.2", + "qrcode": "^1.5.0", "react": "^19.0.0", "semver": "^7.6.0", "stack-utils": "^2.0.6", @@ -52,6 +55,7 @@ "tree-kill": "^1.2.2", "type-fest": "^4.30.0", "undici": "^7.3.0", + "usehooks-ts": "^3.1.0", "wrap-ansi": "^9.0.0", "ws": "^8.18.0", "yaml": "^2.6.0", diff --git a/prompts/04-fix-mcp-server.md b/prompts/04-fix-mcp-server.md index 7d1869c..ed2f478 100644 --- a/prompts/04-fix-mcp-server.md +++ b/prompts/04-fix-mcp-server.md @@ -43,3 +43,43 @@ Currently `npm run build` (which runs `tsc`) fails with TypeScript errors. 1. `cd mcp-server && npm run build` succeeds with zero errors 2. `ls mcp-server/dist/` shows compiled `.js` files 3. `node mcp-server/dist/index.js` starts without immediate crash + +--- + +## Fix: GitHub Push Protection Blocked Push + +`git push origin main` is rejected because commits `5e99ad6` and `7adaa5d` contain a **GitHub OAuth token** in `.mcpregistry_github_token`. The file was deleted from disk but still exists in git history. You must rewrite history to remove it. + +### Step 1: Scrub secrets from history + +```bash +git filter-branch --force --index-filter \ + 'git rm --cached --ignore-unmatch .mcpregistry_github_token .mcpregistry_registry_token mcp-server/.mcpregistry_github_token mcp-server/.mcpregistry_registry_token' \ + --prune-empty HEAD~5..HEAD +``` + +### Step 2: Push + +```bash +git push origin main +``` + +### Alternative: Interactive rebase + +```bash +git rebase -i HEAD~5 +# Change "pick" to "edit" for commits 5e99ad6 and 7adaa5d +# At each stop, run: +git rm --cached .mcpregistry_github_token .mcpregistry_registry_token 2>/dev/null +git rm --cached mcp-server/.mcpregistry_github_token mcp-server/.mcpregistry_registry_token 2>/dev/null +git commit --amend --no-edit +git rebase --continue +``` + +### Step 3: Prevent future leaks + +```bash +echo ".mcpregistry_github_token" >> .gitignore +echo ".mcpregistry_registry_token" >> .gitignore +git add .gitignore && git commit -m "chore: gitignore token files" +``` diff --git a/scripts/build-bundle.ts b/scripts/build-bundle.ts index 5cb8b5e..5e2f14c 100644 --- a/scripts/build-bundle.ts +++ b/scripts/build-bundle.ts @@ -102,6 +102,8 @@ const buildOptions: esbuild.BuildOptions = { // Anthropic-internal packages (not published externally) '@anthropic-ai/sandbox-runtime', '@anthropic-ai/claude-agent-sdk', + // Anthropic-internal (@ant/) packages — gated behind USER_TYPE === 'ant' + '@ant/*', ], jsx: 'automatic', diff --git a/scripts/tsconfig.json b/scripts/tsconfig.json new file mode 100644 index 0000000..e69de29 diff --git a/tsconfig.json b/tsconfig.json index 2a5b251..17f0157 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -15,7 +15,7 @@ "allowImportingTsExtensions": true, "verbatimModuleSyntax": false, "lib": ["ESNext"], - "types": ["bun-types", "node"], + "types": ["node"], "baseUrl": ".", "paths": { "bun:bundle": ["./src/types/bun-bundle.d.ts"]