{"_id":"@anteriorai/srg-parser","_rev":"5-3e9bf93eca6caa3399905f8ed11b23bb","name":"@anteriorai/srg-parser","dist-tags":{"latest":"0.6.1"},"versions":{"0.5.1":{"name":"@anteriorai/srg-parser","version":"0.5.1","keywords":["srg","parser","ast","tree-sitter","symbolic-reasoning","browser","nodejs"],"license":"SEE LICENSE IN LICENSE","_id":"@anteriorai/srg-parser@0.5.1","maintainers":[{"name":"ant-alpacolypse","email":"anuj@anterior.com"},{"name":"vitali_avagyan","email":"vitali.avagyan@anterior.com"}],"homepage":"https://github.com/anteriorai/symbolic-reasoning#readme","bugs":{"url":"https://github.com/anteriorai/symbolic-reasoning/issues"},"dist":{"shasum":"297248d65683ca6dfef08565c4ffbfe92bcefc91","tarball":"https://registry.npmjs.org/@anteriorai/srg-parser/-/srg-parser-0.5.1.tgz","fileCount":14,"integrity":"sha512-n/Cpn2PDcVFE32ASjZkgcb56dFdcU97EOBJdRGzTsLXAJRhvJSJ0ZIuXlsxLHxEdJJUhXtlMJhb2EXRuJtblBA==","signatures":[{"sig":"MEQCIBHkY1ftbyCe1nDW40R+VfvzyF091+X3bBayS8/fQNBGAiB+kLFZpeNU5yEoyr1Pv3pFNIrDgba1kNd3qRQQ/K6bhA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":267507},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=24.0.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./wasm/*":"./wasm/*"},"gitHead":"e9693600ab401c56a7f4f6c5f22d56d685564627","private":false,"scripts":{"dev":"tsc --watch","test":"npm run build && node --test test/parser.test.js","build":"npm run copy-wasm && tsc","clean":"rm -rf dist wasm","prepare":"npm run build","copy-wasm":"node scripts/copy-wasm.js"},"_npmUser":{"name":"ant-alpacolypse","email":"anuj@anterior.com"},"repository":{"url":"git+https://github.com/anteriorai/symbolic-reasoning.git","type":"git","directory":"packages/srg-parser"},"_npmVersion":"11.6.2","description":"Universal parser for SRG (Symbolic Reasoning Graph) language - works in browser and Node.js","directories":{},"_nodeVersion":"24.11.1","dependencies":{"web-tree-sitter":"0.25.10","@anteriorai/srg-grammar":"^0.5.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"5.9.3","@types/node":"20.19.27"},"_npmOperationalInternal":{"tmp":"tmp/srg-parser_0.5.1_1778567695501_0.07013300749002327","host":"s3://npm-registry-packages-npm-production"}},"0.6.0":{"name":"@anteriorai/srg-parser","version":"0.6.0","keywords":["srg","parser","ast","tree-sitter","symbolic-reasoning","browser","nodejs"],"license":"SEE LICENSE IN LICENSE","_id":"@anteriorai/srg-parser@0.6.0","maintainers":[{"name":"ant-alpacolypse","email":"anuj@anterior.com"},{"name":"vitali_avagyan","email":"vitali.avagyan@anterior.com"}],"homepage":"https://github.com/anteriorai/symbolic-reasoning#readme","bugs":{"url":"https://github.com/anteriorai/symbolic-reasoning/issues"},"dist":{"shasum":"6450da23ec04852613c4254b0407469406ab60d0","tarball":"https://registry.npmjs.org/@anteriorai/srg-parser/-/srg-parser-0.6.0.tgz","fileCount":14,"integrity":"sha512-dCWUnio0JdeGJzYWf2dy0BpJAwb3hPBiAIfBH3b1krvxn3iBSz7fA5Fwo7Ou428cZy2oY1BkDUuzuR4k07i3yw==","signatures":[{"sig":"MEUCIQDaK9TPuNXJc2kVecTcQyqd4JedyQvtlh3Qug8f2k9wdAIgSWN5098ILpkrzMBG6M6R4wabS+Jbh8BC2flnJZpnj9w=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":267507},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=24.0.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./wasm/*":"./wasm/*"},"gitHead":"137137672d18f28a4d31a3a73081e9a2b24bcbc5","private":false,"scripts":{"dev":"tsc --watch","test":"npm run build && node --test test/parser.test.js","build":"npm run copy-wasm && tsc","clean":"rm -rf dist wasm","prepare":"npm run build","copy-wasm":"node scripts/copy-wasm.js"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:c091ac7d-34b7-4a46-9c4e-f6855562422e"}},"repository":{"url":"git+https://github.com/anteriorai/symbolic-reasoning.git","type":"git","directory":"packages/srg-parser"},"_npmVersion":"11.6.2","description":"Universal parser for SRG (Symbolic Reasoning Graph) language - works in browser and Node.js","directories":{},"_nodeVersion":"24.11.1","dependencies":{"web-tree-sitter":"0.25.10","@anteriorai/srg-grammar":"^0.6.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"5.9.3","@types/node":"20.19.27"},"_npmOperationalInternal":{"tmp":"tmp/srg-parser_0.6.0_1782925054837_0.5255467668488205","host":"s3://npm-registry-packages-npm-production"}},"0.6.1":{"name":"@anteriorai/srg-parser","version":"0.6.1","private":false,"license":"SEE LICENSE IN LICENSE","description":"Universal parser for SRG (Symbolic Reasoning Graph) language - works in browser and Node.js","type":"module","main":"./dist/index.js","types":"./dist/index.d.ts","publishConfig":{"access":"public"},"exports":{".":{"import":"./dist/index.js","types":"./dist/index.d.ts"},"./wasm/*":"./wasm/*"},"scripts":{"copy-wasm":"node scripts/copy-wasm.js","build":"npm run copy-wasm && tsc","prepare":"npm run build","dev":"tsc --watch","test":"npm run build && node --test test/parser.test.js","clean":"rm -rf dist wasm"},"keywords":["srg","parser","ast","tree-sitter","symbolic-reasoning","browser","nodejs"],"engines":{"node":">=24.0.0"},"dependencies":{"@anteriorai/srg-grammar":"^0.6.1","web-tree-sitter":"0.25.10"},"devDependencies":{"typescript":"5.9.3","@types/node":"20.19.27"},"repository":{"type":"git","url":"git+https://github.com/anteriorai/symbolic-reasoning.git","directory":"packages/srg-parser"},"gitHead":"81b1da875eee92a866fcf59bc2256042131a3288","_id":"@anteriorai/srg-parser@0.6.1","bugs":{"url":"https://github.com/anteriorai/symbolic-reasoning/issues"},"homepage":"https://github.com/anteriorai/symbolic-reasoning#readme","_nodeVersion":"24.11.1","_npmVersion":"11.6.2","dist":{"integrity":"sha512-2RWyaxy+U13v4yK+VueXfaZh3+tZTAZ45NK0SwrOkUmehMRRvz2+HzPoh5gLxbqf1+6RWdNl52Jn2dD92fehhA==","shasum":"460ca35b4b10820e03a497126be5255d4b87d9a2","tarball":"https://registry.npmjs.org/@anteriorai/srg-parser/-/srg-parser-0.6.1.tgz","fileCount":14,"unpackedSize":267496,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIBrt12XxXLQMhOonQdkm4iZnkbTozBqFKTxOIRBzNCKWAiEA97R0hJ9uqoWcU9JaDDhzxcESDXkx3G36y3/hv9BC3tA="}]},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:c091ac7d-34b7-4a46-9c4e-f6855562422e"}},"directories":{},"maintainers":[{"name":"ant-alpacolypse","email":"anuj@anterior.com"},{"name":"vitali_avagyan","email":"vitali.avagyan@anterior.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/srg-parser_0.6.1_1782937368981_0.15461726664952424"},"_hasShrinkwrap":false}},"time":{"created":"2026-05-12T06:34:55.440Z","modified":"2026-07-01T20:22:49.254Z","0.5.0":"2026-05-05T22:47:24.118Z","0.5.1":"2026-05-12T06:34:55.690Z","0.6.0":"2026-07-01T16:57:35.003Z","0.6.1":"2026-07-01T20:22:49.123Z"},"bugs":{"url":"https://github.com/anteriorai/symbolic-reasoning/issues"},"license":"SEE LICENSE IN LICENSE","homepage":"https://github.com/anteriorai/symbolic-reasoning#readme","keywords":["srg","parser","ast","tree-sitter","symbolic-reasoning","browser","nodejs"],"repository":{"type":"git","url":"git+https://github.com/anteriorai/symbolic-reasoning.git","directory":"packages/srg-parser"},"description":"Universal parser for SRG (Symbolic Reasoning Graph) language - works in browser and Node.js","maintainers":[{"name":"ant-alpacolypse","email":"anuj@anterior.com"},{"name":"vitali_avagyan","email":"vitali.avagyan@anterior.com"}],"readme":"# @anteriorai/srg-parser\n\nParser for the SRG (Symbolic Reasoning Graph) language. Converts `.srg` source files to Abstract Syntax Trees (AST).\n\n> **Public preview.** This package is an early public release of Anterior's symbolic reasoning tooling.\n> It is being published to support transparency, research discussion, and early experimentation while the broader open-source repository is prepared for release.\n>\n> Future releases may be made available under updated licensing terms. Until then, use of this package is governed by the license included with this release.\n>\n> This release should not be treated as a supported product, a stable API, or a complete reference implementation.\n> It is provided \"as is,\" without warranties of any kind. Users are responsible for evaluating correctness, security, compliance, and suitability for their own use case.\n\n## Installation\n\n```bash\nnpm install @anteriorai/srg-parser\n```\n\n## Usage\n\n```typescript\nimport { parse } from '@anteriorai/srg-parser';\n\nconst source = `\npredicate is_adult: \"Is patient 18 or older?\"\noutcome approved: \"Approved\"\nis_adult => approved\n`;\n\nconst ast = await parse(source);\n```\n\n## Bundler Configuration (Vite)\n\nThis package uses WASM. If you are using Vite, you may need to exclude it from dependency optimization to ensure WASM assets are loaded correctly in development mode:\n\n```javascript\n// vite.config.js\nexport default defineConfig({\n  optimizeDeps: {\n    exclude: ['@anteriorai/srg-parser']\n  }\n});\n```\n\n## API\n\n### `parse(source: string): Promise<SourceFile>`\n\nParses SRG source code and returns a typed AST with location information.\n\n### Types\n\nAll AST types are exported for TypeScript usage:\n\n```typescript\nimport type { \n  Position,\n  Location,\n  SourceFile,\n  PredicateDefinition,\n  OutcomeDefinition,\n  AggregatorDefinition,\n  Path,\n  Expression\n} from '@anteriorai/srg-parser';\n```\n","readmeFilename":"README.md"}