{"id":13799390,"url":"https://github.com/pmarkert/wavelength","last_synced_at":"2025-08-02T20:07:30.387Z","repository":{"id":143927605,"uuid":"44634503","full_name":"pmarkert/wavelength","owner":"pmarkert","description":"Framework for building Alexa Skills with AWS Lambda","archived":false,"fork":false,"pushed_at":"2016-07-26T13:09:26.000Z","size":7,"stargazers_count":9,"open_issues_count":0,"forks_count":3,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-21T09:03:10.152Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/pmarkert.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2015-10-20T20:56:54.000Z","updated_at":"2021-12-04T01:50:53.000Z","dependencies_parsed_at":null,"dependency_job_id":"743268ea-737f-4f84-a576-c5995d439c25","html_url":"https://github.com/pmarkert/wavelength","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/pmarkert/wavelength","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pmarkert%2Fwavelength","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pmarkert%2Fwavelength/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pmarkert%2Fwavelength/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pmarkert%2Fwavelength/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pmarkert","download_url":"https://codeload.github.com/pmarkert/wavelength/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pmarkert%2Fwavelength/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268448204,"owners_count":24251999,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-02T02:00:12.353Z","response_time":74,"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":[],"created_at":"2024-08-04T00:01:02.233Z","updated_at":"2025-08-02T20:07:30.342Z","avatar_url":"https://github.com/pmarkert.png","language":"JavaScript","funding_links":[],"categories":["NPM Modules"],"sub_categories":[],"readme":"Wavelength is a framework that simplifies working with the Alexa SDK\nwhen using Amazon Lambda services on the back-end. \n\nThe Alexa Skills Kit is the programming interface to create skills for\nAmazon Echo devices and other Alexa enabled services.\n\nAmazon Lambda is a computing mechanism where you can write a \"cloud function\"\nthat can be hosted and executed on demand. Instead of running a server\n24/7, AWS takes care of making your function available (and scaling\nto handle request capacity). AWS has a rather generous free-tier so\nyou should be able to host quite a few lambda functions before incurring any \ncharges.\n\nFor information on how to develop skills using the Alexa Skills Kit,\ngo to: https://developer.amazon.com/public/solutions/alexa/alexa-skills-kit\n\nAnd for information about using AWS Lambda, see:\nhttp://docs.aws.amazon.com/lambda/latest/dg/welcome.html\n\nAmazon makes it very straight-forward to trigger your lambda function \nfrom the Alexa Skill.\n\nThe project name of wavelength is because lambda is the symbol for \nwavelength in physics equations and an echo is the reflection of a sound wave.\n\n# Example\n```node\nvar wavelength = require(\"wavelength\");\n\nvar router = wavelength.Router();\nmodule.exports = router;\n\nrouter.launch(function(event) {\n\treturn wavelength.Response()\n\t\t.text(\"Tough decision to make? I'll help you pick. For example, you can ask: 'Should I choose chocolate, or vanilla?'\")\n\t\t.reprompt.text(\"Go ahead, ask me something like: red, or blue\");\n});\n\nrouter.intent(\"ChooseIntent\", function(params, event) {\n\tconsole.log(\"Params - \" + JSON.stringify(params));\n\tif(!params.first || !params.second) {\n\t\treturn wavelength.Response()\n\t\t\t.text(\"I didn't understand your choices, please say something like: 'should I choose the red shoes or the black ones'\")\n\t\t\t.reprompt.text(\"Go ahead, don't be shy.\");\n\t}\n\tvar chosen = (Math.random()\u003c0.5) ? params.first : params.second;\n\tconsole.log(\"Choice was \" + chosen);\n\treturn wavelength.Response()\n\t\t.text(\"Between \" + params.first + \" and \" + params.second + \" I would choose \" + chosen)\n\t\t.end_session(event.session.new)\n\t\t.reprompt.text(\"Can I help you with any other decisions?\");\n});\n\nrouter.intent(\"Goodbye\", function(params, event) {\n\treturn wavelength.Response()\n\t\t.text(\"Good luck. Let me know how it goes!\")\n\t\t.end_session(true);\n});\n```\n\n# Router/Response Features\n1. Router class to handle intent/launch mapping\n2. session_started and session_ended events\n3. Optional application-id validation on requests\n4. Synchronous or Asynchronous handler definitions\n5. Simplified access to slot parameters and full access to the event data\n6. Session attribute management\n7. Build responses with text/ssml, including reprompts, cards, and options.\n\n```node\n// Usage:\nvar wl = require(\"wavelength\");\nvar router = wl.Router();\n\nrouter.launch(function(event) { // Synchronous launch\n   return wl.Response(event).text(\"response\");\n});\n\nrouter.launch(function(event, callback) { // Asynchronous launch\n    callback(wl.Response(event).text(\"response\"));\n});\n\nrouter.intent(\"intent_name\", function(params, event) { // Synchronous intent\n    return wl.Response(event).text(\"response\");\n});\n\nrouter.intent(\"intent_name\", function(params, event, callback) { // Asynchronous intent\n   callback(wl.Response(event).text(\"response\"))\n});\n\nrouter.session_started = function(event, context, callback) { // session_started hook\n  callback();\n};\n\nrouter.session_ended = function(event, context, callback) { // session_ended hook\n  callback();\n};\n\n// Set router.applicationId to your application's ID if you want to verify the applicationId on each request.\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpmarkert%2Fwavelength","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpmarkert%2Fwavelength","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpmarkert%2Fwavelength/lists"}