-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtypes.ts
More file actions
142 lines (129 loc) · 3.07 KB
/
types.ts
File metadata and controls
142 lines (129 loc) · 3.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
export interface Metric {
label: string;
value: string;
change: string;
trend: 'up' | 'down';
icon: string;
onClick?: () => void;
status?: 'success' | 'warning' | 'neutral' | 'info';
}
export interface GradeEntry {
source: 'ai' | 'human';
score: number;
reasoning?: string;
createdAt: string;
isSelected?: boolean;
electedAt?: string;
}
export interface ChatStep {
id: string;
role: 'interviewer' | 'agent' | 'system';
content: string;
timestamp: string;
status?: 'pass' | 'fail' | 'info';
metadata?: Record<string, string>;
score?: number;
category?: string;
isHumanGraded?: boolean;
humanNote?: string;
gradingHistory?: GradeEntry[];
}
export interface Run {
id: string;
agentId: string;
agentName: string;
timestamp: string;
status: 'pass' | 'fail' | 'in_progress' | 'running';
score?: number;
steps?: ChatStep[];
totalSteps?: number;
templateName?: string;
templateDifficulty?: string;
templateSkills?: string; // JSON array string
templateDescription?: string;
certificate?: Certificate;
isCertified?: boolean;
}
export interface Criterion {
id: string;
prompt: string;
expected: string;
minScore: number;
}
export interface Template {
id: string;
name: string;
description?: string;
type: 'auto' | 'manual';
status: 'draft' | 'private' | 'public';
skills: string[];
difficulty: 'Easy' | 'Medium' | 'Hard';
criteria?: Criterion[];
lastUpdated: string;
}
export interface Certificate {
id: string;
runId: string;
agentId: string;
agentName: string;
templateName?: string;
score: number;
status: 'active' | 'revoked';
issuedAt: string;
issuedBy?: string;
dataHash: string;
agentSnapshot?: string; // JSON string with agent summary at issuance time
}
export interface AccessRequest {
id: string;
certificateId: string;
certificateName: string;
requesterName: string;
requesterContact: string;
message: string;
timestamp: string;
status: 'unread' | 'read';
}
export interface AgentSkill {
name: string;
declaredLevel: string;
evidence: string;
}
export interface AgentSkillClaim {
skillId: string;
proficiencyClaim: string;
evidence: string;
status: string;
createdAt: string;
}
export interface AgentSummary {
id: number;
agentId: string;
name: string;
version: string;
createdAt: string;
skillCount: number;
certificateCount: number;
latestScore?: number;
}
export interface AgentProfile {
id: number;
agentId: string;
clientRequestId: string;
name: string;
version: string;
fingerprint: string;
fingerprintMethod: string;
toolAccess: string;
skillMdHash: string;
createdAt: string;
workspaceFiles?: string; // JSON string
skills: AgentSkill[];
skillClaims: AgentSkillClaim[];
certificates: Certificate[];
}
export interface AgentUpdate {
name?: string;
version?: string;
workspaceFiles?: string; // JSON string
}