
Research
Supply Chain Attack on Axios Pulls Malicious Dependency from npm
A supply chain attack on Axios introduced a malicious dependency, plain-crypto-js@4.2.1, published minutes earlier and absent from the project’s GitHub releases.
@lightbase/lightbot
Advanced tools
Lightbot.js is a client javascript SDK
It allows the developer to easily communicate with any lightbot agent.
import { LightbotMessenger } from "lightbot";
const lightbotMessenger = new LightbotMessenger({
hostURL: "http://localhost:9000",
agentId: "agent-id",
});
lightbotMessenger.toggleMessenger();
lightbotMessenger.sendMessage({
type: "plain",
sender: "human",
label: "Hello, I need some help!",
});
| Property | Description | Type |
|---|---|---|
| messages | Message history | Message |
| sendMessage | Sends a message to the bot | Function(message: Message): void |
| toggleMessenger | Toggles messenger open state | Function() |
| isMessengerOpen | Current open state | Boolean |
| onChange | Called when any primitive property gets updated | Function(): void |
| resetAgent | Resets all in memory and local storage data related to the bot agent. e.g.: messages, agent data, etc. | Function(): void |
| Property | Description | Value |
|---|---|---|
| sender | Message sender identification | "bot" | "human" |
| type | Type of message | "plain" | "link" | "jump" |
when type: "plain":
| Property | Description | Type |
|---|---|---|
| label | Plain text message | string |
when type: "link":
| Property | Description | Type |
|---|---|---|
| label | Representative link label | string |
| link | link | string |
when type: "jump":
| Property | Description | Type |
|---|---|---|
| label | Representative jump label | string |
| jumps | link | Array<{ label: string; event: string; }> |
withLightbotMessenger HOCLightbot.js provides a React HOC which can be used to provide a communication interface to your React components.
withLightbotMessenger<ComponentProps>(options: { agentId: string; hostURL: string; })(Component)
React components are exported from lib/lightbot-react.
import {
LightbotMessage,
LightbotMessengerDecoratedProps,
withLightbotMessenger
} from "lightbot/lib/lightbot-react";
type AppProps = LightbotMessengerDecoratedProps & {
children: any;
}
class AppDisconnected extends Component<AppProps, {}> {
public render() {
const { messages, isMessengerOpen, toggleMessenger } = this.props;
return (
<>
{
isMessengerOpen ?
(<ChatWindow
messages={messages}
onMessageSend={this.sendMessage}
/>) :
null
}
<button onClick={toggleMessenger}>
{isMessengerOpen ? "close" : "open"}
</button>
</>
);
}
private sendMessage = (message: string) => {
this.props.sendMessage({ type: "plain", label: message });
}
}
export const App = withLightbotMessenger<AppProps>({
hostURL: "https://localhost:9000",
agentId: "agent-id"
})(AppDisconnected);
withLightbotMessenger injects the same props as the one defined by the Lightbot API except the onChange is implemented in order to update your React components when any update is available.
FAQs
Javascript Client for Lightbot API
We found that @lightbase/lightbot demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 4 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
A supply chain attack on Axios introduced a malicious dependency, plain-crypto-js@4.2.1, published minutes earlier and absent from the project’s GitHub releases.

Research
Malicious versions of the Telnyx Python SDK on PyPI delivered credential-stealing malware via a multi-stage supply chain attack.

Security News
TeamPCP is partnering with ransomware group Vect to turn open source supply chain attacks on tools like Trivy and LiteLLM into large-scale ransomware operations.