Research
Security News
Threat Actor Exposes Playbook for Exploiting npm to Build Blockchain-Powered Botnets
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.
@oracle/bots-node-sdk
Advanced tools
Oracle Bots SDK for custom component development and webhook integrations
This SDK is the main developer resource for Oracle Digital Asistant integrations in a Node.js express environment. It provides two primary solutions for custom implementations against the Digital Assistant platform:
To install the SDK globally:
npm install -g @oracle/bots-node-sdk
To install the SDK locally in your current directory:
npm install @oracle/bots-node-sdk
When installed locally, use npx @oracle/bots-node-sdk
instead of just bots-node-sdk
to run the command-line interface (CLI) commands described in the Getting Started section.
This section explains the basic CLI commands to get your component service up and running. See the CLI documentation for a complete list of all the arguments and options that you can configure with each command.
Use the init
command to create a component service package. For example:
bots-node-sdk init PizzaService --name pizza-service
This example creates a component service named pizza-service
in a directory named PizzaService
.
The component service includes one sample custom component named helloWorld
.
You use the init component <name> custom
command to add a component to an existing package. For example:
bots-node-sdk init component myCustomComponent custom
This example creates a component of type custom
named myCustomComponent
. Instead of typing custom
for the component type argument, you can type c
as a shortcut.
You use the init component <name> entityEventHandler
command to add an event handler to an existing package. For example:
bots-node-sdk init component myEventHandler entityEventHandler
This example creates a component of type entityEventHandler
that is named myEventHandler
. Instead of typing entityEventHandler
for the component type argument, you can type e
as a shortcut.
To package the components, use the pack
command. For example:
bots-node-sdk pack
This creates a component service package .tgz file that can be hosted as an express service, uploaded to a skill's embedded container in Digital Assistant, or uploaded to Oracle Mobile Hub.
To start a service on a local node server and host the custom component package, use the start
command.
npm start
This example creates a component service running on a local node server. It uses the @oracle/bots-node-sdk
dev dependency.
Alternatively, you can use this bots-node-sdk command to start the service. This command uses the global bots-node-sdk installation.
bots-node-sdk service
To see the metadata for all deployed components, run this cURL command:
curl -X GET localhost:3000/components
To deploy to a docker container, you can use the following commands:
npm run-script docker-build
docker-compose up
The SDK has full support for TypeScript. If you want to use TypeScript to write your custom components and event handlers, all you need to do is specify the language option when you create the component service. For example:
bots-node-sdk init MyComponentService --language typescript
or the shorter format:
bots-node-sdk init MyComponentService -l t
This example creates a TypeScript project in the MyComponentService directory.
If you subsequently use the init component
command to add a component to a TypeScript project, it creates a TypeScript component instead of a JavaScript component.
When run on a TypeScript project, the service
and pack
commands transpile all files under the src
directory into JavaScript files in the build
directory.
The benefit of using TypeScript over JavaScript is that it is strongly typed, so, if you use an editor like Visual Code Studio, you'll get code completion features and compile-time type checking similar to Java.
See the README.md that's created in your scaffolded TypeScript project for more information.
@oracle/bots-node-sdk
is an open source project. See
CONTRIBUTING for details.
Copyright © 2018-2021, Oracle and/or its affiliates. All rights reserved.
The Universal Permissive License (UPL), Version 1.0
FAQs
Oracle Digital Assistant SDK for custom component development and webhook integrations
The npm package @oracle/bots-node-sdk receives a total of 63 weekly downloads. As such, @oracle/bots-node-sdk popularity was classified as not popular.
We found that @oracle/bots-node-sdk demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.
Security News
NVD’s backlog surpasses 20,000 CVEs as analysis slows and NIST announces new system updates to address ongoing delays.
Security News
Research
A malicious npm package disguised as a WhatsApp client is exploiting authentication flows with a remote kill switch to exfiltrate data and destroy files.