@nxuss/lemma 1.7.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/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.js +38 -38
- 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/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/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
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Main entry point for the protocol implementation
|
|
5
5
|
*/
|
|
6
|
-
export * from './types';
|
|
7
|
-
export * from './validators';
|
|
8
|
-
export * from './flows';
|
|
9
|
-
export * from './utils';
|
|
6
|
+
export * from './types.js';
|
|
7
|
+
export * from './validators.js';
|
|
8
|
+
export * from './flows.js';
|
|
9
|
+
export * from './utils.js';
|
|
10
10
|
export declare const IAP_VERSION = "1.0.0";
|
|
11
11
|
export declare const IAP_NAME = "Inter-Agent Protocol";
|
|
12
12
|
/**
|
|
@@ -4,13 +4,13 @@
|
|
|
4
4
|
* Main entry point for the protocol implementation
|
|
5
5
|
*/
|
|
6
6
|
// Export all types
|
|
7
|
-
export * from './types';
|
|
7
|
+
export * from './types.js';
|
|
8
8
|
// Export validators
|
|
9
|
-
export * from './validators';
|
|
9
|
+
export * from './validators.js';
|
|
10
10
|
// Export flows
|
|
11
|
-
export * from './flows';
|
|
11
|
+
export * from './flows.js';
|
|
12
12
|
// Export utilities
|
|
13
|
-
export * from './utils';
|
|
13
|
+
export * from './utils.js';
|
|
14
14
|
// Version information
|
|
15
15
|
export const IAP_VERSION = '1.0.0';
|
|
16
16
|
export const IAP_NAME = 'Inter-Agent Protocol';
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Utility functions for message creation and handling
|
|
5
5
|
*/
|
|
6
|
-
import { IAPMessage, MessageType, AgentId, TaskId, MessageId, AgentHandshake, TaskProposal, TaskBid, ContextTransfer, ErrorMessage, CapabilityDiscovery, TaskAssignment, TaskResult, Heartbeat, DisconnectMessage } from './types';
|
|
6
|
+
import { IAPMessage, MessageType, AgentId, TaskId, MessageId, AgentHandshake, TaskProposal, TaskBid, ContextTransfer, ErrorMessage, CapabilityDiscovery, TaskAssignment, TaskResult, Heartbeat, DisconnectMessage } from './types.js';
|
|
7
7
|
/**
|
|
8
8
|
* Generates a unique message ID
|
|
9
9
|
*/
|
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
* Utility functions for message creation and handling
|
|
5
5
|
*/
|
|
6
6
|
import { v4 as uuidv4 } from 'uuid';
|
|
7
|
-
import { MessageType } from './types';
|
|
8
|
-
import { PROTOCOL_VERSION } from './validators';
|
|
7
|
+
import { MessageType } from './types.js';
|
|
8
|
+
import { PROTOCOL_VERSION } from './validators.js';
|
|
9
9
|
/**
|
|
10
10
|
* Generates a unique message ID
|
|
11
11
|
*/
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* Emits 'mode-changed' when the effective tier switches.
|
|
10
10
|
*/
|
|
11
11
|
import { EventEmitter } from 'events';
|
|
12
|
-
import { KeyManager } from './KeyManager';
|
|
12
|
+
import { KeyManager } from './KeyManager.js';
|
|
13
13
|
export type CacheMode = 'standard' | 'pro';
|
|
14
14
|
export interface GatekeeperStatus {
|
|
15
15
|
mode: CacheMode;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { AuthManager } from './AuthManager';
|
|
2
|
-
import { RateLimiter } from './RateLimiter';
|
|
3
|
-
import { MessageSanitizer } from './MessageSanitizer';
|
|
1
|
+
import { AuthManager } from './AuthManager.js';
|
|
2
|
+
import { RateLimiter } from './RateLimiter.js';
|
|
3
|
+
import { MessageSanitizer } from './MessageSanitizer.js';
|
|
4
4
|
export class SecurityMiddleware {
|
|
5
5
|
constructor(config) {
|
|
6
6
|
this.config = config;
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
* Security Module
|
|
3
3
|
* Exports all security-related components
|
|
4
4
|
*/
|
|
5
|
-
export { AuthManager, ApiKey, AuthConfig } from './AuthManager';
|
|
6
|
-
export { RateLimiter, RateLimitConfig } from './RateLimiter';
|
|
7
|
-
export { MessageSanitizer, SanitizationResult } from './MessageSanitizer';
|
|
8
|
-
export { SecurityMiddleware, SecurityConfig, SecurityCheckResult } from './SecurityMiddleware';
|
|
5
|
+
export { AuthManager, ApiKey, AuthConfig } from './AuthManager.js';
|
|
6
|
+
export { RateLimiter, RateLimitConfig } from './RateLimiter.js';
|
|
7
|
+
export { MessageSanitizer, SanitizationResult } from './MessageSanitizer.js';
|
|
8
|
+
export { SecurityMiddleware, SecurityConfig, SecurityCheckResult } from './SecurityMiddleware.js';
|
|
9
9
|
/**
|
|
10
10
|
* Default security configuration
|
|
11
11
|
*/
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
* Security Module
|
|
3
3
|
* Exports all security-related components
|
|
4
4
|
*/
|
|
5
|
-
export { AuthManager } from './AuthManager';
|
|
6
|
-
export { RateLimiter } from './RateLimiter';
|
|
7
|
-
export { MessageSanitizer } from './MessageSanitizer';
|
|
8
|
-
export { SecurityMiddleware } from './SecurityMiddleware';
|
|
5
|
+
export { AuthManager } from './AuthManager.js';
|
|
6
|
+
export { RateLimiter } from './RateLimiter.js';
|
|
7
|
+
export { MessageSanitizer } from './MessageSanitizer.js';
|
|
8
|
+
export { SecurityMiddleware } from './SecurityMiddleware.js';
|
|
9
9
|
/**
|
|
10
10
|
* Default security configuration
|
|
11
11
|
*/
|
|
@@ -11,8 +11,8 @@
|
|
|
11
11
|
* - Automatic cleanup
|
|
12
12
|
*/
|
|
13
13
|
import { EventEmitter } from 'events';
|
|
14
|
-
import { Prediction } from './PredictionEngine';
|
|
15
|
-
import { WorkerResult } from './WorkerPool';
|
|
14
|
+
import { Prediction } from './PredictionEngine.js';
|
|
15
|
+
import { WorkerResult } from './WorkerPool.js';
|
|
16
16
|
export interface CacheEntry {
|
|
17
17
|
id: string;
|
|
18
18
|
prediction: Prediction;
|
|
@@ -11,8 +11,8 @@
|
|
|
11
11
|
* - Graceful fallback to standard routing
|
|
12
12
|
*/
|
|
13
13
|
import { EventEmitter } from 'events';
|
|
14
|
-
import { Prediction } from './PredictionEngine';
|
|
15
|
-
import { CacheEntry } from './SpeculativeCache';
|
|
14
|
+
import { Prediction } from './PredictionEngine.js';
|
|
15
|
+
import { CacheEntry } from './SpeculativeCache.js';
|
|
16
16
|
export interface SpeculativeEngineConfig {
|
|
17
17
|
enabled?: boolean;
|
|
18
18
|
predictionEngine?: any;
|
|
@@ -11,9 +11,9 @@
|
|
|
11
11
|
* - Graceful fallback to standard routing
|
|
12
12
|
*/
|
|
13
13
|
import { EventEmitter } from 'events';
|
|
14
|
-
import { PredictionEngine } from './PredictionEngine';
|
|
15
|
-
import { WorkerPool } from './WorkerPool';
|
|
16
|
-
import { SpeculativeCache } from './SpeculativeCache';
|
|
14
|
+
import { PredictionEngine } from './PredictionEngine.js';
|
|
15
|
+
import { WorkerPool } from './WorkerPool.js';
|
|
16
|
+
import { SpeculativeCache } from './SpeculativeCache.js';
|
|
17
17
|
export class SpeculativeEngine extends EventEmitter {
|
|
18
18
|
constructor(config = {}) {
|
|
19
19
|
super();
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Exports all speculative execution components for Phase 3.
|
|
5
5
|
*/
|
|
6
|
-
export { PredictionEngine, PredictionRequest, Prediction, PredictionEngineConfig, PredictionMetrics } from './PredictionEngine';
|
|
7
|
-
export { WorkerPool, WorkerTask, WorkerResult, WorkerPoolConfig, WorkerPoolMetrics } from './WorkerPool';
|
|
8
|
-
export { SpeculativeCache, CacheEntry, SpeculativeCacheConfig, SpeculativeCacheMetrics } from './SpeculativeCache';
|
|
9
|
-
export { SpeculativeEngine, SpeculativeEngineConfig, SpeculativeResult, SpeculativeMetrics } from './SpeculativeEngine';
|
|
6
|
+
export { PredictionEngine, PredictionRequest, Prediction, PredictionEngineConfig, PredictionMetrics } from './PredictionEngine.js';
|
|
7
|
+
export { WorkerPool, WorkerTask, WorkerResult, WorkerPoolConfig, WorkerPoolMetrics } from './WorkerPool.js';
|
|
8
|
+
export { SpeculativeCache, CacheEntry, SpeculativeCacheConfig, SpeculativeCacheMetrics } from './SpeculativeCache.js';
|
|
9
|
+
export { SpeculativeEngine, SpeculativeEngineConfig, SpeculativeResult, SpeculativeMetrics } from './SpeculativeEngine.js';
|
|
10
10
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Exports all speculative execution components for Phase 3.
|
|
5
5
|
*/
|
|
6
|
-
export { PredictionEngine } from './PredictionEngine';
|
|
7
|
-
export { WorkerPool } from './WorkerPool';
|
|
8
|
-
export { SpeculativeCache } from './SpeculativeCache';
|
|
9
|
-
export { SpeculativeEngine } from './SpeculativeEngine';
|
|
6
|
+
export { PredictionEngine } from './PredictionEngine.js';
|
|
7
|
+
export { WorkerPool } from './WorkerPool.js';
|
|
8
|
+
export { SpeculativeCache } from './SpeculativeCache.js';
|
|
9
|
+
export { SpeculativeEngine } from './SpeculativeEngine.js';
|
|
10
10
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { EmbeddingService } from './EmbeddingService';
|
|
2
|
-
import { createLogger } from '../utils/logger';
|
|
1
|
+
import { EmbeddingService } from './EmbeddingService.js';
|
|
2
|
+
import { createLogger } from '../utils/logger.js';
|
|
3
3
|
const logger = createLogger('SemanticCache');
|
|
4
4
|
/**
|
|
5
5
|
* SemanticCache implements the "short-circuit" logic for semantic caching.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { VectorStore } from './VectorStore';
|
|
2
|
-
import { EmbeddingService } from './EmbeddingService';
|
|
3
|
-
import { SemanticCache } from './SemanticCache';
|
|
1
|
+
import { VectorStore } from './VectorStore.js';
|
|
2
|
+
import { EmbeddingService } from './EmbeddingService.js';
|
|
3
|
+
import { SemanticCache } from './SemanticCache.js';
|
|
4
4
|
import { EventEmitter } from 'events';
|
|
5
5
|
/**
|
|
6
6
|
* SubconsciousEngine is the main orchestrator for semantic caching.
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
* Provides "short-circuit" logic to return cached results for similar tasks,
|
|
6
6
|
* reducing latency from seconds to milliseconds.
|
|
7
7
|
*/
|
|
8
|
-
export { VectorStore } from './VectorStore';
|
|
9
|
-
export { EmbeddingService } from './EmbeddingService';
|
|
10
|
-
export { SemanticCache, CacheResult } from './SemanticCache';
|
|
11
|
-
export { SubconsciousEngine, SubconsciousConfig, Task, TaskResult, EngineMetrics, } from './SubconsciousEngine';
|
|
8
|
+
export { VectorStore } from './VectorStore.js';
|
|
9
|
+
export { EmbeddingService } from './EmbeddingService.js';
|
|
10
|
+
export { SemanticCache, CacheResult } from './SemanticCache.js';
|
|
11
|
+
export { SubconsciousEngine, SubconsciousConfig, Task, TaskResult, EngineMetrics, } from './SubconsciousEngine.js';
|
|
12
12
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
* Provides "short-circuit" logic to return cached results for similar tasks,
|
|
6
6
|
* reducing latency from seconds to milliseconds.
|
|
7
7
|
*/
|
|
8
|
-
export { VectorStore } from './VectorStore';
|
|
9
|
-
export { EmbeddingService } from './EmbeddingService';
|
|
10
|
-
export { SemanticCache } from './SemanticCache';
|
|
11
|
-
export { SubconsciousEngine, } from './SubconsciousEngine';
|
|
8
|
+
export { VectorStore } from './VectorStore.js';
|
|
9
|
+
export { EmbeddingService } from './EmbeddingService.js';
|
|
10
|
+
export { SemanticCache } from './SemanticCache.js';
|
|
11
|
+
export { SubconsciousEngine, } from './SubconsciousEngine.js';
|
|
12
12
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import fs from 'fs';
|
|
2
2
|
import path from 'path';
|
|
3
|
-
import { computeFingerprint } from './FileFingerprint';
|
|
4
|
-
import { squeezeCode } from './ContextSqueezer';
|
|
5
|
-
import { buildImportTree } from './ImportTreeContext';
|
|
6
|
-
import { getBrain, deriveProjectId } from '../subconscious/TheBrainV2';
|
|
3
|
+
import { computeFingerprint } from './FileFingerprint.js';
|
|
4
|
+
import { squeezeCode } from './ContextSqueezer.js';
|
|
5
|
+
import { buildImportTree } from './ImportTreeContext.js';
|
|
6
|
+
import { getBrain, deriveProjectId } from '../subconscious/TheBrainV2.js';
|
|
7
7
|
import * as ts from 'typescript';
|
|
8
8
|
function estimateTokens(text) {
|
|
9
9
|
return Math.ceil(text.length / 4);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import fs from 'fs';
|
|
2
2
|
import path from 'path';
|
|
3
|
-
import { computeFingerprint } from './FileFingerprint';
|
|
4
|
-
import { squeezeCode } from './ContextSqueezer';
|
|
3
|
+
import { computeFingerprint } from './FileFingerprint.js';
|
|
4
|
+
import { squeezeCode } from './ContextSqueezer.js';
|
|
5
5
|
function estimateTokens(text) {
|
|
6
6
|
return Math.ceil(text.length / 4);
|
|
7
7
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { execSync, spawn } from 'child_process';
|
|
2
|
-
import { squeezeCode } from './ContextSqueezer';
|
|
3
|
-
import { savingsLedger } from './SavingsLedger';
|
|
2
|
+
import { squeezeCode } from './ContextSqueezer.js';
|
|
3
|
+
import { savingsLedger } from './SavingsLedger.js';
|
|
4
4
|
/**
|
|
5
5
|
* Reads text content from the macOS system clipboard using native pbpaste
|
|
6
6
|
*/
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* Algorithm: Query-Focused TF-IDF Centroid sentence extraction + Jaccard dedup.
|
|
6
6
|
* Latency: <15ms for 100k characters.
|
|
7
7
|
*/
|
|
8
|
-
import { tokenize } from '../subconscious/TheBrainV2';
|
|
8
|
+
import { tokenize } from '../subconscious/TheBrainV2.js';
|
|
9
9
|
/**
|
|
10
10
|
* Split text into logical blocks (sentences or log chunks).
|
|
11
11
|
*/
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
import fs from 'fs';
|
|
11
11
|
import path from 'path';
|
|
12
12
|
import * as ts from 'typescript';
|
|
13
|
-
import { safeResolvePath } from '../mcp/utils';
|
|
13
|
+
import { safeResolvePath } from '../mcp/utils.js';
|
|
14
14
|
/**
|
|
15
15
|
* Traverses AST to find the node defining the specified symbol name.
|
|
16
16
|
*/
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { execSync } from 'child_process';
|
|
2
|
-
import { getBrain, deriveProjectId } from '../subconscious/TheBrainV2';
|
|
2
|
+
import { getBrain, deriveProjectId } from '../subconscious/TheBrainV2.js';
|
|
3
3
|
function extractFailures(output) {
|
|
4
4
|
const failures = [];
|
|
5
5
|
// Jest/Vitest failure pattern
|
|
Binary file
|
package/dist/esm/utils/logger.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nxuss/lemma",
|
|
3
|
-
"version": "1.7.
|
|
3
|
+
"version": "1.7.1",
|
|
4
4
|
"description": "Intelligent AI Gateway for IDEs & Agents — Semantic cache, Privacy Firewall, Infrastructure Command Center, and Autonomous Cost-Optimization.",
|
|
5
5
|
"main": "./dist/cjs/index.js",
|
|
6
6
|
"module": "./dist/esm/index.js",
|
|
@@ -71,10 +71,6 @@
|
|
|
71
71
|
"default": "./dist/cjs/protocol/index.js"
|
|
72
72
|
}
|
|
73
73
|
},
|
|
74
|
-
"./langchain": {
|
|
75
|
-
"types": "./sdks/langchain/dist/index.d.ts",
|
|
76
|
-
"default": "./sdks/langchain/dist/index.js"
|
|
77
|
-
},
|
|
78
74
|
"./crewai": {
|
|
79
75
|
"types": "./sdks/crewai/dist/index.d.ts",
|
|
80
76
|
"default": "./sdks/crewai/dist/index.js"
|
|
@@ -91,6 +87,7 @@
|
|
|
91
87
|
"bin/cli.js",
|
|
92
88
|
"bin/checkpoint.js",
|
|
93
89
|
"dashboard/dist/**/*",
|
|
90
|
+
"sdks/crewai/dist/**/*",
|
|
94
91
|
"!dist/examples/**",
|
|
95
92
|
"README.md",
|
|
96
93
|
"LICENSE"
|
|
@@ -100,12 +97,12 @@
|
|
|
100
97
|
"proxy:stop": "node lemma-proxy.cjs stop",
|
|
101
98
|
"proxy:stats": "node lemma-proxy.cjs stats",
|
|
102
99
|
"proxy:status": "node lemma-proxy.cjs status",
|
|
103
|
-
"build": "npm run build:esm && npm run build:cjs && npm run
|
|
104
|
-
"build:full": "npm run build
|
|
100
|
+
"build": "npm run build:esm && npm run build:cjs && npm run build:sdks",
|
|
101
|
+
"build:full": "npm run build",
|
|
105
102
|
"build:esm": "tsc --outDir ./dist/esm",
|
|
106
103
|
"build:cjs": "tsc --project tsconfig.cjs.json",
|
|
107
104
|
"build:sdks": "npm run sdk:build",
|
|
108
|
-
"postbuild": "node scripts/post-build.js",
|
|
105
|
+
"postbuild": "node scripts/post-build.js && node scripts/fix-esm-extensions.js",
|
|
109
106
|
"dev": "npx tsx start-dev.ts",
|
|
110
107
|
"start": "node dist/cjs/index.js",
|
|
111
108
|
"test": "jest",
|
|
@@ -139,7 +136,7 @@
|
|
|
139
136
|
"stack:all": "bash scripts/launch-all.sh",
|
|
140
137
|
"sdk:langchain:build": "cd sdks/langchain && npm run build",
|
|
141
138
|
"sdk:crewai:build": "cd sdks/crewai && npm run build",
|
|
142
|
-
"sdk:build": "npm run sdk:
|
|
139
|
+
"sdk:build": "npm run sdk:crewai:build",
|
|
143
140
|
"keys:generate": "npx tsx scripts/manage-keys.ts generate",
|
|
144
141
|
"keys:list": "npx tsx scripts/manage-keys.ts list",
|
|
145
142
|
"keys:revoke": "npx tsx scripts/manage-keys.ts revoke"
|
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
# @lemma/crewai
|
|
2
|
+
|
|
3
|
+
CrewAI integration for Lemma agent orchestration hub.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install @lemma/crewai
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Quick Start
|
|
12
|
+
|
|
13
|
+
```typescript
|
|
14
|
+
import { LemmaCrewAgent } from '@lemma/crewai';
|
|
15
|
+
|
|
16
|
+
// Create an agent connected to Lemma
|
|
17
|
+
const agent = new LemmaCrewAgent({
|
|
18
|
+
routerUrl: 'ws://localhost:8080',
|
|
19
|
+
agentId: 'research-agent',
|
|
20
|
+
role: 'Researcher',
|
|
21
|
+
goal: 'Find and analyze information',
|
|
22
|
+
backstory: 'Expert researcher with deep analytical skills',
|
|
23
|
+
capabilities: ['research', 'analysis', 'web-search'],
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
// Connect to the hub
|
|
27
|
+
await agent.connect();
|
|
28
|
+
|
|
29
|
+
// Execute a task
|
|
30
|
+
const result = await agent.execute({
|
|
31
|
+
description: 'Research the latest trends in AI',
|
|
32
|
+
expectedOutput: 'A comprehensive report on AI trends',
|
|
33
|
+
});
|
|
34
|
+
|
|
35
|
+
console.log(result);
|
|
36
|
+
|
|
37
|
+
// Disconnect when done
|
|
38
|
+
agent.disconnect();
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
## Features
|
|
42
|
+
|
|
43
|
+
- **Semantic Caching**: Automatic caching of similar tasks
|
|
44
|
+
- **Agent Collaboration**: Discover and delegate to other agents
|
|
45
|
+
- **Task Routing**: Receive tasks from the orchestration hub
|
|
46
|
+
- **Real-time Monitoring**: Track performance through Lemma dashboard
|
|
47
|
+
- **CrewAI Compatible**: Works with existing CrewAI patterns
|
|
48
|
+
|
|
49
|
+
## Configuration
|
|
50
|
+
|
|
51
|
+
```typescript
|
|
52
|
+
interface LemmaCrewConfig {
|
|
53
|
+
routerUrl: string; // WebSocket URL of Lemma router
|
|
54
|
+
agentId: string; // Unique agent identifier
|
|
55
|
+
role: string; // Agent role (CrewAI concept)
|
|
56
|
+
goal: string; // Agent goal
|
|
57
|
+
backstory?: string; // Agent backstory
|
|
58
|
+
capabilities?: string[]; // Agent capabilities
|
|
59
|
+
verbose?: boolean; // Enable verbose logging
|
|
60
|
+
allowDelegation?: boolean; // Allow task delegation
|
|
61
|
+
}
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
## Advanced Usage
|
|
65
|
+
|
|
66
|
+
### Multi-Agent Crew
|
|
67
|
+
|
|
68
|
+
```typescript
|
|
69
|
+
import { EngramCrew } from '@engram/crewai';
|
|
70
|
+
|
|
71
|
+
const crew = new EngramCrew({
|
|
72
|
+
routerUrl: 'ws://localhost:8080',
|
|
73
|
+
agents: [
|
|
74
|
+
{
|
|
75
|
+
agentId: 'researcher',
|
|
76
|
+
role: 'Researcher',
|
|
77
|
+
goal: 'Research information',
|
|
78
|
+
capabilities: ['research', 'web-search'],
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
agentId: 'writer',
|
|
82
|
+
role: 'Writer',
|
|
83
|
+
goal: 'Write compelling content',
|
|
84
|
+
capabilities: ['writing', 'editing'],
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
agentId: 'reviewer',
|
|
88
|
+
role: 'Reviewer',
|
|
89
|
+
goal: 'Review and improve content',
|
|
90
|
+
capabilities: ['review', 'quality-assurance'],
|
|
91
|
+
},
|
|
92
|
+
],
|
|
93
|
+
});
|
|
94
|
+
|
|
95
|
+
await crew.connect();
|
|
96
|
+
|
|
97
|
+
// Execute a multi-step workflow
|
|
98
|
+
const result = await crew.kickoff({
|
|
99
|
+
task: 'Create a blog post about quantum computing',
|
|
100
|
+
process: 'sequential', // or 'hierarchical'
|
|
101
|
+
});
|
|
102
|
+
|
|
103
|
+
console.log(result);
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
### Task Delegation
|
|
107
|
+
|
|
108
|
+
```typescript
|
|
109
|
+
const agent = new EngramCrewAgent({
|
|
110
|
+
routerUrl: 'ws://localhost:8080',
|
|
111
|
+
agentId: 'manager-agent',
|
|
112
|
+
role: 'Manager',
|
|
113
|
+
goal: 'Coordinate team tasks',
|
|
114
|
+
allowDelegation: true,
|
|
115
|
+
capabilities: ['management', 'coordination'],
|
|
116
|
+
});
|
|
117
|
+
|
|
118
|
+
await agent.connect();
|
|
119
|
+
|
|
120
|
+
// Agent can delegate subtasks to other agents
|
|
121
|
+
const result = await agent.execute({
|
|
122
|
+
description: 'Create a marketing campaign',
|
|
123
|
+
allowDelegation: true,
|
|
124
|
+
});
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
## Benefits
|
|
128
|
+
|
|
129
|
+
1. **60-80% Cost Reduction**: Semantic caching eliminates redundant LLM calls
|
|
130
|
+
2. **Sub-50ms Responses**: Cached results return instantly
|
|
131
|
+
3. **Agent Discovery**: Automatically find capable agents for tasks
|
|
132
|
+
4. **Centralized Monitoring**: Real-time visibility through dashboard
|
|
133
|
+
5. **Fault Tolerance**: Auto-reconnection and error handling
|
|
134
|
+
|
|
135
|
+
## Examples
|
|
136
|
+
|
|
137
|
+
### Research Agent
|
|
138
|
+
|
|
139
|
+
```typescript
|
|
140
|
+
const researcher = new EngramCrewAgent({
|
|
141
|
+
routerUrl: 'ws://localhost:8080',
|
|
142
|
+
agentId: 'researcher-001',
|
|
143
|
+
role: 'Senior Researcher',
|
|
144
|
+
goal: 'Conduct thorough research on any topic',
|
|
145
|
+
backstory: 'PhD in Computer Science with 10 years of research experience',
|
|
146
|
+
capabilities: ['research', 'analysis', 'fact-checking'],
|
|
147
|
+
});
|
|
148
|
+
|
|
149
|
+
await researcher.connect();
|
|
150
|
+
|
|
151
|
+
const findings = await researcher.execute({
|
|
152
|
+
description: 'Research the impact of AI on healthcare',
|
|
153
|
+
expectedOutput: 'Detailed research report with citations',
|
|
154
|
+
});
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
### Code Review Agent
|
|
158
|
+
|
|
159
|
+
```typescript
|
|
160
|
+
const reviewer = new EngramCrewAgent({
|
|
161
|
+
routerUrl: 'ws://localhost:8080',
|
|
162
|
+
agentId: 'code-reviewer',
|
|
163
|
+
role: 'Senior Code Reviewer',
|
|
164
|
+
goal: 'Review code for quality and security',
|
|
165
|
+
capabilities: ['code-review', 'security-audit', 'best-practices'],
|
|
166
|
+
});
|
|
167
|
+
|
|
168
|
+
await reviewer.connect();
|
|
169
|
+
|
|
170
|
+
const review = await reviewer.execute({
|
|
171
|
+
description: 'Review this TypeScript code for issues',
|
|
172
|
+
context: { code: '...' },
|
|
173
|
+
});
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
## License
|
|
177
|
+
|
|
178
|
+
MIT
|