@indemn/cli 1.0.0 → 1.1.0

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.
Files changed (104) hide show
  1. package/.claude-plugin/marketplace.json +28 -0
  2. package/README.md +29 -23
  3. package/dist/cli/agents.d.ts.map +1 -1
  4. package/dist/cli/agents.js +20 -0
  5. package/dist/cli/agents.js.map +1 -1
  6. package/dist/cli/eval.d.ts.map +1 -1
  7. package/dist/cli/eval.js +38 -0
  8. package/dist/cli/eval.js.map +1 -1
  9. package/dist/mcp/tools.d.ts.map +1 -1
  10. package/dist/mcp/tools.js +40 -0
  11. package/dist/mcp/tools.js.map +1 -1
  12. package/dist/report/agent-card/cover.d.ts +20 -0
  13. package/dist/report/agent-card/cover.d.ts.map +1 -0
  14. package/dist/report/agent-card/cover.js +58 -0
  15. package/dist/report/agent-card/cover.js.map +1 -0
  16. package/dist/report/agent-card/document.d.ts +7 -0
  17. package/dist/report/agent-card/document.d.ts.map +1 -0
  18. package/dist/report/agent-card/document.js +144 -0
  19. package/dist/report/agent-card/document.js.map +1 -0
  20. package/dist/report/agent-card/types.d.ts +77 -0
  21. package/dist/report/agent-card/types.d.ts.map +1 -0
  22. package/dist/report/agent-card/types.js +3 -0
  23. package/dist/report/agent-card/types.js.map +1 -0
  24. package/dist/report/assets/Indemn_PrimaryLogo_Iris.png +0 -0
  25. package/dist/report/assets/assets/Indemn_PrimaryLogo_Iris.png +0 -0
  26. package/dist/report/assets/assets/fonts/Barlow-Bold.ttf +0 -0
  27. package/dist/report/assets/assets/fonts/Barlow-Medium.ttf +0 -0
  28. package/dist/report/assets/assets/fonts/Barlow-Regular.ttf +0 -0
  29. package/dist/report/assets/assets/fonts/Barlow-SemiBold.ttf +0 -0
  30. package/dist/report/assets/fonts/Barlow-Bold.ttf +0 -0
  31. package/dist/report/assets/fonts/Barlow-Medium.ttf +0 -0
  32. package/dist/report/assets/fonts/Barlow-Regular.ttf +0 -0
  33. package/dist/report/assets/fonts/Barlow-SemiBold.ttf +0 -0
  34. package/dist/report/eval-report/cover.d.ts +16 -0
  35. package/dist/report/eval-report/cover.d.ts.map +1 -0
  36. package/dist/report/eval-report/cover.js +8 -0
  37. package/dist/report/eval-report/cover.js.map +1 -0
  38. package/dist/report/eval-report/document.d.ts +19 -0
  39. package/dist/report/eval-report/document.d.ts.map +1 -0
  40. package/dist/report/eval-report/document.js +32 -0
  41. package/dist/report/eval-report/document.js.map +1 -0
  42. package/dist/report/eval-report/example-page.d.ts +11 -0
  43. package/dist/report/eval-report/example-page.d.ts.map +1 -0
  44. package/dist/report/eval-report/example-page.js +18 -0
  45. package/dist/report/eval-report/example-page.js.map +1 -0
  46. package/dist/report/eval-report/item-page.d.ts +9 -0
  47. package/dist/report/eval-report/item-page.d.ts.map +1 -0
  48. package/dist/report/eval-report/item-page.js +72 -0
  49. package/dist/report/eval-report/item-page.js.map +1 -0
  50. package/dist/report/eval-report/matrix-page.d.ts +8 -0
  51. package/dist/report/eval-report/matrix-page.d.ts.map +1 -0
  52. package/dist/report/eval-report/matrix-page.js +31 -0
  53. package/dist/report/eval-report/matrix-page.js.map +1 -0
  54. package/dist/report/eval-report/types.d.ts +69 -0
  55. package/dist/report/eval-report/types.d.ts.map +1 -0
  56. package/dist/report/eval-report/types.js +7 -0
  57. package/dist/report/eval-report/types.js.map +1 -0
  58. package/dist/report/eval-report/v2-cover.d.ts +9 -0
  59. package/dist/report/eval-report/v2-cover.d.ts.map +1 -0
  60. package/dist/report/eval-report/v2-cover.js +32 -0
  61. package/dist/report/eval-report/v2-cover.js.map +1 -0
  62. package/dist/report/export.d.ts +17 -0
  63. package/dist/report/export.d.ts.map +1 -0
  64. package/dist/report/export.js +327 -0
  65. package/dist/report/export.js.map +1 -0
  66. package/dist/report/generate.d.ts +7 -0
  67. package/dist/report/generate.d.ts.map +1 -0
  68. package/dist/report/generate.js +30 -0
  69. package/dist/report/generate.js.map +1 -0
  70. package/dist/report/scoring.d.ts +90 -0
  71. package/dist/report/scoring.d.ts.map +1 -0
  72. package/dist/report/scoring.js +174 -0
  73. package/dist/report/scoring.js.map +1 -0
  74. package/dist/report/styles.d.ts +111 -0
  75. package/dist/report/styles.d.ts.map +1 -0
  76. package/dist/report/styles.js +134 -0
  77. package/dist/report/styles.js.map +1 -0
  78. package/docs/plans/2026-03-13-cli-exports.md +819 -0
  79. package/package.json +14 -4
  80. package/skills/eval-analysis/SKILL.md +178 -0
  81. package/skills/eval-analysis/references/data-shapes.md +279 -0
  82. package/src/cli/agents.ts +22 -0
  83. package/src/cli/eval.ts +42 -0
  84. package/src/mcp/tools.ts +50 -0
  85. package/src/report/agent-card/cover.tsx +232 -0
  86. package/src/report/agent-card/document.tsx +582 -0
  87. package/src/report/agent-card/types.ts +86 -0
  88. package/src/report/assets/Indemn_PrimaryLogo_Iris.png +0 -0
  89. package/src/report/assets/fonts/Barlow-Bold.ttf +0 -0
  90. package/src/report/assets/fonts/Barlow-Medium.ttf +0 -0
  91. package/src/report/assets/fonts/Barlow-Regular.ttf +0 -0
  92. package/src/report/assets/fonts/Barlow-SemiBold.ttf +0 -0
  93. package/src/report/eval-report/cover.tsx +69 -0
  94. package/src/report/eval-report/document.tsx +105 -0
  95. package/src/report/eval-report/example-page.tsx +121 -0
  96. package/src/report/eval-report/item-page.tsx +211 -0
  97. package/src/report/eval-report/matrix-page.tsx +124 -0
  98. package/src/report/eval-report/types.ts +77 -0
  99. package/src/report/eval-report/v2-cover.tsx +102 -0
  100. package/src/report/export.ts +394 -0
  101. package/src/report/generate.tsx +37 -0
  102. package/src/report/scoring.ts +281 -0
  103. package/src/report/styles.ts +138 -0
  104. package/tsconfig.json +2 -1
@@ -0,0 +1,232 @@
1
+ // Agent card cover page — ported from AgentCardCover.tsx
2
+ import { Page, View, Text, Image } from '@react-pdf/renderer';
3
+ import { styles, colors, logoPath } from '../styles.js';
4
+ import { getScoreHexColor } from '../scoring.js';
5
+ import type { LifecycleStage, V1Owner } from './types.js';
6
+
7
+ export interface AgentCardCoverProps {
8
+ agentName: string;
9
+ description?: string;
10
+ channels: string[];
11
+ generatedDate: string;
12
+ lifecycle?: LifecycleStage;
13
+ owner?: V1Owner;
14
+ evaluationSummary?: {
15
+ criteriaRate: number | null;
16
+ rubricRate: number | null;
17
+ criteriaPassed: number;
18
+ criteriaTotal: number;
19
+ rubricRulesPassed: number;
20
+ rubricRulesTotal: number;
21
+ totalRuns: number;
22
+ };
23
+ }
24
+
25
+ const lifecycleColors: Record<string, { bg: string; text: string }> = {
26
+ prototype: { bg: '#e5e7eb', text: '#4b5563' },
27
+ beta: { bg: '#fef3c7', text: '#92400e' },
28
+ published: { bg: '#d1fae5', text: '#065f46' },
29
+ };
30
+
31
+ export function AgentCardCover({
32
+ agentName,
33
+ description,
34
+ channels,
35
+ generatedDate,
36
+ lifecycle,
37
+ owner,
38
+ evaluationSummary,
39
+ }: AgentCardCoverProps) {
40
+ const lc = lifecycle ? lifecycleColors[lifecycle] || lifecycleColors.prototype : null;
41
+ const ownerName = owner
42
+ ? [owner.firstname, owner.lastname].filter(Boolean).join(' ') || owner.email || null
43
+ : null;
44
+
45
+ return (
46
+ <Page size="A4" style={[styles.page, { justifyContent: 'center' }]}>
47
+ {/* Logo */}
48
+ <View style={{ alignItems: 'center', marginBottom: 48 }}>
49
+ <Image src={logoPath} style={{ width: 200, height: 46 }} />
50
+ </View>
51
+
52
+ {/* Badges row: V1 Agent + Lifecycle */}
53
+ <View style={{ flexDirection: 'row', justifyContent: 'center', gap: 8, marginBottom: 16 }}>
54
+ <View
55
+ style={{
56
+ backgroundColor: `${colors.iris}20`,
57
+ paddingHorizontal: 12,
58
+ paddingVertical: 4,
59
+ borderRadius: 4,
60
+ }}
61
+ >
62
+ <Text style={{ fontSize: 10, fontWeight: 500, color: colors.iris }}>
63
+ V1 Agent
64
+ </Text>
65
+ </View>
66
+ {lc && (
67
+ <View
68
+ style={{
69
+ backgroundColor: lc.bg,
70
+ paddingHorizontal: 12,
71
+ paddingVertical: 4,
72
+ borderRadius: 4,
73
+ }}
74
+ >
75
+ <Text style={{ fontSize: 10, fontWeight: 500, color: lc.text }}>
76
+ {lifecycle!.charAt(0).toUpperCase() + lifecycle!.slice(1)}
77
+ </Text>
78
+ </View>
79
+ )}
80
+ </View>
81
+
82
+ {/* Title */}
83
+ <View style={{ alignItems: 'center', marginBottom: 8 }}>
84
+ <Text
85
+ style={{
86
+ fontSize: 28,
87
+ fontWeight: 700,
88
+ color: colors.eggplant,
89
+ marginBottom: 8,
90
+ textAlign: 'center',
91
+ }}
92
+ >
93
+ {agentName}
94
+ </Text>
95
+ {description && (
96
+ <Text
97
+ style={{
98
+ fontSize: 14,
99
+ fontWeight: 400,
100
+ color: colors.muted,
101
+ textAlign: 'center',
102
+ maxWidth: 400,
103
+ }}
104
+ >
105
+ {description}
106
+ </Text>
107
+ )}
108
+ </View>
109
+
110
+ {/* Owner */}
111
+ {ownerName && (
112
+ <View style={{ alignItems: 'center', marginBottom: 16 }}>
113
+ <Text style={{ fontSize: 10, color: colors.muted }}>
114
+ Owner: {ownerName}
115
+ </Text>
116
+ </View>
117
+ )}
118
+
119
+ {/* Channels */}
120
+ {channels.length > 0 && (
121
+ <View
122
+ style={{
123
+ flexDirection: 'row',
124
+ justifyContent: 'center',
125
+ gap: 8,
126
+ marginBottom: 32,
127
+ }}
128
+ >
129
+ {channels.map((channel) => (
130
+ <View
131
+ key={channel}
132
+ style={{
133
+ backgroundColor: colors.background,
134
+ paddingHorizontal: 10,
135
+ paddingVertical: 4,
136
+ borderRadius: 4,
137
+ }}
138
+ >
139
+ <Text style={{ fontSize: 10, fontWeight: 500, color: colors.eggplant }}>
140
+ {channel}
141
+ </Text>
142
+ </View>
143
+ ))}
144
+ </View>
145
+ )}
146
+
147
+ {/* Evaluation Summary — Dual Scores */}
148
+ <View style={{ alignItems: 'center', marginBottom: 48 }}>
149
+ <View style={[styles.card, { paddingHorizontal: 32, paddingVertical: 20, minWidth: 320 }]}>
150
+ {evaluationSummary && evaluationSummary.totalRuns > 0 ? (
151
+ <View>
152
+ {/* Dual score row */}
153
+ <View style={{ flexDirection: 'row', justifyContent: 'center', gap: 32, marginBottom: 8 }}>
154
+ {/* Criteria score */}
155
+ <View style={{ alignItems: 'center' }}>
156
+ <Text style={{ fontSize: 10, fontWeight: 500, color: colors.muted, marginBottom: 4 }}>
157
+ Criteria
158
+ </Text>
159
+ {evaluationSummary.criteriaRate !== null ? (
160
+ <>
161
+ <Text
162
+ style={{
163
+ fontSize: 24,
164
+ fontWeight: 700,
165
+ color: getScoreHexColor(evaluationSummary.criteriaRate),
166
+ }}
167
+ >
168
+ {Math.round(evaluationSummary.criteriaRate * 100)}%
169
+ </Text>
170
+ <Text style={{ fontSize: 9, color: colors.muted, marginTop: 2 }}>
171
+ {evaluationSummary.criteriaPassed}/{evaluationSummary.criteriaTotal} checks
172
+ </Text>
173
+ </>
174
+ ) : (
175
+ <Text style={{ fontSize: 14, color: colors.muted }}>-</Text>
176
+ )}
177
+ </View>
178
+
179
+ {/* Divider */}
180
+ <View style={{ width: 1, backgroundColor: colors.border, marginVertical: 4 }} />
181
+
182
+ {/* Rubric score */}
183
+ <View style={{ alignItems: 'center' }}>
184
+ <Text style={{ fontSize: 10, fontWeight: 500, color: colors.muted, marginBottom: 4 }}>
185
+ Rubric
186
+ </Text>
187
+ {evaluationSummary.rubricRate !== null ? (
188
+ <>
189
+ <Text
190
+ style={{
191
+ fontSize: 24,
192
+ fontWeight: 700,
193
+ color: getScoreHexColor(evaluationSummary.rubricRate),
194
+ }}
195
+ >
196
+ {Math.round(evaluationSummary.rubricRate * 100)}%
197
+ </Text>
198
+ <Text style={{ fontSize: 9, color: colors.muted, marginTop: 2 }}>
199
+ {evaluationSummary.rubricRulesPassed}/{evaluationSummary.rubricRulesTotal} rules
200
+ </Text>
201
+ </>
202
+ ) : (
203
+ <Text style={{ fontSize: 14, color: colors.muted }}>-</Text>
204
+ )}
205
+ </View>
206
+ </View>
207
+
208
+ {/* Run count */}
209
+ <View style={{ alignItems: 'center' }}>
210
+ <Text style={{ fontSize: 9, fontWeight: 400, color: colors.muted }}>
211
+ across {evaluationSummary.totalRuns} evaluation run{evaluationSummary.totalRuns !== 1 ? 's' : ''}
212
+ </Text>
213
+ </View>
214
+ </View>
215
+ ) : (
216
+ <View style={{ alignItems: 'center' }}>
217
+ <Text style={{ fontSize: 12, fontWeight: 500, color: colors.muted }}>
218
+ Not yet evaluated
219
+ </Text>
220
+ </View>
221
+ )}
222
+ </View>
223
+ </View>
224
+
225
+ {/* Footer */}
226
+ <View style={[styles.footer, { position: 'absolute', bottom: 40 }]}>
227
+ <Text style={styles.caption}>Generated {generatedDate}</Text>
228
+ <Text style={styles.caption}>Page 1</Text>
229
+ </View>
230
+ </Page>
231
+ );
232
+ }