
Security News
AGENTS.md Gains Traction as an Open Format for AI Coding Agents
AGENTS.md is a fast-growing open format giving AI coding agents a shared, predictable way to understand project setup, style, and workflows.
botmaster-session-ware-redis-store
Advanced tools
Redis store adapter for the botmaster session ware
This is the Redis store adapter for the botmaster-session-ware middleware.
yarn add botmaster-session-ware-redis-store
or with npm
npm install --save botmaster-session-ware-redis-store
This package is an adapter for botmaster-session-ware: https://github.com/botmasterai/botmaster-session-ware
Using this adapter along with the botmaster-session-ware middleware will store sessions in redis rather than use the default in memory store which should not be used in production
Parameters
redisSettings
settings
object just a valid ioredis settings object as per:
https://github.com/luin/ioredis which is used under the hood. By default,
will connect to 127.0.0.1:6379
*Examples
const Botmaster = require('botmaster');
// Using this socket.io bot class for the sake of the example
const SocketioBot = require('botmaster-socket.io');
const SessionWare = require('botmaster-session-ware');
const SessionWareRedisStore = require('botmaster-session-ware-redis-store');
const botmaster = new Botmaster();
botmaster.addBot(new SocketioBot({
id: 'botId',
server: botmaster.server,
}));
// declaring middleware
botmaster.use({
type: 'incoming',
name: 'my-awesome-middleware',
controller: async (bot, update) => {
// this will be {} on the first call from a certain user
// and will contain the last message upon all the next iterations
console.log(update.session);
update.session.lastMessage = update.message;
}
})
// This will make our context persist throughout different messages from the
// same user
const sessionWare = new SessionWare({ adapter: new SessionWareRedisStore() });
botmaster.useWrapped(sessionWare.incoming, sessionWare.outgoing);
Get or create a session with the id.
Parameters
id
String a unique id for the sessionReturns Promise evaluates to an object that is the session
Update a session in the storage.
Parameters
Returns Promise resolves when the session has been saved
FAQs
Redis store adapter for the botmaster session ware
The npm package botmaster-session-ware-redis-store receives a total of 3 weekly downloads. As such, botmaster-session-ware-redis-store popularity was classified as not popular.
We found that botmaster-session-ware-redis-store demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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.
Security News
AGENTS.md is a fast-growing open format giving AI coding agents a shared, predictable way to understand project setup, style, and workflows.
Security News
/Research
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
Security News
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.