@nxuss/lemma 1.6.0 → 1.7.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/README.md +114 -5
- package/bin/checkpoint.js +49 -0
- package/bin/init.js +21 -2
- package/dist/cjs/mcp/prompts.d.ts +1 -2
- package/dist/cjs/mcp/prompts.d.ts.map +1 -1
- package/dist/cjs/mcp/prompts.js +29 -126
- package/dist/cjs/mcp/prompts.js.map +1 -1
- package/dist/cjs/mcp/resources.d.ts.map +1 -1
- package/dist/cjs/mcp/resources.js +4 -4
- package/dist/cjs/mcp/resources.js.map +1 -1
- package/dist/cjs/mcp/tool-profiles.d.ts +55 -0
- package/dist/cjs/mcp/tool-profiles.d.ts.map +1 -0
- package/dist/cjs/mcp/tool-profiles.js +204 -0
- package/dist/cjs/mcp/tool-profiles.js.map +1 -0
- package/dist/cjs/mcp/tools.d.ts +12 -0
- package/dist/cjs/mcp/tools.d.ts.map +1 -1
- package/dist/cjs/mcp/tools.js +175 -26
- package/dist/cjs/mcp/tools.js.map +1 -1
- package/dist/cjs/subconscious/TheBrainV2.d.ts +36 -2
- package/dist/cjs/subconscious/TheBrainV2.d.ts.map +1 -1
- package/dist/cjs/subconscious/TheBrainV2.js +104 -23
- package/dist/cjs/subconscious/TheBrainV2.js.map +1 -1
- package/dist/cjs/utils/AutoContextBundle.d.ts.map +1 -1
- package/dist/cjs/utils/AutoContextBundle.js +17 -20
- package/dist/cjs/utils/AutoContextBundle.js.map +1 -1
- package/dist/cjs/utils/ConversationCheckpoint.d.ts +13 -0
- package/dist/cjs/utils/ConversationCheckpoint.d.ts.map +1 -1
- package/dist/cjs/utils/ConversationCheckpoint.js +58 -0
- package/dist/cjs/utils/ConversationCheckpoint.js.map +1 -1
- package/dist/cjs/utils/TestAutofixInterceptor.d.ts.map +1 -1
- package/dist/cjs/utils/TestAutofixInterceptor.js +15 -26
- package/dist/cjs/utils/TestAutofixInterceptor.js.map +1 -1
- package/dist/esm/api/dashboardRoutes.d.ts +3 -3
- package/dist/esm/api/dashboardRoutes.js +1 -1
- package/dist/esm/api/server.d.ts +4 -4
- package/dist/esm/api/server.js +3 -3
- package/dist/esm/autopilot/AutopilotWatcher.js +3 -3
- package/dist/esm/autopilot/Notifier.d.ts +1 -1
- package/dist/esm/cli/lemma-proxy.js +14 -14
- package/dist/esm/cli/stack.d.ts +4 -4
- package/dist/esm/cli/stack.js +5 -5
- package/dist/esm/cloud/KeyManager.d.ts +1 -1
- package/dist/esm/cloud/KeyManager.js +1 -1
- package/dist/esm/cloud/TenantCache.d.ts +1 -1
- package/dist/esm/cloud/TenantCache.js +1 -1
- package/dist/esm/cloud/index.d.ts +3 -3
- package/dist/esm/cloud/index.js +3 -3
- package/dist/esm/cloud/server.d.ts +3 -3
- package/dist/esm/cloud/server.js +5 -5
- package/dist/esm/config/index.d.ts +1 -1
- package/dist/esm/config/index.js +1 -1
- package/dist/esm/consensus/index.d.ts +2 -2
- package/dist/esm/consensus/index.js +2 -2
- package/dist/esm/core/AgentRegistry.d.ts +1 -1
- package/dist/esm/core/AgentRegistry.js +1 -1
- package/dist/esm/core/DashboardBroadcaster.d.ts +3 -3
- package/dist/esm/core/DashboardBroadcaster.js +2 -2
- package/dist/esm/core/DashboardWebSocketServer.d.ts +1 -1
- package/dist/esm/core/DashboardWebSocketServer.js +1 -1
- package/dist/esm/core/GhostAlchemist.js +1 -1
- package/dist/esm/core/GhostListener.js +2 -2
- package/dist/esm/core/OrchestrationEngine.d.ts +3 -3
- package/dist/esm/core/OrchestrationEngine.js +2 -2
- package/dist/esm/core/SubconsciousEngine.d.ts +1 -1
- package/dist/esm/core/SubconsciousEngine.js +2 -2
- package/dist/esm/core/WebSocketServer.d.ts +2 -2
- package/dist/esm/core/WebSocketServer.js +1 -1
- package/dist/esm/core/index.d.ts +6 -6
- package/dist/esm/core/index.js +6 -6
- package/dist/esm/core/router.d.ts +3 -3
- package/dist/esm/core/router.js +1 -1
- package/dist/esm/db/database.js +1 -1
- package/dist/esm/embed.d.ts +2 -2
- package/dist/esm/embed.js +2 -2
- package/dist/esm/examples/basic-usage.js +1 -1
- package/dist/esm/index.d.ts +14 -14
- package/dist/esm/index.js +14 -14
- package/dist/esm/infra/analyzers/DriftDetector.d.ts +1 -1
- package/dist/esm/infra/analyzers/InfraAnalyzer.d.ts +1 -1
- package/dist/esm/infra/analyzers/MonolithAnalyzer.d.ts +1 -1
- package/dist/esm/infra/analyzers/index.d.ts +3 -3
- package/dist/esm/infra/analyzers/index.js +3 -3
- package/dist/esm/infra/cli.js +2 -2
- package/dist/esm/infra/config.d.ts +1 -1
- package/dist/esm/infra/index.d.ts +5 -5
- package/dist/esm/infra/index.js +5 -5
- package/dist/esm/infra/mcp-tools.js +5 -5
- package/dist/esm/infra/providers/InfraProvider.d.ts +1 -1
- package/dist/esm/infra/providers/JenkinsProvider.d.ts +2 -2
- package/dist/esm/infra/providers/OKDProvider.d.ts +2 -2
- package/dist/esm/infra/providers/TerraformProvider.d.ts +2 -2
- package/dist/esm/infra/providers/index.d.ts +5 -5
- package/dist/esm/infra/providers/index.js +3 -3
- package/dist/esm/mcp/index.js +5 -5
- package/dist/esm/mcp/prompts.d.ts +1 -2
- package/dist/esm/mcp/prompts.d.ts.map +1 -1
- package/dist/esm/mcp/prompts.js +28 -125
- package/dist/esm/mcp/prompts.js.map +1 -1
- package/dist/esm/mcp/resources.d.ts.map +1 -1
- package/dist/esm/mcp/resources.js +5 -5
- package/dist/esm/mcp/resources.js.map +1 -1
- package/dist/esm/mcp/tool-profiles.d.ts +55 -0
- package/dist/esm/mcp/tool-profiles.d.ts.map +1 -0
- package/dist/esm/mcp/tool-profiles.js +196 -0
- package/dist/esm/mcp/tool-profiles.js.map +1 -0
- package/dist/esm/mcp/tools.d.ts +12 -0
- package/dist/esm/mcp/tools.d.ts.map +1 -1
- package/dist/esm/mcp/tools.js +209 -63
- package/dist/esm/mcp/tools.js.map +1 -1
- package/dist/esm/observability/IdeContextSync.d.ts +1 -1
- package/dist/esm/observability/IdeContextSync.js +5 -5
- package/dist/esm/pr-review/PRReviewEngine.d.ts +1 -1
- package/dist/esm/pr-review/PRReviewEngine.js +4 -4
- package/dist/esm/pr-review/ReviewStore.d.ts +1 -1
- package/dist/esm/pr-review/adapters/AzureDevOpsAdapter.d.ts +2 -2
- package/dist/esm/pr-review/adapters/AzureDevOpsAdapter.js +1 -1
- package/dist/esm/pr-review/adapters/GitHubAdapter.d.ts +2 -2
- package/dist/esm/pr-review/adapters/GitHubAdapter.js +1 -1
- package/dist/esm/pr-review/adapters/GitLabAdapter.d.ts +2 -2
- package/dist/esm/pr-review/adapters/GitLabAdapter.js +1 -1
- package/dist/esm/pr-review/adapters/GitPlatformAdapter.d.ts +1 -1
- package/dist/esm/pr-review/adapters/index.d.ts +4 -4
- package/dist/esm/pr-review/adapters/index.js +3 -3
- package/dist/esm/pr-review/analyzers/QualityGrader.d.ts +1 -1
- package/dist/esm/pr-review/analyzers/RegressionDetector.d.ts +1 -1
- package/dist/esm/pr-review/analyzers/SecurityScanner.d.ts +1 -1
- package/dist/esm/pr-review/analyzers/StaticAnalyzer.d.ts +1 -1
- package/dist/esm/pr-review/analyzers/index.d.ts +8 -8
- package/dist/esm/pr-review/analyzers/index.js +4 -4
- package/dist/esm/pr-review/bridge/BrainBridge.d.ts +1 -1
- package/dist/esm/pr-review/bridge/BrainBridge.js +1 -1
- package/dist/esm/pr-review/bridge/index.d.ts +1 -1
- package/dist/esm/pr-review/bridge/index.js +1 -1
- package/dist/esm/pr-review/index.d.ts +4 -4
- package/dist/esm/pr-review/index.js +2 -2
- package/dist/esm/pr-review/reviewRunner.d.ts +2 -2
- package/dist/esm/pr-review/reviewRunner.js +6 -6
- package/dist/esm/pr-review/webhook/WebhookServer.js +1 -1
- package/dist/esm/pr-review/webhook/index.d.ts +1 -1
- package/dist/esm/pr-review/webhook/index.js +1 -1
- package/dist/esm/protocol/flows.d.ts +1 -1
- package/dist/esm/protocol/flows.js +1 -1
- package/dist/esm/protocol/index.d.ts +4 -4
- package/dist/esm/protocol/index.js +4 -4
- package/dist/esm/protocol/utils.d.ts +1 -1
- package/dist/esm/protocol/utils.js +2 -2
- package/dist/esm/protocol/validators.d.ts +1 -1
- package/dist/esm/protocol/validators.js +1 -1
- package/dist/esm/proxy/ContextInjector.d.ts +1 -1
- package/dist/esm/proxy/Gatekeeper.d.ts +1 -1
- package/dist/esm/security/SecurityMiddleware.d.ts +1 -1
- package/dist/esm/security/SecurityMiddleware.js +3 -3
- package/dist/esm/security/index.d.ts +4 -4
- package/dist/esm/security/index.js +4 -4
- package/dist/esm/speculative/SpeculativeCache.d.ts +2 -2
- package/dist/esm/speculative/SpeculativeEngine.d.ts +2 -2
- package/dist/esm/speculative/SpeculativeEngine.js +3 -3
- package/dist/esm/speculative/WorkerPool.d.ts +1 -1
- package/dist/esm/speculative/index.d.ts +4 -4
- package/dist/esm/speculative/index.js +4 -4
- package/dist/esm/subconscious/SemanticCache.d.ts +2 -2
- package/dist/esm/subconscious/SemanticCache.js +2 -2
- package/dist/esm/subconscious/SubconsciousEngine.d.ts +1 -1
- package/dist/esm/subconscious/SubconsciousEngine.js +3 -3
- package/dist/esm/subconscious/TheBrainV2.d.ts +36 -2
- package/dist/esm/subconscious/TheBrainV2.d.ts.map +1 -1
- package/dist/esm/subconscious/TheBrainV2.js +103 -23
- package/dist/esm/subconscious/TheBrainV2.js.map +1 -1
- package/dist/esm/subconscious/index.d.ts +4 -4
- package/dist/esm/subconscious/index.js +4 -4
- package/dist/esm/utils/AutoContextBundle.d.ts +1 -1
- package/dist/esm/utils/AutoContextBundle.d.ts.map +1 -1
- package/dist/esm/utils/AutoContextBundle.js +20 -23
- package/dist/esm/utils/AutoContextBundle.js.map +1 -1
- package/dist/esm/utils/BulkFileDigest.js +2 -2
- package/dist/esm/utils/ClipboardWatcher.js +2 -2
- package/dist/esm/utils/ContextCollapser.js +1 -1
- package/dist/esm/utils/ConversationCheckpoint.d.ts +13 -0
- package/dist/esm/utils/ConversationCheckpoint.d.ts.map +1 -1
- package/dist/esm/utils/ConversationCheckpoint.js +57 -0
- package/dist/esm/utils/ConversationCheckpoint.js.map +1 -1
- package/dist/esm/utils/ExecutiveReport.js +1 -1
- package/dist/esm/utils/StructuralSearch.d.ts +1 -1
- package/dist/esm/utils/SurgicalASTInsert.js +1 -1
- package/dist/esm/utils/SymbolSurgicalContext.js +1 -1
- package/dist/esm/utils/TestAutofixInterceptor.d.ts.map +1 -1
- package/dist/esm/utils/TestAutofixInterceptor.js +15 -26
- package/dist/esm/utils/TestAutofixInterceptor.js.map +1 -1
- package/dist/esm/utils/WorkspaceSearch.js +0 -0
- package/dist/esm/utils/logger.js +1 -1
- package/package.json +9 -10
- package/sdks/crewai/README.md +178 -0
- package/sdks/crewai/dist/index.d.ts +130 -0
- package/sdks/crewai/dist/index.js +308 -0
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.runTestAutofix = runTestAutofix;
|
|
4
4
|
const child_process_1 = require("child_process");
|
|
5
|
+
const TheBrainV2_1 = require("../subconscious/TheBrainV2");
|
|
5
6
|
function extractFailures(output) {
|
|
6
7
|
const failures = [];
|
|
7
8
|
// Jest/Vitest failure pattern
|
|
@@ -54,35 +55,23 @@ function extractTestCounts(output) {
|
|
|
54
55
|
}
|
|
55
56
|
return { total, passed, failed };
|
|
56
57
|
}
|
|
58
|
+
/**
|
|
59
|
+
* Looks for a previously stored fix for a test failure.
|
|
60
|
+
*
|
|
61
|
+
* Previously scanned `<project>/.lemma/memory/*.json` — a directory no code path writes —
|
|
62
|
+
* so `brainHit` was always false and the "Brain-suggested fix" feature never fired once.
|
|
63
|
+
* Now it asks the Brain directly, which also replaces the hand-rolled token overlap score
|
|
64
|
+
* with the BM25 ranking the Brain already implements.
|
|
65
|
+
*/
|
|
57
66
|
function searchBrainForFix(errorMessage, projectRoot) {
|
|
58
67
|
try {
|
|
59
|
-
const
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
68
|
+
const results = (0, TheBrainV2_1.getBrain)().search(errorMessage, 1, 0.35, {
|
|
69
|
+
projectId: (0, TheBrainV2_1.deriveProjectId)(projectRoot),
|
|
70
|
+
});
|
|
71
|
+
const top = results[0];
|
|
72
|
+
if (!top)
|
|
63
73
|
return { fix: null, hit: false };
|
|
64
|
-
|
|
65
|
-
const files = fs.readdirSync(brainDir).filter((f) => f.endsWith('.json'));
|
|
66
|
-
let bestScore = 0;
|
|
67
|
-
let bestFix = null;
|
|
68
|
-
for (const f of files) {
|
|
69
|
-
try {
|
|
70
|
-
const data = JSON.parse(fs.readFileSync(path.join(brainDir, f), 'utf8'));
|
|
71
|
-
const content = `${data.query || ''} ${data.response || ''}`.toLowerCase();
|
|
72
|
-
let score = 0;
|
|
73
|
-
for (const token of errorTokens) {
|
|
74
|
-
if (content.includes(token))
|
|
75
|
-
score++;
|
|
76
|
-
}
|
|
77
|
-
const normalizedScore = errorTokens.length > 0 ? score / errorTokens.length : 0;
|
|
78
|
-
if (normalizedScore > bestScore && normalizedScore > 0.3) {
|
|
79
|
-
bestScore = normalizedScore;
|
|
80
|
-
bestFix = String(data.response).slice(0, 500);
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
catch { }
|
|
84
|
-
}
|
|
85
|
-
return { fix: bestFix, hit: bestScore > 0.3 };
|
|
74
|
+
return { fix: String(top.response).slice(0, 500), hit: true };
|
|
86
75
|
}
|
|
87
76
|
catch {
|
|
88
77
|
return { fix: null, hit: false };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TestAutofixInterceptor.js","sourceRoot":"","sources":["../../../src/utils/TestAutofixInterceptor.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"TestAutofixInterceptor.js","sourceRoot":"","sources":["../../../src/utils/TestAutofixInterceptor.ts"],"names":[],"mappings":";;AA+FA,wCAsCC;AArID,iDAAyC;AACzC,2DAAuE;AAmBvE,SAAS,eAAe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chestrationEngine } from '../core/OrchestrationEngine';
|
|
17
|
-
import { AgentRegistry } from '../core/AgentRegistry';
|
|
18
|
-
import { SubconsciousEngine } from '../core/SubconsciousEngine';
|
|
16
|
+
import { OrchestrationEngine } from '../core/OrchestrationEngine.js';
|
|
17
|
+
import { AgentRegistry } from '../core/AgentRegistry.js';
|
|
18
|
+
import { SubconsciousEngine } from '../core/SubconsciousEngine.js';
|
|
19
19
|
interface DashboardAPIContext {
|
|
20
20
|
eventLog: any[];
|
|
21
21
|
orchestrationEngine: OrchestrationEngine;
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
* POST /api/debugger/rewind - Rewind to event state
|
|
14
14
|
*/
|
|
15
15
|
import { Router } from 'express';
|
|
16
|
-
import { createLogger } from '../utils/logger';
|
|
16
|
+
import { createLogger } from '../utils/logger.js';
|
|
17
17
|
const logger = createLogger('DashboardAPI');
|
|
18
18
|
export function createDashboardRouter(context) {
|
|
19
19
|
const router = Router();
|
package/dist/esm/api/server.d.ts
CHANGED
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
* Express server for dashboard metrics and analytics endpoints
|
|
4
4
|
* Runs on port 3001 by default
|
|
5
5
|
*/
|
|
6
|
-
import { DashboardWebSocketServer } from '../core/DashboardWebSocketServer';
|
|
7
|
-
import { OrchestrationEngine } from '../core/OrchestrationEngine';
|
|
8
|
-
import { AgentRegistry } from '../core/AgentRegistry';
|
|
9
|
-
import { SubconsciousEngine } from '../core/SubconsciousEngine';
|
|
6
|
+
import { DashboardWebSocketServer } from '../core/DashboardWebSocketServer.js';
|
|
7
|
+
import { OrchestrationEngine } from '../core/OrchestrationEngine.js';
|
|
8
|
+
import { AgentRegistry } from '../core/AgentRegistry.js';
|
|
9
|
+
import { SubconsciousEngine } from '../core/SubconsciousEngine.js';
|
|
10
10
|
export interface ServerConfig {
|
|
11
11
|
port?: number;
|
|
12
12
|
host?: string;
|
package/dist/esm/api/server.js
CHANGED
|
@@ -6,9 +6,9 @@
|
|
|
6
6
|
import express from 'express';
|
|
7
7
|
import cors from 'cors';
|
|
8
8
|
import http from 'http';
|
|
9
|
-
import { createDashboardRouter } from './dashboardRoutes';
|
|
10
|
-
import { DashboardWebSocketServer } from '../core/DashboardWebSocketServer';
|
|
11
|
-
import { createLogger } from '../utils/logger';
|
|
9
|
+
import { createDashboardRouter } from './dashboardRoutes.js';
|
|
10
|
+
import { DashboardWebSocketServer } from '../core/DashboardWebSocketServer.js';
|
|
11
|
+
import { createLogger } from '../utils/logger.js';
|
|
12
12
|
const logger = createLogger('DashboardServer');
|
|
13
13
|
export class DashboardAPIServer {
|
|
14
14
|
constructor(config = {}) {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import fs from 'fs';
|
|
2
2
|
import path from 'path';
|
|
3
3
|
import { exec } from 'child_process';
|
|
4
|
-
import { performAutoHeal } from '../cli/lemma-proxy';
|
|
5
|
-
import { savePatch, countPending } from './PatchStore';
|
|
6
|
-
import { notifyPatch } from './Notifier';
|
|
4
|
+
import { performAutoHeal } from '../cli/lemma-proxy.js';
|
|
5
|
+
import { savePatch, countPending } from './PatchStore.js';
|
|
6
|
+
import { notifyPatch } from './Notifier.js';
|
|
7
7
|
export class AutopilotWatcher {
|
|
8
8
|
constructor(watchDir = 'src', nonInvasive = true) {
|
|
9
9
|
this.isRunning = false;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Patch } from './PatchStore';
|
|
1
|
+
import type { Patch } from './PatchStore.js';
|
|
2
2
|
export declare function sendNotification(title: string, subtitle: string, message: string): void;
|
|
3
3
|
export declare function notifyPatch(patch: Patch): void;
|
|
4
4
|
export declare function notifyClear(): void;
|
|
@@ -33,20 +33,20 @@ function ask(query) {
|
|
|
33
33
|
const rl = readline.createInterface({ input: process.stdin, output: process.stdout });
|
|
34
34
|
return new Promise(resolve => rl.question(query, ans => { rl.close(); resolve(ans); }));
|
|
35
35
|
}
|
|
36
|
-
import ComplexityRouter from '../proxy/ComplexityRouter';
|
|
37
|
-
import SemanticScrubber from '../security/SemanticScrubber';
|
|
38
|
-
import CloudSyncClient from '../cloud/CloudSyncClient';
|
|
39
|
-
import { runPRReview } from '../pr-review/reviewRunner';
|
|
40
|
-
import { registerInfraCommands } from '../infra/cli';
|
|
41
|
-
import { pruneHistoryMessages, squeezePrompt } from '../utils/ContextSqueezer';
|
|
42
|
-
import { AgentMultiplexer } from '../proxy/AgentMultiplexer';
|
|
43
|
-
import { SseRelay } from '../proxy/SseRelay';
|
|
44
|
-
import { KeyManager } from '../proxy/KeyManager';
|
|
45
|
-
import { Gatekeeper } from '../proxy/Gatekeeper';
|
|
46
|
-
import { ProjectRegistry } from '../proxy/ProjectRegistry';
|
|
47
|
-
import { shouldInject, buildMinimalContext, buildDeepContext, sniffProjectFromMessages } from '../proxy/ContextInjector';
|
|
48
|
-
import { savingsLedger } from '../utils/SavingsLedger';
|
|
49
|
-
import { CACHE_DIR, PID_FILE, PORT_FILE, STATS_FILE, USAGE_FILE, LICENSE_FILE, CLIPBOARD_PID_FILE, FREE_TIER_LIMIT } from '../proxy/ProjectStore';
|
|
36
|
+
import ComplexityRouter from '../proxy/ComplexityRouter.js';
|
|
37
|
+
import SemanticScrubber from '../security/SemanticScrubber.js';
|
|
38
|
+
import CloudSyncClient from '../cloud/CloudSyncClient.js';
|
|
39
|
+
import { runPRReview } from '../pr-review/reviewRunner.js';
|
|
40
|
+
import { registerInfraCommands } from '../infra/cli.js';
|
|
41
|
+
import { pruneHistoryMessages, squeezePrompt } from '../utils/ContextSqueezer.js';
|
|
42
|
+
import { AgentMultiplexer } from '../proxy/AgentMultiplexer.js';
|
|
43
|
+
import { SseRelay } from '../proxy/SseRelay.js';
|
|
44
|
+
import { KeyManager } from '../proxy/KeyManager.js';
|
|
45
|
+
import { Gatekeeper } from '../proxy/Gatekeeper.js';
|
|
46
|
+
import { ProjectRegistry } from '../proxy/ProjectRegistry.js';
|
|
47
|
+
import { shouldInject, buildMinimalContext, buildDeepContext, sniffProjectFromMessages } from '../proxy/ContextInjector.js';
|
|
48
|
+
import { savingsLedger } from '../utils/SavingsLedger.js';
|
|
49
|
+
import { CACHE_DIR, PID_FILE, PORT_FILE, STATS_FILE, USAGE_FILE, LICENSE_FILE, CLIPBOARD_PID_FILE, FREE_TIER_LIMIT } from '../proxy/ProjectStore.js';
|
|
50
50
|
const chroma = new ChromaClient({ host: 'localhost', port: 8000 });
|
|
51
51
|
const dummyEmbeddingFunction = { generate: (texts) => Promise.resolve([]) };
|
|
52
52
|
const complexityRouter = new ComplexityRouter();
|
package/dist/esm/cli/stack.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { WebSocketServer } from '../core/WebSocketServer';
|
|
2
|
-
import { OrchestrationEngine } from '../core/OrchestrationEngine';
|
|
3
|
-
import { SubconsciousEngine } from '../core/SubconsciousEngine';
|
|
4
|
-
import { DashboardAPIServer } from '../api/server';
|
|
1
|
+
import { WebSocketServer } from '../core/WebSocketServer.js';
|
|
2
|
+
import { OrchestrationEngine } from '../core/OrchestrationEngine.js';
|
|
3
|
+
import { SubconsciousEngine } from '../core/SubconsciousEngine.js';
|
|
4
|
+
import { DashboardAPIServer } from '../api/server.js';
|
|
5
5
|
/**
|
|
6
6
|
* Lemma Stack Orchestrator
|
|
7
7
|
* Starts the Router, Subconscious Engine, and Dashboard API
|
package/dist/esm/cli/stack.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { WebSocketServer } from '../core/WebSocketServer';
|
|
2
|
-
import { OrchestrationEngine } from '../core/OrchestrationEngine';
|
|
3
|
-
import { SubconsciousEngine } from '../core/SubconsciousEngine';
|
|
4
|
-
import { DashboardBroadcaster } from '../core/DashboardBroadcaster';
|
|
5
|
-
import { DashboardAPIServer } from '../api/server';
|
|
1
|
+
import { WebSocketServer } from '../core/WebSocketServer.js';
|
|
2
|
+
import { OrchestrationEngine } from '../core/OrchestrationEngine.js';
|
|
3
|
+
import { SubconsciousEngine } from '../core/SubconsciousEngine.js';
|
|
4
|
+
import { DashboardBroadcaster } from '../core/DashboardBroadcaster.js';
|
|
5
|
+
import { DashboardAPIServer } from '../api/server.js';
|
|
6
6
|
/**
|
|
7
7
|
* Lemma Stack Orchestrator
|
|
8
8
|
* Starts the Router, Subconscious Engine, and Dashboard API
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Handles key generation, validation, usage tracking, and plan enforcement.
|
|
5
5
|
* Uses a JSON file as storage (swap for Redis/Postgres in production).
|
|
6
6
|
*/
|
|
7
|
-
import { ApiKey } from './types';
|
|
7
|
+
import { ApiKey } from './types.js';
|
|
8
8
|
export declare class KeyManager {
|
|
9
9
|
private keys;
|
|
10
10
|
private storePath;
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
import crypto from 'crypto';
|
|
8
8
|
import fs from 'fs';
|
|
9
9
|
import path from 'path';
|
|
10
|
-
import { PLAN_LIMITS } from './types';
|
|
10
|
+
import { PLAN_LIMITS } from './types.js';
|
|
11
11
|
export class KeyManager {
|
|
12
12
|
constructor(storePath = './data/keys.json') {
|
|
13
13
|
this.keys = new Map();
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Each tenant gets an isolated ChromaDB collection + usage stats.
|
|
5
5
|
* Handles semantic search via Ollama embeddings.
|
|
6
6
|
*/
|
|
7
|
-
import { TenantStats } from './types';
|
|
7
|
+
import { TenantStats } from './types.js';
|
|
8
8
|
export declare class TenantCache {
|
|
9
9
|
private tenantId;
|
|
10
10
|
private chromaUrl;
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Each tenant gets an isolated ChromaDB collection + usage stats.
|
|
5
5
|
* Handles semantic search via Ollama embeddings.
|
|
6
6
|
*/
|
|
7
|
-
import { AVG_TOKENS_PER_REQUEST, COST_PER_TOKEN } from './types';
|
|
7
|
+
import { AVG_TOKENS_PER_REQUEST, COST_PER_TOKEN } from './types.js';
|
|
8
8
|
export class TenantCache {
|
|
9
9
|
constructor(tenantId, chromaUrl, ollamaUrl, model) {
|
|
10
10
|
this.chromaClient = null;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { KeyManager } from './KeyManager';
|
|
2
|
-
export { TenantCache } from './TenantCache';
|
|
3
|
-
export * from './types';
|
|
1
|
+
export { KeyManager } from './KeyManager.js';
|
|
2
|
+
export { TenantCache } from './TenantCache.js';
|
|
3
|
+
export * from './types.js';
|
|
4
4
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/esm/cloud/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { KeyManager } from './KeyManager';
|
|
2
|
-
export { TenantCache } from './TenantCache';
|
|
3
|
-
export * from './types';
|
|
1
|
+
export { KeyManager } from './KeyManager.js';
|
|
2
|
+
export { TenantCache } from './TenantCache.js';
|
|
3
|
+
export * from './types.js';
|
|
4
4
|
//# sourceMappingURL=index.js.map
|
|
@@ -8,9 +8,9 @@
|
|
|
8
8
|
* Start: node dist/cloud/server.js
|
|
9
9
|
* Or: npm run cloud:start
|
|
10
10
|
*/
|
|
11
|
-
import { KeyManager } from './KeyManager';
|
|
12
|
-
import { TenantCache } from './TenantCache';
|
|
13
|
-
import { PostgresQuotaLimiter } from './PostgresQuotaLimiter';
|
|
11
|
+
import { KeyManager } from './KeyManager.js';
|
|
12
|
+
import { TenantCache } from './TenantCache.js';
|
|
13
|
+
import { PostgresQuotaLimiter } from './PostgresQuotaLimiter.js';
|
|
14
14
|
declare const app: import("express-serve-static-core").Express;
|
|
15
15
|
declare const keyManager: KeyManager;
|
|
16
16
|
declare const tenantCaches: Map<string, TenantCache>;
|
package/dist/esm/cloud/server.js
CHANGED
|
@@ -10,12 +10,12 @@
|
|
|
10
10
|
*/
|
|
11
11
|
import express from 'express';
|
|
12
12
|
import crypto from 'crypto';
|
|
13
|
-
import { KeyManager } from './KeyManager';
|
|
14
|
-
import { TenantCache } from './TenantCache';
|
|
15
|
-
import { PLAN_LIMITS } from './types';
|
|
16
|
-
import { BurstRateLimiter } from './BurstRateLimiter';
|
|
13
|
+
import { KeyManager } from './KeyManager.js';
|
|
14
|
+
import { TenantCache } from './TenantCache.js';
|
|
15
|
+
import { PLAN_LIMITS } from './types.js';
|
|
16
|
+
import { BurstRateLimiter } from './BurstRateLimiter.js';
|
|
17
17
|
import { Pool } from 'pg';
|
|
18
|
-
import { PostgresQuotaLimiter } from './PostgresQuotaLimiter';
|
|
18
|
+
import { PostgresQuotaLimiter } from './PostgresQuotaLimiter.js';
|
|
19
19
|
const app = express();
|
|
20
20
|
// ─── Bind config ─────────────────────────────────────────────────────────────
|
|
21
21
|
const BIND_HOST = process.env.LEMMA_BIND_HOST || '127.0.0.1';
|
package/dist/esm/config/index.js
CHANGED
|
@@ -3,6 +3,6 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Exports all consensus components for Phase 3.
|
|
5
5
|
*/
|
|
6
|
-
export { ConsensusEngine, ConsensusRequest, ModelResponse, DebateRound, ConsensusResult, ConsensusEngineConfig, ConsensusMetrics, } from './ConsensusEngine';
|
|
7
|
-
export { ModelPool, ModelConfig, ModelInfo, QueryResponse, ModelPoolConfig, } from './ModelPool';
|
|
6
|
+
export { ConsensusEngine, ConsensusRequest, ModelResponse, DebateRound, ConsensusResult, ConsensusEngineConfig, ConsensusMetrics, } from './ConsensusEngine.js';
|
|
7
|
+
export { ModelPool, ModelConfig, ModelInfo, QueryResponse, ModelPoolConfig, } from './ModelPool.js';
|
|
8
8
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -3,6 +3,6 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Exports all consensus components for Phase 3.
|
|
5
5
|
*/
|
|
6
|
-
export { ConsensusEngine, } from './ConsensusEngine';
|
|
7
|
-
export { ModelPool, } from './ModelPool';
|
|
6
|
+
export { ConsensusEngine, } from './ConsensusEngine.js';
|
|
7
|
+
export { ModelPool, } from './ModelPool.js';
|
|
8
8
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { EventEmitter } from 'events';
|
|
2
|
-
import { AgentInfo, AgentStatus, AgentCapability, AgentMetrics } from '../types';
|
|
2
|
+
import { AgentInfo, AgentStatus, AgentCapability, AgentMetrics } from '../types/index.js';
|
|
3
3
|
/**
|
|
4
4
|
* Dynamic registry for tracking connected agents and their capabilities
|
|
5
5
|
* Maintains agent state, metrics, and capability discovery
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { EventEmitter } from 'events';
|
|
2
|
-
import { AgentStatus } from '../types';
|
|
2
|
+
import { AgentStatus } from '../types/index.js';
|
|
3
3
|
/**
|
|
4
4
|
* Dynamic registry for tracking connected agents and their capabilities
|
|
5
5
|
* Maintains agent state, metrics, and capability discovery
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { WebSocketServer } from './WebSocketServer';
|
|
2
|
-
import { OrchestrationEngine } from './OrchestrationEngine';
|
|
3
|
-
import { IAPMessage } from '../types';
|
|
1
|
+
import { WebSocketServer } from './WebSocketServer.js';
|
|
2
|
+
import { OrchestrationEngine } from './OrchestrationEngine.js';
|
|
3
|
+
import { IAPMessage } from '../types/index.js';
|
|
4
4
|
/**
|
|
5
5
|
* Dashboard Broadcaster
|
|
6
6
|
* Handles real-time metrics and state broadcasting to dashboard clients
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { MessageType } from '../types';
|
|
1
|
+
import { MessageType } from '../types/index.js';
|
|
2
2
|
import { v4 as uuidv4 } from 'uuid';
|
|
3
|
-
import { createLogger } from '../utils/logger';
|
|
3
|
+
import { createLogger } from '../utils/logger.js';
|
|
4
4
|
const logger = createLogger('DashboardBroadcaster');
|
|
5
5
|
/**
|
|
6
6
|
* Dashboard Broadcaster
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
*/
|
|
6
6
|
import { Server as SocketIOServer } from 'socket.io';
|
|
7
7
|
import http from 'http';
|
|
8
|
-
import { OrchestrationEngine } from './OrchestrationEngine';
|
|
8
|
+
import { OrchestrationEngine } from './OrchestrationEngine.js';
|
|
9
9
|
export declare class DashboardWebSocketServer {
|
|
10
10
|
private io;
|
|
11
11
|
private orchestrationEngine;
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Emits metrics, agent updates, and cache events
|
|
5
5
|
*/
|
|
6
6
|
import { Server as SocketIOServer } from 'socket.io';
|
|
7
|
-
import { createLogger } from '../utils/logger';
|
|
7
|
+
import { createLogger } from '../utils/logger.js';
|
|
8
8
|
const logger = createLogger('DashboardWebSocketServer');
|
|
9
9
|
export class DashboardWebSocketServer {
|
|
10
10
|
constructor(httpServer, port = 3002) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { spawn } from 'child_process';
|
|
2
|
-
import { GhostAlchemist } from './GhostAlchemist';
|
|
3
|
-
import { logger } from '../utils/logger';
|
|
2
|
+
import { GhostAlchemist } from './GhostAlchemist.js';
|
|
3
|
+
import { logger } from '../utils/logger.js';
|
|
4
4
|
/**
|
|
5
5
|
* GhostListener
|
|
6
6
|
* Watches terminal output for errors and provides instant diagnostics.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { WebSocketServer } from './WebSocketServer';
|
|
2
|
-
import { SubconsciousEngine } from './SubconsciousEngine';
|
|
3
|
-
import { OrchestrationMetrics } from '../types';
|
|
1
|
+
import { WebSocketServer } from './WebSocketServer.js';
|
|
2
|
+
import { SubconsciousEngine } from './SubconsciousEngine.js';
|
|
3
|
+
import { OrchestrationMetrics } from '../types/index.js';
|
|
4
4
|
/**
|
|
5
5
|
* Orchestration Engine
|
|
6
6
|
* Integrates WebSocket Server and Subconscious Engine
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { v4 as uuidv4 } from 'uuid';
|
|
2
|
-
import { MessageType, } from '../types';
|
|
3
|
-
import { createLogger } from '../utils/logger';
|
|
2
|
+
import { MessageType, } from '../types/index.js';
|
|
3
|
+
import { createLogger } from '../utils/logger.js';
|
|
4
4
|
const logger = createLogger('OrchestrationEngine');
|
|
5
5
|
/**
|
|
6
6
|
* Orchestration Engine
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ChromaClient } from 'chromadb';
|
|
2
2
|
import axios from 'axios';
|
|
3
|
-
import { config, getChromaURL } from '../config';
|
|
4
|
-
import { createLogger } from '../utils/logger';
|
|
3
|
+
import { config, getChromaURL } from '../config/index.js';
|
|
4
|
+
import { createLogger } from '../utils/logger.js';
|
|
5
5
|
const logger = createLogger('SubconsciousEngine');
|
|
6
6
|
/**
|
|
7
7
|
* Subconscious Semantic Engine
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { EventEmitter } from 'events';
|
|
2
|
-
import { AgentConnection, ServerConfig, ConnectionStats } from '../types';
|
|
3
|
-
import { SecurityMiddleware, SecurityConfig } from '../security';
|
|
2
|
+
import { AgentConnection, ServerConfig, ConnectionStats } from '../types/index.js';
|
|
3
|
+
import { SecurityMiddleware, SecurityConfig } from '../security/index.js';
|
|
4
4
|
/**
|
|
5
5
|
* High-performance WebSocket server for agent connections
|
|
6
6
|
* Handles connection lifecycle, heartbeat, reconnection logic, and security
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import WebSocket, { WebSocketServer as WSServer } from 'ws';
|
|
2
2
|
import { EventEmitter } from 'events';
|
|
3
|
-
import { SecurityMiddleware } from '../security';
|
|
3
|
+
import { SecurityMiddleware } from '../security/index.js';
|
|
4
4
|
/**
|
|
5
5
|
* High-performance WebSocket server for agent connections
|
|
6
6
|
* Handles connection lifecycle, heartbeat, reconnection logic, and security
|
package/dist/esm/core/index.d.ts
CHANGED
|
@@ -6,10 +6,10 @@
|
|
|
6
6
|
* - AgentRegistry: Dynamic agent registration and capability tracking
|
|
7
7
|
* - Router: I.A.P. message routing and task orchestration
|
|
8
8
|
*/
|
|
9
|
-
export { WebSocketServer } from './WebSocketServer';
|
|
10
|
-
export { AgentRegistry } from './AgentRegistry';
|
|
11
|
-
export { Router } from './router';
|
|
12
|
-
export { OrchestrationEngine } from './OrchestrationEngine';
|
|
13
|
-
export { SubconsciousEngine } from './SubconsciousEngine';
|
|
14
|
-
export { DashboardBroadcaster } from './DashboardBroadcaster';
|
|
9
|
+
export { WebSocketServer } from './WebSocketServer.js';
|
|
10
|
+
export { AgentRegistry } from './AgentRegistry.js';
|
|
11
|
+
export { Router } from './router.js';
|
|
12
|
+
export { OrchestrationEngine } from './OrchestrationEngine.js';
|
|
13
|
+
export { SubconsciousEngine } from './SubconsciousEngine.js';
|
|
14
|
+
export { DashboardBroadcaster } from './DashboardBroadcaster.js';
|
|
15
15
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/esm/core/index.js
CHANGED
|
@@ -6,10 +6,10 @@
|
|
|
6
6
|
* - AgentRegistry: Dynamic agent registration and capability tracking
|
|
7
7
|
* - Router: I.A.P. message routing and task orchestration
|
|
8
8
|
*/
|
|
9
|
-
export { WebSocketServer } from './WebSocketServer';
|
|
10
|
-
export { AgentRegistry } from './AgentRegistry';
|
|
11
|
-
export { Router } from './router';
|
|
12
|
-
export { OrchestrationEngine } from './OrchestrationEngine';
|
|
13
|
-
export { SubconsciousEngine } from './SubconsciousEngine';
|
|
14
|
-
export { DashboardBroadcaster } from './DashboardBroadcaster';
|
|
9
|
+
export { WebSocketServer } from './WebSocketServer.js';
|
|
10
|
+
export { AgentRegistry } from './AgentRegistry.js';
|
|
11
|
+
export { Router } from './router.js';
|
|
12
|
+
export { OrchestrationEngine } from './OrchestrationEngine.js';
|
|
13
|
+
export { SubconsciousEngine } from './SubconsciousEngine.js';
|
|
14
|
+
export { DashboardBroadcaster } from './DashboardBroadcaster.js';
|
|
15
15
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { EventEmitter } from 'events';
|
|
2
|
-
import { AgentRegistry } from './AgentRegistry';
|
|
3
|
-
import { WebSocketServer } from './WebSocketServer';
|
|
4
|
-
import { RouterConfig } from '../types';
|
|
2
|
+
import { AgentRegistry } from './AgentRegistry.js';
|
|
3
|
+
import { WebSocketServer } from './WebSocketServer.js';
|
|
4
|
+
import { RouterConfig } from '../types/index.js';
|
|
5
5
|
/**
|
|
6
6
|
* Core routing engine for Inter-Agent Protocol (I.A.P.) messages
|
|
7
7
|
* Handles message reception, agent selection, and error management
|
package/dist/esm/core/router.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { EventEmitter } from 'events';
|
|
2
|
-
import { IAPMessageType } from '../types';
|
|
2
|
+
import { IAPMessageType } from '../types/index.js';
|
|
3
3
|
/**
|
|
4
4
|
* Core routing engine for Inter-Agent Protocol (I.A.P.) messages
|
|
5
5
|
* Handles message reception, agent selection, and error management
|
package/dist/esm/db/database.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Handles schema creation, updates, and cleanup
|
|
4
4
|
*/
|
|
5
5
|
import { Pool } from 'pg';
|
|
6
|
-
import { UP_SQL, DOWN_SQL, CLEANUP_SQL } from './migrations/001-dashboard-schema';
|
|
6
|
+
import { UP_SQL, DOWN_SQL, CLEANUP_SQL } from './migrations/001-dashboard-schema.js';
|
|
7
7
|
export class DatabaseMigrator {
|
|
8
8
|
constructor(connectionString) {
|
|
9
9
|
this.pool = new Pool({
|
package/dist/esm/embed.d.ts
CHANGED
|
@@ -6,6 +6,6 @@
|
|
|
6
6
|
* @example
|
|
7
7
|
* import { Lemma } from 'lemma/embed';
|
|
8
8
|
*/
|
|
9
|
-
export { Lemma, LemmaConfig, CacheResult, LemmaMetrics } from './embed/index';
|
|
10
|
-
export { default } from './embed/index';
|
|
9
|
+
export { Lemma, LemmaConfig, CacheResult, LemmaMetrics } from './embed/index.js';
|
|
10
|
+
export { default } from './embed/index.js';
|
|
11
11
|
//# sourceMappingURL=embed.d.ts.map
|
package/dist/esm/embed.js
CHANGED
|
@@ -6,6 +6,6 @@
|
|
|
6
6
|
* @example
|
|
7
7
|
* import { Lemma } from 'lemma/embed';
|
|
8
8
|
*/
|
|
9
|
-
export { Lemma } from './embed/index';
|
|
10
|
-
export { default } from './embed/index';
|
|
9
|
+
export { Lemma } from './embed/index.js';
|
|
10
|
+
export { default } from './embed/index.js';
|
|
11
11
|
//# sourceMappingURL=embed.js.map
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* 3. Storing results for future caching
|
|
8
8
|
* 4. Monitoring metrics
|
|
9
9
|
*/
|
|
10
|
-
import { SubconsciousEngine } from '../subconscious';
|
|
10
|
+
import { SubconsciousEngine } from '../subconscious/index.js';
|
|
11
11
|
async function main() {
|
|
12
12
|
console.log('=== Subconscious Engine Demo ===\n');
|
|
13
13
|
// 1. Create and initialize the engine
|