{"id":41830505,"url":"https://github.com/cafjs/caf_iot_cli","last_synced_at":"2026-01-25T08:36:44.579Z","repository":{"id":6704373,"uuid":"7949864","full_name":"cafjs/caf_iot_cli","owner":"cafjs","description":"OBSOLETE! see caf/main/caf_iot instead. CAF Client library for IoT devices (node.js)","archived":false,"fork":false,"pushed_at":"2014-10-26T21:10:48.000Z","size":212,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-10-06T05:57:33.034Z","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":"2013-02-01T01:56:51.000Z","updated_at":"2015-11-29T23:10:41.000Z","dependencies_parsed_at":"2022-08-24T03:10:41.690Z","dependency_job_id":null,"html_url":"https://github.com/cafjs/caf_iot_cli","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/cafjs/caf_iot_cli","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cafjs%2Fcaf_iot_cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cafjs%2Fcaf_iot_cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cafjs%2Fcaf_iot_cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cafjs%2Fcaf_iot_cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cafjs","download_url":"https://codeload.github.com/cafjs/caf_iot_cli/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cafjs%2Fcaf_iot_cli/sbom","scorecard":{"id":261768,"data":{"date":"2025-08-11","repo":{"name":"github.com/cafjs/caf_iot_cli","commit":"339c32c2b5573ef5f71f786c3e8e737be9127145"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"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":"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":"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":"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":"Code-Review","score":0,"reason":"Found 0/20 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":"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":"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:38.143Z","repository_id":6704373,"created_at":"2025-08-17T10:58:38.143Z","updated_at":"2025-08-17T10:58:38.143Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28749609,"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:44.510Z","updated_at":"2026-01-25T08:36:44.572Z","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 Client Lib for IoT devices using node.js\n\nThis repository contains a client CAF lib for IoT devices that use node.js to interact with Cloud Assistants.\n\n\nThe client programming model is based on a customizable main loop:\n\n      while(true) {\n          readSensorsHook(mapOut, cb);  // (1)\n          \u003cgarbage_collect_previous_responses();\u003e\n          for_each_command_from_CA {\n              executeCommandHook(command, mapIn, mapOut, cb); // (2)\n          }\n          mainHook(mapIn, mapOut, cb); // (3)\n          \u003cupdate_map();\u003e\n          \u003csync_maps_with_CA();\u003e\n           \u003csleep();\u003e\n       }\n\nHooks that can be customized are:\n\n*  **readSensorsHook** Populates a map with readings from external inputs, e.g., GPIO pins.\n* **executeCommandHook** Every command sent by the CA is interpreted by this method. The outcome could be a change in mapOut or a value returned in the callback (using node.js conventions) that will be sent back to the CA.\n* **mainHook** Gives a chance to this device after reading sensors and executing commands to do some periodic tasks. This hook is always invoked, i.e., even if there were no commands.\n    \nInternal methods that can only be customized with config properties:\n\n* **GC_responses** Responses that have been ack by the CA do not need to be sent again.\n* **Update_map** Increment maps version numbers.\n* **Sync_map** Exchange maps with the CA with a single POST\n* **Sleep** Wait for `config.interval` miliseconds before retrying.\n\nsee `caf_iot/README.md` for details of the wire protocol.\n\n\n## API\n\n    lib/MainLoop.js\n \n## Configuration Example\n\nConfig properties passed to constructor `MainLoop`:\n\n     {\n        config: configType,\n        readSensorsHook: {function(mapOut:Object, caf.cb)},\n        executeCommandHook: {function(command:string, mapIn:Object,\n                             mapOut:Object, caf.cb)},\n        mainHook:{function(mapIn:Object, mapOut:Object, caf.cb)},\n        cb: caf.cb // optional callback for error propagation\n      }\n \nwhere configType is\n \n      {\n         url: {string}, // e.g.,'http://helloworld.cafjs.com/iot/2343432423'\n         proxy: {string=}, // url with a http proxy (Optional)\n         interval:number // sleep timeout in seconds\n      }\n\n\n\n\n### framework.json\n\nNone\n\n\n### ca.json\n\nNone\n        \n            \n \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcafjs%2Fcaf_iot_cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcafjs%2Fcaf_iot_cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcafjs%2Fcaf_iot_cli/lists"}