{"_id":"@awfixerai/natives","name":"@awfixerai/natives","dist-tags":{"latest":"0.0.1-rc.1"},"versions":{"0.0.1-rc.1":{"name":"@awfixerai/natives","version":"0.0.1-rc.1","description":"Native Rust bindings for grep, clipboard, image processing, syntax highlighting, PTY, and shell operations via N-API","type":"module","homepage":"https://agent.awfixer.codes","license":"MIT","repository":{"type":"git","url":"git+https://github.com/awfixers-stuff/awfixer-agent.git","directory":"packages/natives"},"bugs":{"url":"https://github.com/awfixers-stuff/awfixer-agent/issues"},"keywords":["napi","rust","native","grep","text-processing","clipboard","image","pty","shell","syntax-highlighting"],"main":"./native/index.js","types":"./native/index.d.ts","scripts":{"build":"bun scripts/build-native.ts","check":"biome check . && bun run check:types","check:types":"tsgo -p tsconfig.json --noEmit","lint":"biome lint .","test":"bun test --parallel","fix":"biome check --write --unsafe .","fmt":"biome format --write .","gen:native":"bun scripts/embed-native.ts","gen:native:reset":"bun scripts/embed-native.ts --reset","gen:npm":"bun scripts/gen-npm-packages.ts","bench":"bun bench/grep.ts"},"devDependencies":{"@napi-rs/cli":"3.7.0","@types/bun":"^1.3.14"},"engines":{"bun":">=1.3.14"},"napi":{"binaryName":"pi_natives","triples":{}},"exports":{".":{"types":"./native/index.d.ts","import":"./native/index.js"}},"_id":"@awfixerai/natives@0.0.1-rc.1","_integrity":"sha512-TRt7yfTb2M76GpMYVb9819oNbn3rWpOleeTXE/9rQmy4zOj+VyDaLqbps9A86v74ewrguF1yOzjfj7xdba0B4Q==","_nodeVersion":"24.3.0","_npmVersion":"10.8.3","shasum":"3fd55be2086661a2e103cbbb79bc11d28c839a74","dist":{"integrity":"sha512-TRt7yfTb2M76GpMYVb9819oNbn3rWpOleeTXE/9rQmy4zOj+VyDaLqbps9A86v74ewrguF1yOzjfj7xdba0B4Q==","shasum":"3fd55be2086661a2e103cbbb79bc11d28c839a74","tarball":"https://registry.npmjs.org/@awfixerai/natives/-/natives-0.0.1-rc.1.tgz","fileCount":9,"unpackedSize":144476953,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIGa147PMF7Mseah/Qm0rSFHYgtiaEBx+ulCloxK0oXNgAiEA+XiV7d423tX0Mev+v9ZHnoYReiWDMksuE8O1z7y6v4c="}]},"_npmUser":{"name":"awfixer","email":"wise.jet2897@fastmail.com"},"directories":{},"maintainers":[{"name":"awfixer","email":"wise.jet2897@fastmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/natives_0.0.1-rc.1_1783015011711_0.06503863018039402"},"_hasShrinkwrap":false}},"time":{"created":"2026-07-02T17:56:51.410Z","0.0.1-rc.1":"2026-07-02T17:56:52.111Z","modified":"2026-07-02T17:56:52.483Z"},"maintainers":[{"name":"awfixer","email":"wise.jet2897@fastmail.com"}],"description":"Native Rust bindings for grep, clipboard, image processing, syntax highlighting, PTY, and shell operations via N-API","homepage":"https://agent.awfixer.codes","keywords":["napi","rust","native","grep","text-processing","clipboard","image","pty","shell","syntax-highlighting"],"repository":{"type":"git","url":"git+https://github.com/awfixers-stuff/awfixer-agent.git","directory":"packages/natives"},"bugs":{"url":"https://github.com/awfixers-stuff/awfixer-agent/issues"},"license":"MIT","readme":"# @awfixerai/natives\n\nNative Rust functionality via N-API.\n\n## What's Inside\n\n- **Grep**: Regex-based search powered by ripgrep's engine with native file walking and matching\n- **Find**: Glob-based file/directory discovery with gitignore support (pure TypeScript via `globPaths`)\n- **SIXEL**: Terminal image encoding for SIXEL-capable terminals (decode, resize, encode in one pass)\n\nGeneral-purpose image processing (decode/resize/encode for files and buffers)\nlives in [`Bun.Image`](https://bun.com/docs/runtime/image) on the JS side; this\ncrate only ships the SIXEL encoder because no built-in equivalent exists for\nthat terminal protocol.\n\n## Usage\n\n```typescript\nimport { grep, find, encodeSixel } from \"@awfixerai/natives\";\n\n// Grep for a pattern\nconst results = await grep({\n\tpattern: \"TODO\",\n\tpath: \"/path/to/project\",\n\tglob: \"*.ts\",\n\tcontext: 2,\n});\n\n// Find files\nconst files = await find({\n\tpattern: \"*.rs\",\n\tpath: \"/path/to/project\",\n\tfileType: \"file\",\n});\n\n// SIXEL encode for a terminal cell box (px)\nconst sequence = encodeSixel(pngBytes, widthPx, heightPx);\n```\n\n## Building\n\n```bash\n# Build native addon from workspace root (requires Rust)\nbun run build\n\n# Type check\nbun run check\n```\n\n## Architecture\n\n`@awfixerai/natives` publishes a small core package plus generated\nplatform-specific optional dependency packages:\n\n```\ncrates/pi-natives/       # Rust source (workspace member)\n  src/lib.rs             # N-API exports\n  src/sixel.rs           # SIXEL terminal-image encoding\n  Cargo.toml             # Rust dependencies\nnative/                  # Core loader files and local/CI native build outputs\n  index.js               # Public native export surface\n  loader-state.js        # Platform, ISA variant, and addon resolution\n  embedded-addon.js      # Standalone binary embed stub/generated metadata\n  pi_natives.<platform>-<arch>-modern.node   # x64 modern ISA (local/CI artifact)\n  pi_natives.<platform>-<arch>-baseline.node # x64 baseline ISA (local/CI artifact)\n  pi_natives.<platform>-<arch>.node          # non-x64 build artifact\nnpm/<platform>-<arch>/   # Generated at publish time, not committed\n  package.json           # @awfixerai/natives-<platform>-<arch>\n  *.node                 # Only that platform's addon binary or x64 ISA variants\nsrc/                     # TypeScript wrappers and generated declarations source\n  native.ts\n  index.ts\n```\n\nThe published core package contains only the JS loader, declarations, README,\nand `package.json`. Release publishing generates one leaf package per supported\n`os`/`cpu` pair and injects those leaves into the core manifest as pinned\n`optionalDependencies`, so package managers install only the host platform's\nnative addon. x64 leaves include every built ISA variant, and the loader keeps\nchoosing between `baseline` and `modern` at runtime.\n","readmeFilename":"README.md","_rev":"1-e181958a7aa850aaf0990214c6f01da8"}