@nxuss/lemma 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/cjs/mcp/tools.d.ts.map +1 -1
- package/dist/cjs/mcp/tools.js +115 -15
- package/dist/cjs/mcp/tools.js.map +1 -1
- package/dist/cjs/proxy/ComplexityRouter.d.ts +7 -0
- package/dist/cjs/proxy/ComplexityRouter.d.ts.map +1 -1
- package/dist/cjs/proxy/ComplexityRouter.js +18 -5
- package/dist/cjs/proxy/ComplexityRouter.js.map +1 -1
- package/dist/cjs/utils/TokenReceipt.d.ts +6 -0
- package/dist/cjs/utils/TokenReceipt.d.ts.map +1 -1
- package/dist/cjs/utils/TokenReceipt.js +9 -0
- package/dist/cjs/utils/TokenReceipt.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/resources.js +2 -2
- package/dist/esm/mcp/tools.d.ts.map +1 -1
- package/dist/esm/mcp/tools.js +153 -53
- 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/ComplexityRouter.d.ts +7 -0
- package/dist/esm/proxy/ComplexityRouter.d.ts.map +1 -1
- package/dist/esm/proxy/ComplexityRouter.js +18 -5
- package/dist/esm/proxy/ComplexityRouter.js.map +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/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.js +4 -4
- 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/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.js +1 -1
- package/dist/esm/utils/TokenReceipt.d.ts +6 -0
- package/dist/esm/utils/TokenReceipt.d.ts.map +1 -1
- package/dist/esm/utils/TokenReceipt.js +8 -0
- package/dist/esm/utils/TokenReceipt.js.map +1 -1
- package/dist/esm/utils/WorkspaceSearch.js +0 -0
- package/dist/esm/utils/logger.js +1 -1
- package/package.json +6 -9
- package/sdks/crewai/README.md +178 -0
- package/sdks/crewai/dist/index.d.ts +130 -0
- package/sdks/crewai/dist/index.js +308 -0
|
@@ -1,11 +1,18 @@
|
|
|
1
1
|
export interface ComplexityRouterConfig {
|
|
2
2
|
cheapModel?: string;
|
|
3
|
+
/**
|
|
4
|
+
* Cheap model to fall back to per provider family, keyed by a substring of the
|
|
5
|
+
* requested model id ('claude', 'gemini', ...). Overridable from lemma.config.json
|
|
6
|
+
* so a retired model id can be corrected without shipping a new build.
|
|
7
|
+
*/
|
|
8
|
+
cheapModelsByFamily?: Record<string, string>;
|
|
3
9
|
complexKeywords?: string[];
|
|
4
10
|
complexityThreshold?: number;
|
|
5
11
|
disabled?: boolean;
|
|
6
12
|
}
|
|
7
13
|
export declare class ComplexityRouter {
|
|
8
14
|
private cheapModel;
|
|
15
|
+
private cheapModelsByFamily;
|
|
9
16
|
private complexKeywords;
|
|
10
17
|
private syntaxDensityThreshold;
|
|
11
18
|
constructor(config?: ComplexityRouterConfig);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ComplexityRouter.d.ts","sourceRoot":"","sources":["../../../src/proxy/ComplexityRouter.ts"],"names":[],"mappings":"AACA,MAAM,WAAW,sBAAsB;IACrC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,eAAe,CAAC,EAAE,MAAM,EAAE,CAAC;IAC3B,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;
|
|
1
|
+
{"version":3,"file":"ComplexityRouter.d.ts","sourceRoot":"","sources":["../../../src/proxy/ComplexityRouter.ts"],"names":[],"mappings":"AACA,MAAM,WAAW,sBAAsB;IACrC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;;;OAIG;IACH,mBAAmB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC7C,eAAe,CAAC,EAAE,MAAM,EAAE,CAAC;IAC3B,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAYD,qBAAa,gBAAgB;IAC3B,OAAO,CAAC,UAAU,CAAS;IAC3B,OAAO,CAAC,mBAAmB,CAAyB;IACpD,OAAO,CAAC,eAAe,CAAW;IAClC,OAAO,CAAC,sBAAsB,CAAS;gBAE3B,MAAM,GAAE,sBAA2B;IAYxC,YAAY,CAAC,MAAM,EAAE,sBAAsB,GAAG,IAAI;IASlD,QAAQ,CAAC,MAAM,EAAE,MAAM,EAAE,aAAa,CAAC,EAAE,MAAM,GAAG;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,UAAU,EAAE,KAAK,GAAG,MAAM,CAAA;KAAE;CAsEvG;AAED,eAAe,gBAAgB,CAAC"}
|
|
@@ -1,9 +1,19 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.ComplexityRouter = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Model ids go stale as providers retire them; these are defaults, not truth. If the
|
|
6
|
+
* router starts recommending a model your provider rejects, override
|
|
7
|
+
* routing.complexity.cheapModelsByFamily in lemma.config.json.
|
|
8
|
+
*/
|
|
9
|
+
const DEFAULT_CHEAP_MODELS_BY_FAMILY = {
|
|
10
|
+
claude: 'claude-haiku-4-5-20251001',
|
|
11
|
+
gemini: 'gemini-2.0-flash',
|
|
12
|
+
};
|
|
4
13
|
class ComplexityRouter {
|
|
5
14
|
constructor(config = {}) {
|
|
6
15
|
this.cheapModel = config.cheapModel || 'gpt-4o-mini';
|
|
16
|
+
this.cheapModelsByFamily = { ...DEFAULT_CHEAP_MODELS_BY_FAMILY, ...(config.cheapModelsByFamily || {}) };
|
|
7
17
|
this.complexKeywords = config.complexKeywords || [
|
|
8
18
|
'architecture', 'design', 'debug', 'trace', 'system', 'microservices',
|
|
9
19
|
'refactor', 'optimize', 'implement', 'algorithm', 'distributed',
|
|
@@ -15,6 +25,9 @@ class ComplexityRouter {
|
|
|
15
25
|
updateConfig(config) {
|
|
16
26
|
if (config.cheapModel)
|
|
17
27
|
this.cheapModel = config.cheapModel;
|
|
28
|
+
if (config.cheapModelsByFamily) {
|
|
29
|
+
this.cheapModelsByFamily = { ...this.cheapModelsByFamily, ...config.cheapModelsByFamily };
|
|
30
|
+
}
|
|
18
31
|
if (config.complexKeywords)
|
|
19
32
|
this.complexKeywords = config.complexKeywords;
|
|
20
33
|
if (config.complexityThreshold)
|
|
@@ -72,11 +85,11 @@ class ComplexityRouter {
|
|
|
72
85
|
let cheapModel = this.cheapModel;
|
|
73
86
|
if (originalModel) {
|
|
74
87
|
const lowerModel = originalModel.toLowerCase();
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
88
|
+
for (const [family, model] of Object.entries(this.cheapModelsByFamily)) {
|
|
89
|
+
if (lowerModel.includes(family)) {
|
|
90
|
+
cheapModel = model;
|
|
91
|
+
break;
|
|
92
|
+
}
|
|
80
93
|
}
|
|
81
94
|
}
|
|
82
95
|
console.log(`[ComplexityRouter] Low complexity detected. Routing to ${cheapModel}`);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ComplexityRouter.js","sourceRoot":"","sources":["../../../src/proxy/ComplexityRouter.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CAAC,EAAE,CAAC;wBAChC,UAAU,GAAG,KAAK,CAAC;wBACnB,MAAM;oBACR,CAAC;gBACH,CAAC;YACH,CAAC;YACD,OAAO,CAAC,GAAG,CAAC,0DAA0D,UAAU,EAAE,CAAC,CAAC;YACpF,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,UAAU,EAAE,KAAK,EAAE,CAAC;QAClD,CAAC;IACH,CAAC;CACF;AAjGD,4CAiGC;AAED,kBAAe,gBAAgB,CAAC"}
|
|
@@ -14,6 +14,12 @@ export interface ReceiptEvent {
|
|
|
14
14
|
meta?: Record<string, unknown>;
|
|
15
15
|
}
|
|
16
16
|
export declare function recordReceiptEvent(type: ReceiptEventType, label: string, meta?: Record<string, unknown>): void;
|
|
17
|
+
/**
|
|
18
|
+
* Number of events recorded so far. The dispatcher samples this around a handler to
|
|
19
|
+
* tell whether the handler already logged something specific (a cache hit, a miss)
|
|
20
|
+
* before falling back to a generic tool_call entry.
|
|
21
|
+
*/
|
|
22
|
+
export declare function getLedgerLength(): number;
|
|
17
23
|
export interface ReceiptSummary {
|
|
18
24
|
totalEvents: number;
|
|
19
25
|
byType: Record<ReceiptEventType, number>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TokenReceipt.d.ts","sourceRoot":"","sources":["../../../src/utils/TokenReceipt.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAIH,MAAM,MAAM,gBAAgB,GACxB,iBAAiB,GACjB,oBAAoB,GACpB,WAAW,GACX,WAAW,GACX,WAAW,CAAC;AAEhB,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,gBAAgB,CAAC;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAChC;AAID,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,gBAAgB,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,CAAC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10
10
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
11
11
|
exports.recordReceiptEvent = recordReceiptEvent;
|
|
12
|
+
exports.getLedgerLength = getLedgerLength;
|
|
12
13
|
exports.getReceiptSummary = getReceiptSummary;
|
|
13
14
|
exports.clearReceiptLedger = clearReceiptLedger;
|
|
14
15
|
const MAX_EVENTS = 2000;
|
|
@@ -19,6 +20,14 @@ function recordReceiptEvent(type, label, meta) {
|
|
|
19
20
|
sessionLedger.splice(0, sessionLedger.length - MAX_EVENTS);
|
|
20
21
|
}
|
|
21
22
|
}
|
|
23
|
+
/**
|
|
24
|
+
* Number of events recorded so far. The dispatcher samples this around a handler to
|
|
25
|
+
* tell whether the handler already logged something specific (a cache hit, a miss)
|
|
26
|
+
* before falling back to a generic tool_call entry.
|
|
27
|
+
*/
|
|
28
|
+
function getLedgerLength() {
|
|
29
|
+
return sessionLedger.length;
|
|
30
|
+
}
|
|
22
31
|
function getReceiptSummary(limit = 20) {
|
|
23
32
|
const byType = {
|
|
24
33
|
exact_cache_hit: 0,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TokenReceipt.js","sourceRoot":"","sources":["../../../src/utils/TokenReceipt.ts"],"names":[],"mappings":";AAAA;;;;;;;GAOG;;AAoBH,gDAKC;AAQD,8CAcC;AAED,gDAEC;
|
|
1
|
+
{"version":3,"file":"TokenReceipt.js","sourceRoot":"","sources":["../../../src/utils/TokenReceipt.ts"],"names":[],"mappings":";AAAA;;;;;;;GAOG;;AAoBH,gDAKC;AAOD,0CAEC;AAQD,8CAcC;AAED,gDAEC;AA1DD,MAAM,UAAU,GAAG,IAAI,CAAC;AAgBxB,MAAM,aAAa,GAAmB,EAAE,CAAC;AAEzC,SAAgB,kBAAkB,CAAC,IAAsB,EAAE,KAAa,EAAE,IAA8B;IACtG,aAAa,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,SAAS,EAAE,IAAI,CAAC,GAAG,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC;IACjE,IAAI,aAAa,CAAC,MAAM,GAAG,UAAU,EAAE,CAAC;QACtC,aAAa,CAAC,MAAM,CAAC,CAAC,EAAE,aAAa,CAAC,MAAM,GAAG,UAAU,CAAC,CAAC;IAC7D,CAAC;AACH,CAAC;AAED;;;;GAIG;AACH,SAAgB,eAAe;IAC7B,OAAO,aAAa,CAAC,MAAM,CAAC;AAC9B,CAAC;AAQD,SAAgB,iBAAiB,CAAC,KAAK,GAAG,EAAE;IAC1C,MAAM,MAAM,GAAqC;QAC/C,eAAe,EAAE,CAAC;QAClB,kBAAkB,EAAE,CAAC;QACrB,SAAS,EAAE,CAAC;QACZ,SAAS,EAAE,CAAC;QACZ,SAAS,EAAE,CAAC;KACb,CAAC;IACF,KAAK,MAAM,CAAC,IAAI,aAAa;QAAE,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC;IAChD,OAAO;QACL,WAAW,EAAE,aAAa,CAAC,MAAM;QACjC,MAAM;QACN,MAAM,EAAE,aAAa,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC;KACpC,CAAC;AACJ,CAAC;AAED,SAAgB,kBAAkB;IAChC,aAAa,CAAC,MAAM,GAAG,CAAC,CAAC;AAC3B,CAAC"}
|
|
@@ -13,9 +13,9 @@
|
|
|
13
13
|
* POST /api/debugger/rewind - Rewind to event state
|
|
14
14
|
*/
|
|
15
15
|
import { Router } from 'express';
|
|
16
|
-
import { OrchestrationEngine } 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
|