{"_id":"@humain/workflow","_rev":"4-4be2e503577c1e7091862cbddaa27a66","name":"@humain/workflow","dist-tags":{"latest":"0.1.0"},"versions":{"0.0.3":{"name":"@humain/workflow","version":"0.0.3","keywords":["react","workflow","editor","graph","humain"],"author":{"name":"Ali Abdul-Karim","email":"akarim@humain.com"},"license":"Apache-2.0","_id":"@humain/workflow@0.0.3","maintainers":[{"name":"mazinkam","email":"ali.abdul-karim@hotmail.com"}],"bin":{"humain-workflow":"bin/humain-workflow.mjs"},"dist":{"shasum":"c42b653c1c0adf829bbe57e28aaae8581e3a2641","tarball":"https://registry.npmjs.org/@humain/workflow/-/workflow-0.0.3.tgz","fileCount":147,"integrity":"sha512-wEbYeneVUS+PGg+Ksvf0cT9WQYrh8WpvF28VMsZK5ueMgO2NLxSo30txDxjzebdtriaCEKsHQixKswgn4qfgIQ==","signatures":[{"sig":"MEQCIBRyexI3i59hc3QsQWpcCHeufzOgN99BlIpplqn9DtTtAiBwU3rTpW+fsAtpns6NJyKpYM0hpwWvLJzz80dRLZGlpQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":889545},"main":"./dist/index.js","type":"module","_from":"file:/var/folders/nb/s79g7y216rd1nd99cvs3lfc80000gp/T/humain-workflow-release-AgNdqI/verified-tarball/humain-workflow-0.0.3.tgz","owner":"Humain","types":"./dist/index.d.ts","module":"./dist/index.js","contact":"akarim@humain.com","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./domain":{"types":"./dist/domain.d.ts","import":"./dist/domain.js"},"./editor":{"types":"./dist/editor.d.ts","import":"./dist/editor.js"},"./runtime":{"types":"./dist/runtime.d.ts","import":"./dist/runtime.js"},"./styles.css":"./dist/styles.css"},"scripts":{"test":"vitest run --root ../.. --project=workflow-unit","build":"vite build && bun run build:types && bun run build:css","build:css":"mkdir -p dist && cp src/styles.css dist/styles.css","test:a11y":"vitest run --root ../.. --project=workflow-unit accessibility --no-file-parallelism --maxWorkers=1","typecheck":"tsc -p tsconfig.json --noEmit && tsc -p tsconfig.public-consumer.json","pack:skill":"bun ../../tooling/workflow/skill.ts pack","build:types":"tsc -p tsconfig.build.json && bun scripts/clean-private-declarations.ts","check:skill":"bun ../../tooling/workflow/skill.ts check","test:visual":"bun tests/visual/run.ts","generate:skill":"bun ../../tooling/workflow/skill.ts generate"},"_npmUser":{"name":"mazinkam","email":"ali.abdul-karim@hotmail.com"},"_resolved":"/var/folders/nb/s79g7y216rd1nd99cvs3lfc80000gp/T/humain-workflow-release-AgNdqI/verified-tarball/humain-workflow-0.0.3.tgz","_integrity":"sha512-wEbYeneVUS+PGg+Ksvf0cT9WQYrh8WpvF28VMsZK5ueMgO2NLxSo30txDxjzebdtriaCEKsHQixKswgn4qfgIQ==","repository":{"url":"https://gitlab.humain.com/humain/data-and-ai-modeling/applications/government-brain/humain-foundation-ui-react.git","type":"git","directory":"packages/workflow"},"_npmVersion":"11.17.0","description":"HUMAIN's React workflow editor runtime and product workflow components","directories":{},"sideEffects":["*.css"],"_nodeVersion":"26.5.0","dependencies":{"@xyflow/react":"12.11.2"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"devDependencies":{"pngjs":"7.0.0","axe-core":"4.12.1","@humain/ui":"workspace:*","@types/pngjs":"6.0.5","@blazediff/core":"1.9.3"},"peerDependencies":{"react":"^18.0.0 || ^19.0.0","react-dom":"^18.0.0 || ^19.0.0","@humain/ui":"^2.1.57","lucide-react":"^0.577.0 || ^1.0.1"},"_npmOperationalInternal":{"tmp":"tmp/workflow_0.0.3_1784815145213_0.8716187928472032","host":"s3://npm-registry-packages-npm-production"}},"0.0.4":{"name":"@humain/workflow","version":"0.0.4","keywords":["react","workflow","editor","graph","humain"],"author":{"name":"Ali Abdul-Karim","email":"akarim@humain.com"},"license":"Apache-2.0","_id":"@humain/workflow@0.0.4","maintainers":[{"name":"mazinkam","email":"ali.abdul-karim@hotmail.com"}],"bin":{"humain-workflow":"bin/humain-workflow.mjs"},"dist":{"shasum":"c333d06bb01f34b9aa54828e72c68c3dc297d750","tarball":"https://registry.npmjs.org/@humain/workflow/-/workflow-0.0.4.tgz","fileCount":147,"integrity":"sha512-xEjGtqNuu2TwgUFRl9Xz1SKyVN/F0ut566aPKMdd/c8l09EZXOjju1HTvdmzXssEkSBp++TnFQcVkK6mAX4qHA==","signatures":[{"sig":"MEQCICKr7fUWYzqjKAl4qvCYuAcfO2Qy98M4LaZm6PRknlFqAiBS4DsU64foaKxIj6D8/BJ/R1+zvuPnEBjZTxGNBmAu3Q==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":890624},"main":"./dist/index.js","type":"module","_from":"file:/var/folders/nb/s79g7y216rd1nd99cvs3lfc80000gp/T/humain-workflow-release-CFZVh1/verified-tarball/humain-workflow-0.0.4.tgz","owner":"Humain","types":"./dist/index.d.ts","module":"./dist/index.js","contact":"akarim@humain.com","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./domain":{"types":"./dist/domain.d.ts","import":"./dist/domain.js"},"./editor":{"types":"./dist/editor.d.ts","import":"./dist/editor.js"},"./runtime":{"types":"./dist/runtime.d.ts","import":"./dist/runtime.js"},"./styles.css":"./dist/styles.css"},"scripts":{"test":"vitest run --root ../.. --project=workflow-unit","build":"vite build && bun run build:types && bun run build:css","build:css":"mkdir -p dist && cp src/styles.css dist/styles.css","test:a11y":"vitest run --root ../.. --project=workflow-unit accessibility --no-file-parallelism --maxWorkers=1","typecheck":"tsc -p tsconfig.json --noEmit && tsc -p tsconfig.public-consumer.json","pack:skill":"bun ../../tooling/workflow/skill.ts pack","build:types":"tsc -p tsconfig.build.json && bun scripts/clean-private-declarations.ts","check:skill":"bun ../../tooling/workflow/skill.ts check","test:visual":"bun tests/visual/run.ts","generate:llms":"bun ../../tooling/workflow/generate-llms.ts","generate:skill":"bun ../../tooling/workflow/skill.ts generate"},"_npmUser":{"name":"mazinkam","email":"ali.abdul-karim@hotmail.com"},"_resolved":"/var/folders/nb/s79g7y216rd1nd99cvs3lfc80000gp/T/humain-workflow-release-CFZVh1/verified-tarball/humain-workflow-0.0.4.tgz","_integrity":"sha512-xEjGtqNuu2TwgUFRl9Xz1SKyVN/F0ut566aPKMdd/c8l09EZXOjju1HTvdmzXssEkSBp++TnFQcVkK6mAX4qHA==","repository":{"url":"https://gitlab.humain.com/humain/data-and-ai-modeling/applications/government-brain/humain-foundation-ui-react.git","type":"git","directory":"packages/workflow"},"_npmVersion":"11.13.0","description":"HUMAIN's React workflow editor runtime and product workflow components","directories":{},"sideEffects":["*.css"],"_nodeVersion":"24.16.0","dependencies":{"@xyflow/react":"12.11.2"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"devDependencies":{"pngjs":"7.0.0","axe-core":"4.12.1","@humain/ui":"workspace:*","@types/pngjs":"6.0.5","@blazediff/core":"1.9.3"},"peerDependencies":{"react":"^18.0.0 || ^19.0.0","react-dom":"^18.0.0 || ^19.0.0","@humain/ui":"^2.1.57","lucide-react":"^0.577.0 || ^1.0.1"},"_npmOperationalInternal":{"tmp":"tmp/workflow_0.0.4_1785133385881_0.6737656776222269","host":"s3://npm-registry-packages-npm-production"}},"0.0.5":{"name":"@humain/workflow","version":"0.0.5","keywords":["react","workflow","editor","graph","humain"],"author":{"name":"Ali Abdul-Karim","email":"akarim@humain.com"},"license":"Apache-2.0","_id":"@humain/workflow@0.0.5","maintainers":[{"name":"mazinkam","email":"ali.abdul-karim@hotmail.com"}],"bin":{"humain-workflow":"bin/humain-workflow.mjs"},"dist":{"shasum":"5ae0a8f8f25f5f61d3404fc8b1929587e3f9eb3a","tarball":"https://registry.npmjs.org/@humain/workflow/-/workflow-0.0.5.tgz","fileCount":149,"integrity":"sha512-8BR4U0zVsSTDrDSmZSBgy4mrgGZDmz68MEWyXyyWGeFPk8P7X1Wu2PwcjhsTRJFEDAFHjlFEFn39QdZmJGxB5w==","signatures":[{"sig":"MEUCIFqS6eAt3cLTVyskJH9rzasdiY0ygAhkNeeLYGKYEfaBAiEAhFRmZmuZrcJzSzVm5rwNHCLlXGodOZpwZVK0QW+dEGA=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":958572},"main":"./dist/index.js","type":"module","_from":"file:/var/folders/nb/s79g7y216rd1nd99cvs3lfc80000gp/T/humain-workflow-release-6zjzue/verified-tarball/humain-workflow-0.0.5.tgz","owner":"Humain","types":"./dist/index.d.ts","module":"./dist/index.js","contact":"akarim@humain.com","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./domain":{"types":"./dist/domain.d.ts","import":"./dist/domain.js"},"./editor":{"types":"./dist/editor.d.ts","import":"./dist/editor.js"},"./runtime":{"types":"./dist/runtime.d.ts","import":"./dist/runtime.js"},"./styles.css":"./dist/styles.css"},"scripts":{"test":"vitest run --root ../.. --project=workflow-unit","build":"vite build && bun run build:types && bun run build:css","build:css":"mkdir -p dist && cp src/styles.css dist/styles.css","test:a11y":"vitest run --root ../.. --project=workflow-unit accessibility --no-file-parallelism --maxWorkers=1","typecheck":"tsc -p tsconfig.json --noEmit && tsc -p tsconfig.public-consumer.json","pack:skill":"bun ../../tooling/workflow/skill.ts pack","build:types":"tsc -p tsconfig.build.json && bun scripts/clean-private-declarations.ts","check:skill":"bun ../../tooling/workflow/skill.ts check","test:visual":"bun tests/visual/run.ts","generate:llms":"bun ../../tooling/workflow/generate-llms.ts","generate:skill":"bun ../../tooling/workflow/skill.ts generate"},"_npmUser":{"name":"mazinkam","email":"ali.abdul-karim@hotmail.com"},"_resolved":"/var/folders/nb/s79g7y216rd1nd99cvs3lfc80000gp/T/humain-workflow-release-6zjzue/verified-tarball/humain-workflow-0.0.5.tgz","_integrity":"sha512-8BR4U0zVsSTDrDSmZSBgy4mrgGZDmz68MEWyXyyWGeFPk8P7X1Wu2PwcjhsTRJFEDAFHjlFEFn39QdZmJGxB5w==","repository":{"url":"https://gitlab.humain.com/humain/data-and-ai-modeling/applications/government-brain/humain-foundation-ui-react.git","type":"git","directory":"packages/workflow"},"_npmVersion":"11.17.0","description":"HUMAIN's React workflow editor runtime and product workflow components","directories":{},"sideEffects":["*.css"],"_nodeVersion":"26.5.0","dependencies":{"@xyflow/react":"12.11.2"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"devDependencies":{"pngjs":"7.0.0","axe-core":"4.12.1","@humain/ui":"workspace:*","@types/pngjs":"6.0.5","@blazediff/core":"1.9.3"},"peerDependencies":{"react":"^18.0.0 || ^19.0.0","react-dom":"^18.0.0 || ^19.0.0","@humain/ui":"^2.1.57","lucide-react":"^0.577.0 || ^1.0.1"},"_npmOperationalInternal":{"tmp":"tmp/workflow_0.0.5_1785218817202_0.3573867417893666","host":"s3://npm-registry-packages-npm-production"}},"0.1.0":{"_id":"@humain/workflow@0.1.0","bin":{"humain-workflow":"bin/humain-workflow.mjs"},"dist":{"shasum":"d1c721e6df2d74b64e723a6d162681168b713885","tarball":"https://registry.npmjs.org/@humain/workflow/-/workflow-0.1.0.tgz","fileCount":193,"integrity":"sha512-kqZ2q5UYPJFEVbH6M4ps7Be6YlkOp9rZ8cWVzduhW2hGnRXuYb0gKGKcG5K8TN0Ju58Dfp/mz/hV3jkdqmmQxQ==","signatures":[{"sig":"MEUCIGTcFZzhSHrP/cG9J/lriy40RwaufnOh0yQp/0k9yQy5AiEApsHddlXJoe01qqBXrCP5x23IoVsLkkOJ13rsDHasgu8=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQCyT6IZDvdeGKBivMSWzqtt5wdSmdPKXGomrBJb0MCxLAIgIe7CIfzZjUg/N//6pZKBZMoIsgwcws/HsXvEQuN6oS4="}],"unpackedSize":1393687},"main":"./dist/index.js","name":"@humain/workflow","type":"module","_from":"file:/tmp/PWFREL-010/humain-workflow-0.1.0.tgz","owner":"Humain","types":"./dist/index.d.ts","author":{"name":"Ali Abdul-Karim","email":"akarim@humain.com"},"module":"./dist/index.js","contact":"akarim@humain.com","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./domain":{"types":"./dist/domain.d.ts","import":"./dist/domain.js"},"./editor":{"types":"./dist/editor.d.ts","import":"./dist/editor.js"},"./runtime":{"types":"./dist/runtime.d.ts","import":"./dist/runtime.js"},"./primitives":{"types":"./dist/primitives.d.ts","import":"./dist/primitives.js"},"./styles.css":"./dist/styles.css"},"license":"Apache-2.0","scripts":{"test":"vitest run --root ../.. --project=workflow-unit --project=workflow-primitives","build":"vite build && bun run build:types && bun run build:css","build:css":"bun scripts/build-css.ts","test:a11y":"vitest run --root ../.. --project=workflow-unit accessibility --no-file-parallelism --maxWorkers=1","typecheck":"tsc -p tsconfig.json --noEmit && tsc -p tsconfig.public-consumer.json && tsc -p tsconfig.primitives-tests.json","pack:skill":"bun ../../tooling/workflow/skill.ts pack","build:types":"tsc -p tsconfig.build.json && bun scripts/clean-private-declarations.ts","check:skill":"bun ../../tooling/workflow/skill.ts check","test:visual":"bun tests/visual/run.ts","generate:llms":"bun ../../tooling/workflow/generate-llms.ts","generate:skill":"bun ../../tooling/workflow/skill.ts generate"},"version":"0.1.0","_npmUser":{"name":"mazinkam","email":"ali.abdul-karim@hotmail.com"},"keywords":["react","workflow","editor","graph","humain"],"_resolved":"/tmp/PWFREL-010/humain-workflow-0.1.0.tgz","_integrity":"sha512-kqZ2q5UYPJFEVbH6M4ps7Be6YlkOp9rZ8cWVzduhW2hGnRXuYb0gKGKcG5K8TN0Ju58Dfp/mz/hV3jkdqmmQxQ==","repository":{"url":"https://gitlab.humain.com/humain/data-and-ai-modeling/applications/government-brain/humain-foundation-ui-react.git","type":"git","directory":"packages/workflow"},"_npmVersion":"11.20.0","description":"HUMAIN's React workflow editor runtime and product workflow components","directories":{},"maintainers":[{"name":"mazinkam","email":"ali.abdul-karim@hotmail.com"}],"sideEffects":["*.css"],"_nodeVersion":"26.11.0","dependencies":{"@xyflow/react":"12.12.0","react-compiler-runtime":"1.0.0"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"devDependencies":{"pngjs":"7.0.0","axe-core":"4.14.0","@humain/ui":"workspace:*","@types/pngjs":"6.0.5","@blazediff/core":"1.10.0"},"peerDependencies":{"react":"^18.0.0 || ^19.0.0","react-dom":"^18.0.0 || ^19.0.0","@humain/ui":"^2.8.0","lucide-react":"^0.577.0 || ^1.0.1"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/workflow_0.1.0_1792758938743_0.5170883110323758"}}},"time":{"created":"2026-07-23T13:59:05.045Z","modified":"2026-10-23T12:35:39.361Z","0.0.3":"2026-07-23T13:59:05.362Z","0.0.4":"2026-07-27T06:23:06.075Z","0.0.5":"2026-07-28T06:06:57.386Z","0.1.0":"2026-10-23T12:35:38.875Z"},"author":{"name":"Ali Abdul-Karim","email":"akarim@humain.com"},"license":"Apache-2.0","keywords":["react","workflow","editor","graph","humain"],"repository":{"url":"https://gitlab.humain.com/humain/data-and-ai-modeling/applications/government-brain/humain-foundation-ui-react.git","type":"git","directory":"packages/workflow"},"description":"HUMAIN's React workflow editor runtime and product workflow components","maintainers":[{"name":"mazinkam","email":"ali.abdul-karim@hotmail.com"}],"readme":"# @humain/workflow\n\n`@humain/workflow` owns the React editor and standalone visual primitives.\n**React-only; no Web Components**. Supports React 18/19. Start with its semantic\npreset catalog, then add only the product definitions and adapters your\napplication owns.\n\n## Install\n\n```bash\nnpm install @humain/ui @humain/workflow lucide-react\n```\n\nImport the two public stylesheets once at the application entrypoint:\n\n```tsx\nimport '@humain/ui/styles.css';\nimport '@humain/workflow/styles.css';\n```\n\nDo not import package source paths, internal graph modules, or `@xyflow/react`.\nThe graph engine is a private implementation detail.\n\n## Layered imports\n\nThe root entry remains supported for existing consumers. New code can import\nfrom the narrowest public layer so its bundler does not retain the editor stack\nfor domain-only or non-visual runtime usage:\n\n```ts\nimport {\n  createWorkflowPresetRegistry,\n  validateWorkflowDocument,\n} from '@humain/workflow/domain';\nimport { createWorkflowExecutionController } from '@humain/workflow/runtime';\nimport { WorkflowEditor } from '@humain/workflow/editor';\nimport { WorkflowNode as VisualNode } from '@humain/workflow/primitives';\n```\n\n- `@humain/workflow/domain` contains JSON-safe contracts and pure workflow\n  behavior.\n- `@humain/workflow/runtime` contains non-React controllers and adapter state.\n- `@humain/workflow/editor` contains React hooks, messages, and editor\n  components.\n\n- `@humain/workflow/primitives` contains all six standalone visual families and public props/types without loading the editor/graph engine. Its visual `WorkflowNode` is distinct from the root/domain document type.\n\nThe coordinated ownership migration pairs UI 2.8.0 and Workflow 0.1.0, requiring UI `^2.8.0`. This intentionally breaks the old UI minor-release exports and six Workflow WC/WC-React families; there are no compatibility re-exports or replacement WC package. Generic UI Web Components remain supported. See the ownership guide in the dedicated reference at `/workflow/storybook/?path=/docs/workflow-docs-package-ownership-migration--docs`; the overview is `/workflow/storybook/?path=/docs/workflow-docs-overview--docs` and AI reference is `/workflow/storybook/docs/workflow-llms.txt`. Use the coordinated versions together when migrating an existing Workflow integration.\n\nImport `@humain/workflow/styles.css` when rendering the editor or primitives, alongside `@humain/ui/styles.css`. Emitted files\noutside these documented entry points are private implementation details.\n\n## Preset-first quick start\n\n`include` preserves the product-supplied order. It does not sort presets into\nthe package's default catalog order.\n\n```tsx\nimport { ThemeProvider } from '@humain/ui';\nimport {\n  createWorkflowNodeRegistry,\n  createWorkflowPresetDefinitions,\n  type WorkflowDocument,\n  WorkflowEditor,\n} from '@humain/workflow';\nimport { useState } from 'react';\n\nconst definitions = createWorkflowPresetDefinitions({\n  include: ['manual-trigger', 'ai-agent', 'http-request', 'workflow-end'],\n});\nconst registry = createWorkflowNodeRegistry(definitions);\n\nconst initialDocument: WorkflowDocument = {\n  schemaVersion: 1,\n  id: 'support-flow',\n  name: 'Support flow',\n  nodes: [\n    {\n      id: 'start',\n      type: 'manual-trigger',\n      position: { x: 80, y: 220 },\n      configuration: {},\n    },\n    {\n      id: 'agent',\n      type: 'ai-agent',\n      position: { x: 360, y: 220 },\n      configuration: {},\n    },\n    {\n      id: 'http',\n      type: 'http-request',\n      position: { x: 360, y: 460 },\n      configuration: {},\n    },\n    {\n      id: 'end',\n      type: 'workflow-end',\n      position: { x: 660, y: 220 },\n      configuration: {},\n    },\n  ],\n  edges: [\n    {\n      id: 'start-to-agent',\n      sourceNodeId: 'start',\n      sourcePortId: 'output',\n      targetNodeId: 'agent',\n      targetPortId: 'input',\n    },\n    {\n      id: 'agent-tool-to-http',\n      sourceNodeId: 'agent',\n      sourcePortId: 'tool-primary',\n      targetNodeId: 'http',\n      targetPortId: 'tool-input',\n    },\n    {\n      id: 'agent-to-end',\n      sourceNodeId: 'agent',\n      sourcePortId: 'output',\n      targetNodeId: 'end',\n      targetPortId: 'input',\n    },\n  ],\n};\n\nexport function SupportWorkflow() {\n  const [document, setDocument] = useState(initialDocument);\n\n  return (\n    <ThemeProvider>\n      <WorkflowEditor\n        document={document}\n        registry={registry}\n        nodeCatalogDefinitions={definitions}\n        onDocumentChange={({ document: nextDocument }) =>\n          setDocument(nextDocument)\n        }\n      />\n    </ThemeProvider>\n  );\n}\n```\n\nThe first and third edges are semantic data flow (`output` to `input`). The\nmiddle edge is the named AI tool relationship (`tool-primary` to `tool-input`).\nPersist this JSON-only document shape; React elements, functions, clients,\ncredentials, and secrets belong outside it.\n\nUse `defaultDocument` instead of `document` when the editor should own its\nlocal state. Use `document` with `onDocumentChange` when the host owns state\nand acknowledges every proposal. Do not mix the two ownership models.\n\n## Configurable default UI\n\nThe default editor renders its own header, left tool rail, centered empty-state\ncards, bottom AI composer, and history/zoom controls. A minimal integration\nneeds only a document and registry:\n\n```tsx\n<WorkflowEditor defaultDocument={initialDocument} registry={registry} />\n<WorkflowEditor document={initialDocument} registry={registry} readOnly />\n```\n\nThe registry supplies the catalog when no explicit catalog is passed. The\nfirst picker accepts any registered node; restrict it in the host when your\nproduct requires an entry point. Explicit `catalog.items` takes precedence\nover legacy `nodeCatalogDefinitions`, then registry order. Catalog items\noverride presentation, not registered behavior.\n\n```tsx\nimport { Badge } from '@humain/ui';\nimport { Plus } from 'lucide-react';\nimport type { WorkflowDocument } from '@humain/workflow';\n\ndeclare const exportWorkflow: (document: Readonly<WorkflowDocument>) => void;\n\n<WorkflowEditor\n  document={document}\n  registry={registry}\n  onDocumentChange={({ document: next }) => setDocument(next)}\n  onExport={exportWorkflow}\n  catalog={{\n    items: [\n      { typeId: 'manual-trigger', label: 'Start manually', group: 'Triggers' },\n      { typeId: 'ai-agent', group: 'Steps' },\n      { typeId: 'workflow-end', group: 'Steps' },\n    ],\n    groupOrder: ['Triggers', 'Steps'],\n    filter: (definition, context) =>\n      context.kind !== 'first' || Boolean(definition.entryPoint),\n  }}\n  ui={{\n    header: { items: ['export', 'save', 'publish'], showSearch: false },\n    canvasTools: { items: [\n      { id: 'add-step', label: 'Add a step', icon: <Plus />, mutates: true,\n        onSelect: ({ openPicker }) => openPicker() },\n    ] },\n    emptyState: { items: ['add'] },\n    aiComposer: false,\n    corner: { render: ({ readOnly }) =>\n      <Badge>{readOnly ? 'Read only' : 'Editing'}</Badge> },\n  }}\n/>\n```\n\nUse `false` to hide any configured section. A section's `render` callback\nreceives its context and `defaultContent` when you need composition rather\nthan action ordering. Mark custom mutating actions `mutates: true`; custom\nrendered content must use `context.readOnly` to disable its own mutations.\n\nBack, export, AI, templates, attachment, text, and more controls appear only\nwhen their handlers are supplied. Save and publish require their adapters.\nAI submit is labeled as submit; a voice action requires `ui.aiComposer.onVoice`.\nThe title becomes a project menu only when `projects` contains another\nenabled project. The host owns project navigation and unsaved-change policy.\n\nDragging an output to empty canvas or using its trailing plus opens connected\ninsertion. Candidates must satisfy kind, optional semantic `connectionType`,\ncapacity, and host validation. A node definition's `preferredInputPortId`\nselects an eligible input; otherwise multiple eligible inputs require an\nexplicit choice. Untyped custom ports retain kind-only compatibility; specify\nchannels on both ends or use host validation for stricter semantics.\n\nInsertion submits one atomic node-and-edge proposal and one history entry.\nEscape cancels without changing the graph and restores focus. Controlled\nhosts must acknowledge the complete proposed document; rejection never falls\nback to a disconnected node.\n\nSingle click selects. Double-click or Configure opens the inspector, including\nfor read-only documents. Picker and inspector do not remain open together.\nUse `openInspectorOnAdd` to opt into inspection after insertion.\n\n`readOnly` blocks package-mediated graph changes, history mutations, saves,\npublication, and execution, including late asynchronous outcomes. Selection,\ninspection, search, pan/zoom, and a supplied export handler remain available.\nCustom inspectors receive `readOnly`; disable host-owned configuration fields\nand actions. This is a UI permission boundary, not backend authorization.\nAdapters must honor cancellation; UI guards cannot roll back host side effects\nalready started.\n\nSee [default UI migration](docs/DefaultUiMigration.mdx) for changed defaults.\n\n## Ownership and extension\n\nThe package owns editing, graph projection, structural validation, history,\naccessibility behavior, and package-created copy. The host owns persistence,\nproduct validation, publication, execution, authentication, authorization,\ncredentials, secret storage, and service clients. Supply the host-owned\nadapters through `WorkflowEditor` rather than embedding services in a node\ndefinition or workflow document.\n\n### Adapter replacement lifecycle\n\nDuring an active durable operation, replacing the validation adapter cancels\nvalidation-dependent saves and publications; replacing the publication adapter\ncancels only publication; and replacing the persistence adapter cancels only\nsaves. Pending autosave is rescheduled against the replacement validation\nadapter. Obsolete outcomes are ignored, and cleanup removes only the\noperation's own busy feedback so newer unrelated notices remain visible.\nUpdating `messages.controllerErrors` alone only refreshes fallback copy and\ndoes not cancel active host work.\n\n## Live announcements\n\n`useWorkflowAnnouncements` accepts an optional `reannounceKey`. Change that\nkey when an otherwise identical message represents a new event; the hook first\nclears both live regions, then publishes the message again so assistive\ntechnology can announce it reliably. First-time and changed messages remain\navailable immediately without that repeat transition. Clearing `message`\nempties the regions but retains the prior event identity, so a later identical\nevent with a new key still receives the repeat transition.\n\n## Execution safety\n\n`WorkflowEditor` defaults `executionMode` to `\"simulation\"`. When an\nexecution adapter can cause side effects, pass `executionMode=\"live\"` and keep\nthat prop current whenever the host's execution configuration changes.\n`@humain/workflow` does not inspect an adapter or workflow to infer safety,\nauthorization, or product policy.\n\nIn live mode, `WorkflowEditor` owns the confirmation boundary for every editor\nexecution entry point. A standalone `WorkflowGraphOutline` still uses\nmode-aware labels, but its callbacks remain the consumer's confirmation\npolicy.\n\nActivated connections show a one-shot execution tracer by default. Its core\nuses the source port tone and its halo uses the source node tone. Pass\n`showExecutionFlowAnimation={false}` to keep execution state colors while\nremoving spatial motion; the tracer is also hidden automatically for users\nwho prefer reduced motion.\n\nSee the preset, custom-registry, and linear HTTP Request examples in\n[Node registry](https://gitlab.humain.com/humain/data-and-ai-modeling/standard/library/humain-foundation-ui-react/-/blob/main/packages/workflow/docs/NodeRegistry.mdx),\nmessage and accessibility requirements in\n[Accessibility and theming](https://gitlab.humain.com/humain/data-and-ai-modeling/standard/library/humain-foundation-ui-react/-/blob/main/packages/workflow/docs/AccessibilityAndTheming.mdx),\nand adapter contracts in\n[Editor quickstart](https://gitlab.humain.com/humain/data-and-ai-modeling/standard/library/humain-foundation-ui-react/-/blob/main/packages/workflow/docs/EditorQuickstart.mdx).\n\n## Coding-agent skill\n\n```bash\nnpx @humain/workflow@latest skill\nnpx @humain/workflow@latest skill --global\nnpx @humain/workflow@latest skill --project --agent codex --yes\n```\n\nThe skill installer requires Node.js **22.20.0 or newer**; this is separate\nfrom the Workflow library's runtime support.\n\nThe bare interactive command delegates agent selection, Project/Global scope,\nand confirmation to the native `skills@1.7.2` wizard. Use arrow keys to navigate,\nSpace to toggle agents, Enter to confirm, and typing to search. Review the\nselected agents and destinations before installing. There are no typed wrapper\nprompts. Native detection may skip agent selection\nwhen only one agent is detected. `--global` without `--agent` fixes global scope\nwhile leaving native agent selection enabled. Explicit `--agent` options\nwithout a scope leave scope selection to the native wizard.\n\n**Partial-project migration:** interactive `--project` without `--agent` is\nrejected before installation. The pinned native installer has no `add --project`\nflag, so silently forwarding it would allow a different scope. Run the bare\ncommand and choose **Project**, or add an explicit `--agent <name>` (repeatable).\n\nNoninteractive runs and `--yes` require both `--project` or `--global` and at\nleast one explicit `--agent`. Fully specified commands retain the wrapper's\ncompletion summary. Native interactive output owns its summary; cancellation\nalso exits successfully, so the wrapper does not claim installation completed.\nInstalls keep `--copy` and the selected agents' native skill destinations.\nCoding-agent environments require explicit `--yes`, scope, and agent flags even\nwith a TTY, preventing inherited agent markers from bypassing confirmation and\noverwriting existing skill directories.\n\nThe [Workflow skill](skills/humain-workflow/SKILL.md) mirrors the public\nReact-only contract: presets, documents, registries, copy, adapters,\naccessibility, and verification. The `0.1.x` line is a preview API; pin the\nminor version until the package is promoted to a stable release.\n","readmeFilename":"README.md"}