{"id":13454335,"url":"https://github.com/senecajs/seneca","last_synced_at":"2026-10-18T20:14:59.722Z","repository":{"id":1135113,"uuid":"1012745","full_name":"senecajs/seneca","owner":"senecajs","description":"A microservices toolkit for Node.js.","archived":false,"fork":false,"pushed_at":"2026-10-17T12:42:03.000Z","size":8728,"stargazers_count":3957,"open_issues_count":208,"forks_count":309,"subscribers_count":132,"default_branch":"master","last_synced_at":"2026-10-17T15:54:11.057Z","etag":null,"topics":["javascript","microservices","node","seneca"],"latest_commit_sha":null,"homepage":"http://senecajs.org","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/senecajs.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGES.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2010-10-21T17:09:05.000Z","updated_at":"2026-10-17T12:42:09.000Z","dependencies_parsed_at":"2023-01-13T10:58:05.732Z","dependency_job_id":"ef9cd3c4-d182-4f9e-8b14-ccf2fa4d11f6","html_url":"https://github.com/senecajs/seneca","commit_stats":{"total_commits":1580,"total_committers":63,"mean_commits":25.07936507936508,"dds":0.2683544303797468,"last_synced_commit":"89580d8f818e9b3b77878e8d5aadf56f108e57ff"},"previous_names":[],"tags_count":152,"template":false,"template_full_name":null,"purl":"pkg:github/senecajs/seneca","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/senecajs%2Fseneca","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/senecajs%2Fseneca/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/senecajs%2Fseneca/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/senecajs%2Fseneca/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/senecajs","download_url":"https://codeload.github.com/senecajs/seneca/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/senecajs%2Fseneca/sbom","scorecard":{"id":811111,"data":{"date":"2025-08-11","repo":{"name":"github.com/senecajs/seneca","commit":"077878d2fc0facc4f36119e1327326a3c11a043a"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.5,"checks":[{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Code-Review","score":1,"reason":"Found 3/28 approved changesets -- score normalized to 1","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/build.yml:1","Warn: no topLevel permission defined: .github/workflows/todo.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":3,"reason":"dependency not pinned by hash detected -- score normalized to 3","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yml:25: update your workflow using https://app.stepsecurity.io/secureworkflow/senecajs/seneca/build.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yml:27: update your workflow using https://app.stepsecurity.io/secureworkflow/senecajs/seneca/build.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/build.yml:35: update your workflow using https://app.stepsecurity.io/secureworkflow/senecajs/seneca/build.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/todo.yml:7: update your workflow using https://app.stepsecurity.io/secureworkflow/senecajs/seneca/todo.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/todo.yml:9: update your workflow using https://app.stepsecurity.io/secureworkflow/senecajs/seneca/todo.yml/master?enable=pin","Warn: npmCommand not pinned by hash: .github/workflows/build.yml:31","Info:   0 out of   3 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   2 third-party GitHubAction dependencies pinned","Info:   2 out of   3 npmCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Vulnerabilities","score":8,"reason":"2 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-qwcr-r2fm-qrc7","Warn: Project is vulnerable to: GHSA-hrpp-h998-j3pp"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 5 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-23T13:12:22.971Z","repository_id":1135113,"created_at":"2025-08-23T13:12:22.972Z","updated_at":"2025-08-23T13:12:22.972Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":344872684,"owners_count":38335047,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-10-03T21:59:58.778Z","status":"online","status_checked_at":"2026-10-17T02:00:06.547Z","response_time":57,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["javascript","microservices","node","seneca"],"created_at":"2024-07-31T08:00:53.177Z","updated_at":"2026-10-18T20:14:59.716Z","avatar_url":"https://github.com/senecajs.png","language":"JavaScript","funding_links":[],"categories":["JavaScript","Packages","Repository","包","目录","Service Toolkits","Web frameworks","Networking and Distributed"],"sub_categories":["Web frameworks","Web Frameworks","Web 框架","Web框架","Node.js","RPC and Messaging"],"readme":"![Logo][]\n\u003e A Node.js toolkit for Microservice architectures\n\n| ![Voxgig](https://www.voxgig.com/res/img/vgt01r.png) | This open source module is sponsored and supported by [Voxgig](https://www.voxgig.com). |\n|---|---|\n\n# seneca\n\n[![npm version](https://img.shields.io/npm/v/seneca.svg)](https://npmjs.com/package/seneca)\n[![NpmFigs][BadgeNpmFigs]][Npm]\n[![build](https://github.com/senecajs/seneca/actions/workflows/build.yml/badge.svg)](https://github.com/senecajs/seneca/actions/workflows/build.yml)\n[![Coveralls][BadgeCoveralls]][Coveralls]\n[![Known Vulnerabilities](https://snyk.io/test/github/senecajs/seneca/badge.svg)](https://snyk.io/test/github/senecajs/seneca)\n[![DeepScan][BadgeDeepScan]][DeepScan]\n[![CodeClimate][BadgeCodeClimate]][CodeClimate]\n\n- __Lead Maintainer:__ [Richard Rodger][Lead]\n- __Sponsor:__ [voxgig][Sponsor]\n\nSeneca is a toolkit for writing microservices and organizing the\nbusiness logic of your application. You describe what your system does\nas *messages*, and write *actions* that handle them. Which action runs\nis decided by pattern matching on the message, so the code that handles\na message, and the process it runs in, can change without changing the\ncode that sends it.\n\nSeneca provides:\n\n- __pattern matching:__ messages are plain objects, routed to the most\n  specific matching action; special cases are new patterns, not branches\n- __composition:__ functionality is grouped into plugins that can extend\n  each other by overriding patterns and calling the prior action\n- __transport independence:__ the same actions run in one process or\n  across many, connected by transport plugins\n- __maturity:__ in production since 2010, with a deep and wide ecosystem\n  of [plugins][]\n- __a book:__ a guide to designing microservice architectures: [taomicro][]\n\n## Install\n\n```sh\nnpm install seneca\n```\n\nSeneca 4 requires Node.js 24 or later, the version used for development,\ncontinuous integration and releases (see `.nvmrc`).\n\nNetwork transports are plugins. For HTTP and TCP install\n[seneca-transport](https://github.com/senecajs/seneca-transport) as well.\n\n## Example\n\nA plugin is a function that adds actions for patterns:\n\n```js\nconst Seneca = require('seneca')\n\nfunction math(options) {\n  // An action for a pattern: any message with role:math and cmd:sum\n  this.add('role:math,cmd:sum', function (msg, reply) {\n    reply({ answer: msg.left + msg.right })\n  })\n\n  // A more specific pattern handles a special case\n  this.add('role:math,cmd:sum,integer:true', function (msg, reply) {\n    reply({ answer: Math.floor(msg.left) + Math.floor(msg.right) })\n  })\n}\n\nconst seneca = Seneca({ log: 'warn' }).use(math)\n\nseneca.act('role:math,cmd:sum,left:1.5,right:2.5', Seneca.util.print)\n// { answer: 4 }\n\nseneca.act('role:math,cmd:sum,left:1.5,right:2.5,integer:true', Seneca.util.print)\n// { answer: 3 }\n```\n\nPromises are built in (`seneca.message` and `seneca.post`), and the same\nplugin can be served over the network with a transport plugin:\n\n```js\n// service process\nSeneca().use(math).use('seneca-transport').listen({ port: 8260, pin: 'role:math,cmd:*' })\n\n// client process\nconst client = Seneca().use('seneca-transport').client({ port: 8260, pin: 'role:math,cmd:*' })\nconst result = await client.post('role:math,cmd:sum,left:1,right:2')\n```\n\n## Documentation\n\nThe documentation lives in [docs/](https://github.com/senecajs/seneca/blob/master/docs/README.md)\nand is organized in four sections:\n\n- __[Tutorials](docs/README.md#tutorials)__: start with\n  [Getting started](docs/tutorials/getting-started.md), then\n  [Microservices with transports](docs/tutorials/microservices-with-transports.md)\n  and [Writing a plugin](docs/tutorials/writing-a-plugin.md).\n- __[How-to guides](docs/README.md#how-to-guides)__: configuring options\n  and logging, handling errors, testing, priors, transports, plugins,\n  debugging, graceful shutdown, running in production, migrating from\n  Seneca 3.\n- __[Reference](docs/README.md#reference)__: the\n  [instance API](docs/reference/api.md), [options](docs/reference/options.md),\n  [patterns](docs/reference/patterns.md),\n  [message directives](docs/reference/message-directives.md),\n  [plugin definition](docs/reference/plugins.md),\n  [logging](docs/reference/logging.md), [error codes](docs/reference/error-codes.md),\n  [transport](docs/reference/transport.md) and more, with a\n  [feature index](docs/reference/feature-index.md).\n- __[Explanation](docs/README.md#explanation)__: [why Seneca](docs/explanation/why-seneca.md),\n  [pattern matching](docs/explanation/pattern-matching.md),\n  [message lifecycle](docs/explanation/message-lifecycle.md),\n  [plugins and composition](docs/explanation/plugins-and-composition.md),\n  [transport independence](docs/explanation/transport-independence.md)\n  and [the error model](docs/explanation/error-model.md).\n\nChanges between versions are listed in [CHANGES.md](CHANGES.md);\n[Migrate from Seneca 3](docs/how-to/migrate-from-seneca-3.md) covers\nupgrading.\n\n## Running\n\n```sh\nnode service.js                   # JSON logs at level info, for log collectors\nnode service.js --seneca.test     # readable logs with full detail, for development\nnode service.js --seneca.log=warn # quieter\n```\n\nSee [Command line and environment](docs/reference/command-line-and-environment.md).\n\n## Support\n\nIf you're using this module and need help, you can:\n\n- Post a [github issue][Issue]\n- Tweet to [@senecajs][Tweet]\n- Ask on the [Gitter][Gitter]\n\n## Contributing\n\nThe [Senecajs org][Org] encourages participation. If you feel you can help in any way, be\nit with bug reporting, documentation, examples, extra testing, or new features feel free\nto [create an issue][Issue], or better yet, [submit a Pull Request][Pull]. For more\ninformation on contribution please see our [Contributing][Contrib] guide.\n\n### Test\n\nThe tests use the Node.js built-in test runner (`node:test`) and\nassertions (`node:assert`), and need Node.js 24 or later. `npm test` also\ncompiles the TypeScript consumer code in `test/types` against the\ndeclarations (`npm run test-types` runs only that). To run the tests\nlocally, with a coverage summary:\n\n```sh\nnpm test\n```\n\nTo run only the tests whose names match a pattern:\n\n```sh\nnpm run test-some -- close\n```\n\nTo write an lcov coverage report to `coverage/lcov.info`:\n\n```sh\nnpm run coverage\n```\n\nMaintainers: see [Create a release](docs/how-to/create-a-release.md).\n\n## Background\n\nSeneca is sponsored and supported by [Voxgig](https://www.voxgig.com/).\n\nCopyright (c) 2010-2026 Richard Rodger and other contributors;\nLicensed under [MIT][Lic].\n\n[BadgeNpmFigs]: https://img.shields.io/npm/dm/seneca.svg?maxAge=2592000\n[BadgeCoveralls]: https://coveralls.io/repos/senecajs/seneca/badge.svg?branch=master\u0026service=github\n[BadgeDeepScan]: https://deepscan.io/api/teams/5016/projects/6816/branches/59148/badge/grade.svg\n[BadgeCodeClimate]: https://api.codeclimate.com/v1/badges/3a95be9ab6432c620bea/maintainability\n[CoC]: http://senecajs.org/code-of-conduct\n[Contrib]: http://senecajs.org/contribute\n[Coveralls]: https://coveralls.io/github/senecajs/seneca?branch=master\n[DeepScan]: https://deepscan.io/dashboard#view=project\u0026tid=5016\u0026pid=6816\u0026bid=59148\n[CodeClimate]: https://codeclimate.com/github/senecajs/seneca/maintainability\n[Gitter]: https://gitter.im/senecajs/seneca\n[Issue]: https://github.com/senecajs/seneca/issues/new\n[Lead]: https://github.com/rjrodger\n[Lic]: ./LICENSE\n[Logo]: http://senecajs.org/files/assets/seneca-logo.jpg\n[Npm]: https://www.npmjs.com/package/seneca\n[Org]: http://senecajs.org/\n[Pull]: https://github.com/senecajs/seneca/pulls\n[Sponsor]: http://www.voxgig.com\n[Tweet]: https://twitter.com/senecajs\n[Plugins]: https://github.com/search?utf8=%E2%9C%93\u0026q=seneca\u0026type=Repositories\u0026ref=searchresults\n[taomicro]: https://bitly.com/rrtaomicro\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsenecajs%2Fseneca","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsenecajs%2Fseneca","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsenecajs%2Fseneca/lists"}