asdf
Squash the current repository state back into one baseline commit while preserving the README reframing and repository contents. Constraint: User explicitly requested a single squashed commit with subject "asdf" Confidence: high Scope-risk: broad Reversibility: clean Directive: This commit intentionally rewrites published history; coordinate before future force-pushes Tested: git status clean; local history rewritten to one commit; force-pushed main to origin and instructkr Not-tested: Fresh clone verification after push
This commit is contained in:
commit
d2542c9a62
29
src/utils/embeddedTools.ts
Normal file
29
src/utils/embeddedTools.ts
Normal file
@@ -0,0 +1,29 @@
|
||||
import { isEnvTruthy } from './envUtils.js'
|
||||
|
||||
/**
|
||||
* Whether this build has bfs/ugrep embedded in the bun binary (ant-native only).
|
||||
*
|
||||
* When true:
|
||||
* - `find` and `grep` in Claude's Bash shell are shadowed by shell functions
|
||||
* that invoke the bun binary with argv0='bfs' / argv0='ugrep' (same trick
|
||||
* as embedded ripgrep)
|
||||
* - The dedicated Glob/Grep tools are removed from the tool registry
|
||||
* - Prompt guidance steering Claude away from find/grep is omitted
|
||||
*
|
||||
* Set as a build-time define in scripts/build-with-plugins.ts for ant-native builds.
|
||||
*/
|
||||
export function hasEmbeddedSearchTools(): boolean {
|
||||
if (!isEnvTruthy(process.env.EMBEDDED_SEARCH_TOOLS)) return false
|
||||
const e = process.env.CLAUDE_CODE_ENTRYPOINT
|
||||
return (
|
||||
e !== 'sdk-ts' && e !== 'sdk-py' && e !== 'sdk-cli' && e !== 'local-agent'
|
||||
)
|
||||
}
|
||||
|
||||
/**
|
||||
* Path to the bun binary that contains the embedded search tools.
|
||||
* Only meaningful when hasEmbeddedSearchTools() is true.
|
||||
*/
|
||||
export function embeddedSearchToolsBinaryPath(): string {
|
||||
return process.execPath
|
||||
}
|
||||
Reference in New Issue
Block a user