{"_id":"@camunda/linting-autofix","_rev":"3-0f1ea810705718720ef4ebc347a5e71e","name":"@camunda/linting-autofix","dist-tags":{"latest":"0.2.0"},"versions":{"0.1.0":{"name":"@camunda/linting-autofix","version":"0.1.0","keywords":["bpmn","bpmnlint","camunda","autofix","linting"],"license":"MIT","_id":"@camunda/linting-autofix@0.1.0","maintainers":[{"name":"nikku","email":"git_nikku@nixis.de"},{"name":"barmac","email":"maciejbarel@gmail.com"},{"name":"maxtru","email":"maximilian.trumpf@camunda.com"},{"name":"philippfromme","email":"philippfromme@outlook.com"},{"name":"marstamm","email":"martin.stamm@camunda.com"},{"name":"camunda_it","email":"it-tools@camunda.com"},{"name":"omranabazid","email":"omran.1994@gmail.com"},{"name":"husnauygur","email":"husna.uygur@camunda.com"},{"name":"skaiir-camunda","email":"valentin.serra@camunda.com"},{"name":"vsgoulart","email":"vinicius@vsgoulart.com"},{"name":"yhaskell","email":"dultsev.igor@gmail.com"},{"name":"jarekdanielak","email":"jarek.danielak@camunda.com"},{"name":"francesco.camunda","email":"francesco.esposito@camunda.com"},{"name":"urbanisierung","email":"adam.urban@gmail.com"},{"name":"jroquescamunda","email":"jonathan.roques@camunda.com"},{"name":"ev-camunda","email":"ev.bilske@camunda.com"},{"name":"ztefanie","email":"stefanie.metzger@camunda.com"},{"name":"emoloney","email":"eamonn.moloney@camunda.com"},{"name":"marcello.barile-camunda","email":"marcello.barile@camunda.com"}],"homepage":"https://github.com/camunda/linting-autofix#readme","bugs":{"url":"https://github.com/camunda/linting-autofix/issues"},"dist":{"shasum":"bd3bfb1ac867608bac4d273711e1cd99a2718c00","tarball":"https://registry.npmjs.org/@camunda/linting-autofix/-/linting-autofix-0.1.0.tgz","fileCount":7,"integrity":"sha512-7kIXTPmM2749p4s/Z2pn3Bi3G6Yd9S6OPg9VW6EU+M8RGe3WrrPkOvnUvgzpioL2PR+r0ZXVBcR5V8YiDwiOPQ==","signatures":[{"sig":"MEUCIQC95m1Sl4Z+4NkaGlS1MUHRYoHDWIWJx9BpMDL061MVEQIgLsLW5Zhi/uJmtsee/xvXkEKPOEOTcHE4U+oLyT1UDnE=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":230170},"main":"dist/index.js","types":"dist/index.d.ts","module":"dist/index.js","exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"./package.json":"./package.json","./assets/linting-autofix.css":"./assets/linting-autofix.css"},"gitHead":"c47e0aa4558d849eba6f5dec064b561db924f715","scripts":{"all":"npm run lint && npm run build && npm test","dev":"npm run test:watch","lint":"eslint . && tsc -p tsconfig.json --noEmit","test":"vitest run","build":"rollup -c","start":"vite --config playground/vite.config.ts","prepare":"npm run build","test:watch":"vitest"},"_npmUser":{"name":"barmac","email":"maciejbarel@gmail.com"},"repository":{"url":"git+https://github.com/camunda/linting-autofix.git","type":"git"},"_npmVersion":"11.17.0","description":"Autofix and autofill affordances for Camunda linting, shared by Camunda Desktop and Web Modeler","directories":{},"_nodeVersion":"24.18.0","dependencies":{"htm":"^3.1.1","@bpmn-io/feelin":"^6.1.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"vite":"^6.0.7","tslib":"^2.8.1","eslint":"^9.17.0","preact":"^10.25.4","rollup":"^4.62.4","vitest":"^4.1.10","bpmn-js":"^18.24.0","globals":"^15.14.0","min-dash":"^5.0.0","diagram-js":"^15.24.0","playwright":"^1.62.1","typescript":"^5.7.2","@types/node":"^22.10.2","@lezer/common":"^1.5.2","@vitest/browser":"^4.1.10","camunda-bpmn-js":"^5.31.1","@camunda/linting":"^3.54.0","rollup-plugin-dts":"^6.5.1","zeebe-bpmn-moddle":"^1.17.0","@testing-library/dom":"^10.4.1","eslint-plugin-bpmn-io":"^2.3.1","bpmn-js-properties-panel":"^5.62.0","@bpmn-io/properties-panel":"^3.48.0","@rollup/plugin-typescript":"^12.3.0","@testing-library/jest-dom":"^6.9.1","@typescript-eslint/parser":"^8.19.0","bpmn-js-element-templates":"^2.30.0","camunda-bpmn-js-behaviors":"^1.17.0","@vitest/browser-playwright":"^4.1.10","mocha-test-container-support":"^0.2.0","bpmnlint-plugin-camunda-compat":"^2.59.2","@typescript-eslint/eslint-plugin":"^8.19.0"},"peerDependencies":{"bpmn-js":">= 18.0.0","diagram-js":">= 15.0.0","bpmn-js-properties-panel":">= 5.0.0","@bpmn-io/properties-panel":">= 3.26.0"},"_npmOperationalInternal":{"tmp":"tmp/linting-autofix_0.1.0_1787153589286_0.7149754901848984","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@camunda/linting-autofix","version":"0.1.1","keywords":["bpmn","bpmnlint","camunda","autofix","linting"],"license":"MIT","_id":"@camunda/linting-autofix@0.1.1","maintainers":[{"name":"nikku","email":"git_nikku@nixis.de"},{"name":"barmac","email":"maciejbarel@gmail.com"},{"name":"maxtru","email":"maximilian.trumpf@camunda.com"},{"name":"philippfromme","email":"philippfromme@outlook.com"},{"name":"marstamm","email":"martin.stamm@camunda.com"},{"name":"camunda_it","email":"it-tools@camunda.com"},{"name":"omranabazid","email":"omran.1994@gmail.com"},{"name":"husnauygur","email":"husna.uygur@camunda.com"},{"name":"skaiir-camunda","email":"valentin.serra@camunda.com"},{"name":"vsgoulart","email":"vinicius@vsgoulart.com"},{"name":"yhaskell","email":"dultsev.igor@gmail.com"},{"name":"jarekdanielak","email":"jarek.danielak@camunda.com"},{"name":"francesco.camunda","email":"francesco.esposito@camunda.com"},{"name":"urbanisierung","email":"adam.urban@gmail.com"},{"name":"jroquescamunda","email":"jonathan.roques@camunda.com"},{"name":"ev-camunda","email":"ev.bilske@camunda.com"},{"name":"ztefanie","email":"stefanie.metzger@camunda.com"},{"name":"emoloney","email":"eamonn.moloney@camunda.com"},{"name":"marcello.barile-camunda","email":"marcello.barile@camunda.com"}],"homepage":"https://github.com/camunda/linting-autofix#readme","bugs":{"url":"https://github.com/camunda/linting-autofix/issues"},"dist":{"shasum":"6106387d4898a79584ef3534df7dc2a8cb828b42","tarball":"https://registry.npmjs.org/@camunda/linting-autofix/-/linting-autofix-0.1.1.tgz","fileCount":7,"integrity":"sha512-qsJsG5mDNFD+6QaOSCtLuDGl40IZKJpPJ8iNDk1zQTSmkSD7v3NZPmd8jZynkck8DPBSW5Fw+s5AAYJ+By5Cwg==","signatures":[{"sig":"MEYCIQCA1QLmMUo4f6Fjwx+AlvfhGL0WISjlOvZJw/leagK/uwIhALNXnjK51gnT4yMBrbEUFoNPTzjZ0D06nk5/xSiZ0sJB","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":227758},"main":"dist/index.js","types":"dist/index.d.ts","module":"dist/index.js","exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"./package.json":"./package.json","./assets/linting-autofix.css":"./assets/linting-autofix.css"},"gitHead":"00483f9ca4c1610546d8867654f945b1f5f7a976","scripts":{"all":"npm run lint && npm run build && npm test","dev":"npm run test:watch","lint":"eslint . && tsc -p tsconfig.json --noEmit","test":"vitest run","build":"rollup -c","start":"vite --config playground/vite.config.ts","prepare":"npm run build","test:watch":"vitest"},"_npmUser":{"name":"barmac","email":"maciejbarel@gmail.com"},"repository":{"url":"git+https://github.com/camunda/linting-autofix.git","type":"git"},"_npmVersion":"11.17.0","description":"Autofix and autofill affordances for Camunda linting, shared by Camunda Desktop and Web Modeler","directories":{},"_nodeVersion":"24.18.0","dependencies":{"htm":"^3.1.1","@bpmn-io/feelin":"^6.1.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"vite":"^6.0.7","tslib":"^2.8.1","eslint":"^9.17.0","preact":"^10.25.4","rollup":"^4.62.4","vitest":"^4.1.10","bpmn-js":"^18.24.0","globals":"^15.14.0","min-dash":"^5.0.0","diagram-js":"^15.24.0","playwright":"^1.62.1","typescript":"^5.7.2","@types/node":"^22.10.2","@lezer/common":"^1.5.2","@vitest/browser":"^4.1.10","camunda-bpmn-js":"^5.31.1","@camunda/linting":"^3.54.0","rollup-plugin-dts":"^6.5.1","zeebe-bpmn-moddle":"^1.17.0","@testing-library/dom":"^10.4.1","eslint-plugin-bpmn-io":"^2.3.1","bpmn-js-properties-panel":"^5.62.0","@bpmn-io/properties-panel":"^3.48.0","@rollup/plugin-typescript":"^12.3.0","@testing-library/jest-dom":"^6.9.1","@typescript-eslint/parser":"^8.19.0","bpmn-js-element-templates":"^2.30.0","camunda-bpmn-js-behaviors":"^1.17.0","@vitest/browser-playwright":"^4.1.10","mocha-test-container-support":"^0.2.0","bpmnlint-plugin-camunda-compat":"^2.59.2","@typescript-eslint/eslint-plugin":"^8.19.0"},"peerDependencies":{"bpmn-js":">= 18.0.0","diagram-js":">= 15.0.0","bpmn-js-properties-panel":">= 5.0.0","@bpmn-io/properties-panel":">= 3.26.0"},"_npmOperationalInternal":{"tmp":"tmp/linting-autofix_0.1.1_1787573981460_0.11745333953452763","host":"s3://npm-registry-packages-npm-production"}},"0.2.0":{"name":"@camunda/linting-autofix","version":"0.2.0","description":"Autofix and autofill affordances for Camunda linting, shared by Camunda Desktop and Web Modeler","main":"dist/index.js","module":"dist/index.js","types":"dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"./assets/linting-autofix.css":"./assets/linting-autofix.css","./package.json":"./package.json"},"scripts":{"all":"npm run lint && npm run build && npm test","build":"rollup -c","dev":"npm run test:watch","lint":"eslint . && tsc -p tsconfig.json --noEmit","prepare":"npm run build","start":"vite --config playground/vite.config.ts","test":"vitest run","test:watch":"vitest"},"keywords":["bpmn","bpmnlint","camunda","autofix","linting"],"repository":{"type":"git","url":"git+https://github.com/camunda/linting-autofix.git"},"license":"MIT","dependencies":{"@bpmn-io/feelin":"^6.1.0","htm":"^3.1.1"},"peerDependencies":{"@bpmn-io/properties-panel":">= 3.26.0","bpmn-js":">= 18.0.0","bpmn-js-properties-panel":">= 5.0.0","diagram-js":">= 15.0.0"},"devDependencies":{"@bpmn-io/properties-panel":"^3.48.0","@camunda/linting":"^3.54.0","@lezer/common":"^1.5.2","@rollup/plugin-typescript":"^12.3.0","@testing-library/dom":"^10.4.1","@testing-library/jest-dom":"^6.9.1","@types/node":"^22.10.2","@typescript-eslint/eslint-plugin":"^8.19.0","@typescript-eslint/parser":"^8.19.0","@vitest/browser":"^4.1.10","@vitest/browser-playwright":"^4.1.10","bpmn-js":"^18.24.0","bpmn-js-element-templates":"^2.30.0","bpmn-js-properties-panel":"^5.62.0","bpmnlint-plugin-camunda-compat":"^2.59.2","camunda-bpmn-js":"^5.31.1","camunda-bpmn-js-behaviors":"^1.17.0","diagram-js":"^15.24.0","eslint":"^9.17.0","eslint-plugin-bpmn-io":"^2.3.1","globals":"^15.14.0","min-dash":"^5.0.0","mocha-test-container-support":"^0.2.0","playwright":"^1.62.1","preact":"^10.25.4","rollup":"^4.62.4","rollup-plugin-dts":"^6.5.1","tslib":"^2.8.1","typescript":"^5.7.2","vite":"^6.0.7","vitest":"^4.1.10","zeebe-bpmn-moddle":"^1.17.0"},"publishConfig":{"access":"public"},"gitHead":"9d8db65fbd5ffa78daebae4812e2172a39439e7e","_id":"@camunda/linting-autofix@0.2.0","bugs":{"url":"https://github.com/camunda/linting-autofix/issues"},"homepage":"https://github.com/camunda/linting-autofix#readme","_nodeVersion":"24.16.0","_npmVersion":"12.0.2","dist":{"integrity":"sha512-8nSNiw0uQz7XtafdDC5UT69b+W3Bz/vMCKuuJcfqUPOwn9M+O3ARIGGnR06kMZGb3nOSzpmrRWkyKHuNhmqzsA==","shasum":"526f9637e4e244d81b0f26e7b6611b7d2c69dc46","tarball":"https://registry.npmjs.org/@camunda/linting-autofix/-/linting-autofix-0.2.0.tgz","fileCount":7,"unpackedSize":269788,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIGG/U9iJo+bEaXHt+t3RAFYnTGU8V8oWQh0PUel7urTwAiAFvuFYnTTrvcc7fP5jExaI28PI8L+y3tZ4Lv6S+G9UQA=="}]},"_npmUser":{"name":"nikku","email":"git_nikku@nixis.de"},"directories":{},"maintainers":[{"name":"nikku","email":"git_nikku@nixis.de"},{"name":"barmac","email":"maciejbarel@gmail.com"},{"name":"maxtru","email":"maximilian.trumpf@camunda.com"},{"name":"philippfromme","email":"philippfromme@outlook.com"},{"name":"marstamm","email":"martin.stamm@camunda.com"},{"name":"camunda_it","email":"it-tools@camunda.com"},{"name":"omranabazid","email":"omran.1994@gmail.com"},{"name":"husnauygur","email":"husna.uygur@camunda.com"},{"name":"skaiir-camunda","email":"valentin.serra@camunda.com"},{"name":"vsgoulart","email":"vinicius@vsgoulart.com"},{"name":"yhaskell","email":"dultsev.igor@gmail.com"},{"name":"jarekdanielak","email":"jarek.danielak@camunda.com"},{"name":"francesco.camunda","email":"francesco.esposito@camunda.com"},{"name":"urbanisierung","email":"adam.urban@gmail.com"},{"name":"jroquescamunda","email":"jonathan.roques@camunda.com"},{"name":"ev-camunda","email":"ev.bilske@camunda.com"},{"name":"ztefanie","email":"stefanie.metzger@camunda.com"},{"name":"emoloney","email":"eamonn.moloney@camunda.com"},{"name":"marcello.barile-camunda","email":"marcello.barile@camunda.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/linting-autofix_0.2.0_1787818380050_0.6648588787780734"},"_hasShrinkwrap":false}},"time":{"created":"2026-08-19T15:33:09.102Z","modified":"2026-08-27T08:13:00.528Z","0.1.0":"2026-08-19T15:33:09.447Z","0.1.1":"2026-08-24T12:19:41.624Z","0.2.0":"2026-08-27T08:13:00.194Z"},"bugs":{"url":"https://github.com/camunda/linting-autofix/issues"},"license":"MIT","homepage":"https://github.com/camunda/linting-autofix#readme","keywords":["bpmn","bpmnlint","camunda","autofix","linting"],"repository":{"type":"git","url":"git+https://github.com/camunda/linting-autofix.git"},"description":"Autofix and autofill affordances for Camunda linting, shared by Camunda Desktop and Web Modeler","maintainers":[{"name":"nikku","email":"git_nikku@nixis.de"},{"name":"barmac","email":"maciejbarel@gmail.com"},{"name":"maxtru","email":"maximilian.trumpf@camunda.com"},{"name":"philippfromme","email":"philippfromme@outlook.com"},{"name":"marstamm","email":"martin.stamm@camunda.com"},{"name":"camunda_it","email":"it-tools@camunda.com"},{"name":"omranabazid","email":"omran.1994@gmail.com"},{"name":"husnauygur","email":"husna.uygur@camunda.com"},{"name":"skaiir-camunda","email":"valentin.serra@camunda.com"},{"name":"vsgoulart","email":"vinicius@vsgoulart.com"},{"name":"yhaskell","email":"dultsev.igor@gmail.com"},{"name":"jarekdanielak","email":"jarek.danielak@camunda.com"},{"name":"francesco.camunda","email":"francesco.esposito@camunda.com"},{"name":"urbanisierung","email":"adam.urban@gmail.com"},{"name":"jroquescamunda","email":"jonathan.roques@camunda.com"},{"name":"ev-camunda","email":"ev.bilske@camunda.com"},{"name":"ztefanie","email":"stefanie.metzger@camunda.com"},{"name":"emoloney","email":"eamonn.moloney@camunda.com"},{"name":"marcello.barile-camunda","email":"marcello.barile@camunda.com"}],"readme":"# @camunda/linting-autofix\n\nAutofix and autofill affordances for [linting](https://github.com/camunda/linting), shared by Camunda Desktop and Web Modeler.\n\nThe module decorates the properties panel of elements inside an agentic ad-hoc sub-process with one-click affordances that wire up both sides of an AI Agent tool contract: the `fromAi()` inputs the agent supplies, and the `toolCallResult` output it reads back. One rule governs every affordance: **seed a blank field, never overwrite a value.**\n\nBoth modelers register the same module, so the two stay in lockstep by construction rather than by builders remembering to change both.\n\n## Usage\n\nRegister the module:\n\n```javascript\nimport { agentConfigAutofillModule } from '@camunda/linting-autofix';\n\nimport '@camunda/linting-autofix/assets/linting-autofix.css';\n\nconst modeler = new BpmnModeler({\n  additionalModules: [\n    agentConfigAutofillModule\n  ]\n});\n```\n\nThe module is editor-only (it mutates the model) and needs the properties panel to be registered too. Host integration is a single line.\n\n### Peer dependencies\n\n`bpmn-js`, `diagram-js`, `bpmn-js-properties-panel` and `@bpmn-io/properties-panel` are peer dependencies, so the module always renders through the host's own instances. In particular, its entries are authored with `htm` bound to `@bpmn-io/properties-panel`'s vendored preact copy — the panel renders its tree through that copy, and hooks from a second preact instance track a different `currentComponent` than the panel sets during render.\n\n## Affordances\n\n1. **Input autofill (`fromAi()`)**, on the tool flow's _entry element only_ — blank io-mapping inputs and blank FEEL-capable element-template fields bound to `zeebe:input` get an `Input from agent` pill, in its own entry directly below the field, seeding `=fromAi(toolCall.<key>, \"<description>\", \"<type>\")`. No offer when the derived key collides with a `fromAi()` key already declared on the element.\n\n2. **Result autofill (`toolCallResult`)**, an `Output to agent` pill on any tool-flow element that does not already produce a contract-readable result upstream on its own execution path, writing into the element's _native_ result field — a templated connector's result expression, a FEEL script task's result variable, or a new output parameter on a plain task.\n\n   On an output mapping row this pill writes the process variable name and nothing else, so the row's _variable assignment value_ never affects it.\n\n   Withdrawn where clicking could not help: on an output row already targeting `toolCallResult`, the click would write the value already there; on a row targeting a sub-path such as `toolCallResult.statusCode`, it would collapse a deliberate partial contribution back to the root.\n\n3. **Autofix actions**, offered on populated fields: malformed `fromAi()` keys (wrong prefix, bracket notation, quoted, over-long path, wrong casing, missing entirely) and near-miss result-channel names are detected by re-parsing the element's own fields. A well-formed `fromAi()` call sitting on a non-entry element is offered as `Move to \"<entry element>\"`, which declares it on the actual entry element and rewrites only the `fromAi(...)` span, leaving the rest of that field's expression intact.\n\n   A correction that resolves a validation message is painted onto that message rather than taking a row of its own. Its visible label describes the builder's goal independently of whether the implementation classifies the mutation as a fix or autofill:\n\n   | What the field holds | What accepting gives you | Label |\n   | --- | --- | --- |\n   | A description or type you wrote | Your text kept exactly; only the key is corrected, and anything you left out is filled in | `Fix` |\n   | Nothing but a broken key (`fromAi()`, `fromAi(42)`) | A complete call: key, description, type | `Input from agent` |\n   | A call that will not parse at all | A reset to a working default; what you wrote is replaced, and the adjacent validation text and accessible tooltip say so | `Input from agent` |\n\n   Three rules govern this, stated canonically in `agent-tool-corrections.ts`: keep every decision you made that is still readable; reset only when nothing can be salvaged; and say which of the two just happened, because the button previews nothing. A type is written from a template's declared property but never from a keyword guess into a call you already had.\n\nFixes are span-scoped, never whole-field replacement, so an expression like `=concat(\"prefix-\", fromAi(), \"-suffix\")` is never discarded. Every applied fix, including a multi-element move, is a single undo unit.\n\n### The seeded `fromAi()` type is a guess, not a fact\n\nEvery seeded call carries a `type` argument computed by `inferFromAiType` in `from-ai-autofill.ts`. Only `propertyType === 'Boolean'` on an element-template field is a confident fact; everything else is a keyword heuristic over the field's own description/label text, defaulting to `'string'`.\n\nIf you hit a runtime type mismatch on a tool call, check this before assuming the connector or the model is at fault: the third argument of a seeded call is exactly what `inferFromAiType` returned, never hand-authored. The fix is a one-word edit to the seeded `\"<type>\"` argument in the field itself, not a change to that function.\n\n## Eligibility\n\nAn ad-hoc sub-process counts as agentic once it carries the `io.camunda.agenticai.toolContainer` `zeebe:Properties` boolean, or the `io.camunda.connectors.agenticai.aiagent.jobworker.v1` element template id — matching `isAgenticAdHocSubProcess` in `bpmnlint-plugin-camunda-compat`. A bare `zeebe:AdHoc` extension is deliberately not treated as a fallback: plain ad-hoc sub-processes using output collection carry it too.\n\nThe shared predicates (`isAgenticAdHocSubProcess`, `isToolFlowElement`, `isToolEntryElement`) are exported so every host surface agrees on where the affordances belong.\n\n## Development\n\n```sh\nnpm install\nnpm start     # playground for testing library code in isolation\nnpm run all   # lint + build + test, the same as CI\n```\n\n### Local development against a host modeler\n\nBuild the library and link it into the host:\n\n```sh\nnpm run build && npm link\ncd ../camunda-modeler/client && npm link @camunda/linting-autofix\n```\n\nRe-run `npm run build` after each change; the host picks up `dist/` directly.\n\n## License\n\nMIT\n","readmeFilename":"README.md"}