Files
oh-my-pi/.gitignore
T
can1357 e39d3d9c76 fix(natives): detect compiled-binary mode via embedded-addon presence
Standalone Bun binaries on WSL (and any host where the user moves the
binary away from the build-host's checkout) failed to load
pi_natives.<platform>-<arch>*.node. The loader's isCompiledBinary
detection relied on two signals that are both false in shipped binaries:
process.env.PI_COMPILED (bun --define PI_COMPILED=true substitutes the
bare identifier, not property accesses on process.env) and
__filename.includes("$bunfs") (Bun retains the build-host absolute path
in __filename for required CJS modules — only import.meta.url is
rewritten). Detection therefore returned false, embedded-addon
extraction was skipped, and the only candidates probed were the
build-host nativeDir and execDir.

Make embedded-addon presence the authoritative compiled-mode signal
(it is null in the post-build --reset stub, populated when embed:native
ran for the standalone build), eagerly require the manifest, and
extract candidate-path computation into a pure helper covered by a
host-platform-agnostic unit test. Also fix the build-time --define so
process.env.PI_COMPILED is genuinely set at runtime as a defensive
fallback.

Fixes #823
2026-04-30 04:51:23 +02:00

68 lines
800 B
Plaintext

# Dependencies
node_modules/
.npm/
# Build output
dist/
packages/*/dist/
packages/*/dist-chrome/
packages/*/dist-firefox/
target/
*.tsbuildinfo
*.node
*.b64.js
# Environment
.env
# Editors
.vscode/
.zed/
.idea/
*.swp
*.swo
*.kate-swp
*~
# OS
*.tmp
.DS_Store
# Logs & profiling
*.log
tui-debug.log
*.cpuprofile
# Test & coverage
coverage/
.nyc_output/
packages/ai/test/.temp-images/
# Project specific
!.omp/
.omp/plugins/
.pi_config/
.opencode/
.worktrees/
compaction-results/
changes/
__pycache__/
# Scratch files
syntax.jsonl
out.jsonl
out.html
pi-*.html
# Generated files
packages/coding-agent/src/internal-urls/docs-index.generated.ts
/runs/
python/omp-rpc/src/omp_rpc.egg-info/
scripts/session-stats/Cargo.lock
scripts/session-stats/edit-analysis.csv
# parallel-agent worktrees
.wt/