feat(bft): Bun File Trace for node:fs / Bun.file() assets in agent builds#213
Draft
Copilot wants to merge 3 commits into
Draft
feat(bft): Bun File Trace for node:fs / Bun.file() assets in agent builds#213Copilot wants to merge 3 commits into
Copilot wants to merge 3 commits into
Conversation
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
Co-authored-by: fuxingloh <4266087+fuxingloh@users.noreply.github.com>
Co-authored-by: fuxingloh <4266087+fuxingloh@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add NFT and BFT support for file-system agents
feat(bft): Bun File Trace for node:fs / Bun.file() assets in agent builds
Feb 25, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Bun.build()has no awareness of files accessed at runtime vianode:fsorBun.file()— those calls survive in the bundle verbatim, but the referenced files are never copied to the output. This is the same gap Node File Trace (NFT) fills for Node.js deployments.What changed
packages/aixyz-config— two newbuildfieldsMirrors Next.js
outputFileTracingIncludes/outputFileTracingExcludes. Acceptsstring | string[], defaults to[].packages/aixyz-cli/build/nft.ts— new Bun File Trace (BFT) moduletraceFileSystemAssets(appDir, cwd)app/for literal-string arguments toreadFileSync,readFile,createReadStream,existsSync,statSync,Bun.file(). Resolves paths against both CWD (most common) andimport.meta.dir. Returns absolute paths of non-code files that exist on disk.copyTracedFiles(files, cwd, outputDir)copyAppAssets(appDir, outputDir, includes, excludes)outputFileTracingIncludes/outputFileTracingExcludes. No-op by default.packages/aixyz-cli/build/index.tsBoth
buildBunandbuildVercelrun all three BFT steps afterBun.build()succeeds. Auto-tracing always runs; the config-driven sweep is opt-in.packages/aixyz-cli/build/nft.test.ts13 tests covering: literal-path detection (
readFileSync,Bun.file()), template-literal/variable path skipping, absolute-path rejection, code-file exclusion,outputFileTracingExcludesprecedence, and the empty-includes no-op default.Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
nextjs.org/home/REDACTED/work/_temp/ghcca-node/node/bin/node /home/REDACTED/work/_temp/ghcca-node/node/bin/node --enable-source-maps /home/REDACTED/work/_temp/copilot-developer-action-main/dist/index.js(dns block)If you need me to access, download, or install something from one of these locations, you can either:
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.