fix: add shell() helper, fix shell syntax in 12 tool files#125
Open
TerminalGravity wants to merge 4 commits intomainfrom
Open
fix: add shell() helper, fix shell syntax in 12 tool files#125TerminalGravity wants to merge 4 commits intomainfrom
TerminalGravity wants to merge 4 commits intomainfrom
Conversation
Covers LanceDB native binary failures, CLAUDE_PROJECT_DIR config, vector search not returning results, MCP handshake debugging, and performance tips. Links from README nav bar.
- examples/.preflight/config.yml: profile, related projects, thresholds, embeddings - examples/.preflight/triage.yml: strictness, always_check/skip/cross-service keywords - examples/.preflight/README.md: setup instructions and env var fallback reference - README.md: link to examples from Configuration Reference section
… tool files Adds src/lib/shell.ts with shell() (uses execSync with shell) and shellEscape() for safe interpolation. Migrates all tool files that were passing shell syntax (pipes, redirects, ||, &&) to run() (which uses execFileSync without shell) to use shell() instead. Simple git commands converted to array args where possible. Fixes #110
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.
Summary
Adds
src/lib/shell.tswith:shell(cmd)— runs commands viaexecSyncwith full shell support (pipes, redirects,||,&&)shellEscape(s)— safe single-quote wrapping for interpolationMigrates all 12 tool files that were passing shell syntax to
run()(which usesexecFileSyncwithout a shell, silently breaking pipes/redirects):verify-completion.ts— tsc, build, cattoken-audit.ts— wc, tail, git diffsession-handoff.ts— command -v, gh pr listaudit-workspace.ts— find | wcclarify-intent.ts— tsc | grep, find | headscope-work.ts— git ls-files | grepenrich-agent-task.ts— git ls-files | grep, headsequence-tasks.ts— git ls-files | headcheckpoint.ts— git add && commitsharpen-followup.ts— git status --porcelain (converted to array args)session-health.ts— git diff --stat (converted to array args + JS)what-changed.ts— git diff/log with fallbacks (converted to array args + JS)Simple git-only commands converted to proper array args. Commands needing shell features use
shell().Builds clean. Closes #110.