{"_id":"@amql/engine","name":"@amql/engine","dist-tags":{"alpha":"0.0.0-alpha.0","latest":"0.0.0-alpha.0"},"versions":{"0.0.0-alpha.0":{"name":"@amql/engine","version":"0.0.0-alpha.0","type":"module","exports":{".":{"types":"./index.d.ts","flow":"./index.js.flow","require":"./index.cjs","import":"./index.js"}},"engines":{"node":">=18.0.0"},"scripts":{"prepack":"wasm-js-bridge build-workspace"},"license":"MIT","description":"AQL engine: parse, index, query, and validate code annotations","repository":{"type":"git","url":"git+https://github.com/vikr01/aql.git"},"peerDependencies":{"@amql/mutate":"^0.0.0-alpha.0","@amql/predicates":"^0.0.0-alpha.0","@amql/selector":"^0.0.0-alpha.0"},"_id":"@amql/engine@0.0.0-alpha.0","gitHead":"4ee0598df7c53c686813ef469453e946c91514be","types":"./index.d.ts","bugs":{"url":"https://github.com/vikr01/aql/issues"},"homepage":"https://github.com/vikr01/aql#readme","_nodeVersion":"22.17.0","_npmVersion":"11.4.2","dist":{"integrity":"sha512-wG96zluuUldu9H9/lgEapQ9HOTqbYNqPvPkTmKxbDt003G2QZTr0dwzkKaAoNcJiGeuWfTuI4L+MAyOv+tdr+A==","shasum":"968f39ea978f075a8ed8e702a2d055e7e30ea755","tarball":"https://registry.npmjs.org/@amql/engine/-/engine-0.0.0-alpha.0.tgz","fileCount":6,"unpackedSize":968525,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCID3DJSB+glg03EM/a0at2Q0hcHSRotRMPmDVl3ub5fphAiB0El4wyOyjlZ/NXrtcLmxx1/vla11gqr09RWqp1heAlA=="}]},"_npmUser":{"name":"vikr01","email":"vik120@icloud.com"},"directories":{},"maintainers":[{"name":"vikr01","email":"vik120@icloud.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/engine_0.0.0-alpha.0_1773348983286_0.9788767468697905"},"_hasShrinkwrap":false}},"time":{"created":"2026-03-12T20:56:23.182Z","0.0.0-alpha.0":"2026-03-12T20:56:23.584Z","modified":"2026-03-12T20:56:23.869Z"},"maintainers":[{"name":"vikr01","email":"vik120@icloud.com"}],"description":"AQL engine: parse, index, query, and validate code annotations","homepage":"https://github.com/vikr01/aql#readme","repository":{"type":"git","url":"git+https://github.com/vikr01/aql.git"},"bugs":{"url":"https://github.com/vikr01/aql/issues"},"license":"MIT","readme":"# amql-engine\n\n> Core domain logic for AQL: parse, index, query, and validate code annotations\n\n## Role\n\n- All domain logic lives here\n- Surface crates (CLI, MCP, LSP, WASM) are thin shims into this crate\n- No surface crate contains domain logic — `D ⊂ amql-engine`\n\n## Features\n\n- `default` = `[\"resolver\", \"fs\"]`\n- `resolver` — tree-sitter code resolution (Rust, TypeScript, Go)\n- `fs` — filesystem access (globbing, caching, file I/O)\n- `wasm` — WASM bindings via `wasm_bindgen` (excludes `resolver` + `fs`)\n- `ts` — TypeScript type generation via `ts-rs`\n\n## Key Modules\n\n- `store` — load, index, query `.aqm` annotation sidecars\n- `selector` — CSS-like selector parsing and matching\n- `navigate` — tree-sitter AST navigation and source mutation\n- `sync` — incremental sidecar sync (source change → minimal XML edits)\n- `extractor` — built-in framework extractors (Express, React, Go, Rust, tests)\n- `query` — unified annotation + code element queries\n- `transact` — atomic multi-step source mutations with rollback\n\n## Getting Started\n\n```rust\nuse aql_engine::{AnnotationStore, Scope};\nuse std::path::Path;\n\n// Load annotations\nlet mut store = AnnotationStore::new(Path::new(\"/project\"));\nlet errors = store.load_all_from_locator();\n\n// Query by selector\nlet results = store.select(\"controller[method=\\\"POST\\\"]\", None, None, None)?;\n\n// Incremental sidecar sync\nuse aql_engine::{sync_sidecar, apply_edits};\nlet edits = sync_sidecar(&old_xml, &new_annotations);\nlet updated_xml = apply_edits(&old_xml, &edits);\n```\n\n## npm\n\n- Package: `@aql/engine`\n- Build: `bun run build` (via turborepo → wasm-pack + codegen)\n- All TypeScript types generated from Rust via `ts-rs`\n- All JS wrappers generated from embedded Rust consts\n\n## License\n\n[MIT](../../LICENSE)\n","readmeFilename":"README.md","_rev":"1-e8ca40a3673c88b03cb4005888bf75a4"}