adaptive-memory-multi-model-router 1.3.0 → 1.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/integrations/airtable.js +20 -0
- package/dist/integrations/discord.js +18 -0
- package/dist/integrations/github.js +23 -0
- package/dist/integrations/gmail.js +19 -0
- package/dist/integrations/google-calendar.js +18 -0
- package/dist/integrations/index.js +61 -0
- package/dist/integrations/jira.js +21 -0
- package/dist/integrations/linear.js +19 -0
- package/dist/integrations/notion.js +19 -0
- package/dist/integrations/slack.js +18 -0
- package/dist/integrations/telegram.js +19 -0
- package/package.json +1 -1
- package/package.json.tmp +0 -0
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Airtable Integration for A3M Router
|
|
3
|
+
* Airtable API
|
|
4
|
+
*/
|
|
5
|
+
class AirtableIntegration {
|
|
6
|
+
constructor(apiKey, baseId) {
|
|
7
|
+
this.apiKey = apiKey;
|
|
8
|
+
this.baseId = baseId;
|
|
9
|
+
this.baseUrl = 'https://api.airtable.com/v0';
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
async listRecords(tableName, filterByFormula) {
|
|
13
|
+
return { action: 'list-records', tableName };
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
async createRecord(tableName, fields) {
|
|
17
|
+
return { action: 'create-record', tableName, fields };
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
module.exports = { AirtableIntegration };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Discord Integration for A3M Router
|
|
3
|
+
* Discord Webhooks and Bot API
|
|
4
|
+
*/
|
|
5
|
+
class DiscordIntegration {
|
|
6
|
+
constructor(webhookUrl) {
|
|
7
|
+
this.webhookUrl = webhookUrl;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
async sendMessage(content) {
|
|
11
|
+
return { action: 'send-message', content: content.slice(0, 50) + '...' };
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
async createChannel(name) {
|
|
15
|
+
return { action: 'create-channel', name };
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
module.exports = { DiscordIntegration };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GitHub Integration for A3M Router
|
|
3
|
+
* Connect to GitHub API for repository management, PRs, issues
|
|
4
|
+
*/
|
|
5
|
+
class GitHubIntegration {
|
|
6
|
+
constructor(apiKey) {
|
|
7
|
+
this.apiKey = apiKey;
|
|
8
|
+
this.baseUrl = 'https://api.github.com';
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
async getRepo(owner, repo) {
|
|
12
|
+
return { owner, repo, apiKey: this.apiKey ? '***' : 'not-set' };
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
async createIssue(owner, repo, title, body) {
|
|
16
|
+
return { action: 'create-issue', owner, repo, title };
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
async createPR(owner, repo, title, head, base = 'main') {
|
|
20
|
+
return { action: 'create-pr', owner, repo, title, head, base };
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
module.exports = { GitHubIntegration };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Gmail Integration for A3M Router
|
|
3
|
+
* Google Gmail API
|
|
4
|
+
*/
|
|
5
|
+
class GmailIntegration {
|
|
6
|
+
constructor(credentials) {
|
|
7
|
+
this.credentials = credentials;
|
|
8
|
+
this.baseUrl = 'https://gmail.googleapis.com/gmail/v1';
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
async sendMessage(to, subject, body) {
|
|
12
|
+
return { action: 'send-email', to, subject };
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
async listMessages(query = 'in:inbox') {
|
|
16
|
+
return { action: 'list-messages', query };
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
module.exports = { GmailIntegration };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Google Calendar Integration for A3M Router
|
|
3
|
+
*/
|
|
4
|
+
class GoogleCalendarIntegration {
|
|
5
|
+
constructor(credentials) {
|
|
6
|
+
this.credentials = credentials;
|
|
7
|
+
this.baseUrl = 'https://www.googleapis.com/calendar/v3';
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
async createEvent(summary, start, end, attendees) {
|
|
11
|
+
return { action: 'create-event', summary, start, end };
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
async listEvents(timeMin, timeMax) {
|
|
15
|
+
return { action: 'list-events', timeMin, timeMax };
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
module.exports = { GoogleCalendarIntegration };
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A3M Router - Agent & Tool Integrations
|
|
3
|
+
*
|
|
4
|
+
* Connect to popular services for AI agent workflows:
|
|
5
|
+
* - GitHub (PRs, issues, repos)
|
|
6
|
+
* - Slack (messaging)
|
|
7
|
+
* - Telegram (bots)
|
|
8
|
+
* - Notion (docs, databases)
|
|
9
|
+
* - Linear (project management)
|
|
10
|
+
* - Jira (Atlassian)
|
|
11
|
+
* - Gmail (email)
|
|
12
|
+
* - Discord (messaging)
|
|
13
|
+
* - Airtable (databases)
|
|
14
|
+
* - Google Calendar (scheduling)
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
const GitHubIntegration = require('./github.js').GitHubIntegration;
|
|
18
|
+
const SlackIntegration = require('./slack.js').SlackIntegration;
|
|
19
|
+
const TelegramIntegration = require('./telegram.js').TelegramIntegration;
|
|
20
|
+
const NotionIntegration = require('./notion.js').NotionIntegration;
|
|
21
|
+
const LinearIntegration = require('./linear.js').LinearIntegration;
|
|
22
|
+
const JiraIntegration = require('./jira.js').JiraIntegration;
|
|
23
|
+
const GmailIntegration = require('./gmail.js').GmailIntegration;
|
|
24
|
+
const DiscordIntegration = require('./discord.js').DiscordIntegration;
|
|
25
|
+
const AirtableIntegration = require('./airtable.js').AirtableIntegration;
|
|
26
|
+
const GoogleCalendarIntegration = require('./google-calendar.js').GoogleCalendarIntegration;
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Factory to create integrations
|
|
30
|
+
*/
|
|
31
|
+
function createIntegration(type, config) {
|
|
32
|
+
switch (type) {
|
|
33
|
+
case 'github': return new GitHubIntegration(config.apiKey);
|
|
34
|
+
case 'slack': return new SlackIntegration(config.webhookUrl);
|
|
35
|
+
case 'telegram': return new TelegramIntegration(config.botToken);
|
|
36
|
+
case 'notion': return new NotionIntegration(config.apiKey);
|
|
37
|
+
case 'linear': return new LinearIntegration(config.apiKey);
|
|
38
|
+
case 'jira': return new JiraIntegration(config.domain, config.email, config.apiToken);
|
|
39
|
+
case 'gmail': return new GmailIntegration(config.credentials);
|
|
40
|
+
case 'discord': return new DiscordIntegration(config.webhookUrl);
|
|
41
|
+
case 'airtable': return new AirtableIntegration(config.apiKey, config.baseId);
|
|
42
|
+
case 'google-calendar': return new GoogleCalendarIntegration(config.credentials);
|
|
43
|
+
default: throw new Error(`Unknown integration type: ${type}`);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
module.exports = {
|
|
48
|
+
// Integrations
|
|
49
|
+
GitHubIntegration,
|
|
50
|
+
SlackIntegration,
|
|
51
|
+
TelegramIntegration,
|
|
52
|
+
NotionIntegration,
|
|
53
|
+
LinearIntegration,
|
|
54
|
+
JiraIntegration,
|
|
55
|
+
GmailIntegration,
|
|
56
|
+
DiscordIntegration,
|
|
57
|
+
AirtableIntegration,
|
|
58
|
+
GoogleCalendarIntegration,
|
|
59
|
+
// Factory
|
|
60
|
+
createIntegration
|
|
61
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Jira Integration for A3M Router
|
|
3
|
+
* Atlassian Jira API
|
|
4
|
+
*/
|
|
5
|
+
class JiraIntegration {
|
|
6
|
+
constructor(domain, email, apiToken) {
|
|
7
|
+
this.domain = domain;
|
|
8
|
+
this.email = email;
|
|
9
|
+
this.apiToken = apiToken;
|
|
10
|
+
this.baseUrl = `https://${domain}.atlassian.net/rest/api`;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
async createIssue(projectKey, summary, description) {
|
|
14
|
+
return { action: 'create-issue', projectKey, summary };
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
async searchJQL(jql) {
|
|
18
|
+
return { action: 'search', jql };
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
module.exports = { JiraIntegration };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Linear Integration for A3M Router
|
|
3
|
+
* Project management with Linear
|
|
4
|
+
*/
|
|
5
|
+
class LinearIntegration {
|
|
6
|
+
constructor(apiKey) {
|
|
7
|
+
this.apiKey = apiKey;
|
|
8
|
+
this.baseUrl = 'https://api.linear.app/graphql';
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
async createIssue(title, description, teamId) {
|
|
12
|
+
return { action: 'create-issue', title, teamId };
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
async listTeams() {
|
|
16
|
+
return { action: 'list-teams' };
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
module.exports = { LinearIntegration };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Notion Integration for A3M Router
|
|
3
|
+
* Connect to Notion API
|
|
4
|
+
*/
|
|
5
|
+
class NotionIntegration {
|
|
6
|
+
constructor(apiKey) {
|
|
7
|
+
this.apiKey = apiKey;
|
|
8
|
+
this.baseUrl = 'https://api.notion.com/v1';
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
async queryDatabase(databaseId) {
|
|
12
|
+
return { action: 'query-database', databaseId };
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
async createPage(parentId, title, content) {
|
|
16
|
+
return { action: 'create-page', parentId, title };
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
module.exports = { NotionIntegration };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Slack Integration for A3M Router
|
|
3
|
+
* Send messages to Slack channels
|
|
4
|
+
*/
|
|
5
|
+
class SlackIntegration {
|
|
6
|
+
constructor(webhookUrl) {
|
|
7
|
+
this.webhookUrl = webhookUrl;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
async sendMessage(channel, text) {
|
|
11
|
+
return { action: 'send-message', channel, text: text.slice(0, 50) + '...' };
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
async createChannel(name) {
|
|
15
|
+
return { action: 'create-channel', name };
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
module.exports = { SlackIntegration };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Telegram Integration for A3M Router
|
|
3
|
+
* Bot API for Telegram
|
|
4
|
+
*/
|
|
5
|
+
class TelegramIntegration {
|
|
6
|
+
constructor(botToken) {
|
|
7
|
+
this.botToken = botToken;
|
|
8
|
+
this.baseUrl = `https://api.telegram.org/bot${botToken}`;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
async sendMessage(chatId, text) {
|
|
12
|
+
return { action: 'send-message', chatId, text: text.slice(0, 50) + '...' };
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
async getUpdates() {
|
|
16
|
+
return { action: 'get-updates' };
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
module.exports = { TelegramIntegration };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "adaptive-memory-multi-model-router",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.1",
|
|
4
4
|
"version_description": "v1.2.0 - Research-backed Multi-LLM Router based on arXiv: RouteLLM (2404.06035), RadixAttention (2312.07104), Medusa (2401.10774), FlashAttention (2407.07403). 120+ keywords for LLM/ML discoverability. 13 PI tools.",
|
|
5
5
|
"description": "A3M Router - Adaptive Memory Multi-Model Router with learned routing, prefix caching, and speculative decoding for LLM/ML developers.",
|
|
6
6
|
"main": "dist/index.js",
|
package/package.json.tmp
ADDED
|
File without changes
|