tlnt
Version:
TLNT - HMS-Powered Multi-Agent Platform with Government Agency Analysis, Deep Research, and Enterprise-Ready Deployment. Self-optimizing multi-domain AI agent with continuous learning and enterprise-grade performance monitoring.
244 lines • 6.47 kB
TypeScript
import { EventEmitter } from 'events';
export interface Stakeholder {
id: string;
name: string;
role: 'client' | 'provider' | 'reviewer' | 'approver' | 'observer';
contactInfo: {
email?: string;
phone?: string;
organization?: string;
};
requirements: string[];
constraints: string[];
successCriteria: string[];
votingWeight: number;
}
export interface Metric {
metricId: string;
name: string;
description: string;
type: 'financial' | 'operational' | 'quality' | 'time' | 'compliance';
unit: string;
targetValue: number;
currentValue: number;
trend: 'improving' | 'stable' | 'declining';
measurable: boolean;
attainable: boolean;
priority: 'low' | 'medium' | 'high' | 'critical';
dataSource: string;
validationMethod: string;
lastUpdated: Date;
}
export interface Solution {
solutionId: string;
name: string;
description: string;
approach: string;
estimatedDuration: number;
requiredSkills: string[];
deliverables: string[];
risks: Array<{
description: string;
probability: number;
impact: number;
mitigation: string;
}>;
dependencies: string[];
resourceRequirements: {
humanAgents: number;
aiAgents: number;
specializedTools: string[];
externalServices: string[];
};
expectedValue: number;
confidence: number;
}
export interface Financing {
budgetSource: string;
totalBudget: number;
currency: string;
fundingType: 'fixed' | 'hourly' | 'milestone' | 'outcome_based';
paymentSchedule: Array<{
milestone: string;
amount: number;
dueDate: Date;
conditions: string[];
}>;
costBreakdown: {
agentCosts: number;
toolCosts: number;
infraCosts: number;
overheadCosts: number;
};
riskAllowance: number;
performanceBonuses: Array<{
condition: string;
amount: number;
}>;
}
export declare enum DealStatus {
CREATED = "created",
PLANNING = "planning",
IN_PROGRESS = "in_progress",
REVIEW = "review",
COMPLETED = "completed",
CANCELLED = "cancelled",
FAILED = "failed"
}
export interface Deal {
dealId: string;
name: string;
problem: string;
description: string;
proposedSolutions: Solution[];
stakeholders: Stakeholder[];
financing: Financing;
metrics: Metric[];
status: DealStatus;
priority: 'low' | 'medium' | 'high' | 'urgent';
tags: string[];
createdAt: Date;
updatedAt: Date;
startDate?: Date;
deadline?: Date;
completedAt?: Date;
assignedAgents: string[];
progress: number;
currentPhase: string;
nextMilestone?: string;
expectedValue: number;
actualValue?: number;
valueDelta?: number;
requiredStandards: string[];
complianceStatus: Record<string, 'pending' | 'compliant' | 'non_compliant'>;
auditLog: Array<{
timestamp: Date;
actor: string;
action: string;
details: Record<string, unknown>;
valueImpact?: number;
}>;
metadata: Record<string, unknown>;
}
export interface CreateDealRequest {
name: string;
problem: string;
description?: string;
priority?: Deal['priority'];
deadline?: Date;
stakeholders: Omit<Stakeholder, 'id'>[];
financing: Financing;
requiredStandards?: string[];
tags?: string[];
metadata?: Record<string, unknown>;
}
export interface UpdateDealRequest {
name?: string;
description?: string;
priority?: Deal['priority'];
deadline?: Date;
status?: DealStatus;
progress?: number;
currentPhase?: string;
nextMilestone?: string;
metadata?: Record<string, unknown>;
}
export interface DealSearchQuery {
status?: DealStatus[];
priority?: Deal['priority'][];
tags?: string[];
stakeholders?: string[];
assignedAgents?: string[];
createdAfter?: Date;
createdBefore?: Date;
minValue?: number;
maxValue?: number;
standards?: string[];
textSearch?: string;
limit?: number;
offset?: number;
}
export interface DealMetrics {
dealId: string;
totalValue: number;
valueDelta: number;
completionPercentage: number;
metricsAttainability: number;
riskScore: number;
complianceScore: number;
stakeholderSatisfaction: number;
agentEfficiency: number;
lastUpdated: Date;
}
/**
* Deal Registry for managing collaborative deals
* Provides CRUD operations and business logic for deal lifecycle
*/
export declare class DealRegistry extends EventEmitter {
private deals;
private dealMetrics;
private initialized;
constructor();
initialize(): Promise<void>;
/**
* Create a new deal
*/
createDeal(request: CreateDealRequest): Promise<Deal>;
/**
* Get a deal by ID
*/
getDeal(dealId: string): Promise<Deal | null>;
/**
* Update a deal
*/
updateDeal(dealId: string, updates: UpdateDealRequest, actor?: string): Promise<Deal | null>;
/**
* Delete a deal
*/
deleteDeal(dealId: string, actor?: string): Promise<boolean>;
/**
* Search deals
*/
searchDeals(query: DealSearchQuery): Promise<{
deals: Deal[];
total: number;
}>;
/**
* Add a solution to a deal
*/
addSolution(dealId: string, solution: Omit<Solution, 'solutionId'>, actor?: string): Promise<Solution | null>;
/**
* Add a metric to a deal
*/
addMetric(dealId: string, metric: Omit<Metric, 'metricId'>, actor?: string): Promise<Metric | null>;
/**
* Assign agents to a deal
*/
assignAgents(dealId: string, agentIds: string[], actor?: string): Promise<boolean>;
/**
* Get deal metrics
*/
getDealMetrics(dealId: string): Promise<DealMetrics | null>;
/**
* Get all deals
*/
getAllDeals(): Deal[];
/**
* Get deal count by status
*/
getDealCountByStatus(): Record<DealStatus, number>;
private initializeDealMetrics;
private updateDealMetrics;
private calculateMetricsAttainability;
private calculateRiskScore;
private calculateComplianceScore;
private generateDealId;
/**
* Health check
*/
healthCheck(): Promise<{
status: 'healthy' | 'unhealthy';
details: Record<string, unknown>;
}>;
}
//# sourceMappingURL=dealModel.d.ts.map