Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@
"typecheck": "tsc --noEmit"
},
"files": [
"dist",
"vendor"
"dist"
],
"dependencies": {
"@a2a-js/sdk": "0.3.11",
Expand Down
25 changes: 25 additions & 0 deletions scripts/build_binary.js
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,31 @@ try {
process.exit(1);
}

// 2b. Copy host-platform ripgrep binary into bundle/vendor/ripgrep/.
Comment thread
SandyTao520 marked this conversation as resolved.
Resolved
// The npm `bundle` step intentionally omits these binaries (they would push
// the published tarball past the registry's upload limit). The SEA build,
// being per-platform, only needs the binary for the host it's targeting,
// so we copy just one. The runtime resolver in packages/core/src/tools/
// ripGrep.ts (getRipgrepPath) looks for rg-${platform}-${arch}.
const ripgrepVendorSrc = join(root, 'packages/core/vendor/ripgrep');
const ripgrepVendorDest = join(bundleDir, 'vendor', 'ripgrep');
if (existsSync(ripgrepVendorSrc)) {
const rgBinName = `rg-${process.platform}-${process.arch}${
process.platform === 'win32' ? '.exe' : ''
}`;
const rgSrc = join(ripgrepVendorSrc, rgBinName);
if (existsSync(rgSrc)) {
mkdirSync(ripgrepVendorDest, { recursive: true });
cpSync(rgSrc, join(ripgrepVendorDest, rgBinName), { dereference: true });
console.log(`Copied ${rgBinName} to bundle/vendor/ripgrep/`);
} else {
console.warn(
`Warning: bundled ripgrep binary not found for ${process.platform}/${process.arch} at ${rgSrc}. ` +
`The SEA will fall back to system grep at runtime.`,
);
}
}
Comment thread
SandyTao520 marked this conversation as resolved.
Resolved

// 3. Stage & Sign Native Modules
const includeNativeModules = process.env.BUNDLE_NATIVE_MODULES !== 'false';
console.log(`Include Native Modules: ${includeNativeModules}`);
Expand Down
14 changes: 1 addition & 13 deletions scripts/copy_bundle_assets.js
Original file line number Diff line number Diff line change
Expand Up @@ -108,19 +108,7 @@ if (!existsSync(bundleMcpSrc)) {
cpSync(bundleMcpSrc, bundleMcpDest, { recursive: true, dereference: true });
console.log('Copied bundled chrome-devtools-mcp to bundle/bundled/');

// 7. Copy pre-built ripgrep vendor binaries
const ripgrepVendorSrc = join(root, 'packages/core/vendor/ripgrep');
const ripgrepVendorDest = join(bundleDir, 'vendor', 'ripgrep');
if (existsSync(ripgrepVendorSrc)) {
mkdirSync(ripgrepVendorDest, { recursive: true });
cpSync(ripgrepVendorSrc, ripgrepVendorDest, {
recursive: true,
dereference: true,
});
console.log('Copied ripgrep vendor binaries to bundle/vendor/ripgrep/');
}

// 8. Copy Extension Examples
// 7. Copy Extension Examples
const extensionExamplesSrc = join(
root,
'packages/cli/src/commands/extensions/examples',
Expand Down
Loading