adaptive-memory-multi-model-router 1.7.0 → 1.7.2

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/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  /**
3
- * TMLPD PI Extension - v1.1.0
3
+ * A3M Router - Adaptive Memory Multi-Model Router v1.7.1
4
4
  *
5
5
  * Parallel Multi-LLM Processing with Streaming, Caching, Cost Tracking, Reliability
6
6
  * + Reference Architecture to Full TMLPD (Episodic Memory, MCTS, HALO)
@@ -236,4 +236,93 @@ exports.default = {
236
236
  TMLPDTools: tmlpdTools_1.TMLPDTools,
237
237
  TMLPD_PI_TOOLS: exports.TMLPD_PI_TOOLS
238
238
  };
239
- //# sourceMappingURL=index.js.map
239
+ //# sourceMappingURL=index.js.map
240
+ // ============================================
241
+ // A3M Router - Adaptive Memory Multi-Model Router
242
+ // Re-exports for the A3M Router package
243
+ // ============================================
244
+
245
+ // Memory
246
+ const memoryTree_1 = require("./memory/memoryTree");
247
+ Object.defineProperty(exports, "MemoryTree", { enumerable: true, get: function () { return memoryTree_1.MemoryTree; } });
248
+
249
+ const autoFetch_1 = require("./memory/autoFetch");
250
+ Object.defineProperty(exports, "AutoFetch", { enumerable: true, get: function () { return autoFetch_1.AutoFetch; } });
251
+
252
+ const obsidianVault_1 = require("./memory/obsidianVault");
253
+ Object.defineProperty(exports, "ObsidianVault", { enumerable: true, get: function () { return obsidianVault_1.ObsidianVault; } });
254
+
255
+ const enhancedCompression_1 = require("./utils/enhancedCompression");
256
+ Object.defineProperty(exports, "EnhancedCompression", { enumerable: true, get: function () { return enhancedCompression_1.EnhancedCompression; } });
257
+
258
+ // OAuth
259
+ const oauth_1 = require("./integrations/oauth");
260
+ Object.defineProperty(exports, "OAuthManager", { enumerable: true, get: function () { return oauth_1.OAuthManager; } });
261
+ Object.defineProperty(exports, "OAUTH_PROVIDERS", { enumerable: true, get: function () { return oauth_1.OAUTH_PROVIDERS; } });
262
+
263
+ // Integrations
264
+ const integrations_1 = require("./integrations/index");
265
+ Object.defineProperty(exports, "GitHubIntegration", { enumerable: true, get: function () { return integrations_1.GitHubIntegration; } });
266
+ Object.defineProperty(exports, "SlackIntegration", { enumerable: true, get: function () { return integrations_1.SlackIntegration; } });
267
+ Object.defineProperty(exports, "TelegramIntegration", { enumerable: true, get: function () { return integrations_1.TelegramIntegration; } });
268
+ Object.defineProperty(exports, "NotionIntegration", { enumerable: true, get: function () { return integrations_1.NotionIntegration; } });
269
+ Object.defineProperty(exports, "LinearIntegration", { enumerable: true, get: function () { return integrations_1.LinearIntegration; } });
270
+ Object.defineProperty(exports, "JiraIntegration", { enumerable: true, get: function () { return integrations_1.JiraIntegration; } });
271
+ Object.defineProperty(exports, "GmailIntegration", { enumerable: true, get: function () { return integrations_1.GmailIntegration; } });
272
+ Object.defineProperty(exports, "DiscordIntegration", { enumerable: true, get: function () { return integrations_1.DiscordIntegration; } });
273
+ Object.defineProperty(exports, "AirtableIntegration", { enumerable: true, get: function () { return integrations_1.AirtableIntegration; } });
274
+ Object.defineProperty(exports, "GoogleCalendarIntegration", { enumerable: true, get: function () { return integrations_1.GoogleCalendarIntegration; } });
275
+ Object.defineProperty(exports, "createIntegration", { enumerable: true, get: function () { return integrations_1.createIntegration; } });
276
+
277
+ // Convenience: createA3MRouter factory
278
+ /**
279
+ * Create a configured A3M Router instance
280
+ * @param {Object} config - Router configuration
281
+ * @param {Object} config.providers - LLM provider configs
282
+ * @param {Object} config.memory - Memory settings
283
+ * @param {Object} config.cache - Cache settings
284
+ * @param {Object} config.cost - Cost tracking settings
285
+ * @returns {Object} Router instance with route(), routeBatch(), recommend(), memory, cache, compression, oauth, vault, providers properties
286
+ */
287
+ function createA3MRouter(config = {}) {
288
+ const { providers = {}, memory = {}, cache = {}, cost = {} } = config;
289
+
290
+ const memoryTree = new memoryTree_1.MemoryTree(memory);
291
+ const prefixCache = new (require("./cache/prefixCache").PrefixCache)(cache);
292
+ const costTracker = new (require("./cost/costTracker").CostTracker)(cost);
293
+ const autoFetch = new autoFetch_1.AutoFetch(memory);
294
+ const compression = new enhancedCompression_1.EnhancedCompression();
295
+ const oauth = new oauth_1.OAuthManager();
296
+ const vault = new obsidianVault_1.ObsidianVault();
297
+
298
+ return {
299
+ // Routing
300
+ route: (query, options) => (0, require("./routing/advancedRouter").routeQuery)(query, options),
301
+ routeBatch: (queries, options) => (0, require("./routing/advancedRouter").routeBatch)(queries, options),
302
+ recommend: (task) => (0, require("./routing/advancedRouter").recommendForTask)(task),
303
+
304
+ // Memory
305
+ memory: memoryTree,
306
+ autoFetch,
307
+ vault,
308
+ compression,
309
+
310
+ // Cache & Cost
311
+ cache: prefixCache,
312
+ costTracker,
313
+
314
+ // Auth
315
+ oauth,
316
+
317
+ // Providers (from existing TMLPD)
318
+ providers: new (require("./providers/registry").ProviderRegistry)(),
319
+
320
+ // Integrations
321
+ createIntegration: integrations_1.createIntegration,
322
+
323
+ // Utils
324
+ countTokens: require("./utils/tokenUtils").countTokens,
325
+ estimateCost: require("./utils/tokenUtils").estimateCost,
326
+ };
327
+ }
328
+ exports.createA3MRouter = createA3MRouter;
@@ -109,3 +109,11 @@ const DEFAULT_PROVIDER_CONFIG = {
109
109
  };
110
110
 
111
111
  module.exports = { ProviderRegistry };
112
+
113
+ // Re-export routing functions for convenience
114
+ const advancedRouter = require("../routing/advancedRouter");
115
+ Object.defineProperty(exports, "routeQuery", { enumerable: true, get: function () { return advancedRouter.routeQuery; } });
116
+ Object.defineProperty(exports, "routeBatch", { enumerable: true, get: function () { return advancedRouter.routeBatch; } });
117
+ Object.defineProperty(exports, "recommendForTask", { enumerable: true, get: function () { return advancedRouter.recommendForTask; } });
118
+ Object.defineProperty(exports, "extractQueryFeatures", { enumerable: true, get: function () { return advancedRouter.extractQueryFeatures; } });
119
+ Object.defineProperty(exports, "MODEL_PROFILES", { enumerable: true, get: function () { return advancedRouter.MODEL_PROFILES; } });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "adaptive-memory-multi-model-router",
3
- "version": "1.7.0",
3
+ "version": "1.7.2",
4
4
  "shortName": "A3M Router",
5
5
  "displayName": "A3M Router - Adaptive Memory Multi-Model Router",
6
6
  "description": "A3M Router - Adaptive Memory Multi-Model Router with learned routing (RouteLLM), prefix caching (RadixAttention), speculative decoding (Medusa), TokenJuice-style compression. 14 LLM providers, 10 integrations, Python bindings. 20x more adaptable for ML/AI developers.",