{"_id":"@humain/workflow","_rev":"3-e54121caaac677bc6633676e1771e362","name":"@humain/workflow","dist-tags":{"latest":"0.0.5"},"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","description":"HUMAIN's React workflow editor runtime and product workflow components","author":{"name":"Ali Abdul-Karim","email":"akarim@humain.com"},"owner":"Humain","contact":"akarim@humain.com","license":"Apache-2.0","repository":{"type":"git","url":"https://gitlab.humain.com/humain/data-and-ai-modeling/applications/government-brain/humain-foundation-ui-react.git","directory":"packages/workflow"},"keywords":["react","workflow","editor","graph","humain"],"type":"module","publishConfig":{"registry":"https://registry.npmjs.org/","access":"public"},"main":"./dist/index.js","module":"./dist/index.js","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./domain":{"types":"./dist/domain.d.ts","import":"./dist/domain.js"},"./runtime":{"types":"./dist/runtime.d.ts","import":"./dist/runtime.js"},"./editor":{"types":"./dist/editor.d.ts","import":"./dist/editor.js"},"./styles.css":"./dist/styles.css"},"bin":{"humain-workflow":"bin/humain-workflow.mjs"},"sideEffects":["*.css"],"scripts":{"build":"vite build && bun run build:types && bun run build:css","build:types":"tsc -p tsconfig.build.json && bun scripts/clean-private-declarations.ts","build:css":"mkdir -p dist && cp src/styles.css dist/styles.css","generate:llms":"bun ../../tooling/workflow/generate-llms.ts","generate:skill":"bun ../../tooling/workflow/skill.ts generate","pack:skill":"bun ../../tooling/workflow/skill.ts pack","check:skill":"bun ../../tooling/workflow/skill.ts check","typecheck":"tsc -p tsconfig.json --noEmit && tsc -p tsconfig.public-consumer.json","test":"vitest run --root ../.. --project=workflow-unit","test:a11y":"vitest run --root ../.. --project=workflow-unit accessibility --no-file-parallelism --maxWorkers=1","test:visual":"bun tests/visual/run.ts"},"peerDependencies":{"@humain/ui":"^2.1.57","lucide-react":"^0.577.0 || ^1.0.1","react":"^18.0.0 || ^19.0.0","react-dom":"^18.0.0 || ^19.0.0"},"dependencies":{"@xyflow/react":"12.11.2"},"devDependencies":{"@blazediff/core":"1.9.3","@humain/ui":"workspace:*","@types/pngjs":"6.0.5","axe-core":"4.12.1","pngjs":"7.0.0"},"_id":"@humain/workflow@0.0.5","_integrity":"sha512-8BR4U0zVsSTDrDSmZSBgy4mrgGZDmz68MEWyXyyWGeFPk8P7X1Wu2PwcjhsTRJFEDAFHjlFEFn39QdZmJGxB5w==","_resolved":"/var/folders/nb/s79g7y216rd1nd99cvs3lfc80000gp/T/humain-workflow-release-6zjzue/verified-tarball/humain-workflow-0.0.5.tgz","_from":"file:/var/folders/nb/s79g7y216rd1nd99cvs3lfc80000gp/T/humain-workflow-release-6zjzue/verified-tarball/humain-workflow-0.0.5.tgz","_nodeVersion":"26.5.0","_npmVersion":"11.17.0","dist":{"integrity":"sha512-8BR4U0zVsSTDrDSmZSBgy4mrgGZDmz68MEWyXyyWGeFPk8P7X1Wu2PwcjhsTRJFEDAFHjlFEFn39QdZmJGxB5w==","shasum":"5ae0a8f8f25f5f61d3404fc8b1929587e3f9eb3a","tarball":"https://registry.npmjs.org/@humain/workflow/-/workflow-0.0.5.tgz","fileCount":149,"unpackedSize":958572,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIFqS6eAt3cLTVyskJH9rzasdiY0ygAhkNeeLYGKYEfaBAiEAhFRmZmuZrcJzSzVm5rwNHCLlXGodOZpwZVK0QW+dEGA="}]},"_npmUser":{"name":"mazinkam","email":"ali.abdul-karim@hotmail.com"},"directories":{},"maintainers":[{"name":"mazinkam","email":"ali.abdul-karim@hotmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/workflow_0.0.5_1785218817202_0.3573867417893666"},"_hasShrinkwrap":false}},"time":{"created":"2026-07-23T13:59:05.045Z","modified":"2026-07-28T06:06:57.545Z","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"},"author":{"name":"Ali Abdul-Karim","email":"akarim@humain.com"},"license":"Apache-2.0","keywords":["react","workflow","editor","graph","humain"],"repository":{"type":"git","url":"https://gitlab.humain.com/humain/data-and-ai-modeling/applications/government-brain/humain-foundation-ui-react.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` is a React-only workflow editor. 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';\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\nImport `@humain/workflow/styles.css` when rendering the editor. 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## 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 --project --agent codex --yes\n```\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"}