{"id":41830374,"url":"https://github.com/cafjs/caf_conduit","last_synced_at":"2026-01-25T08:36:34.179Z","repository":{"id":15916934,"uuid":"18658639","full_name":"cafjs/caf_conduit","owner":"cafjs","description":" OBSOLETE! Added multi-method calls in caf_cli - CAF lib for orchestrating asynchronous tasks","archived":false,"fork":false,"pushed_at":"2014-07-05T02:29:47.000Z","size":300,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-10-30T15:45:54.362Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cafjs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE-2.0.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-04-11T01:44:38.000Z","updated_at":"2016-04-21T07:32:29.000Z","dependencies_parsed_at":"2022-09-07T07:50:52.781Z","dependency_job_id":null,"html_url":"https://github.com/cafjs/caf_conduit","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/cafjs/caf_conduit","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cafjs%2Fcaf_conduit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cafjs%2Fcaf_conduit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cafjs%2Fcaf_conduit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cafjs%2Fcaf_conduit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cafjs","download_url":"https://codeload.github.com/cafjs/caf_conduit/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cafjs%2Fcaf_conduit/sbom","scorecard":{"id":261759,"data":{"date":"2025-08-11","repo":{"name":"github.com/cafjs/caf_conduit","commit":"72b4856dddfca76be7de605c1c60bcd1b8315996"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"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":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"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":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"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":"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":"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":"Code-Review","score":0,"reason":"Found 0/24 approved changesets -- score normalized to 0","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":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","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":"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":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"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":9,"reason":"license file detected","details":["Info: project has a license file: LICENSE-2.0.txt:0","Warn: project license file does not contain an FSF or OSI license."],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"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":"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"}}]},"last_synced_at":"2025-08-17T10:58:34.467Z","repository_id":15916934,"created_at":"2025-08-17T10:58:34.468Z","updated_at":"2025-08-17T10:58:34.468Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28749599,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-25T08:31:04.260Z","status":"ssl_error","status_checked_at":"2026-01-25T08:30:28.859Z","response_time":113,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":[],"created_at":"2026-01-25T08:36:33.536Z","updated_at":"2026-01-25T08:36:34.174Z","avatar_url":"https://github.com/cafjs.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CAF (Cloud Assistant Framework)\n\nCo-design permanent, active, stateful, reliable cloud proxies with your web app.\n\nSee http://www.cafjs.com \n\n## CAF Lib Conduit\n\n[![Build Status](http://ci.cafjs.com/github.com/cafjs/caf_conduit/status.svg?branch=master)](http://ci.cafjs.com/github.com/cafjs/caf_conduit)\n\n\n  Conduits are functional processing pipelines assembled in a series-parallel\n task graph. Each task implements an asynchronous action that uses standard\n node.js callback conventions, and data flows through pipelines by folding\n a map in a graph traversal that respects task dependencies.\n Map entries are labelled with the originating task, enabling communication\n between tasks. Unique labels can be chosen by the application or\n assigned by the library. Tasks can explicitly declare these dependencies and\n 'conduit' will check for data races or dangling references at build time. \n Labels can be made unique by scoping with a prefix, and 'conduit' will\n rewrite the dependencies for you. \n \n  An error in any of the tasks aborts the traversal, returning in a callback\n this error and previous (or parallel)  results already in the map.\n\n  The structure and configuration of conduits can be serialized, and later\n on, after parsing, can be bound  to a different set of implementation\n methods. This simplifies uploading conduits (from the browser to a CA) in a\n secure manner, and modify their behavior based on the execution context.\n\n## API\n\n Conduits are immutable data structures and reusing pipeline elements\n never creates side-effects. Task graphs are built using a stack,\n similar to an HP calculator with reverse polish notation (RPN), but only\n two operators `__seq__(n)` and `__par__(n)`. For example:\n \n    var conduit = require('caf_conduit')\n    \n    // declare method names that implement tasks\n    c = conduit.newInstance(['foo','bar'])\n    \n    // first argument provides arguments for the invoked task\n    // second argument, an optional object with read dependencies\n    // third argument, an optional label for the results\n    // returns a new conduit (a conduit object is immutable) \n    c = c.foo({'arg':1}, null, 'fx0')\n         .foo({'arg':2}, {'prev': 'fx0'}, 'fx1')\n         .foo({'arg':4}, {'prev': 'fx1'}, 'fx2')\n         .__seq__(3)\n         .bar({'arg':2}, null,  'bx')\n         .bar({'arg':4}, null, 'b1x')\n         .__seq__()\n         .__par__()\n               \n will execute in parallel two sequences of 3 foos and 2 bars.\n \nAnd this can be composed with another conduit as follows:\n \n    b = conduit.newInstance(['foo','bar'])\n    b = b.foo({'arg':1}, null, 'ffx')\n         .__push__(c)\n         .__seq__()\n         \nOr we can use it as a template, and prefix labels to avoid collisions:\n\n    cClone = c.__scope__('myspace/')\n    // and now labels are of the form 'myspace/fx0', 'myspace/fx1'...\n\nSerializing a conduit:\n\n    var st = b.__stringify__()\n    var c = conduit.parse(st);\n     \nAdding methods to implement tasks: \n\n    var actions = {\n                    'foo' : function(acc, args, deps, label, cb) {\n                      // acc should be treated as read-only\n                      //\n                      // Note that deps.prev `happened-before` this task\n                      //   because conduit checks for races.\n                      var whatever = (deps \u0026\u0026 deps.prev \u0026\u0026 acc[deps.prev] \u0026\u0026 \n                                      acc[deps.prev].data \u0026\u0026\n                                      acc[deps.prev].data.whatever) || 0;\n                      // Never use `return xx`, use the callback to return.\n                      // New `whatever` will be added to acc by this library.\n                      cb(null, {'whatever': whatever + 1})\n                     },\n                     'bar' : function(acc, args, deps, label, cb) {\n                      ...\n                     }\n                   }\n    b = b.__behavior__(actions)\n\nExecuting the task graph:\n\n    var acc = {}\n    b.__fold__(acc, function(err, data) {\n                        // data refers to `acc` with an entry for each\n                        //  task (key is the given label or a unique string,\n                        //        value is {err: \u003cerr\u003e, data: \u003cwhatever\u003e,\n                        //                  meta: {name:string, args:[],\n                        //                         deps:[]}})\n                        // where meta just records call arguments\n                        ...\n    });\n \n## Configuration Example\n\n### framework.json\n\nNone\n\n\n### ca.json\n\nNone\n  \n        \n            \n \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcafjs%2Fcaf_conduit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcafjs%2Fcaf_conduit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcafjs%2Fcaf_conduit/lists"}