snipsco / snips-issues

Feel free to share your bugs with us.
14 stars 5 forks source link

[SAM] Expose Snips Console API as separate package or Make Sam Download Assistant #212

Open zaripych opened 5 years ago

zaripych commented 5 years ago

Is your feature request related to a problem? Please describe. We are at a stage where we want to streamline bug fixes to assistant and automate deployments to production.

At the moment SAM can download and upload assistant to Raspberri Pi devices via SSH. It also expects users to be typing in login credentials and cannot use stdin as input for credentials (at least according to snips-sam login --help).

What we are looking for is DevOps automation tool. We need to get latest assistant zip file so we can upload it to our instances ourselves.

In addition to that, our services are deployed on a non-Raspberri Pi devices but custom docker images, so SAM wouldn't be able to detect them as devices or reach them via network.

What are the use cases of this feature During development: for example, integration-testing new assistant on local dev machine with other custom software components that might affect end result. (Console UI is perfect for this if there are nothing else built or integrated on top of snips).

Automated integration-testing new assistant versions against a set of recordings together with other software components.

CI/CD, automated deployments of new assistants.

Describe the solution you'd like Multiple options here (choose one):

cat pwd | snips-sam download-assistant --id xxx --login yyy

Describe alternatives you've considered Somebody could reverse engineer SAM (seems like source is included into the package itself: snips-sam/src/session/consoleClient.ts) to a separate package, but then it will break at any time you change the API.

I'm willing to help you by extracting everything into a separate package with minimum changes, after that you could take ownership of that code and the package can be used in SAM and by the community.

Additional context Other people doing this too: https://laurentchervet.wordpress.com/2019/05/12/snips-console-login-without-sam/

What the community needs though is something that won't break if API changes.