From b30a7f137b2f0862e37d392e55f8d331da9197f9 Mon Sep 17 00:00:00 2001 From: Chris Tate Date: Sun, 11 Jan 2026 01:48:47 -0600 Subject: [PATCH] add opensrc --- .gitignore | 3 +++ AGENTS.md | 26 ++++++++++++++++++++++++++ tsconfig.json | 15 ++++++++++++--- 3 files changed, 41 insertions(+), 3 deletions(-) create mode 100644 AGENTS.md diff --git a/.gitignore b/.gitignore index d322e88..3ee69d0 100644 --- a/.gitignore +++ b/.gitignore @@ -31,3 +31,6 @@ yarn.lock # Environment .env .env.local + +# opensrc - source code for packages +opensrc/ diff --git a/AGENTS.md b/AGENTS.md new file mode 100644 index 0000000..5548ea1 --- /dev/null +++ b/AGENTS.md @@ -0,0 +1,26 @@ +# AGENTS.md + +Instructions for AI coding agents working with this codebase. + + + +## Source Code Reference + +Source code for dependencies is available in `opensrc/` for deeper understanding of implementation details. + +See `opensrc/sources.json` for the list of available packages and their versions. + +Use this source code when you need to understand how a package works internally, not just its types/interface. + +### Fetching Additional Source Code + +To fetch source code for a package or repository you need to understand, run: + +```bash +npx opensrc # npm package (e.g., npx opensrc zod) +npx opensrc pypi: # Python package (e.g., npx opensrc pypi:requests) +npx opensrc crates: # Rust crate (e.g., npx opensrc crates:serde) +npx opensrc / # GitHub repo (e.g., npx opensrc vercel/ai) +``` + + diff --git a/tsconfig.json b/tsconfig.json index 345d749..93aa062 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -3,7 +3,9 @@ "target": "ES2022", "module": "NodeNext", "moduleResolution": "NodeNext", - "lib": ["ES2022"], + "lib": [ + "ES2022" + ], "outDir": "./dist", "rootDir": "./src", "strict": true, @@ -14,6 +16,13 @@ "declarationMap": true, "sourceMap": true }, - "include": ["src/**/*"], - "exclude": ["node_modules", "dist", "src/**/*.test.ts"] + "include": [ + "src/**/*" + ], + "exclude": [ + "node_modules", + "dist", + "src/**/*.test.ts", + "opensrc" + ] }