{"_id":"@buildtovalue/sfeel","name":"@buildtovalue/sfeel","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"@buildtovalue/sfeel","version":"1.0.0","description":"Minimal S-FEEL subset parser + evaluator for decision tables (Handoff 9 SF-1): input unary tests (comparisons, ranges, value lists, not(), '-'), literal outputs, number/string/boolean, hit policies U and F. Everything outside the documented subset returns","license":"Apache-2.0","type":"module","sideEffects":false,"engines":{"node":">=20"},"main":"./dist/cjs/index.js","module":"./dist/esm/index.js","types":"./dist/esm/index.d.ts","exports":{".":{"types":"./dist/esm/index.d.ts","import":"./dist/esm/index.js","require":"./dist/cjs/index.js"}},"keywords":["dmn","sfeel","feel","decision-table","bpmn"],"repository":{"type":"git","url":"git+https://github.com/danzeroum/bpmn.git","directory":"packages/sfeel"},"publishConfig":{"access":"public"},"scripts":{"build":"tsc -p tsconfig.build.json && tsc -p tsconfig.cjs.json && node ../../scripts/write-cjs-package.mjs dist/cjs","typecheck":"tsc -p tsconfig.json --noEmit"},"_id":"@buildtovalue/sfeel@1.0.0","bugs":{"url":"https://github.com/danzeroum/bpmn/issues"},"homepage":"https://github.com/danzeroum/bpmn#readme","_integrity":"sha512-KEuqDnnWPC6jN6qcdnMYu71BDbxbJY2i0APDUBRmO883OHEd+scuTqMlHHAnzcglRRPo80/YThZrSMAGF1GGNA==","_resolved":"C:\\Users\\danni\\AppData\\Local\\Temp\\15a205dd32440e958c9f41e4edb77738\\buildtovalue-sfeel-1.0.0.tgz","_from":"file:buildtovalue-sfeel-1.0.0.tgz","_nodeVersion":"22.20.0","_npmVersion":"10.9.3","dist":{"integrity":"sha512-KEuqDnnWPC6jN6qcdnMYu71BDbxbJY2i0APDUBRmO883OHEd+scuTqMlHHAnzcglRRPo80/YThZrSMAGF1GGNA==","shasum":"08180f2b8b9b210850a46a634317cf08787d8665","tarball":"https://registry.npmjs.org/@buildtovalue/sfeel/-/sfeel-1.0.0.tgz","fileCount":28,"unpackedSize":108563,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIFWTl5N+DRW55yjmFCNxA59iCbcr0Edh7EyEqpKgtFn8AiAts6CQy0EyvO32PRuhQgUDg13iGS+jJsFskvNcFymLqQ=="}]},"_npmUser":{"name":"danzeroum","email":"danzeroum@gmail.com"},"directories":{},"maintainers":[{"name":"danzeroum","email":"danzeroum@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/sfeel_1.0.0_1784345276174_0.9832792230076168"},"_hasShrinkwrap":false}},"time":{"created":"2026-07-18T03:27:56.047Z","1.0.0":"2026-07-18T03:27:56.306Z","modified":"2026-07-18T03:27:56.497Z"},"maintainers":[{"name":"danzeroum","email":"danzeroum@gmail.com"}],"description":"Minimal S-FEEL subset parser + evaluator for decision tables (Handoff 9 SF-1): input unary tests (comparisons, ranges, value lists, not(), '-'), literal outputs, number/string/boolean, hit policies U and F. Everything outside the documented subset returns","homepage":"https://github.com/danzeroum/bpmn#readme","keywords":["dmn","sfeel","feel","decision-table","bpmn"],"repository":{"type":"git","url":"git+https://github.com/danzeroum/bpmn.git","directory":"packages/sfeel"},"bugs":{"url":"https://github.com/danzeroum/bpmn/issues"},"license":"Apache-2.0","readme":"# @buildtovalue/sfeel\r\n\r\nMinimal **S-FEEL subset** parser + evaluator for decision tables (Handoff 9\r\n§5). Serves the token simulator (Handoff 7 — `businessRuleTask` routes through\r\nreal decision tables) and the DMN editor (Handoff 5 — ⚠ \"não-simulável\" cell\r\nmarkers) without importing either: the package operates on plain string cells\r\nplus a `{variable: value}` context and has **zero dependencies, zero imports\r\nfrom the ecosystem**.\r\n\r\n## The subset (supported)\r\n\r\n| Construct | Example |\r\n|---|---|\r\n| Comparisons | `< 5`, `<= 5`, `> 5`, `>= 5`, `= \"gold\"` |\r\n| Ranges (incl./excl./mixed) | `[1..10]`, `]1..10[`, `[1..10[`, `]1..10]` |\r\n| Value lists (implicit OR) | `\"a\", \"b\"` · `1, 2, 3` · `< 3, > 10` |\r\n| List negation | `not(\"a\", \"b\")` |\r\n| Irrelevant | `-` (or an empty cell) |\r\n| Types | number, string, boolean |\r\n| Hit policies | **U** (Unique), **F** (First) |\r\n\r\nOutputs are **literals only** (number, `\"string\"`, boolean).\r\n\r\n## Explicitly excluded (cerca §1.6)\r\n\r\nFunction invocation (`date()`, `duration()`, …), arithmetic in cells,\r\n`for`/`some`/`every`, nested contexts, date/time/duration types and literals,\r\nnon-literal output expressions, identifier references in cells, and evaluation\r\nof the A/P/R/O/C hit policies (they remain editor metadata — registered in\r\n`pendencias.md`).\r\n\r\n## Honesty contract\r\n\r\n`evaluate(table, context)` returns exactly one of:\r\n\r\n- `{ result }` — the matched rule's outputs (or `null` when no rule matches);\r\n- `{ nonSimulable: { cell, reason } }` — a **declared** failure naming the\r\n  offending cell and why: a construct outside the subset, a malformed cell, a\r\n  missing input variable, a type mismatch, or a Unique-hit-policy violation\r\n  (two rules matching).\r\n\r\nThere is no third, silent state — a cell the package cannot evaluate correctly\r\nis never evaluated at all. `checkTable` / `checkUnaryCell` / `checkOutputCell`\r\nexpose the same verdicts statically for editor feedback before simulation.\r\n\r\nInput-column `expression`s are used **verbatim as context keys** — they are not\r\nevaluated (an input expression that needs evaluation is outside the subset).\r\n","readmeFilename":"README.md","_rev":"1-808ce786af87de7fbf1fa4d33adaa69e"}