Coder Social home page Coder Social logo

botbuildercommunity / botbuilder-community-js Goto Github PK

View Code? Open in Web Editor NEW
116.0 13.0 38.0 4.35 MB

Part of the Bot Builder Community Project. Repository for extensions for the Bot Builder JavaScript SDK, including middleware, dialogs, recognizers and more.

License: MIT License

TypeScript 60.99% JavaScript 39.01%
bots bot-framework nodejs chatbots typescript javascript botbuilder middleware dialogs prompts

botbuilder-community-js's People

Contributors

benbrown avatar captainlazarus avatar cloudguy-pro avatar dependabot[bot] avatar garypretty avatar imicknl avatar jacquesporveau avatar jamesemann avatar kayneb avatar mdrichardson avatar spike008t avatar stephanbisser avatar szul avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

botbuilder-community-js's Issues

Add TestAdapter and Mocha unit tests

Right now tests are simply an example bot that you can run manually. We should incorporate Mocha as the unit test framework, and then use the TestAdapter in the Bot Framework to help run the tests. Examples for the Node.JS usage of the TestAdapter can be found in the Bot Framework source code, as well as some of the libraries tests.

Add endpoint construction method to the LUIS class

botbuilder-config

In the event the PR for the botbuilder-tools is delayed, or not accepted, need to be able to dynamically construct the endpoint URL.

The botbuilder-tools repo has an issue 330 that seems to suggest Microsoft wants to use authoringRegion instead of an endpoint, and that the endpoint may be dynamically constructed. Will need to modify the code, so that there is a getter/setter for endpoint that constructs the URL itself.

Moved from previous repository.

Change folder names in repo to reflect "community" reference

Currently, the libraries folder has each package, and each package is prefixed with "botbuilder-". Should we change that prefix to be "botbuildercommunity-"? Should we remove the prefix entirely?

For reference, the NPM packages are scoped to the @botbuildercommunity organizations, so the botbuilder-adapters folder aligns with the @botbuildercommunity/adapters NPM package.

This is more an internal repository structure question/change than anything.

Opinions?

IBM Watson's SDK has a security vulnerability

Currently breaking the CI/CD build. The issue is with a dependency of the API SDK. An upgrade to 5.x.x for the IBM Watson SDK will fix this, but it's a major version release which breaks our packages tests. Will need to upgrade the SDK and then update our package.

Rename Azure table storage package/folder, and change NPM

The botbuilder-azuretablestorage folder should be renamed botbuilder-storage, and the NPM package should be renamed @botbuildercommunity/storage to put it in the org scope like the other packages. Will need to deprecate the previous package in NPM. This will allow us to build out additional storage middleware and options in a single package.

Allow Twitter adapter to initiate conversation

Right now the Twitter adapter is respond-first. If the user sends a tweet, it’ll respond with a tweet. If a direct message, it’ll respond with a direct message. Need to allow the adapter (and chatbot) to kick off a message of the user’s choice.

Constructor standardization

For classes that accept multiple arguments in the constructor, what is the standard practice? Should it always been a settings/configuration object, or are there times when it makes sense to pass in multiple arguments accompanied by an options parameter?

Based on:
#70 (comment)

Add TSLint to project

Suggested by @iMicknl to clean up the code, and make it more uniform. Would align us with the Bot Framework team's usage.

Create hierachical packages for some collections to better abstract

As discussed with @iMicknl, and noted in #63, we should take packages like the adapters and storage and break them out more, but leave the top level one for "install all" capabilities.

I like how Text Recognizers are handled.

For storage, it could be:
npm install @botbuildercommunity/storage for the suite and...
npm install @botbuildercommunity/storage-ats to get just the Azure Table Storage.

For adapters, it could be:
npm install @botbuildercommunity/adapters for the suite and...
npm install @botbuildercommunity/adapters-console to get just the console adapter.

Open to thoughts/suggestions.

Middleware structure and name changes

As referenced in #70 and originally discussed in #64, we need to break apart "collective" packages to give users individual choice, but also have an overall "suite" install still in place. While looking into this for my recent Watson integration, I realized that we ended middleware packages with "middleware", and likely put that in the wrong place.

As per my PR, we probably want to do something like this:

  • botbuilder-middleware
  • botbuilder-middleware-engines
  • botbuilder-middleware-text-analytics
  • botbuilder-middleware-watson-nlu

...which would mean changing something like "botbuilder-text-analytics-middleware" to "botbuilder-middleware-text-analytics". This is better in my opinion because of tab completion and search.

If implemented, however, it would require changes to the folder structure and NPM package (deprecating old ones) for the above, as well as the spell check and recognizers middleware to bring everything into alignment.

Standardize the .npmignore file

Right now--for publishing--we're only ignoring the node_modules folder. We should probably ignore other things like example and test folders. Things that a production package doesn't need.

Dialog prompts failing tests on 4.3.4 and 4.4

For the botbuilder-dialogs-prompts, running the tests throws the following error per dialog prompt:

Error: DialogSet.add(): Invalid dialog being added.
      at DialogSet.add (test\node_modules\botbuilder-dialogs\lib\dialogSet.js:190:19)
      at Context.it (test\index.test.js:33:17)

The code for these dialog prompts parallels the dialog prompts in the Microsoft repo. Not sure what the failure is coming from. Needs further investigation.

Port community dialog prompts

The community dialog prompts from the dotnet repo are the ideal candidate(s) for a first attempt at porting over some dotnet items to NodeJS.

Node version support

Does it make sense to list the supported Node version? I had an older version of Node and came across this issue:
#63 (comment)

...when reviewing @iMicknl's Twilio WhatsApp adapter. My version could have just been too old though.

What is the standard practice?

Remove Twitter package from the Twitter adapter

Once the package was finished, only a single API call ended up using the “twitter” package. The rest had to be custom. Need to convert the final one to request-promise and remove the package.

Adaptive Card to Image middleware

Some channels (like experimental WhatsApp) just support images and don’t support Adaptive Cards. It would be great if there was a middleware, which could be used to transform adaptive cards to images for selected channels.

As far as I know, this is something that is be done by default in the Bot Service. However, this isn’t available for the custom adapters.

Currently, the latest Adaptive Cards package doesn’t offer an AdaptiveCardRenderer to Image API for NodeJS (microsoft/AdaptiveCards#1012), only for C# (microsoft/AdaptiveCards#930). So it has to be a custom renderer in NodeJS.

Have botbuilder-config extend botframework-config

The botbuilder-config package was created because at the time, the Bot Framework had no way of consuming the bot files and using them in chatbots. Microsoft has since created a botframework-config package to do this. The botbuilder-config has enough variance (and future functionality), that I want to keep it active, but we should extend the botframework-config package to avoid reinventing the wheel.

Add NPM badges to the README table next the repo packages

This could also be implemented for the NPM packages in botbuilder-community-tools. There is a module called badges that looks like a lot of people utilize. Open to this or another solution to align the design of the JavaScript/TypeScript projects with the NuGet badges in the dotnet repo.

Usability of Google Adapter

Hi all,

I'm trying to use the Google Bot Adapter and having some issues, first had to adapt the path to /api/actionrequest which is different from the documentation.

After that we had a bug on the following line inside GoogleAdapter.cs (line 116) where Arguments was null and we did not have the ? operator)

        if(actionPayload.Inputs.FirstOrDefault()?.Arguments?.FirstOrDefault()?.Name == "OPTION")

After that when trying to run the sample bot testing via the Actions On Google simulator, I get the following error:

API Version 2: Failed to parse JSON response string with 'INVALID_ARGUMENT' error: "payload: Cannot find field.".

Am I doing something wrong? Should this be working?

Thanks

Proper NPM build/postinstall when using Lerna

As per @iMicknl's comment on PR #38: The individual package calls to tsc in their local node_modules folders was replaced with just tsc. This is because a configuration of:

"postinstall": "./node_modules/.bin/tsc -p ."

or

"postinstall": "./node_modules/.bin/tsc"

...throws an error when lerna bootstrap is run of:

'.' is not recognized as an internal or external command

This seems to be an issue with pathing to the TypeScript executable when running Lerna. I could possibly resolve this by putting TypeScript at the root level along with Lerna, and using that for building. The problem is that the postinstall script runs after the NPM module is installed by the user, so that's why local TypeScript installs were added.

Is this necessary?

When the NPM module is published, I believe it publishes from the local folder, so it should include the built JavaScript files, even though they are not in GitHub. If this is correct, we could eliminate the postinstall script in favor of a build script.

Open to suggestions.

Error in dialogs afters upgrading to SDK 4.5.1

After the upgrade, the following errors are encountered when running npm run test:

C:\Users\micha\x\botbuilder-community-js\libraries\botbuilder-dialog-prompts\node_modules\botbuilder-dialogs\lib\prompts\oauthPrompt.js:235
            catch {
                  ^

SyntaxError: Unexpected token {
    at createScript (vm.js:80:10)
    at Object.runInThisContext (vm.js:139:10)
    at Module._compile (module.js:607:28)
    at Object.Module._extensions..js (module.js:654:10)
    at Module.load (module.js:556:32)
    at tryModuleLoad (module.js:499:12)
    at Function.Module._load (module.js:491:3)
    at Module.require (module.js:587:17)

This seems to be pointing to a file in the botbuilder-dialog package in the Bot Framework.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.