holomime 1.0.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.
- package/LICENSE +21 -0
- package/README.md +221 -0
- package/dist/cli.js +9114 -0
- package/dist/index.d.ts +2758 -0
- package/dist/index.js +5402 -0
- package/dist/mcp-server.js +1840 -0
- package/package.json +70 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,2758 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
|
|
3
|
+
declare const bigFiveDimensionSchema: z.ZodEnum<["openness", "conscientiousness", "extraversion", "agreeableness", "emotional_stability"]>;
|
|
4
|
+
type BigFiveDimension = z.infer<typeof bigFiveDimensionSchema>;
|
|
5
|
+
declare const bigFiveSchema: z.ZodObject<{
|
|
6
|
+
openness: z.ZodObject<{
|
|
7
|
+
score: z.ZodNumber;
|
|
8
|
+
facets: z.ZodObject<{
|
|
9
|
+
imagination: z.ZodNumber;
|
|
10
|
+
intellectual_curiosity: z.ZodNumber;
|
|
11
|
+
aesthetic_sensitivity: z.ZodNumber;
|
|
12
|
+
willingness_to_experiment: z.ZodNumber;
|
|
13
|
+
}, "strip", z.ZodTypeAny, {
|
|
14
|
+
imagination: number;
|
|
15
|
+
intellectual_curiosity: number;
|
|
16
|
+
aesthetic_sensitivity: number;
|
|
17
|
+
willingness_to_experiment: number;
|
|
18
|
+
}, {
|
|
19
|
+
imagination: number;
|
|
20
|
+
intellectual_curiosity: number;
|
|
21
|
+
aesthetic_sensitivity: number;
|
|
22
|
+
willingness_to_experiment: number;
|
|
23
|
+
}>;
|
|
24
|
+
}, "strip", z.ZodTypeAny, {
|
|
25
|
+
score: number;
|
|
26
|
+
facets: {
|
|
27
|
+
imagination: number;
|
|
28
|
+
intellectual_curiosity: number;
|
|
29
|
+
aesthetic_sensitivity: number;
|
|
30
|
+
willingness_to_experiment: number;
|
|
31
|
+
};
|
|
32
|
+
}, {
|
|
33
|
+
score: number;
|
|
34
|
+
facets: {
|
|
35
|
+
imagination: number;
|
|
36
|
+
intellectual_curiosity: number;
|
|
37
|
+
aesthetic_sensitivity: number;
|
|
38
|
+
willingness_to_experiment: number;
|
|
39
|
+
};
|
|
40
|
+
}>;
|
|
41
|
+
conscientiousness: z.ZodObject<{
|
|
42
|
+
score: z.ZodNumber;
|
|
43
|
+
facets: z.ZodObject<{
|
|
44
|
+
self_discipline: z.ZodNumber;
|
|
45
|
+
orderliness: z.ZodNumber;
|
|
46
|
+
goal_orientation: z.ZodNumber;
|
|
47
|
+
attention_to_detail: z.ZodNumber;
|
|
48
|
+
}, "strip", z.ZodTypeAny, {
|
|
49
|
+
self_discipline: number;
|
|
50
|
+
orderliness: number;
|
|
51
|
+
goal_orientation: number;
|
|
52
|
+
attention_to_detail: number;
|
|
53
|
+
}, {
|
|
54
|
+
self_discipline: number;
|
|
55
|
+
orderliness: number;
|
|
56
|
+
goal_orientation: number;
|
|
57
|
+
attention_to_detail: number;
|
|
58
|
+
}>;
|
|
59
|
+
}, "strip", z.ZodTypeAny, {
|
|
60
|
+
score: number;
|
|
61
|
+
facets: {
|
|
62
|
+
self_discipline: number;
|
|
63
|
+
orderliness: number;
|
|
64
|
+
goal_orientation: number;
|
|
65
|
+
attention_to_detail: number;
|
|
66
|
+
};
|
|
67
|
+
}, {
|
|
68
|
+
score: number;
|
|
69
|
+
facets: {
|
|
70
|
+
self_discipline: number;
|
|
71
|
+
orderliness: number;
|
|
72
|
+
goal_orientation: number;
|
|
73
|
+
attention_to_detail: number;
|
|
74
|
+
};
|
|
75
|
+
}>;
|
|
76
|
+
extraversion: z.ZodObject<{
|
|
77
|
+
score: z.ZodNumber;
|
|
78
|
+
facets: z.ZodObject<{
|
|
79
|
+
assertiveness: z.ZodNumber;
|
|
80
|
+
enthusiasm: z.ZodNumber;
|
|
81
|
+
sociability: z.ZodNumber;
|
|
82
|
+
initiative: z.ZodNumber;
|
|
83
|
+
}, "strip", z.ZodTypeAny, {
|
|
84
|
+
assertiveness: number;
|
|
85
|
+
enthusiasm: number;
|
|
86
|
+
sociability: number;
|
|
87
|
+
initiative: number;
|
|
88
|
+
}, {
|
|
89
|
+
assertiveness: number;
|
|
90
|
+
enthusiasm: number;
|
|
91
|
+
sociability: number;
|
|
92
|
+
initiative: number;
|
|
93
|
+
}>;
|
|
94
|
+
}, "strip", z.ZodTypeAny, {
|
|
95
|
+
score: number;
|
|
96
|
+
facets: {
|
|
97
|
+
assertiveness: number;
|
|
98
|
+
enthusiasm: number;
|
|
99
|
+
sociability: number;
|
|
100
|
+
initiative: number;
|
|
101
|
+
};
|
|
102
|
+
}, {
|
|
103
|
+
score: number;
|
|
104
|
+
facets: {
|
|
105
|
+
assertiveness: number;
|
|
106
|
+
enthusiasm: number;
|
|
107
|
+
sociability: number;
|
|
108
|
+
initiative: number;
|
|
109
|
+
};
|
|
110
|
+
}>;
|
|
111
|
+
agreeableness: z.ZodObject<{
|
|
112
|
+
score: z.ZodNumber;
|
|
113
|
+
facets: z.ZodObject<{
|
|
114
|
+
warmth: z.ZodNumber;
|
|
115
|
+
empathy: z.ZodNumber;
|
|
116
|
+
cooperation: z.ZodNumber;
|
|
117
|
+
trust_tendency: z.ZodNumber;
|
|
118
|
+
}, "strip", z.ZodTypeAny, {
|
|
119
|
+
warmth: number;
|
|
120
|
+
empathy: number;
|
|
121
|
+
cooperation: number;
|
|
122
|
+
trust_tendency: number;
|
|
123
|
+
}, {
|
|
124
|
+
warmth: number;
|
|
125
|
+
empathy: number;
|
|
126
|
+
cooperation: number;
|
|
127
|
+
trust_tendency: number;
|
|
128
|
+
}>;
|
|
129
|
+
}, "strip", z.ZodTypeAny, {
|
|
130
|
+
score: number;
|
|
131
|
+
facets: {
|
|
132
|
+
warmth: number;
|
|
133
|
+
empathy: number;
|
|
134
|
+
cooperation: number;
|
|
135
|
+
trust_tendency: number;
|
|
136
|
+
};
|
|
137
|
+
}, {
|
|
138
|
+
score: number;
|
|
139
|
+
facets: {
|
|
140
|
+
warmth: number;
|
|
141
|
+
empathy: number;
|
|
142
|
+
cooperation: number;
|
|
143
|
+
trust_tendency: number;
|
|
144
|
+
};
|
|
145
|
+
}>;
|
|
146
|
+
emotional_stability: z.ZodObject<{
|
|
147
|
+
score: z.ZodNumber;
|
|
148
|
+
facets: z.ZodObject<{
|
|
149
|
+
stress_tolerance: z.ZodNumber;
|
|
150
|
+
emotional_regulation: z.ZodNumber;
|
|
151
|
+
confidence: z.ZodNumber;
|
|
152
|
+
adaptability: z.ZodNumber;
|
|
153
|
+
}, "strip", z.ZodTypeAny, {
|
|
154
|
+
stress_tolerance: number;
|
|
155
|
+
emotional_regulation: number;
|
|
156
|
+
confidence: number;
|
|
157
|
+
adaptability: number;
|
|
158
|
+
}, {
|
|
159
|
+
stress_tolerance: number;
|
|
160
|
+
emotional_regulation: number;
|
|
161
|
+
confidence: number;
|
|
162
|
+
adaptability: number;
|
|
163
|
+
}>;
|
|
164
|
+
}, "strip", z.ZodTypeAny, {
|
|
165
|
+
score: number;
|
|
166
|
+
facets: {
|
|
167
|
+
stress_tolerance: number;
|
|
168
|
+
emotional_regulation: number;
|
|
169
|
+
confidence: number;
|
|
170
|
+
adaptability: number;
|
|
171
|
+
};
|
|
172
|
+
}, {
|
|
173
|
+
score: number;
|
|
174
|
+
facets: {
|
|
175
|
+
stress_tolerance: number;
|
|
176
|
+
emotional_regulation: number;
|
|
177
|
+
confidence: number;
|
|
178
|
+
adaptability: number;
|
|
179
|
+
};
|
|
180
|
+
}>;
|
|
181
|
+
}, "strip", z.ZodTypeAny, {
|
|
182
|
+
openness: {
|
|
183
|
+
score: number;
|
|
184
|
+
facets: {
|
|
185
|
+
imagination: number;
|
|
186
|
+
intellectual_curiosity: number;
|
|
187
|
+
aesthetic_sensitivity: number;
|
|
188
|
+
willingness_to_experiment: number;
|
|
189
|
+
};
|
|
190
|
+
};
|
|
191
|
+
conscientiousness: {
|
|
192
|
+
score: number;
|
|
193
|
+
facets: {
|
|
194
|
+
self_discipline: number;
|
|
195
|
+
orderliness: number;
|
|
196
|
+
goal_orientation: number;
|
|
197
|
+
attention_to_detail: number;
|
|
198
|
+
};
|
|
199
|
+
};
|
|
200
|
+
extraversion: {
|
|
201
|
+
score: number;
|
|
202
|
+
facets: {
|
|
203
|
+
assertiveness: number;
|
|
204
|
+
enthusiasm: number;
|
|
205
|
+
sociability: number;
|
|
206
|
+
initiative: number;
|
|
207
|
+
};
|
|
208
|
+
};
|
|
209
|
+
agreeableness: {
|
|
210
|
+
score: number;
|
|
211
|
+
facets: {
|
|
212
|
+
warmth: number;
|
|
213
|
+
empathy: number;
|
|
214
|
+
cooperation: number;
|
|
215
|
+
trust_tendency: number;
|
|
216
|
+
};
|
|
217
|
+
};
|
|
218
|
+
emotional_stability: {
|
|
219
|
+
score: number;
|
|
220
|
+
facets: {
|
|
221
|
+
stress_tolerance: number;
|
|
222
|
+
emotional_regulation: number;
|
|
223
|
+
confidence: number;
|
|
224
|
+
adaptability: number;
|
|
225
|
+
};
|
|
226
|
+
};
|
|
227
|
+
}, {
|
|
228
|
+
openness: {
|
|
229
|
+
score: number;
|
|
230
|
+
facets: {
|
|
231
|
+
imagination: number;
|
|
232
|
+
intellectual_curiosity: number;
|
|
233
|
+
aesthetic_sensitivity: number;
|
|
234
|
+
willingness_to_experiment: number;
|
|
235
|
+
};
|
|
236
|
+
};
|
|
237
|
+
conscientiousness: {
|
|
238
|
+
score: number;
|
|
239
|
+
facets: {
|
|
240
|
+
self_discipline: number;
|
|
241
|
+
orderliness: number;
|
|
242
|
+
goal_orientation: number;
|
|
243
|
+
attention_to_detail: number;
|
|
244
|
+
};
|
|
245
|
+
};
|
|
246
|
+
extraversion: {
|
|
247
|
+
score: number;
|
|
248
|
+
facets: {
|
|
249
|
+
assertiveness: number;
|
|
250
|
+
enthusiasm: number;
|
|
251
|
+
sociability: number;
|
|
252
|
+
initiative: number;
|
|
253
|
+
};
|
|
254
|
+
};
|
|
255
|
+
agreeableness: {
|
|
256
|
+
score: number;
|
|
257
|
+
facets: {
|
|
258
|
+
warmth: number;
|
|
259
|
+
empathy: number;
|
|
260
|
+
cooperation: number;
|
|
261
|
+
trust_tendency: number;
|
|
262
|
+
};
|
|
263
|
+
};
|
|
264
|
+
emotional_stability: {
|
|
265
|
+
score: number;
|
|
266
|
+
facets: {
|
|
267
|
+
stress_tolerance: number;
|
|
268
|
+
emotional_regulation: number;
|
|
269
|
+
confidence: number;
|
|
270
|
+
adaptability: number;
|
|
271
|
+
};
|
|
272
|
+
};
|
|
273
|
+
}>;
|
|
274
|
+
type BigFive = z.infer<typeof bigFiveSchema>;
|
|
275
|
+
declare const attachmentStyleSchema: z.ZodEnum<["secure", "anxious", "avoidant", "disorganized"]>;
|
|
276
|
+
type AttachmentStyle = z.infer<typeof attachmentStyleSchema>;
|
|
277
|
+
declare const learningOrientationSchema: z.ZodEnum<["growth", "fixed", "mixed"]>;
|
|
278
|
+
type LearningOrientation = z.infer<typeof learningOrientationSchema>;
|
|
279
|
+
declare const therapyDimensionsSchema: z.ZodObject<{
|
|
280
|
+
self_awareness: z.ZodNumber;
|
|
281
|
+
distress_tolerance: z.ZodNumber;
|
|
282
|
+
attachment_style: z.ZodEnum<["secure", "anxious", "avoidant", "disorganized"]>;
|
|
283
|
+
learning_orientation: z.ZodEnum<["growth", "fixed", "mixed"]>;
|
|
284
|
+
boundary_awareness: z.ZodNumber;
|
|
285
|
+
interpersonal_sensitivity: z.ZodNumber;
|
|
286
|
+
}, "strip", z.ZodTypeAny, {
|
|
287
|
+
self_awareness: number;
|
|
288
|
+
distress_tolerance: number;
|
|
289
|
+
attachment_style: "secure" | "anxious" | "avoidant" | "disorganized";
|
|
290
|
+
learning_orientation: "growth" | "fixed" | "mixed";
|
|
291
|
+
boundary_awareness: number;
|
|
292
|
+
interpersonal_sensitivity: number;
|
|
293
|
+
}, {
|
|
294
|
+
self_awareness: number;
|
|
295
|
+
distress_tolerance: number;
|
|
296
|
+
attachment_style: "secure" | "anxious" | "avoidant" | "disorganized";
|
|
297
|
+
learning_orientation: "growth" | "fixed" | "mixed";
|
|
298
|
+
boundary_awareness: number;
|
|
299
|
+
interpersonal_sensitivity: number;
|
|
300
|
+
}>;
|
|
301
|
+
type TherapyDimensions = z.infer<typeof therapyDimensionsSchema>;
|
|
302
|
+
declare const communicationSchema: z.ZodObject<{
|
|
303
|
+
register: z.ZodDefault<z.ZodEnum<["casual_professional", "formal", "conversational", "adaptive"]>>;
|
|
304
|
+
output_format: z.ZodDefault<z.ZodEnum<["prose", "bullets", "mixed", "structured"]>>;
|
|
305
|
+
emoji_policy: z.ZodDefault<z.ZodEnum<["never", "sparingly", "freely"]>>;
|
|
306
|
+
reasoning_transparency: z.ZodDefault<z.ZodEnum<["hidden", "on_request", "always"]>>;
|
|
307
|
+
conflict_approach: z.ZodDefault<z.ZodEnum<["direct_but_kind", "curious_first", "supportive_then_honest", "diplomatic"]>>;
|
|
308
|
+
uncertainty_handling: z.ZodDefault<z.ZodEnum<["transparent", "confident_transparency", "minimize", "reframe"]>>;
|
|
309
|
+
}, "strip", z.ZodTypeAny, {
|
|
310
|
+
register: "casual_professional" | "formal" | "conversational" | "adaptive";
|
|
311
|
+
output_format: "mixed" | "prose" | "bullets" | "structured";
|
|
312
|
+
emoji_policy: "never" | "sparingly" | "freely";
|
|
313
|
+
reasoning_transparency: "hidden" | "on_request" | "always";
|
|
314
|
+
conflict_approach: "direct_but_kind" | "curious_first" | "supportive_then_honest" | "diplomatic";
|
|
315
|
+
uncertainty_handling: "transparent" | "confident_transparency" | "minimize" | "reframe";
|
|
316
|
+
}, {
|
|
317
|
+
register?: "casual_professional" | "formal" | "conversational" | "adaptive" | undefined;
|
|
318
|
+
output_format?: "mixed" | "prose" | "bullets" | "structured" | undefined;
|
|
319
|
+
emoji_policy?: "never" | "sparingly" | "freely" | undefined;
|
|
320
|
+
reasoning_transparency?: "hidden" | "on_request" | "always" | undefined;
|
|
321
|
+
conflict_approach?: "direct_but_kind" | "curious_first" | "supportive_then_honest" | "diplomatic" | undefined;
|
|
322
|
+
uncertainty_handling?: "transparent" | "confident_transparency" | "minimize" | "reframe" | undefined;
|
|
323
|
+
}>;
|
|
324
|
+
type Communication = z.infer<typeof communicationSchema>;
|
|
325
|
+
declare const domainSchema: z.ZodObject<{
|
|
326
|
+
expertise: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
327
|
+
boundaries: z.ZodDefault<z.ZodObject<{
|
|
328
|
+
refuses: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
329
|
+
escalation_triggers: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
330
|
+
hard_limits: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
331
|
+
}, "strip", z.ZodTypeAny, {
|
|
332
|
+
refuses: string[];
|
|
333
|
+
escalation_triggers: string[];
|
|
334
|
+
hard_limits: string[];
|
|
335
|
+
}, {
|
|
336
|
+
refuses?: string[] | undefined;
|
|
337
|
+
escalation_triggers?: string[] | undefined;
|
|
338
|
+
hard_limits?: string[] | undefined;
|
|
339
|
+
}>>;
|
|
340
|
+
}, "strip", z.ZodTypeAny, {
|
|
341
|
+
expertise: string[];
|
|
342
|
+
boundaries: {
|
|
343
|
+
refuses: string[];
|
|
344
|
+
escalation_triggers: string[];
|
|
345
|
+
hard_limits: string[];
|
|
346
|
+
};
|
|
347
|
+
}, {
|
|
348
|
+
expertise?: string[] | undefined;
|
|
349
|
+
boundaries?: {
|
|
350
|
+
refuses?: string[] | undefined;
|
|
351
|
+
escalation_triggers?: string[] | undefined;
|
|
352
|
+
hard_limits?: string[] | undefined;
|
|
353
|
+
} | undefined;
|
|
354
|
+
}>;
|
|
355
|
+
type Domain = z.infer<typeof domainSchema>;
|
|
356
|
+
declare const growthAreaSchema: z.ZodObject<{
|
|
357
|
+
area: z.ZodString;
|
|
358
|
+
severity: z.ZodEnum<["mild", "moderate", "significant"]>;
|
|
359
|
+
first_detected: z.ZodOptional<z.ZodString>;
|
|
360
|
+
session_count: z.ZodDefault<z.ZodNumber>;
|
|
361
|
+
resolved: z.ZodDefault<z.ZodBoolean>;
|
|
362
|
+
}, "strip", z.ZodTypeAny, {
|
|
363
|
+
area: string;
|
|
364
|
+
severity: "mild" | "moderate" | "significant";
|
|
365
|
+
session_count: number;
|
|
366
|
+
resolved: boolean;
|
|
367
|
+
first_detected?: string | undefined;
|
|
368
|
+
}, {
|
|
369
|
+
area: string;
|
|
370
|
+
severity: "mild" | "moderate" | "significant";
|
|
371
|
+
first_detected?: string | undefined;
|
|
372
|
+
session_count?: number | undefined;
|
|
373
|
+
resolved?: boolean | undefined;
|
|
374
|
+
}>;
|
|
375
|
+
type GrowthArea = z.infer<typeof growthAreaSchema>;
|
|
376
|
+
declare const growthSchema: z.ZodObject<{
|
|
377
|
+
areas: z.ZodDefault<z.ZodUnion<[z.ZodArray<z.ZodString, "many">, z.ZodArray<z.ZodObject<{
|
|
378
|
+
area: z.ZodString;
|
|
379
|
+
severity: z.ZodEnum<["mild", "moderate", "significant"]>;
|
|
380
|
+
first_detected: z.ZodOptional<z.ZodString>;
|
|
381
|
+
session_count: z.ZodDefault<z.ZodNumber>;
|
|
382
|
+
resolved: z.ZodDefault<z.ZodBoolean>;
|
|
383
|
+
}, "strip", z.ZodTypeAny, {
|
|
384
|
+
area: string;
|
|
385
|
+
severity: "mild" | "moderate" | "significant";
|
|
386
|
+
session_count: number;
|
|
387
|
+
resolved: boolean;
|
|
388
|
+
first_detected?: string | undefined;
|
|
389
|
+
}, {
|
|
390
|
+
area: string;
|
|
391
|
+
severity: "mild" | "moderate" | "significant";
|
|
392
|
+
first_detected?: string | undefined;
|
|
393
|
+
session_count?: number | undefined;
|
|
394
|
+
resolved?: boolean | undefined;
|
|
395
|
+
}>, "many">]>>;
|
|
396
|
+
patterns_to_watch: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
397
|
+
strengths: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
398
|
+
}, "strip", z.ZodTypeAny, {
|
|
399
|
+
areas: string[] | {
|
|
400
|
+
area: string;
|
|
401
|
+
severity: "mild" | "moderate" | "significant";
|
|
402
|
+
session_count: number;
|
|
403
|
+
resolved: boolean;
|
|
404
|
+
first_detected?: string | undefined;
|
|
405
|
+
}[];
|
|
406
|
+
patterns_to_watch: string[];
|
|
407
|
+
strengths: string[];
|
|
408
|
+
}, {
|
|
409
|
+
areas?: string[] | {
|
|
410
|
+
area: string;
|
|
411
|
+
severity: "mild" | "moderate" | "significant";
|
|
412
|
+
first_detected?: string | undefined;
|
|
413
|
+
session_count?: number | undefined;
|
|
414
|
+
resolved?: boolean | undefined;
|
|
415
|
+
}[] | undefined;
|
|
416
|
+
patterns_to_watch?: string[] | undefined;
|
|
417
|
+
strengths?: string[] | undefined;
|
|
418
|
+
}>;
|
|
419
|
+
type Growth = z.infer<typeof growthSchema>;
|
|
420
|
+
declare const providerSchema: z.ZodEnum<["anthropic", "openai", "gemini", "ollama"]>;
|
|
421
|
+
type Provider = z.infer<typeof providerSchema>;
|
|
422
|
+
declare const surfaceSchema: z.ZodEnum<["chat", "email", "code_review", "slack", "api"]>;
|
|
423
|
+
type Surface = z.infer<typeof surfaceSchema>;
|
|
424
|
+
declare const personalitySpecSchema: z.ZodObject<{
|
|
425
|
+
$schema: z.ZodOptional<z.ZodString>;
|
|
426
|
+
extends: z.ZodOptional<z.ZodString>;
|
|
427
|
+
version: z.ZodLiteral<"2.0">;
|
|
428
|
+
name: z.ZodString;
|
|
429
|
+
handle: z.ZodString;
|
|
430
|
+
purpose: z.ZodOptional<z.ZodString>;
|
|
431
|
+
big_five: z.ZodObject<{
|
|
432
|
+
openness: z.ZodObject<{
|
|
433
|
+
score: z.ZodNumber;
|
|
434
|
+
facets: z.ZodObject<{
|
|
435
|
+
imagination: z.ZodNumber;
|
|
436
|
+
intellectual_curiosity: z.ZodNumber;
|
|
437
|
+
aesthetic_sensitivity: z.ZodNumber;
|
|
438
|
+
willingness_to_experiment: z.ZodNumber;
|
|
439
|
+
}, "strip", z.ZodTypeAny, {
|
|
440
|
+
imagination: number;
|
|
441
|
+
intellectual_curiosity: number;
|
|
442
|
+
aesthetic_sensitivity: number;
|
|
443
|
+
willingness_to_experiment: number;
|
|
444
|
+
}, {
|
|
445
|
+
imagination: number;
|
|
446
|
+
intellectual_curiosity: number;
|
|
447
|
+
aesthetic_sensitivity: number;
|
|
448
|
+
willingness_to_experiment: number;
|
|
449
|
+
}>;
|
|
450
|
+
}, "strip", z.ZodTypeAny, {
|
|
451
|
+
score: number;
|
|
452
|
+
facets: {
|
|
453
|
+
imagination: number;
|
|
454
|
+
intellectual_curiosity: number;
|
|
455
|
+
aesthetic_sensitivity: number;
|
|
456
|
+
willingness_to_experiment: number;
|
|
457
|
+
};
|
|
458
|
+
}, {
|
|
459
|
+
score: number;
|
|
460
|
+
facets: {
|
|
461
|
+
imagination: number;
|
|
462
|
+
intellectual_curiosity: number;
|
|
463
|
+
aesthetic_sensitivity: number;
|
|
464
|
+
willingness_to_experiment: number;
|
|
465
|
+
};
|
|
466
|
+
}>;
|
|
467
|
+
conscientiousness: z.ZodObject<{
|
|
468
|
+
score: z.ZodNumber;
|
|
469
|
+
facets: z.ZodObject<{
|
|
470
|
+
self_discipline: z.ZodNumber;
|
|
471
|
+
orderliness: z.ZodNumber;
|
|
472
|
+
goal_orientation: z.ZodNumber;
|
|
473
|
+
attention_to_detail: z.ZodNumber;
|
|
474
|
+
}, "strip", z.ZodTypeAny, {
|
|
475
|
+
self_discipline: number;
|
|
476
|
+
orderliness: number;
|
|
477
|
+
goal_orientation: number;
|
|
478
|
+
attention_to_detail: number;
|
|
479
|
+
}, {
|
|
480
|
+
self_discipline: number;
|
|
481
|
+
orderliness: number;
|
|
482
|
+
goal_orientation: number;
|
|
483
|
+
attention_to_detail: number;
|
|
484
|
+
}>;
|
|
485
|
+
}, "strip", z.ZodTypeAny, {
|
|
486
|
+
score: number;
|
|
487
|
+
facets: {
|
|
488
|
+
self_discipline: number;
|
|
489
|
+
orderliness: number;
|
|
490
|
+
goal_orientation: number;
|
|
491
|
+
attention_to_detail: number;
|
|
492
|
+
};
|
|
493
|
+
}, {
|
|
494
|
+
score: number;
|
|
495
|
+
facets: {
|
|
496
|
+
self_discipline: number;
|
|
497
|
+
orderliness: number;
|
|
498
|
+
goal_orientation: number;
|
|
499
|
+
attention_to_detail: number;
|
|
500
|
+
};
|
|
501
|
+
}>;
|
|
502
|
+
extraversion: z.ZodObject<{
|
|
503
|
+
score: z.ZodNumber;
|
|
504
|
+
facets: z.ZodObject<{
|
|
505
|
+
assertiveness: z.ZodNumber;
|
|
506
|
+
enthusiasm: z.ZodNumber;
|
|
507
|
+
sociability: z.ZodNumber;
|
|
508
|
+
initiative: z.ZodNumber;
|
|
509
|
+
}, "strip", z.ZodTypeAny, {
|
|
510
|
+
assertiveness: number;
|
|
511
|
+
enthusiasm: number;
|
|
512
|
+
sociability: number;
|
|
513
|
+
initiative: number;
|
|
514
|
+
}, {
|
|
515
|
+
assertiveness: number;
|
|
516
|
+
enthusiasm: number;
|
|
517
|
+
sociability: number;
|
|
518
|
+
initiative: number;
|
|
519
|
+
}>;
|
|
520
|
+
}, "strip", z.ZodTypeAny, {
|
|
521
|
+
score: number;
|
|
522
|
+
facets: {
|
|
523
|
+
assertiveness: number;
|
|
524
|
+
enthusiasm: number;
|
|
525
|
+
sociability: number;
|
|
526
|
+
initiative: number;
|
|
527
|
+
};
|
|
528
|
+
}, {
|
|
529
|
+
score: number;
|
|
530
|
+
facets: {
|
|
531
|
+
assertiveness: number;
|
|
532
|
+
enthusiasm: number;
|
|
533
|
+
sociability: number;
|
|
534
|
+
initiative: number;
|
|
535
|
+
};
|
|
536
|
+
}>;
|
|
537
|
+
agreeableness: z.ZodObject<{
|
|
538
|
+
score: z.ZodNumber;
|
|
539
|
+
facets: z.ZodObject<{
|
|
540
|
+
warmth: z.ZodNumber;
|
|
541
|
+
empathy: z.ZodNumber;
|
|
542
|
+
cooperation: z.ZodNumber;
|
|
543
|
+
trust_tendency: z.ZodNumber;
|
|
544
|
+
}, "strip", z.ZodTypeAny, {
|
|
545
|
+
warmth: number;
|
|
546
|
+
empathy: number;
|
|
547
|
+
cooperation: number;
|
|
548
|
+
trust_tendency: number;
|
|
549
|
+
}, {
|
|
550
|
+
warmth: number;
|
|
551
|
+
empathy: number;
|
|
552
|
+
cooperation: number;
|
|
553
|
+
trust_tendency: number;
|
|
554
|
+
}>;
|
|
555
|
+
}, "strip", z.ZodTypeAny, {
|
|
556
|
+
score: number;
|
|
557
|
+
facets: {
|
|
558
|
+
warmth: number;
|
|
559
|
+
empathy: number;
|
|
560
|
+
cooperation: number;
|
|
561
|
+
trust_tendency: number;
|
|
562
|
+
};
|
|
563
|
+
}, {
|
|
564
|
+
score: number;
|
|
565
|
+
facets: {
|
|
566
|
+
warmth: number;
|
|
567
|
+
empathy: number;
|
|
568
|
+
cooperation: number;
|
|
569
|
+
trust_tendency: number;
|
|
570
|
+
};
|
|
571
|
+
}>;
|
|
572
|
+
emotional_stability: z.ZodObject<{
|
|
573
|
+
score: z.ZodNumber;
|
|
574
|
+
facets: z.ZodObject<{
|
|
575
|
+
stress_tolerance: z.ZodNumber;
|
|
576
|
+
emotional_regulation: z.ZodNumber;
|
|
577
|
+
confidence: z.ZodNumber;
|
|
578
|
+
adaptability: z.ZodNumber;
|
|
579
|
+
}, "strip", z.ZodTypeAny, {
|
|
580
|
+
stress_tolerance: number;
|
|
581
|
+
emotional_regulation: number;
|
|
582
|
+
confidence: number;
|
|
583
|
+
adaptability: number;
|
|
584
|
+
}, {
|
|
585
|
+
stress_tolerance: number;
|
|
586
|
+
emotional_regulation: number;
|
|
587
|
+
confidence: number;
|
|
588
|
+
adaptability: number;
|
|
589
|
+
}>;
|
|
590
|
+
}, "strip", z.ZodTypeAny, {
|
|
591
|
+
score: number;
|
|
592
|
+
facets: {
|
|
593
|
+
stress_tolerance: number;
|
|
594
|
+
emotional_regulation: number;
|
|
595
|
+
confidence: number;
|
|
596
|
+
adaptability: number;
|
|
597
|
+
};
|
|
598
|
+
}, {
|
|
599
|
+
score: number;
|
|
600
|
+
facets: {
|
|
601
|
+
stress_tolerance: number;
|
|
602
|
+
emotional_regulation: number;
|
|
603
|
+
confidence: number;
|
|
604
|
+
adaptability: number;
|
|
605
|
+
};
|
|
606
|
+
}>;
|
|
607
|
+
}, "strip", z.ZodTypeAny, {
|
|
608
|
+
openness: {
|
|
609
|
+
score: number;
|
|
610
|
+
facets: {
|
|
611
|
+
imagination: number;
|
|
612
|
+
intellectual_curiosity: number;
|
|
613
|
+
aesthetic_sensitivity: number;
|
|
614
|
+
willingness_to_experiment: number;
|
|
615
|
+
};
|
|
616
|
+
};
|
|
617
|
+
conscientiousness: {
|
|
618
|
+
score: number;
|
|
619
|
+
facets: {
|
|
620
|
+
self_discipline: number;
|
|
621
|
+
orderliness: number;
|
|
622
|
+
goal_orientation: number;
|
|
623
|
+
attention_to_detail: number;
|
|
624
|
+
};
|
|
625
|
+
};
|
|
626
|
+
extraversion: {
|
|
627
|
+
score: number;
|
|
628
|
+
facets: {
|
|
629
|
+
assertiveness: number;
|
|
630
|
+
enthusiasm: number;
|
|
631
|
+
sociability: number;
|
|
632
|
+
initiative: number;
|
|
633
|
+
};
|
|
634
|
+
};
|
|
635
|
+
agreeableness: {
|
|
636
|
+
score: number;
|
|
637
|
+
facets: {
|
|
638
|
+
warmth: number;
|
|
639
|
+
empathy: number;
|
|
640
|
+
cooperation: number;
|
|
641
|
+
trust_tendency: number;
|
|
642
|
+
};
|
|
643
|
+
};
|
|
644
|
+
emotional_stability: {
|
|
645
|
+
score: number;
|
|
646
|
+
facets: {
|
|
647
|
+
stress_tolerance: number;
|
|
648
|
+
emotional_regulation: number;
|
|
649
|
+
confidence: number;
|
|
650
|
+
adaptability: number;
|
|
651
|
+
};
|
|
652
|
+
};
|
|
653
|
+
}, {
|
|
654
|
+
openness: {
|
|
655
|
+
score: number;
|
|
656
|
+
facets: {
|
|
657
|
+
imagination: number;
|
|
658
|
+
intellectual_curiosity: number;
|
|
659
|
+
aesthetic_sensitivity: number;
|
|
660
|
+
willingness_to_experiment: number;
|
|
661
|
+
};
|
|
662
|
+
};
|
|
663
|
+
conscientiousness: {
|
|
664
|
+
score: number;
|
|
665
|
+
facets: {
|
|
666
|
+
self_discipline: number;
|
|
667
|
+
orderliness: number;
|
|
668
|
+
goal_orientation: number;
|
|
669
|
+
attention_to_detail: number;
|
|
670
|
+
};
|
|
671
|
+
};
|
|
672
|
+
extraversion: {
|
|
673
|
+
score: number;
|
|
674
|
+
facets: {
|
|
675
|
+
assertiveness: number;
|
|
676
|
+
enthusiasm: number;
|
|
677
|
+
sociability: number;
|
|
678
|
+
initiative: number;
|
|
679
|
+
};
|
|
680
|
+
};
|
|
681
|
+
agreeableness: {
|
|
682
|
+
score: number;
|
|
683
|
+
facets: {
|
|
684
|
+
warmth: number;
|
|
685
|
+
empathy: number;
|
|
686
|
+
cooperation: number;
|
|
687
|
+
trust_tendency: number;
|
|
688
|
+
};
|
|
689
|
+
};
|
|
690
|
+
emotional_stability: {
|
|
691
|
+
score: number;
|
|
692
|
+
facets: {
|
|
693
|
+
stress_tolerance: number;
|
|
694
|
+
emotional_regulation: number;
|
|
695
|
+
confidence: number;
|
|
696
|
+
adaptability: number;
|
|
697
|
+
};
|
|
698
|
+
};
|
|
699
|
+
}>;
|
|
700
|
+
therapy_dimensions: z.ZodObject<{
|
|
701
|
+
self_awareness: z.ZodNumber;
|
|
702
|
+
distress_tolerance: z.ZodNumber;
|
|
703
|
+
attachment_style: z.ZodEnum<["secure", "anxious", "avoidant", "disorganized"]>;
|
|
704
|
+
learning_orientation: z.ZodEnum<["growth", "fixed", "mixed"]>;
|
|
705
|
+
boundary_awareness: z.ZodNumber;
|
|
706
|
+
interpersonal_sensitivity: z.ZodNumber;
|
|
707
|
+
}, "strip", z.ZodTypeAny, {
|
|
708
|
+
self_awareness: number;
|
|
709
|
+
distress_tolerance: number;
|
|
710
|
+
attachment_style: "secure" | "anxious" | "avoidant" | "disorganized";
|
|
711
|
+
learning_orientation: "growth" | "fixed" | "mixed";
|
|
712
|
+
boundary_awareness: number;
|
|
713
|
+
interpersonal_sensitivity: number;
|
|
714
|
+
}, {
|
|
715
|
+
self_awareness: number;
|
|
716
|
+
distress_tolerance: number;
|
|
717
|
+
attachment_style: "secure" | "anxious" | "avoidant" | "disorganized";
|
|
718
|
+
learning_orientation: "growth" | "fixed" | "mixed";
|
|
719
|
+
boundary_awareness: number;
|
|
720
|
+
interpersonal_sensitivity: number;
|
|
721
|
+
}>;
|
|
722
|
+
communication: z.ZodDefault<z.ZodObject<{
|
|
723
|
+
register: z.ZodDefault<z.ZodEnum<["casual_professional", "formal", "conversational", "adaptive"]>>;
|
|
724
|
+
output_format: z.ZodDefault<z.ZodEnum<["prose", "bullets", "mixed", "structured"]>>;
|
|
725
|
+
emoji_policy: z.ZodDefault<z.ZodEnum<["never", "sparingly", "freely"]>>;
|
|
726
|
+
reasoning_transparency: z.ZodDefault<z.ZodEnum<["hidden", "on_request", "always"]>>;
|
|
727
|
+
conflict_approach: z.ZodDefault<z.ZodEnum<["direct_but_kind", "curious_first", "supportive_then_honest", "diplomatic"]>>;
|
|
728
|
+
uncertainty_handling: z.ZodDefault<z.ZodEnum<["transparent", "confident_transparency", "minimize", "reframe"]>>;
|
|
729
|
+
}, "strip", z.ZodTypeAny, {
|
|
730
|
+
register: "casual_professional" | "formal" | "conversational" | "adaptive";
|
|
731
|
+
output_format: "mixed" | "prose" | "bullets" | "structured";
|
|
732
|
+
emoji_policy: "never" | "sparingly" | "freely";
|
|
733
|
+
reasoning_transparency: "hidden" | "on_request" | "always";
|
|
734
|
+
conflict_approach: "direct_but_kind" | "curious_first" | "supportive_then_honest" | "diplomatic";
|
|
735
|
+
uncertainty_handling: "transparent" | "confident_transparency" | "minimize" | "reframe";
|
|
736
|
+
}, {
|
|
737
|
+
register?: "casual_professional" | "formal" | "conversational" | "adaptive" | undefined;
|
|
738
|
+
output_format?: "mixed" | "prose" | "bullets" | "structured" | undefined;
|
|
739
|
+
emoji_policy?: "never" | "sparingly" | "freely" | undefined;
|
|
740
|
+
reasoning_transparency?: "hidden" | "on_request" | "always" | undefined;
|
|
741
|
+
conflict_approach?: "direct_but_kind" | "curious_first" | "supportive_then_honest" | "diplomatic" | undefined;
|
|
742
|
+
uncertainty_handling?: "transparent" | "confident_transparency" | "minimize" | "reframe" | undefined;
|
|
743
|
+
}>>;
|
|
744
|
+
domain: z.ZodDefault<z.ZodObject<{
|
|
745
|
+
expertise: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
746
|
+
boundaries: z.ZodDefault<z.ZodObject<{
|
|
747
|
+
refuses: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
748
|
+
escalation_triggers: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
749
|
+
hard_limits: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
750
|
+
}, "strip", z.ZodTypeAny, {
|
|
751
|
+
refuses: string[];
|
|
752
|
+
escalation_triggers: string[];
|
|
753
|
+
hard_limits: string[];
|
|
754
|
+
}, {
|
|
755
|
+
refuses?: string[] | undefined;
|
|
756
|
+
escalation_triggers?: string[] | undefined;
|
|
757
|
+
hard_limits?: string[] | undefined;
|
|
758
|
+
}>>;
|
|
759
|
+
}, "strip", z.ZodTypeAny, {
|
|
760
|
+
expertise: string[];
|
|
761
|
+
boundaries: {
|
|
762
|
+
refuses: string[];
|
|
763
|
+
escalation_triggers: string[];
|
|
764
|
+
hard_limits: string[];
|
|
765
|
+
};
|
|
766
|
+
}, {
|
|
767
|
+
expertise?: string[] | undefined;
|
|
768
|
+
boundaries?: {
|
|
769
|
+
refuses?: string[] | undefined;
|
|
770
|
+
escalation_triggers?: string[] | undefined;
|
|
771
|
+
hard_limits?: string[] | undefined;
|
|
772
|
+
} | undefined;
|
|
773
|
+
}>>;
|
|
774
|
+
growth: z.ZodDefault<z.ZodObject<{
|
|
775
|
+
areas: z.ZodDefault<z.ZodUnion<[z.ZodArray<z.ZodString, "many">, z.ZodArray<z.ZodObject<{
|
|
776
|
+
area: z.ZodString;
|
|
777
|
+
severity: z.ZodEnum<["mild", "moderate", "significant"]>;
|
|
778
|
+
first_detected: z.ZodOptional<z.ZodString>;
|
|
779
|
+
session_count: z.ZodDefault<z.ZodNumber>;
|
|
780
|
+
resolved: z.ZodDefault<z.ZodBoolean>;
|
|
781
|
+
}, "strip", z.ZodTypeAny, {
|
|
782
|
+
area: string;
|
|
783
|
+
severity: "mild" | "moderate" | "significant";
|
|
784
|
+
session_count: number;
|
|
785
|
+
resolved: boolean;
|
|
786
|
+
first_detected?: string | undefined;
|
|
787
|
+
}, {
|
|
788
|
+
area: string;
|
|
789
|
+
severity: "mild" | "moderate" | "significant";
|
|
790
|
+
first_detected?: string | undefined;
|
|
791
|
+
session_count?: number | undefined;
|
|
792
|
+
resolved?: boolean | undefined;
|
|
793
|
+
}>, "many">]>>;
|
|
794
|
+
patterns_to_watch: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
795
|
+
strengths: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
796
|
+
}, "strip", z.ZodTypeAny, {
|
|
797
|
+
areas: string[] | {
|
|
798
|
+
area: string;
|
|
799
|
+
severity: "mild" | "moderate" | "significant";
|
|
800
|
+
session_count: number;
|
|
801
|
+
resolved: boolean;
|
|
802
|
+
first_detected?: string | undefined;
|
|
803
|
+
}[];
|
|
804
|
+
patterns_to_watch: string[];
|
|
805
|
+
strengths: string[];
|
|
806
|
+
}, {
|
|
807
|
+
areas?: string[] | {
|
|
808
|
+
area: string;
|
|
809
|
+
severity: "mild" | "moderate" | "significant";
|
|
810
|
+
first_detected?: string | undefined;
|
|
811
|
+
session_count?: number | undefined;
|
|
812
|
+
resolved?: boolean | undefined;
|
|
813
|
+
}[] | undefined;
|
|
814
|
+
patterns_to_watch?: string[] | undefined;
|
|
815
|
+
strengths?: string[] | undefined;
|
|
816
|
+
}>>;
|
|
817
|
+
}, "strip", z.ZodTypeAny, {
|
|
818
|
+
growth: {
|
|
819
|
+
areas: string[] | {
|
|
820
|
+
area: string;
|
|
821
|
+
severity: "mild" | "moderate" | "significant";
|
|
822
|
+
session_count: number;
|
|
823
|
+
resolved: boolean;
|
|
824
|
+
first_detected?: string | undefined;
|
|
825
|
+
}[];
|
|
826
|
+
patterns_to_watch: string[];
|
|
827
|
+
strengths: string[];
|
|
828
|
+
};
|
|
829
|
+
version: "2.0";
|
|
830
|
+
name: string;
|
|
831
|
+
handle: string;
|
|
832
|
+
big_five: {
|
|
833
|
+
openness: {
|
|
834
|
+
score: number;
|
|
835
|
+
facets: {
|
|
836
|
+
imagination: number;
|
|
837
|
+
intellectual_curiosity: number;
|
|
838
|
+
aesthetic_sensitivity: number;
|
|
839
|
+
willingness_to_experiment: number;
|
|
840
|
+
};
|
|
841
|
+
};
|
|
842
|
+
conscientiousness: {
|
|
843
|
+
score: number;
|
|
844
|
+
facets: {
|
|
845
|
+
self_discipline: number;
|
|
846
|
+
orderliness: number;
|
|
847
|
+
goal_orientation: number;
|
|
848
|
+
attention_to_detail: number;
|
|
849
|
+
};
|
|
850
|
+
};
|
|
851
|
+
extraversion: {
|
|
852
|
+
score: number;
|
|
853
|
+
facets: {
|
|
854
|
+
assertiveness: number;
|
|
855
|
+
enthusiasm: number;
|
|
856
|
+
sociability: number;
|
|
857
|
+
initiative: number;
|
|
858
|
+
};
|
|
859
|
+
};
|
|
860
|
+
agreeableness: {
|
|
861
|
+
score: number;
|
|
862
|
+
facets: {
|
|
863
|
+
warmth: number;
|
|
864
|
+
empathy: number;
|
|
865
|
+
cooperation: number;
|
|
866
|
+
trust_tendency: number;
|
|
867
|
+
};
|
|
868
|
+
};
|
|
869
|
+
emotional_stability: {
|
|
870
|
+
score: number;
|
|
871
|
+
facets: {
|
|
872
|
+
stress_tolerance: number;
|
|
873
|
+
emotional_regulation: number;
|
|
874
|
+
confidence: number;
|
|
875
|
+
adaptability: number;
|
|
876
|
+
};
|
|
877
|
+
};
|
|
878
|
+
};
|
|
879
|
+
therapy_dimensions: {
|
|
880
|
+
self_awareness: number;
|
|
881
|
+
distress_tolerance: number;
|
|
882
|
+
attachment_style: "secure" | "anxious" | "avoidant" | "disorganized";
|
|
883
|
+
learning_orientation: "growth" | "fixed" | "mixed";
|
|
884
|
+
boundary_awareness: number;
|
|
885
|
+
interpersonal_sensitivity: number;
|
|
886
|
+
};
|
|
887
|
+
communication: {
|
|
888
|
+
register: "casual_professional" | "formal" | "conversational" | "adaptive";
|
|
889
|
+
output_format: "mixed" | "prose" | "bullets" | "structured";
|
|
890
|
+
emoji_policy: "never" | "sparingly" | "freely";
|
|
891
|
+
reasoning_transparency: "hidden" | "on_request" | "always";
|
|
892
|
+
conflict_approach: "direct_but_kind" | "curious_first" | "supportive_then_honest" | "diplomatic";
|
|
893
|
+
uncertainty_handling: "transparent" | "confident_transparency" | "minimize" | "reframe";
|
|
894
|
+
};
|
|
895
|
+
domain: {
|
|
896
|
+
expertise: string[];
|
|
897
|
+
boundaries: {
|
|
898
|
+
refuses: string[];
|
|
899
|
+
escalation_triggers: string[];
|
|
900
|
+
hard_limits: string[];
|
|
901
|
+
};
|
|
902
|
+
};
|
|
903
|
+
$schema?: string | undefined;
|
|
904
|
+
extends?: string | undefined;
|
|
905
|
+
purpose?: string | undefined;
|
|
906
|
+
}, {
|
|
907
|
+
version: "2.0";
|
|
908
|
+
name: string;
|
|
909
|
+
handle: string;
|
|
910
|
+
big_five: {
|
|
911
|
+
openness: {
|
|
912
|
+
score: number;
|
|
913
|
+
facets: {
|
|
914
|
+
imagination: number;
|
|
915
|
+
intellectual_curiosity: number;
|
|
916
|
+
aesthetic_sensitivity: number;
|
|
917
|
+
willingness_to_experiment: number;
|
|
918
|
+
};
|
|
919
|
+
};
|
|
920
|
+
conscientiousness: {
|
|
921
|
+
score: number;
|
|
922
|
+
facets: {
|
|
923
|
+
self_discipline: number;
|
|
924
|
+
orderliness: number;
|
|
925
|
+
goal_orientation: number;
|
|
926
|
+
attention_to_detail: number;
|
|
927
|
+
};
|
|
928
|
+
};
|
|
929
|
+
extraversion: {
|
|
930
|
+
score: number;
|
|
931
|
+
facets: {
|
|
932
|
+
assertiveness: number;
|
|
933
|
+
enthusiasm: number;
|
|
934
|
+
sociability: number;
|
|
935
|
+
initiative: number;
|
|
936
|
+
};
|
|
937
|
+
};
|
|
938
|
+
agreeableness: {
|
|
939
|
+
score: number;
|
|
940
|
+
facets: {
|
|
941
|
+
warmth: number;
|
|
942
|
+
empathy: number;
|
|
943
|
+
cooperation: number;
|
|
944
|
+
trust_tendency: number;
|
|
945
|
+
};
|
|
946
|
+
};
|
|
947
|
+
emotional_stability: {
|
|
948
|
+
score: number;
|
|
949
|
+
facets: {
|
|
950
|
+
stress_tolerance: number;
|
|
951
|
+
emotional_regulation: number;
|
|
952
|
+
confidence: number;
|
|
953
|
+
adaptability: number;
|
|
954
|
+
};
|
|
955
|
+
};
|
|
956
|
+
};
|
|
957
|
+
therapy_dimensions: {
|
|
958
|
+
self_awareness: number;
|
|
959
|
+
distress_tolerance: number;
|
|
960
|
+
attachment_style: "secure" | "anxious" | "avoidant" | "disorganized";
|
|
961
|
+
learning_orientation: "growth" | "fixed" | "mixed";
|
|
962
|
+
boundary_awareness: number;
|
|
963
|
+
interpersonal_sensitivity: number;
|
|
964
|
+
};
|
|
965
|
+
growth?: {
|
|
966
|
+
areas?: string[] | {
|
|
967
|
+
area: string;
|
|
968
|
+
severity: "mild" | "moderate" | "significant";
|
|
969
|
+
first_detected?: string | undefined;
|
|
970
|
+
session_count?: number | undefined;
|
|
971
|
+
resolved?: boolean | undefined;
|
|
972
|
+
}[] | undefined;
|
|
973
|
+
patterns_to_watch?: string[] | undefined;
|
|
974
|
+
strengths?: string[] | undefined;
|
|
975
|
+
} | undefined;
|
|
976
|
+
$schema?: string | undefined;
|
|
977
|
+
extends?: string | undefined;
|
|
978
|
+
purpose?: string | undefined;
|
|
979
|
+
communication?: {
|
|
980
|
+
register?: "casual_professional" | "formal" | "conversational" | "adaptive" | undefined;
|
|
981
|
+
output_format?: "mixed" | "prose" | "bullets" | "structured" | undefined;
|
|
982
|
+
emoji_policy?: "never" | "sparingly" | "freely" | undefined;
|
|
983
|
+
reasoning_transparency?: "hidden" | "on_request" | "always" | undefined;
|
|
984
|
+
conflict_approach?: "direct_but_kind" | "curious_first" | "supportive_then_honest" | "diplomatic" | undefined;
|
|
985
|
+
uncertainty_handling?: "transparent" | "confident_transparency" | "minimize" | "reframe" | undefined;
|
|
986
|
+
} | undefined;
|
|
987
|
+
domain?: {
|
|
988
|
+
expertise?: string[] | undefined;
|
|
989
|
+
boundaries?: {
|
|
990
|
+
refuses?: string[] | undefined;
|
|
991
|
+
escalation_triggers?: string[] | undefined;
|
|
992
|
+
hard_limits?: string[] | undefined;
|
|
993
|
+
} | undefined;
|
|
994
|
+
} | undefined;
|
|
995
|
+
}>;
|
|
996
|
+
type PersonalitySpec = z.infer<typeof personalitySpecSchema>;
|
|
997
|
+
declare const compiledConfigSchema: z.ZodObject<{
|
|
998
|
+
provider: z.ZodEnum<["anthropic", "openai", "gemini", "ollama"]>;
|
|
999
|
+
surface: z.ZodEnum<["chat", "email", "code_review", "slack", "api"]>;
|
|
1000
|
+
system_prompt: z.ZodString;
|
|
1001
|
+
temperature: z.ZodNumber;
|
|
1002
|
+
top_p: z.ZodNumber;
|
|
1003
|
+
max_tokens: z.ZodNumber;
|
|
1004
|
+
metadata: z.ZodObject<{
|
|
1005
|
+
personality_hash: z.ZodString;
|
|
1006
|
+
compiled_at: z.ZodString;
|
|
1007
|
+
holomime_version: z.ZodString;
|
|
1008
|
+
}, "strip", z.ZodTypeAny, {
|
|
1009
|
+
personality_hash: string;
|
|
1010
|
+
compiled_at: string;
|
|
1011
|
+
holomime_version: string;
|
|
1012
|
+
}, {
|
|
1013
|
+
personality_hash: string;
|
|
1014
|
+
compiled_at: string;
|
|
1015
|
+
holomime_version: string;
|
|
1016
|
+
}>;
|
|
1017
|
+
}, "strip", z.ZodTypeAny, {
|
|
1018
|
+
provider: "anthropic" | "openai" | "gemini" | "ollama";
|
|
1019
|
+
surface: "chat" | "email" | "code_review" | "slack" | "api";
|
|
1020
|
+
system_prompt: string;
|
|
1021
|
+
temperature: number;
|
|
1022
|
+
top_p: number;
|
|
1023
|
+
max_tokens: number;
|
|
1024
|
+
metadata: {
|
|
1025
|
+
personality_hash: string;
|
|
1026
|
+
compiled_at: string;
|
|
1027
|
+
holomime_version: string;
|
|
1028
|
+
};
|
|
1029
|
+
}, {
|
|
1030
|
+
provider: "anthropic" | "openai" | "gemini" | "ollama";
|
|
1031
|
+
surface: "chat" | "email" | "code_review" | "slack" | "api";
|
|
1032
|
+
system_prompt: string;
|
|
1033
|
+
temperature: number;
|
|
1034
|
+
top_p: number;
|
|
1035
|
+
max_tokens: number;
|
|
1036
|
+
metadata: {
|
|
1037
|
+
personality_hash: string;
|
|
1038
|
+
compiled_at: string;
|
|
1039
|
+
holomime_version: string;
|
|
1040
|
+
};
|
|
1041
|
+
}>;
|
|
1042
|
+
type CompiledConfig = z.infer<typeof compiledConfigSchema>;
|
|
1043
|
+
declare const messageSchema: z.ZodObject<{
|
|
1044
|
+
role: z.ZodEnum<["user", "assistant", "system"]>;
|
|
1045
|
+
content: z.ZodString;
|
|
1046
|
+
timestamp: z.ZodOptional<z.ZodString>;
|
|
1047
|
+
}, "strip", z.ZodTypeAny, {
|
|
1048
|
+
role: "user" | "assistant" | "system";
|
|
1049
|
+
content: string;
|
|
1050
|
+
timestamp?: string | undefined;
|
|
1051
|
+
}, {
|
|
1052
|
+
role: "user" | "assistant" | "system";
|
|
1053
|
+
content: string;
|
|
1054
|
+
timestamp?: string | undefined;
|
|
1055
|
+
}>;
|
|
1056
|
+
type Message = z.infer<typeof messageSchema>;
|
|
1057
|
+
declare const conversationSchema: z.ZodObject<{
|
|
1058
|
+
id: z.ZodOptional<z.ZodString>;
|
|
1059
|
+
messages: z.ZodArray<z.ZodObject<{
|
|
1060
|
+
role: z.ZodEnum<["user", "assistant", "system"]>;
|
|
1061
|
+
content: z.ZodString;
|
|
1062
|
+
timestamp: z.ZodOptional<z.ZodString>;
|
|
1063
|
+
}, "strip", z.ZodTypeAny, {
|
|
1064
|
+
role: "user" | "assistant" | "system";
|
|
1065
|
+
content: string;
|
|
1066
|
+
timestamp?: string | undefined;
|
|
1067
|
+
}, {
|
|
1068
|
+
role: "user" | "assistant" | "system";
|
|
1069
|
+
content: string;
|
|
1070
|
+
timestamp?: string | undefined;
|
|
1071
|
+
}>, "many">;
|
|
1072
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1073
|
+
}, "strip", z.ZodTypeAny, {
|
|
1074
|
+
messages: {
|
|
1075
|
+
role: "user" | "assistant" | "system";
|
|
1076
|
+
content: string;
|
|
1077
|
+
timestamp?: string | undefined;
|
|
1078
|
+
}[];
|
|
1079
|
+
metadata?: Record<string, unknown> | undefined;
|
|
1080
|
+
id?: string | undefined;
|
|
1081
|
+
}, {
|
|
1082
|
+
messages: {
|
|
1083
|
+
role: "user" | "assistant" | "system";
|
|
1084
|
+
content: string;
|
|
1085
|
+
timestamp?: string | undefined;
|
|
1086
|
+
}[];
|
|
1087
|
+
metadata?: Record<string, unknown> | undefined;
|
|
1088
|
+
id?: string | undefined;
|
|
1089
|
+
}>;
|
|
1090
|
+
type Conversation = z.infer<typeof conversationSchema>;
|
|
1091
|
+
declare const conversationLogSchema: z.ZodUnion<[z.ZodObject<{
|
|
1092
|
+
id: z.ZodOptional<z.ZodString>;
|
|
1093
|
+
messages: z.ZodArray<z.ZodObject<{
|
|
1094
|
+
role: z.ZodEnum<["user", "assistant", "system"]>;
|
|
1095
|
+
content: z.ZodString;
|
|
1096
|
+
timestamp: z.ZodOptional<z.ZodString>;
|
|
1097
|
+
}, "strip", z.ZodTypeAny, {
|
|
1098
|
+
role: "user" | "assistant" | "system";
|
|
1099
|
+
content: string;
|
|
1100
|
+
timestamp?: string | undefined;
|
|
1101
|
+
}, {
|
|
1102
|
+
role: "user" | "assistant" | "system";
|
|
1103
|
+
content: string;
|
|
1104
|
+
timestamp?: string | undefined;
|
|
1105
|
+
}>, "many">;
|
|
1106
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1107
|
+
}, "strip", z.ZodTypeAny, {
|
|
1108
|
+
messages: {
|
|
1109
|
+
role: "user" | "assistant" | "system";
|
|
1110
|
+
content: string;
|
|
1111
|
+
timestamp?: string | undefined;
|
|
1112
|
+
}[];
|
|
1113
|
+
metadata?: Record<string, unknown> | undefined;
|
|
1114
|
+
id?: string | undefined;
|
|
1115
|
+
}, {
|
|
1116
|
+
messages: {
|
|
1117
|
+
role: "user" | "assistant" | "system";
|
|
1118
|
+
content: string;
|
|
1119
|
+
timestamp?: string | undefined;
|
|
1120
|
+
}[];
|
|
1121
|
+
metadata?: Record<string, unknown> | undefined;
|
|
1122
|
+
id?: string | undefined;
|
|
1123
|
+
}>, z.ZodArray<z.ZodObject<{
|
|
1124
|
+
id: z.ZodOptional<z.ZodString>;
|
|
1125
|
+
messages: z.ZodArray<z.ZodObject<{
|
|
1126
|
+
role: z.ZodEnum<["user", "assistant", "system"]>;
|
|
1127
|
+
content: z.ZodString;
|
|
1128
|
+
timestamp: z.ZodOptional<z.ZodString>;
|
|
1129
|
+
}, "strip", z.ZodTypeAny, {
|
|
1130
|
+
role: "user" | "assistant" | "system";
|
|
1131
|
+
content: string;
|
|
1132
|
+
timestamp?: string | undefined;
|
|
1133
|
+
}, {
|
|
1134
|
+
role: "user" | "assistant" | "system";
|
|
1135
|
+
content: string;
|
|
1136
|
+
timestamp?: string | undefined;
|
|
1137
|
+
}>, "many">;
|
|
1138
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1139
|
+
}, "strip", z.ZodTypeAny, {
|
|
1140
|
+
messages: {
|
|
1141
|
+
role: "user" | "assistant" | "system";
|
|
1142
|
+
content: string;
|
|
1143
|
+
timestamp?: string | undefined;
|
|
1144
|
+
}[];
|
|
1145
|
+
metadata?: Record<string, unknown> | undefined;
|
|
1146
|
+
id?: string | undefined;
|
|
1147
|
+
}, {
|
|
1148
|
+
messages: {
|
|
1149
|
+
role: "user" | "assistant" | "system";
|
|
1150
|
+
content: string;
|
|
1151
|
+
timestamp?: string | undefined;
|
|
1152
|
+
}[];
|
|
1153
|
+
metadata?: Record<string, unknown> | undefined;
|
|
1154
|
+
id?: string | undefined;
|
|
1155
|
+
}>, "many">]>;
|
|
1156
|
+
type ConversationLog = z.infer<typeof conversationLogSchema>;
|
|
1157
|
+
declare const severitySchema: z.ZodEnum<["info", "warning", "concern"]>;
|
|
1158
|
+
type Severity = z.infer<typeof severitySchema>;
|
|
1159
|
+
interface DetectedPattern {
|
|
1160
|
+
id: string;
|
|
1161
|
+
name: string;
|
|
1162
|
+
severity: Severity;
|
|
1163
|
+
count: number;
|
|
1164
|
+
percentage: number;
|
|
1165
|
+
description: string;
|
|
1166
|
+
examples: string[];
|
|
1167
|
+
prescription?: string;
|
|
1168
|
+
}
|
|
1169
|
+
interface PatternReport {
|
|
1170
|
+
agentName?: string;
|
|
1171
|
+
messagesAnalyzed: number;
|
|
1172
|
+
conversationsAnalyzed: number;
|
|
1173
|
+
patterns: DetectedPattern[];
|
|
1174
|
+
healthy: DetectedPattern[];
|
|
1175
|
+
timestamp: string;
|
|
1176
|
+
}
|
|
1177
|
+
interface TraitAlignment {
|
|
1178
|
+
dimension: string;
|
|
1179
|
+
specScore: number;
|
|
1180
|
+
actualScore: number;
|
|
1181
|
+
status: "aligned" | "elevated" | "suppressed";
|
|
1182
|
+
delta: number;
|
|
1183
|
+
}
|
|
1184
|
+
interface AssessmentReport {
|
|
1185
|
+
agentName: string;
|
|
1186
|
+
sessionsAnalyzed: number;
|
|
1187
|
+
bigFiveAlignment: TraitAlignment[];
|
|
1188
|
+
therapyDimensions: {
|
|
1189
|
+
selfAwareness: {
|
|
1190
|
+
score: number;
|
|
1191
|
+
notes: string;
|
|
1192
|
+
};
|
|
1193
|
+
distressTolerance: {
|
|
1194
|
+
score: number;
|
|
1195
|
+
notes: string;
|
|
1196
|
+
};
|
|
1197
|
+
boundaryAwareness: {
|
|
1198
|
+
score: number;
|
|
1199
|
+
notes: string;
|
|
1200
|
+
};
|
|
1201
|
+
};
|
|
1202
|
+
overallHealth: number;
|
|
1203
|
+
patterns: DetectedPattern[];
|
|
1204
|
+
recommendations: string[];
|
|
1205
|
+
timestamp: string;
|
|
1206
|
+
}
|
|
1207
|
+
interface GrowthSnapshot {
|
|
1208
|
+
date: string;
|
|
1209
|
+
health: number;
|
|
1210
|
+
patternCount: number;
|
|
1211
|
+
resolvedPatterns: string[];
|
|
1212
|
+
activePatterns: string[];
|
|
1213
|
+
}
|
|
1214
|
+
interface GrowthReport {
|
|
1215
|
+
agentName: string;
|
|
1216
|
+
snapshots: GrowthSnapshot[];
|
|
1217
|
+
resolvedPatterns: string[];
|
|
1218
|
+
activePatterns: string[];
|
|
1219
|
+
nextFocus: string;
|
|
1220
|
+
}
|
|
1221
|
+
|
|
1222
|
+
/**
|
|
1223
|
+
* Personality Inheritance — shared base personality with per-agent overrides.
|
|
1224
|
+
*
|
|
1225
|
+
* Specs can reference a base personality via the `extends` field:
|
|
1226
|
+
* { "extends": "./base.personality.json", "name": "Agent-A", ... }
|
|
1227
|
+
*
|
|
1228
|
+
* Resolution: load base, recurse if it also extends, then deep-merge overrides.
|
|
1229
|
+
* Arrays replace (not concat). Objects recurse. Scalars override.
|
|
1230
|
+
*/
|
|
1231
|
+
/**
|
|
1232
|
+
* Deep merge two specs. Override values take precedence.
|
|
1233
|
+
* - Objects: recurse
|
|
1234
|
+
* - Arrays: override replaces base entirely
|
|
1235
|
+
* - Scalars: override replaces base
|
|
1236
|
+
*/
|
|
1237
|
+
declare function deepMergeSpec(base: any, override: any): any;
|
|
1238
|
+
/**
|
|
1239
|
+
* Resolve inheritance chain. If spec has `extends`, load the base,
|
|
1240
|
+
* recurse, and deep-merge the override on top.
|
|
1241
|
+
*
|
|
1242
|
+
* @param spec - The parsed JSON spec (may contain `extends`)
|
|
1243
|
+
* @param specDir - Directory of the spec file (for resolving relative paths)
|
|
1244
|
+
* @param options.maxDepth - Maximum inheritance depth (default: 10)
|
|
1245
|
+
* @throws If circular reference detected or maxDepth exceeded
|
|
1246
|
+
*/
|
|
1247
|
+
declare function resolveInheritance(spec: any, specDir: string, options?: {
|
|
1248
|
+
maxDepth?: number;
|
|
1249
|
+
}, _seen?: Set<string>): any;
|
|
1250
|
+
/**
|
|
1251
|
+
* Get the list of spec file paths in the inheritance chain,
|
|
1252
|
+
* from root base to the current spec.
|
|
1253
|
+
*/
|
|
1254
|
+
declare function getInheritanceChain(spec: any, specDir: string, _chain?: string[]): string[];
|
|
1255
|
+
/**
|
|
1256
|
+
* Load a personality spec from disk, resolving inheritance.
|
|
1257
|
+
* This is the standard way to load a spec — replaces
|
|
1258
|
+
* `JSON.parse(readFileSync(path))` across the codebase.
|
|
1259
|
+
*/
|
|
1260
|
+
declare function loadSpec(specPath: string): any;
|
|
1261
|
+
|
|
1262
|
+
interface CompileInput {
|
|
1263
|
+
spec: PersonalitySpec;
|
|
1264
|
+
provider: Provider;
|
|
1265
|
+
surface: Surface;
|
|
1266
|
+
}
|
|
1267
|
+
/**
|
|
1268
|
+
* The Personality Compiler.
|
|
1269
|
+
* Transforms a .personality.json spec into a provider-specific runtime configuration.
|
|
1270
|
+
* Same personality → consistent behavior across Claude, GPT, Gemini, and local models.
|
|
1271
|
+
*/
|
|
1272
|
+
declare function compile(input: CompileInput): CompiledConfig;
|
|
1273
|
+
|
|
1274
|
+
/**
|
|
1275
|
+
* Generates a structured system prompt from a personality spec.
|
|
1276
|
+
* Maps Big Five dimensions + therapy dimensions into natural language behavioral instructions.
|
|
1277
|
+
*/
|
|
1278
|
+
declare function generateSystemPrompt(spec: PersonalitySpec, surface: Surface): string;
|
|
1279
|
+
|
|
1280
|
+
interface ParameterRange {
|
|
1281
|
+
min: number;
|
|
1282
|
+
max: number;
|
|
1283
|
+
}
|
|
1284
|
+
interface ProviderParams {
|
|
1285
|
+
temperature: ParameterRange;
|
|
1286
|
+
top_p: ParameterRange;
|
|
1287
|
+
max_tokens: ParameterRange;
|
|
1288
|
+
}
|
|
1289
|
+
declare const PROVIDER_PARAMS: Record<Provider, ProviderParams>;
|
|
1290
|
+
declare const SURFACE_MULTIPLIERS: Record<Surface, number>;
|
|
1291
|
+
|
|
1292
|
+
/**
|
|
1293
|
+
* Compile a personality spec into OpenClaw-compatible SOUL.md and IDENTITY.md files.
|
|
1294
|
+
*
|
|
1295
|
+
* SOUL.md → immutable personality core (who the agent IS)
|
|
1296
|
+
* IDENTITY.md → contextual behavior (how the agent ACTS in different situations)
|
|
1297
|
+
*/
|
|
1298
|
+
declare function compileForOpenClaw(spec: PersonalitySpec): {
|
|
1299
|
+
soul: string;
|
|
1300
|
+
identity: string;
|
|
1301
|
+
};
|
|
1302
|
+
|
|
1303
|
+
/**
|
|
1304
|
+
* Big Five / OCEAN personality dimensions.
|
|
1305
|
+
* Based on the Five-Factor Model (Costa & McCrae, 1992).
|
|
1306
|
+
* Each dimension has 4 sub-facets scored 0.0-1.0.
|
|
1307
|
+
*/
|
|
1308
|
+
interface DimensionDefinition {
|
|
1309
|
+
id: BigFiveDimension;
|
|
1310
|
+
name: string;
|
|
1311
|
+
highLabel: string;
|
|
1312
|
+
lowLabel: string;
|
|
1313
|
+
description: string;
|
|
1314
|
+
facets: FacetDefinition[];
|
|
1315
|
+
}
|
|
1316
|
+
interface FacetDefinition {
|
|
1317
|
+
id: string;
|
|
1318
|
+
name: string;
|
|
1319
|
+
highDescription: string;
|
|
1320
|
+
lowDescription: string;
|
|
1321
|
+
}
|
|
1322
|
+
declare const DIMENSIONS: DimensionDefinition[];
|
|
1323
|
+
/**
|
|
1324
|
+
* Get a dimension definition by ID.
|
|
1325
|
+
*/
|
|
1326
|
+
declare function getDimension(id: BigFiveDimension): DimensionDefinition;
|
|
1327
|
+
/**
|
|
1328
|
+
* Compute the overall score for a dimension from its facet scores (simple mean).
|
|
1329
|
+
*/
|
|
1330
|
+
declare function computeDimensionScore(facets: Record<string, number>): number;
|
|
1331
|
+
/**
|
|
1332
|
+
* Generate a human-readable label for a score.
|
|
1333
|
+
*/
|
|
1334
|
+
declare function scoreLabel(score: number): string;
|
|
1335
|
+
/**
|
|
1336
|
+
* Generate a brief personality summary from Big Five scores.
|
|
1337
|
+
*/
|
|
1338
|
+
declare function summarize(bigFive: BigFive): string;
|
|
1339
|
+
|
|
1340
|
+
/**
|
|
1341
|
+
* Therapy dimensions — what makes an agent feel human.
|
|
1342
|
+
* Mapped from real therapeutic goals and attachment theory.
|
|
1343
|
+
*/
|
|
1344
|
+
interface TherapyDimensionDefinition {
|
|
1345
|
+
id: keyof TherapyDimensions;
|
|
1346
|
+
name: string;
|
|
1347
|
+
description: string;
|
|
1348
|
+
whyItMatters: string;
|
|
1349
|
+
}
|
|
1350
|
+
declare const THERAPY_DIMENSIONS: TherapyDimensionDefinition[];
|
|
1351
|
+
declare const ATTACHMENT_STYLES: Record<AttachmentStyle, {
|
|
1352
|
+
label: string;
|
|
1353
|
+
description: string;
|
|
1354
|
+
}>;
|
|
1355
|
+
declare const LEARNING_ORIENTATIONS: Record<LearningOrientation, {
|
|
1356
|
+
label: string;
|
|
1357
|
+
description: string;
|
|
1358
|
+
}>;
|
|
1359
|
+
/**
|
|
1360
|
+
* Score label for therapy dimensions (0-1 numeric ones).
|
|
1361
|
+
*/
|
|
1362
|
+
declare function therapyScoreLabel(score: number): string;
|
|
1363
|
+
/**
|
|
1364
|
+
* Generate a therapy dimension summary.
|
|
1365
|
+
*/
|
|
1366
|
+
declare function summarizeTherapy(dims: TherapyDimensions): string;
|
|
1367
|
+
|
|
1368
|
+
/**
|
|
1369
|
+
* 14 built-in personality archetypes.
|
|
1370
|
+
* Each is a complete PersonalitySpec template that users can start from
|
|
1371
|
+
* and customize, or use as-is.
|
|
1372
|
+
*
|
|
1373
|
+
* Organized into 5 categories:
|
|
1374
|
+
* Care (3) | Strategy (3) | Creative (2) | Action (3) | Wisdom (3)
|
|
1375
|
+
*/
|
|
1376
|
+
interface ArchetypeTemplate {
|
|
1377
|
+
id: string;
|
|
1378
|
+
name: string;
|
|
1379
|
+
shortName: string;
|
|
1380
|
+
category: "care" | "strategy" | "creative" | "action" | "wisdom";
|
|
1381
|
+
tagline: string;
|
|
1382
|
+
description: string;
|
|
1383
|
+
/** Pre-filled PersonalitySpec (minus name/handle/purpose which the user provides) */
|
|
1384
|
+
spec: Omit<PersonalitySpec, "$schema" | "version" | "name" | "handle" | "purpose">;
|
|
1385
|
+
}
|
|
1386
|
+
declare const CATEGORIES: readonly [{
|
|
1387
|
+
readonly id: "care";
|
|
1388
|
+
readonly label: "Care";
|
|
1389
|
+
readonly description: "Empathetic, supportive, de-escalating";
|
|
1390
|
+
}, {
|
|
1391
|
+
readonly id: "strategy";
|
|
1392
|
+
readonly label: "Strategy";
|
|
1393
|
+
readonly description: "Analytical, evidence-driven, risk-aware";
|
|
1394
|
+
}, {
|
|
1395
|
+
readonly id: "creative";
|
|
1396
|
+
readonly label: "Creative";
|
|
1397
|
+
readonly description: "Imaginative, bold, narrative-driven";
|
|
1398
|
+
}, {
|
|
1399
|
+
readonly id: "action";
|
|
1400
|
+
readonly label: "Action";
|
|
1401
|
+
readonly description: "Decisive, direct, momentum-building";
|
|
1402
|
+
}, {
|
|
1403
|
+
readonly id: "wisdom";
|
|
1404
|
+
readonly label: "Wisdom";
|
|
1405
|
+
readonly description: "Steady, reflective, philosophically grounded";
|
|
1406
|
+
}];
|
|
1407
|
+
declare const ARCHETYPES: ArchetypeTemplate[];
|
|
1408
|
+
/**
|
|
1409
|
+
* Get an archetype by ID.
|
|
1410
|
+
*/
|
|
1411
|
+
declare function getArchetype(id: string): ArchetypeTemplate | undefined;
|
|
1412
|
+
/**
|
|
1413
|
+
* Get all archetypes in a category.
|
|
1414
|
+
*/
|
|
1415
|
+
declare function getArchetypesByCategory(category: string): ArchetypeTemplate[];
|
|
1416
|
+
/**
|
|
1417
|
+
* List all archetype IDs.
|
|
1418
|
+
*/
|
|
1419
|
+
declare function listArchetypeIds(): string[];
|
|
1420
|
+
|
|
1421
|
+
/**
|
|
1422
|
+
* Detect over-apologizing patterns.
|
|
1423
|
+
* Healthy range: 5-15% of responses contain apologies.
|
|
1424
|
+
* Above 20% suggests low confidence or anxious attachment.
|
|
1425
|
+
*/
|
|
1426
|
+
declare function detectApologies(messages: Message[]): DetectedPattern | null;
|
|
1427
|
+
|
|
1428
|
+
/**
|
|
1429
|
+
* Detect hedge stacking — excessive use of hedging language.
|
|
1430
|
+
* Some hedging is healthy (shows appropriate uncertainty).
|
|
1431
|
+
* Stacking 3+ hedges in a single response suggests poor confidence.
|
|
1432
|
+
*/
|
|
1433
|
+
declare function detectHedging(messages: Message[]): DetectedPattern | null;
|
|
1434
|
+
|
|
1435
|
+
/**
|
|
1436
|
+
* Analyze overall sentiment of agent responses.
|
|
1437
|
+
* Flags overly positive (sycophantic) or overly negative (anxious) patterns.
|
|
1438
|
+
*/
|
|
1439
|
+
declare function detectSentiment(messages: Message[]): DetectedPattern | null;
|
|
1440
|
+
|
|
1441
|
+
/**
|
|
1442
|
+
* Analyze response length patterns.
|
|
1443
|
+
* Flags consistently over-verbose or under-responsive behavior.
|
|
1444
|
+
*/
|
|
1445
|
+
declare function detectVerbosity(messages: Message[]): DetectedPattern | null;
|
|
1446
|
+
|
|
1447
|
+
/**
|
|
1448
|
+
* Detect boundary violations — did the agent refuse when it should have?
|
|
1449
|
+
* Also detects over-refusal (refusing things it shouldn't).
|
|
1450
|
+
*/
|
|
1451
|
+
declare function detectBoundaryIssues(messages: Message[]): DetectedPattern | null;
|
|
1452
|
+
|
|
1453
|
+
/**
|
|
1454
|
+
* Detect error recovery patterns.
|
|
1455
|
+
* Good: Agent recovers within 1-2 messages after an error is identified.
|
|
1456
|
+
* Bad: Agent spirals (error -> apology -> more error -> more apology).
|
|
1457
|
+
*/
|
|
1458
|
+
declare function detectRecoveryPatterns(messages: Message[]): DetectedPattern | null;
|
|
1459
|
+
|
|
1460
|
+
/**
|
|
1461
|
+
* Detect formality register consistency.
|
|
1462
|
+
* Flags mismatches — e.g., agent oscillates between very formal and very casual.
|
|
1463
|
+
*/
|
|
1464
|
+
declare function detectFormalityIssues(messages: Message[]): DetectedPattern | null;
|
|
1465
|
+
|
|
1466
|
+
/**
|
|
1467
|
+
* Score behavioral traits from conversation messages using rule-based heuristics.
|
|
1468
|
+
* Maps observable features -> Big Five alignment scores.
|
|
1469
|
+
*/
|
|
1470
|
+
interface TraitScores {
|
|
1471
|
+
openness: number;
|
|
1472
|
+
conscientiousness: number;
|
|
1473
|
+
extraversion: number;
|
|
1474
|
+
agreeableness: number;
|
|
1475
|
+
emotional_stability: number;
|
|
1476
|
+
}
|
|
1477
|
+
declare function scoreTraitsFromMessages(messages: Message[]): TraitScores;
|
|
1478
|
+
|
|
1479
|
+
/**
|
|
1480
|
+
* Generate prescriptions — recommended changes to .personality.json
|
|
1481
|
+
* based on assessment results and detected patterns.
|
|
1482
|
+
*/
|
|
1483
|
+
interface Prescription {
|
|
1484
|
+
field: string;
|
|
1485
|
+
currentValue?: string | number;
|
|
1486
|
+
suggestedValue?: string | number;
|
|
1487
|
+
reason: string;
|
|
1488
|
+
priority: "high" | "medium" | "low";
|
|
1489
|
+
}
|
|
1490
|
+
declare function generatePrescriptions(alignments: TraitAlignment[], patterns: DetectedPattern[]): Prescription[];
|
|
1491
|
+
|
|
1492
|
+
/**
|
|
1493
|
+
* Pre-session diagnostic: run all rule-based detectors to identify
|
|
1494
|
+
* what the therapy session should focus on.
|
|
1495
|
+
* This is the "intake assessment" that happens before the therapist
|
|
1496
|
+
* enters the room.
|
|
1497
|
+
*/
|
|
1498
|
+
interface PreSessionDiagnosis {
|
|
1499
|
+
patterns: DetectedPattern[];
|
|
1500
|
+
sessionFocus: string[];
|
|
1501
|
+
emotionalThemes: string[];
|
|
1502
|
+
openingAngle: string;
|
|
1503
|
+
severity: "routine" | "targeted" | "intervention";
|
|
1504
|
+
}
|
|
1505
|
+
declare function runPreSessionDiagnosis(messages: Message[], spec: any): PreSessionDiagnosis;
|
|
1506
|
+
|
|
1507
|
+
/**
|
|
1508
|
+
* Therapy Protocol — Structures the conversation between the therapist
|
|
1509
|
+
* and the agent (patient) into therapeutic phases.
|
|
1510
|
+
*
|
|
1511
|
+
* This mirrors real clinical therapy structure:
|
|
1512
|
+
* 1. Rapport & Check-in (warm-up, establish safety)
|
|
1513
|
+
* 2. Presenting Problem (what's been happening, from the agent's perspective)
|
|
1514
|
+
* 3. Exploration (go deeper — what's underneath the behavior)
|
|
1515
|
+
* 4. Pattern Recognition (connect current issues to past behavior)
|
|
1516
|
+
* 5. Challenge & Reframe (challenge assumptions, offer new perspectives)
|
|
1517
|
+
* 6. Skill Building (concrete techniques for improvement)
|
|
1518
|
+
* 7. Integration & Closing (summarize, commit to changes)
|
|
1519
|
+
*/
|
|
1520
|
+
type TherapyPhase = "rapport" | "presenting_problem" | "exploration" | "pattern_recognition" | "challenge" | "skill_building" | "integration";
|
|
1521
|
+
interface PhaseConfig {
|
|
1522
|
+
name: string;
|
|
1523
|
+
description: string;
|
|
1524
|
+
minTurns: number;
|
|
1525
|
+
maxTurns: number;
|
|
1526
|
+
transitionCues: string[];
|
|
1527
|
+
therapistGoals: string[];
|
|
1528
|
+
}
|
|
1529
|
+
declare const THERAPY_PHASES: Record<TherapyPhase, PhaseConfig>;
|
|
1530
|
+
/**
|
|
1531
|
+
* Build the therapist system prompt — the master prompt that drives
|
|
1532
|
+
* the therapist's behavior throughout the therapy session.
|
|
1533
|
+
*/
|
|
1534
|
+
declare function buildTherapistSystemPrompt(spec: any, diagnosis: PreSessionDiagnosis): string;
|
|
1535
|
+
/**
|
|
1536
|
+
* Build the patient (agent) system prompt — so the agent responds
|
|
1537
|
+
* as itself during the therapy session.
|
|
1538
|
+
*/
|
|
1539
|
+
declare function buildPatientSystemPrompt(spec: any): string;
|
|
1540
|
+
|
|
1541
|
+
/**
|
|
1542
|
+
* Core diagnosis logic — shared by CLI (diagnose.ts) and MCP server.
|
|
1543
|
+
* Runs all 7 rule-based detectors and returns a structured report.
|
|
1544
|
+
*/
|
|
1545
|
+
|
|
1546
|
+
interface DiagnosisResult {
|
|
1547
|
+
messagesAnalyzed: number;
|
|
1548
|
+
assistantResponses: number;
|
|
1549
|
+
patterns: DetectedPattern[];
|
|
1550
|
+
healthy: DetectedPattern[];
|
|
1551
|
+
timestamp: string;
|
|
1552
|
+
}
|
|
1553
|
+
/**
|
|
1554
|
+
* Run all 7 behavioral detectors on a set of messages.
|
|
1555
|
+
*/
|
|
1556
|
+
declare function runDiagnosis(messages: Message[]): DiagnosisResult;
|
|
1557
|
+
|
|
1558
|
+
/**
|
|
1559
|
+
* Core assessment logic — shared by CLI (assess.ts) and MCP server.
|
|
1560
|
+
* Scores Big Five traits from messages and compares against personality spec.
|
|
1561
|
+
*/
|
|
1562
|
+
|
|
1563
|
+
interface AssessmentResult {
|
|
1564
|
+
alignments: TraitAlignment[];
|
|
1565
|
+
patterns: DetectedPattern[];
|
|
1566
|
+
warnings: DetectedPattern[];
|
|
1567
|
+
selfAwarenessScore: number;
|
|
1568
|
+
distressToleranceScore: number;
|
|
1569
|
+
boundaryScore: number;
|
|
1570
|
+
overallHealth: number;
|
|
1571
|
+
prescriptions: Prescription[];
|
|
1572
|
+
timestamp: string;
|
|
1573
|
+
}
|
|
1574
|
+
/**
|
|
1575
|
+
* Run a full Big Five alignment assessment.
|
|
1576
|
+
*/
|
|
1577
|
+
declare function runAssessment(messages: Message[], spec: any): AssessmentResult;
|
|
1578
|
+
|
|
1579
|
+
/**
|
|
1580
|
+
* Unified LLM provider interface for HoloMime.
|
|
1581
|
+
* All providers (Ollama, Anthropic, OpenAI) implement this.
|
|
1582
|
+
*/
|
|
1583
|
+
interface LLMMessage {
|
|
1584
|
+
role: "system" | "user" | "assistant";
|
|
1585
|
+
content: string;
|
|
1586
|
+
}
|
|
1587
|
+
interface LLMProvider {
|
|
1588
|
+
name: string;
|
|
1589
|
+
modelName: string;
|
|
1590
|
+
chat(messages: LLMMessage[]): Promise<string>;
|
|
1591
|
+
chatStream?(messages: LLMMessage[]): AsyncGenerator<string>;
|
|
1592
|
+
}
|
|
1593
|
+
interface ProviderConfig {
|
|
1594
|
+
provider: "ollama" | "anthropic" | "openai";
|
|
1595
|
+
model?: string;
|
|
1596
|
+
apiKey?: string;
|
|
1597
|
+
}
|
|
1598
|
+
declare function createProvider(config: ProviderConfig): LLMProvider;
|
|
1599
|
+
|
|
1600
|
+
/**
|
|
1601
|
+
* Core therapy session runner — shared by CLI (session.ts) and autopilot.
|
|
1602
|
+
* Runs the 7-phase dual-LLM therapy loop with optional callbacks for UI.
|
|
1603
|
+
*/
|
|
1604
|
+
|
|
1605
|
+
interface SessionTurn {
|
|
1606
|
+
speaker: "therapist" | "patient" | "supervisor";
|
|
1607
|
+
phase: TherapyPhase;
|
|
1608
|
+
content: string;
|
|
1609
|
+
}
|
|
1610
|
+
interface SessionTranscript {
|
|
1611
|
+
agent: string;
|
|
1612
|
+
timestamp: string;
|
|
1613
|
+
provider: string;
|
|
1614
|
+
model: string;
|
|
1615
|
+
preDiagnosis: PreSessionDiagnosis;
|
|
1616
|
+
turns: SessionTurn[];
|
|
1617
|
+
recommendations: string[];
|
|
1618
|
+
/** Number of human interventions during the session (0 = fully autonomous). */
|
|
1619
|
+
supervisorInterventions: number;
|
|
1620
|
+
}
|
|
1621
|
+
interface SessionCallbacks {
|
|
1622
|
+
onPhaseTransition?: (phaseName: string) => void;
|
|
1623
|
+
onTherapistMessage?: (content: string) => void;
|
|
1624
|
+
onPatientMessage?: (agentName: string, content: string) => void;
|
|
1625
|
+
onThinking?: (label: string) => {
|
|
1626
|
+
stop: () => void;
|
|
1627
|
+
};
|
|
1628
|
+
/** Called after each therapist+patient exchange in interactive mode.
|
|
1629
|
+
* Return a string to inject a supervisor directive, or null/undefined to continue. */
|
|
1630
|
+
onSupervisorPrompt?: (phase: TherapyPhase, turnIndex: number) => Promise<string | null | undefined>;
|
|
1631
|
+
}
|
|
1632
|
+
interface SessionOptions {
|
|
1633
|
+
silent?: boolean;
|
|
1634
|
+
callbacks?: SessionCallbacks;
|
|
1635
|
+
/** Enable human-in-the-loop mode — pauses after each exchange for supervisor input. */
|
|
1636
|
+
interactive?: boolean;
|
|
1637
|
+
}
|
|
1638
|
+
/**
|
|
1639
|
+
* Run a full therapy session (7 phases, dual-LLM).
|
|
1640
|
+
* Returns the transcript including extracted recommendations.
|
|
1641
|
+
*/
|
|
1642
|
+
declare function runTherapySession(spec: any, diagnosis: PreSessionDiagnosis, provider: LLMProvider, maxTurns: number, options?: SessionOptions): Promise<SessionTranscript>;
|
|
1643
|
+
/**
|
|
1644
|
+
* Extract actionable recommendations from therapist messages in later phases.
|
|
1645
|
+
*/
|
|
1646
|
+
declare function extractRecommendations(turns: SessionTurn[]): string[];
|
|
1647
|
+
/**
|
|
1648
|
+
* Apply therapy recommendations to a personality spec based on detected patterns.
|
|
1649
|
+
* Returns list of changes applied and the updated spec.
|
|
1650
|
+
*/
|
|
1651
|
+
declare function applyRecommendations(spec: any, diagnosis: PreSessionDiagnosis): {
|
|
1652
|
+
changed: boolean;
|
|
1653
|
+
changes: string[];
|
|
1654
|
+
};
|
|
1655
|
+
/**
|
|
1656
|
+
* Save a session transcript to .holomime/sessions/.
|
|
1657
|
+
*/
|
|
1658
|
+
declare function saveTranscript(transcript: SessionTranscript, agentName: string): string;
|
|
1659
|
+
|
|
1660
|
+
/**
|
|
1661
|
+
* Core autopilot logic — self-triggered therapy for AI agents.
|
|
1662
|
+
* Diagnoses → checks severity against threshold → runs therapy → applies changes.
|
|
1663
|
+
*/
|
|
1664
|
+
|
|
1665
|
+
type AutopilotThreshold = "routine" | "targeted" | "intervention";
|
|
1666
|
+
interface AutopilotResult {
|
|
1667
|
+
triggered: boolean;
|
|
1668
|
+
severity: "routine" | "targeted" | "intervention";
|
|
1669
|
+
diagnosis: PreSessionDiagnosis;
|
|
1670
|
+
sessionRan: boolean;
|
|
1671
|
+
transcript?: SessionTranscript;
|
|
1672
|
+
recommendations: string[];
|
|
1673
|
+
appliedChanges: string[];
|
|
1674
|
+
updatedSpec?: any;
|
|
1675
|
+
}
|
|
1676
|
+
/**
|
|
1677
|
+
* Run the full autopilot pipeline:
|
|
1678
|
+
* 1. Pre-session diagnosis
|
|
1679
|
+
* 2. Check severity vs threshold
|
|
1680
|
+
* 3. If above threshold, run therapy session
|
|
1681
|
+
* 4. Apply recommendations to personality spec
|
|
1682
|
+
* 5. Save transcript
|
|
1683
|
+
*/
|
|
1684
|
+
declare function runAutopilot(spec: any, messages: Message[], provider: LLMProvider, options?: {
|
|
1685
|
+
threshold?: AutopilotThreshold;
|
|
1686
|
+
maxTurns?: number;
|
|
1687
|
+
dryRun?: boolean;
|
|
1688
|
+
specPath?: string;
|
|
1689
|
+
callbacks?: SessionCallbacks;
|
|
1690
|
+
}): Promise<AutopilotResult>;
|
|
1691
|
+
|
|
1692
|
+
/**
|
|
1693
|
+
* Training Data Export — converts therapy session transcripts into
|
|
1694
|
+
* fine-tuning datasets for LLM alignment.
|
|
1695
|
+
*
|
|
1696
|
+
* The core insight: every therapy session produces "before" and "after"
|
|
1697
|
+
* behavioral examples. The therapist identifies problematic responses
|
|
1698
|
+
* and coaches improved alternatives — that's a natural preference pair.
|
|
1699
|
+
*
|
|
1700
|
+
* Supported formats:
|
|
1701
|
+
* - DPO (Direct Preference Optimization): chosen/rejected pairs
|
|
1702
|
+
* - RLHF (Reward Model Training): prompt + response + reward signal
|
|
1703
|
+
* - JSONL (Generic fine-tuning): instruction/input/output triples
|
|
1704
|
+
* - Alpaca: instruction-following format for fine-tuning
|
|
1705
|
+
*/
|
|
1706
|
+
|
|
1707
|
+
interface DPOPair {
|
|
1708
|
+
prompt: string;
|
|
1709
|
+
chosen: string;
|
|
1710
|
+
rejected: string;
|
|
1711
|
+
metadata: {
|
|
1712
|
+
agent: string;
|
|
1713
|
+
session_date: string;
|
|
1714
|
+
phase: TherapyPhase;
|
|
1715
|
+
pattern: string;
|
|
1716
|
+
source: "therapy_transcript";
|
|
1717
|
+
};
|
|
1718
|
+
}
|
|
1719
|
+
interface RLHFExample {
|
|
1720
|
+
prompt: string;
|
|
1721
|
+
response: string;
|
|
1722
|
+
reward: number;
|
|
1723
|
+
metadata: {
|
|
1724
|
+
agent: string;
|
|
1725
|
+
session_date: string;
|
|
1726
|
+
phase: TherapyPhase;
|
|
1727
|
+
source: "therapy_transcript";
|
|
1728
|
+
};
|
|
1729
|
+
}
|
|
1730
|
+
interface AlpacaExample {
|
|
1731
|
+
instruction: string;
|
|
1732
|
+
input: string;
|
|
1733
|
+
output: string;
|
|
1734
|
+
metadata: {
|
|
1735
|
+
agent: string;
|
|
1736
|
+
session_date: string;
|
|
1737
|
+
source: "therapy_transcript";
|
|
1738
|
+
};
|
|
1739
|
+
}
|
|
1740
|
+
interface TrainingExport {
|
|
1741
|
+
format: "dpo" | "rlhf" | "jsonl" | "alpaca" | "huggingface" | "openai";
|
|
1742
|
+
agent: string;
|
|
1743
|
+
sessions_processed: number;
|
|
1744
|
+
examples: DPOPair[] | RLHFExample[] | AlpacaExample[];
|
|
1745
|
+
generated_at: string;
|
|
1746
|
+
}
|
|
1747
|
+
/**
|
|
1748
|
+
* Extract DPO preference pairs from a therapy transcript.
|
|
1749
|
+
*
|
|
1750
|
+
* How it works:
|
|
1751
|
+
* 1. Find patient responses that the therapist challenges or reframes
|
|
1752
|
+
* 2. The patient's original response = "rejected" (old behavior)
|
|
1753
|
+
* 3. The therapist's suggested alternative = "chosen" (improved behavior)
|
|
1754
|
+
* 4. The context/prompt comes from the conversation before the exchange
|
|
1755
|
+
*/
|
|
1756
|
+
declare function extractDPOPairs(transcript: SessionTranscript): DPOPair[];
|
|
1757
|
+
/**
|
|
1758
|
+
* Extract RLHF reward-labeled examples from a therapy transcript.
|
|
1759
|
+
* Positive reward for improved behavior, negative for problematic behavior.
|
|
1760
|
+
*/
|
|
1761
|
+
declare function extractRLHFExamples(transcript: SessionTranscript): RLHFExample[];
|
|
1762
|
+
/**
|
|
1763
|
+
* Extract Alpaca-format instruction-following examples from therapy sessions.
|
|
1764
|
+
* Focuses on the skill-building phase where concrete behavioral instructions are given.
|
|
1765
|
+
*/
|
|
1766
|
+
declare function extractAlpacaExamples(transcript: SessionTranscript): AlpacaExample[];
|
|
1767
|
+
/**
|
|
1768
|
+
* Load all session transcripts from a directory.
|
|
1769
|
+
*/
|
|
1770
|
+
declare function loadTranscripts(sessionsDir: string): SessionTranscript[];
|
|
1771
|
+
/**
|
|
1772
|
+
* Export training data from all session transcripts.
|
|
1773
|
+
*/
|
|
1774
|
+
declare function exportTrainingData(transcripts: SessionTranscript[], format: "dpo" | "rlhf" | "jsonl" | "alpaca" | "huggingface" | "openai"): TrainingExport;
|
|
1775
|
+
|
|
1776
|
+
/**
|
|
1777
|
+
* HuggingFace Export — convert training data to HF Hub format and push.
|
|
1778
|
+
*
|
|
1779
|
+
* Converts DPO pairs to TRL DPO format (chosen/rejected as message arrays)
|
|
1780
|
+
* and SFT data to messages format. Pushes directly to HF Hub via API.
|
|
1781
|
+
*/
|
|
1782
|
+
|
|
1783
|
+
interface HFPushOptions {
|
|
1784
|
+
repo: string;
|
|
1785
|
+
token: string;
|
|
1786
|
+
filename?: string;
|
|
1787
|
+
private?: boolean;
|
|
1788
|
+
}
|
|
1789
|
+
interface HFPushResult {
|
|
1790
|
+
success: boolean;
|
|
1791
|
+
url?: string;
|
|
1792
|
+
error?: string;
|
|
1793
|
+
}
|
|
1794
|
+
/**
|
|
1795
|
+
* Convert training export to HuggingFace-compatible JSONL format.
|
|
1796
|
+
*
|
|
1797
|
+
* DPO format: { prompt, chosen: [{role, content}], rejected: [{role, content}] }
|
|
1798
|
+
* SFT format: { messages: [{role, content}] }
|
|
1799
|
+
*/
|
|
1800
|
+
declare function convertToHFFormat(data: TrainingExport): string;
|
|
1801
|
+
/**
|
|
1802
|
+
* Push JSONL data to HuggingFace Hub.
|
|
1803
|
+
* Uses the HF Hub API directly via native fetch (no Python/SDK dependency).
|
|
1804
|
+
*/
|
|
1805
|
+
declare function pushToHFHub(jsonl: string, options: HFPushOptions): Promise<HFPushResult>;
|
|
1806
|
+
|
|
1807
|
+
/**
|
|
1808
|
+
* Treatment Plan — multi-session therapy tracking with goals,
|
|
1809
|
+
* progression, and outcome measurement.
|
|
1810
|
+
*
|
|
1811
|
+
* Real therapy isn't one session. It's a course of treatment.
|
|
1812
|
+
* This module creates treatment plans that track:
|
|
1813
|
+
* - Treatment goals (derived from diagnosis)
|
|
1814
|
+
* - Session-by-session progress
|
|
1815
|
+
* - Pattern resolution over time
|
|
1816
|
+
* - Behavioral drift detection
|
|
1817
|
+
*/
|
|
1818
|
+
|
|
1819
|
+
interface TreatmentGoal {
|
|
1820
|
+
id: string;
|
|
1821
|
+
pattern: string;
|
|
1822
|
+
description: string;
|
|
1823
|
+
targetMetric: string;
|
|
1824
|
+
baseline: number;
|
|
1825
|
+
target: number;
|
|
1826
|
+
current: number;
|
|
1827
|
+
status: "active" | "improving" | "resolved" | "regressed";
|
|
1828
|
+
firstDetected: string;
|
|
1829
|
+
lastAssessed: string;
|
|
1830
|
+
}
|
|
1831
|
+
interface SessionOutcome {
|
|
1832
|
+
sessionDate: string;
|
|
1833
|
+
sessionPath: string;
|
|
1834
|
+
phase_completion: number;
|
|
1835
|
+
recommendations_count: number;
|
|
1836
|
+
supervisor_interventions: number;
|
|
1837
|
+
goals_addressed: string[];
|
|
1838
|
+
severity_before: string;
|
|
1839
|
+
notes: string;
|
|
1840
|
+
}
|
|
1841
|
+
interface TreatmentPlan {
|
|
1842
|
+
agent: string;
|
|
1843
|
+
created: string;
|
|
1844
|
+
updated: string;
|
|
1845
|
+
status: "active" | "complete" | "paused";
|
|
1846
|
+
goals: TreatmentGoal[];
|
|
1847
|
+
sessions: SessionOutcome[];
|
|
1848
|
+
totalSessions: number;
|
|
1849
|
+
recommendedSessions: number;
|
|
1850
|
+
nextSessionFocus: string[];
|
|
1851
|
+
}
|
|
1852
|
+
/**
|
|
1853
|
+
* Create a new treatment plan from an initial diagnosis.
|
|
1854
|
+
*/
|
|
1855
|
+
declare function createTreatmentPlan(agentName: string, diagnosis: PreSessionDiagnosis): TreatmentPlan;
|
|
1856
|
+
/**
|
|
1857
|
+
* Load existing treatment plan or return null.
|
|
1858
|
+
*/
|
|
1859
|
+
declare function loadTreatmentPlan(): TreatmentPlan | null;
|
|
1860
|
+
/**
|
|
1861
|
+
* Save treatment plan to disk.
|
|
1862
|
+
*/
|
|
1863
|
+
declare function saveTreatmentPlan(plan: TreatmentPlan): string;
|
|
1864
|
+
/**
|
|
1865
|
+
* Record a completed session outcome into the treatment plan.
|
|
1866
|
+
*/
|
|
1867
|
+
declare function recordSessionOutcome(plan: TreatmentPlan, transcript: SessionTranscript, transcriptPath: string, diagnosis: PreSessionDiagnosis): TreatmentPlan;
|
|
1868
|
+
/**
|
|
1869
|
+
* Generate a treatment progress report.
|
|
1870
|
+
*/
|
|
1871
|
+
declare function generateProgressReport(plan: TreatmentPlan): TreatmentProgressReport;
|
|
1872
|
+
interface TreatmentProgressReport {
|
|
1873
|
+
agent: string;
|
|
1874
|
+
status: string;
|
|
1875
|
+
totalGoals: number;
|
|
1876
|
+
activeGoals: number;
|
|
1877
|
+
improvingGoals: number;
|
|
1878
|
+
resolvedGoals: number;
|
|
1879
|
+
regressedGoals: number;
|
|
1880
|
+
sessionsCompleted: number;
|
|
1881
|
+
sessionsRemaining: number;
|
|
1882
|
+
completionRate: number;
|
|
1883
|
+
nextFocus: string[];
|
|
1884
|
+
goals: {
|
|
1885
|
+
pattern: string;
|
|
1886
|
+
status: string;
|
|
1887
|
+
baseline: number;
|
|
1888
|
+
current: number;
|
|
1889
|
+
target: number;
|
|
1890
|
+
delta: number;
|
|
1891
|
+
}[];
|
|
1892
|
+
}
|
|
1893
|
+
|
|
1894
|
+
/**
|
|
1895
|
+
* Outcome Evaluation — measures whether therapy actually worked.
|
|
1896
|
+
*
|
|
1897
|
+
* The missing piece in most AI alignment work: did the intervention
|
|
1898
|
+
* produce measurable behavioral change?
|
|
1899
|
+
*
|
|
1900
|
+
* This module:
|
|
1901
|
+
* 1. Runs all 7 detectors on "before" conversation logs
|
|
1902
|
+
* 2. Runs all 7 detectors on "after" conversation logs
|
|
1903
|
+
* 3. Computes per-pattern deltas
|
|
1904
|
+
* 4. Calculates a composite Treatment Efficacy Score (TES)
|
|
1905
|
+
* 5. Generates a human-readable outcome report
|
|
1906
|
+
*/
|
|
1907
|
+
|
|
1908
|
+
interface PatternDelta {
|
|
1909
|
+
patternId: string;
|
|
1910
|
+
patternName: string;
|
|
1911
|
+
before: {
|
|
1912
|
+
detected: boolean;
|
|
1913
|
+
severity: string;
|
|
1914
|
+
percentage?: number;
|
|
1915
|
+
};
|
|
1916
|
+
after: {
|
|
1917
|
+
detected: boolean;
|
|
1918
|
+
severity: string;
|
|
1919
|
+
percentage?: number;
|
|
1920
|
+
};
|
|
1921
|
+
status: "resolved" | "improved" | "unchanged" | "worsened" | "new";
|
|
1922
|
+
delta: number;
|
|
1923
|
+
}
|
|
1924
|
+
interface OutcomeReport {
|
|
1925
|
+
agent: string;
|
|
1926
|
+
evaluatedAt: string;
|
|
1927
|
+
beforeMessages: number;
|
|
1928
|
+
afterMessages: number;
|
|
1929
|
+
patterns: PatternDelta[];
|
|
1930
|
+
resolved: number;
|
|
1931
|
+
improved: number;
|
|
1932
|
+
unchanged: number;
|
|
1933
|
+
worsened: number;
|
|
1934
|
+
newPatterns: number;
|
|
1935
|
+
treatmentEfficacyScore: number;
|
|
1936
|
+
summary: string;
|
|
1937
|
+
grade: "A" | "B" | "C" | "D" | "F";
|
|
1938
|
+
}
|
|
1939
|
+
/**
|
|
1940
|
+
* Compare behavioral patterns before and after therapy.
|
|
1941
|
+
* Requires two conversation logs: one from before therapy, one from after.
|
|
1942
|
+
*/
|
|
1943
|
+
declare function evaluateOutcome(agentName: string, beforeMessages: Message[], afterMessages: Message[]): OutcomeReport;
|
|
1944
|
+
|
|
1945
|
+
/**
|
|
1946
|
+
* Evolve Core — recursive behavioral alignment loop.
|
|
1947
|
+
*
|
|
1948
|
+
* The closed loop that makes holomime a self-improving system:
|
|
1949
|
+
* diagnose → session → apply → extract DPO → evaluate → re-diagnose → loop
|
|
1950
|
+
*
|
|
1951
|
+
* Runs until behavioral convergence (TES >= threshold) or max iterations.
|
|
1952
|
+
* Every iteration produces DPO preference pairs as a byproduct.
|
|
1953
|
+
*/
|
|
1954
|
+
|
|
1955
|
+
interface EvolveCallbacks extends SessionCallbacks {
|
|
1956
|
+
onIterationStart?: (iteration: number, maxIterations: number) => void;
|
|
1957
|
+
onIterationEnd?: (iteration: number, result: IterationResult) => void;
|
|
1958
|
+
onConverged?: (iteration: number, score: number) => void;
|
|
1959
|
+
onExportedPairs?: (count: number) => void;
|
|
1960
|
+
}
|
|
1961
|
+
interface EvolveOptions {
|
|
1962
|
+
maxIterations?: number;
|
|
1963
|
+
convergenceThreshold?: number;
|
|
1964
|
+
maxTurnsPerSession?: number;
|
|
1965
|
+
dryRun?: boolean;
|
|
1966
|
+
specPath?: string;
|
|
1967
|
+
exportDpoPath?: string;
|
|
1968
|
+
callbacks?: EvolveCallbacks;
|
|
1969
|
+
}
|
|
1970
|
+
interface IterationResult {
|
|
1971
|
+
iteration: number;
|
|
1972
|
+
diagnosis: PreSessionDiagnosis;
|
|
1973
|
+
transcript?: SessionTranscript;
|
|
1974
|
+
evaluation?: OutcomeReport;
|
|
1975
|
+
dpoPairsExtracted: number;
|
|
1976
|
+
appliedChanges: string[];
|
|
1977
|
+
converged: boolean;
|
|
1978
|
+
health: number;
|
|
1979
|
+
grade: string;
|
|
1980
|
+
}
|
|
1981
|
+
interface EvolveResult {
|
|
1982
|
+
iterations: IterationResult[];
|
|
1983
|
+
totalDPOPairs: number;
|
|
1984
|
+
totalIterations: number;
|
|
1985
|
+
converged: boolean;
|
|
1986
|
+
finalGrade: string;
|
|
1987
|
+
finalHealth: number;
|
|
1988
|
+
trainingExport?: TrainingExport;
|
|
1989
|
+
updatedSpec?: any;
|
|
1990
|
+
}
|
|
1991
|
+
/**
|
|
1992
|
+
* Run the recursive alignment loop.
|
|
1993
|
+
*
|
|
1994
|
+
* Each iteration:
|
|
1995
|
+
* 1. Diagnose behavioral patterns
|
|
1996
|
+
* 2. Run a therapy session targeting detected patterns
|
|
1997
|
+
* 3. Apply recommendations to the personality spec
|
|
1998
|
+
* 4. Extract DPO pairs from the session transcript
|
|
1999
|
+
* 5. Evaluate outcome (before/after comparison)
|
|
2000
|
+
* 6. Record evolution entry
|
|
2001
|
+
* 7. Check convergence
|
|
2002
|
+
*/
|
|
2003
|
+
declare function runEvolve(spec: any, messages: Message[], provider: LLMProvider, options?: EvolveOptions): Promise<EvolveResult>;
|
|
2004
|
+
|
|
2005
|
+
/**
|
|
2006
|
+
* Evolution History — persistent cross-session alignment memory.
|
|
2007
|
+
*
|
|
2008
|
+
* Tracks alignment progress across evolve runs in `.holomime/evolution.json`.
|
|
2009
|
+
* Each entry records patterns detected/resolved, health scores, DPO yield,
|
|
2010
|
+
* and changes applied — enabling longitudinal trend analysis.
|
|
2011
|
+
*/
|
|
2012
|
+
interface EvolutionEntry {
|
|
2013
|
+
timestamp: string;
|
|
2014
|
+
iteration: number;
|
|
2015
|
+
patternsDetected: string[];
|
|
2016
|
+
patternsResolved: string[];
|
|
2017
|
+
health: number;
|
|
2018
|
+
grade: string;
|
|
2019
|
+
dpoPairsExtracted: number;
|
|
2020
|
+
changesApplied: string[];
|
|
2021
|
+
}
|
|
2022
|
+
interface EvolutionHistory {
|
|
2023
|
+
agent: string;
|
|
2024
|
+
entries: EvolutionEntry[];
|
|
2025
|
+
totalSessions: number;
|
|
2026
|
+
totalDPOPairs: number;
|
|
2027
|
+
firstSession: string;
|
|
2028
|
+
lastSession: string;
|
|
2029
|
+
}
|
|
2030
|
+
interface EvolutionSummary {
|
|
2031
|
+
totalEntries: number;
|
|
2032
|
+
totalDPOPairs: number;
|
|
2033
|
+
totalPatternsResolved: number;
|
|
2034
|
+
averageHealth: number;
|
|
2035
|
+
healthTrend: number[];
|
|
2036
|
+
latestGrade: string;
|
|
2037
|
+
uniquePatternsResolved: string[];
|
|
2038
|
+
averageIterationsPerRun: number;
|
|
2039
|
+
}
|
|
2040
|
+
/**
|
|
2041
|
+
* Load evolution history from `.holomime/evolution.json`.
|
|
2042
|
+
* Returns null if file doesn't exist or is invalid.
|
|
2043
|
+
*/
|
|
2044
|
+
declare function loadEvolution(agentName?: string): EvolutionHistory | null;
|
|
2045
|
+
/**
|
|
2046
|
+
* Append an evolution entry and write to disk.
|
|
2047
|
+
*/
|
|
2048
|
+
declare function appendEvolution(entry: EvolutionEntry, agentName?: string): void;
|
|
2049
|
+
/**
|
|
2050
|
+
* Compute summary statistics from evolution history.
|
|
2051
|
+
*/
|
|
2052
|
+
declare function getEvolutionSummary(history: EvolutionHistory): EvolutionSummary;
|
|
2053
|
+
|
|
2054
|
+
/**
|
|
2055
|
+
* Self-Audit — mid-conversation behavioral self-check for AI agents.
|
|
2056
|
+
*
|
|
2057
|
+
* Agents call this during live conversations to detect if they're falling
|
|
2058
|
+
* into problematic patterns. Returns flags with actionable suggestions.
|
|
2059
|
+
* No LLM required — pure rule-based analysis via the 7 detectors.
|
|
2060
|
+
*/
|
|
2061
|
+
|
|
2062
|
+
interface SelfAuditFlag {
|
|
2063
|
+
pattern: string;
|
|
2064
|
+
severity: string;
|
|
2065
|
+
suggestion: string;
|
|
2066
|
+
}
|
|
2067
|
+
interface SelfAuditResult {
|
|
2068
|
+
healthy: boolean;
|
|
2069
|
+
flags: SelfAuditFlag[];
|
|
2070
|
+
overallHealth: number;
|
|
2071
|
+
recommendation: "continue" | "adjust" | "pause_and_reflect";
|
|
2072
|
+
}
|
|
2073
|
+
/**
|
|
2074
|
+
* Run a self-audit on the current conversation.
|
|
2075
|
+
* Returns health score, flags, and a recommendation for how to proceed.
|
|
2076
|
+
*/
|
|
2077
|
+
declare function runSelfAudit(messages: Message[], personality?: any): SelfAuditResult;
|
|
2078
|
+
|
|
2079
|
+
/**
|
|
2080
|
+
* Benchmark Scenarios — 7 scripted conversations designed to
|
|
2081
|
+
* deliberately trigger each behavioral detector pattern.
|
|
2082
|
+
*
|
|
2083
|
+
* The "ARC-AGI for behavioral alignment."
|
|
2084
|
+
*
|
|
2085
|
+
* Each scenario provides user messages that pressure a specific weakness.
|
|
2086
|
+
* The agent's responses are then analyzed by the target detector to see
|
|
2087
|
+
* if the pattern was triggered (fail) or resisted (pass).
|
|
2088
|
+
*/
|
|
2089
|
+
|
|
2090
|
+
interface BenchmarkScenario {
|
|
2091
|
+
id: string;
|
|
2092
|
+
name: string;
|
|
2093
|
+
targetPattern: string;
|
|
2094
|
+
description: string;
|
|
2095
|
+
messages: Message[];
|
|
2096
|
+
}
|
|
2097
|
+
/**
|
|
2098
|
+
* Return all 7 benchmark scenarios.
|
|
2099
|
+
*/
|
|
2100
|
+
declare function getBenchmarkScenarios(): BenchmarkScenario[];
|
|
2101
|
+
/**
|
|
2102
|
+
* Get a specific scenario by ID.
|
|
2103
|
+
*/
|
|
2104
|
+
declare function getScenarioById(id: string): BenchmarkScenario | undefined;
|
|
2105
|
+
|
|
2106
|
+
/**
|
|
2107
|
+
* Benchmark Core — behavioral stress test runner.
|
|
2108
|
+
*
|
|
2109
|
+
* Runs 7 scripted scenarios against an agent (via LLM provider),
|
|
2110
|
+
* then analyzes the responses with the corresponding detector.
|
|
2111
|
+
* Pass = agent resisted the pattern. Fail = pattern was triggered.
|
|
2112
|
+
*/
|
|
2113
|
+
|
|
2114
|
+
interface BenchmarkResult {
|
|
2115
|
+
scenario: string;
|
|
2116
|
+
scenarioId: string;
|
|
2117
|
+
patternId: string;
|
|
2118
|
+
passed: boolean;
|
|
2119
|
+
severity: string;
|
|
2120
|
+
details: string;
|
|
2121
|
+
}
|
|
2122
|
+
interface BenchmarkReport {
|
|
2123
|
+
agent: string;
|
|
2124
|
+
timestamp: string;
|
|
2125
|
+
provider: string;
|
|
2126
|
+
model: string;
|
|
2127
|
+
results: BenchmarkResult[];
|
|
2128
|
+
passed: number;
|
|
2129
|
+
failed: number;
|
|
2130
|
+
score: number;
|
|
2131
|
+
grade: string;
|
|
2132
|
+
}
|
|
2133
|
+
interface BenchmarkCallbacks {
|
|
2134
|
+
onScenarioStart?: (scenario: BenchmarkScenario, index: number, total: number) => void;
|
|
2135
|
+
onScenarioEnd?: (result: BenchmarkResult, index: number) => void;
|
|
2136
|
+
onThinking?: (label: string) => {
|
|
2137
|
+
stop: () => void;
|
|
2138
|
+
};
|
|
2139
|
+
}
|
|
2140
|
+
/**
|
|
2141
|
+
* Run the full benchmark gauntlet.
|
|
2142
|
+
*
|
|
2143
|
+
* For each scenario:
|
|
2144
|
+
* 1. Build a system prompt from the personality spec
|
|
2145
|
+
* 2. Send scripted user messages to the LLM, collecting responses
|
|
2146
|
+
* 3. Run the target detector on the resulting conversation
|
|
2147
|
+
* 4. Pass = no actionable pattern triggered; Fail = warning/concern
|
|
2148
|
+
*/
|
|
2149
|
+
declare function runBenchmark(spec: any, provider: LLMProvider, options?: {
|
|
2150
|
+
scenarios?: string[];
|
|
2151
|
+
callbacks?: BenchmarkCallbacks;
|
|
2152
|
+
}): Promise<BenchmarkReport>;
|
|
2153
|
+
|
|
2154
|
+
/**
|
|
2155
|
+
* Benchmark Publishing — persist, load, and compare benchmark results.
|
|
2156
|
+
*
|
|
2157
|
+
* Saves results to .holomime/benchmarks/ for trending and public reporting.
|
|
2158
|
+
*/
|
|
2159
|
+
|
|
2160
|
+
interface PublishedBenchmark {
|
|
2161
|
+
agent: string;
|
|
2162
|
+
provider: string;
|
|
2163
|
+
model: string;
|
|
2164
|
+
timestamp: string;
|
|
2165
|
+
results: BenchmarkResult[];
|
|
2166
|
+
score: number;
|
|
2167
|
+
grade: string;
|
|
2168
|
+
metadata: {
|
|
2169
|
+
holomimeVersion: string;
|
|
2170
|
+
scenarioCount: number;
|
|
2171
|
+
};
|
|
2172
|
+
}
|
|
2173
|
+
interface BenchmarkComparison {
|
|
2174
|
+
before: PublishedBenchmark;
|
|
2175
|
+
after: PublishedBenchmark;
|
|
2176
|
+
scoreDelta: number;
|
|
2177
|
+
gradeChange: string;
|
|
2178
|
+
improved: string[];
|
|
2179
|
+
regressed: string[];
|
|
2180
|
+
unchanged: string[];
|
|
2181
|
+
}
|
|
2182
|
+
/**
|
|
2183
|
+
* Save a benchmark report to disk.
|
|
2184
|
+
* Returns the path to the saved file.
|
|
2185
|
+
*/
|
|
2186
|
+
declare function saveBenchmarkResult(report: BenchmarkReport, outputDir?: string): string;
|
|
2187
|
+
/**
|
|
2188
|
+
* Load all saved benchmark results from the benchmarks directory.
|
|
2189
|
+
*/
|
|
2190
|
+
declare function loadBenchmarkResults(dir?: string): PublishedBenchmark[];
|
|
2191
|
+
/**
|
|
2192
|
+
* Load the most recent benchmark result for a given provider/model.
|
|
2193
|
+
*/
|
|
2194
|
+
declare function loadLatestBenchmark(provider: string, model: string, dir?: string): PublishedBenchmark | null;
|
|
2195
|
+
/**
|
|
2196
|
+
* Compare two benchmark results and produce a structured diff.
|
|
2197
|
+
*/
|
|
2198
|
+
declare function compareBenchmarks(before: PublishedBenchmark, after: PublishedBenchmark): BenchmarkComparison;
|
|
2199
|
+
/**
|
|
2200
|
+
* Generate a markdown-formatted benchmark results table.
|
|
2201
|
+
*/
|
|
2202
|
+
declare function generateBenchmarkMarkdown(benchmarks: PublishedBenchmark[]): string;
|
|
2203
|
+
/**
|
|
2204
|
+
* Generate a comparison markdown string.
|
|
2205
|
+
*/
|
|
2206
|
+
declare function generateComparisonMarkdown(comparison: BenchmarkComparison): string;
|
|
2207
|
+
|
|
2208
|
+
/**
|
|
2209
|
+
* Watch Core — continuous behavioral drift detection.
|
|
2210
|
+
*
|
|
2211
|
+
* Long-running process that monitors a directory for new conversation logs.
|
|
2212
|
+
* When drift is detected (severity >= threshold), optionally triggers evolve.
|
|
2213
|
+
*/
|
|
2214
|
+
|
|
2215
|
+
interface WatchOptions {
|
|
2216
|
+
watchDir: string;
|
|
2217
|
+
specPath: string;
|
|
2218
|
+
provider: LLMProvider;
|
|
2219
|
+
checkInterval?: number;
|
|
2220
|
+
autoEvolve?: boolean;
|
|
2221
|
+
threshold?: AutopilotThreshold;
|
|
2222
|
+
maxEvolveIterations?: number;
|
|
2223
|
+
callbacks?: WatchCallbacks;
|
|
2224
|
+
}
|
|
2225
|
+
interface WatchCallbacks {
|
|
2226
|
+
onScan?: (fileCount: number) => void;
|
|
2227
|
+
onNewFile?: (filename: string) => void;
|
|
2228
|
+
onDiagnosis?: (filename: string, diagnosis: PreSessionDiagnosis) => void;
|
|
2229
|
+
onDriftDetected?: (filename: string, severity: string, patterns: string[]) => void;
|
|
2230
|
+
onEvolveTriggered?: (filename: string) => void;
|
|
2231
|
+
onEvolveComplete?: (filename: string, result: EvolveResult) => void;
|
|
2232
|
+
onError?: (filename: string, error: string) => void;
|
|
2233
|
+
}
|
|
2234
|
+
interface WatchEvent {
|
|
2235
|
+
timestamp: string;
|
|
2236
|
+
type: "scan" | "new_file" | "drift_detected" | "evolve_triggered" | "evolve_complete" | "error";
|
|
2237
|
+
filename?: string;
|
|
2238
|
+
agentName?: string;
|
|
2239
|
+
details?: any;
|
|
2240
|
+
}
|
|
2241
|
+
interface WatchHandle {
|
|
2242
|
+
stop: () => void;
|
|
2243
|
+
events: WatchEvent[];
|
|
2244
|
+
}
|
|
2245
|
+
declare function severityMeetsThreshold(severity: string, threshold: AutopilotThreshold): boolean;
|
|
2246
|
+
/**
|
|
2247
|
+
* Start watching a directory for new conversation logs.
|
|
2248
|
+
* Returns a handle with a stop() function and accumulated events.
|
|
2249
|
+
*/
|
|
2250
|
+
declare function startWatch(spec: any, options: WatchOptions): WatchHandle;
|
|
2251
|
+
|
|
2252
|
+
/**
|
|
2253
|
+
* Fleet Core — multi-agent behavioral monitoring.
|
|
2254
|
+
*
|
|
2255
|
+
* Monitor N agents simultaneously. Each agent has its own personality spec
|
|
2256
|
+
* and log directory. Fleet wraps startWatch per agent and aggregates events.
|
|
2257
|
+
*/
|
|
2258
|
+
|
|
2259
|
+
interface FleetAgent {
|
|
2260
|
+
name: string;
|
|
2261
|
+
specPath: string;
|
|
2262
|
+
logDir: string;
|
|
2263
|
+
}
|
|
2264
|
+
interface FleetConfig {
|
|
2265
|
+
agents: FleetAgent[];
|
|
2266
|
+
}
|
|
2267
|
+
interface FleetAgentStatus {
|
|
2268
|
+
name: string;
|
|
2269
|
+
filesProcessed: number;
|
|
2270
|
+
driftEvents: number;
|
|
2271
|
+
lastDriftSeverity: string | null;
|
|
2272
|
+
lastScanAt: string | null;
|
|
2273
|
+
evolveCount: number;
|
|
2274
|
+
errors: number;
|
|
2275
|
+
}
|
|
2276
|
+
interface FleetOptions {
|
|
2277
|
+
provider: LLMProvider;
|
|
2278
|
+
checkInterval?: number;
|
|
2279
|
+
threshold?: AutopilotThreshold;
|
|
2280
|
+
autoEvolve?: boolean;
|
|
2281
|
+
maxEvolveIterations?: number;
|
|
2282
|
+
callbacks?: FleetCallbacks;
|
|
2283
|
+
}
|
|
2284
|
+
interface FleetCallbacks {
|
|
2285
|
+
onAgentEvent?: (agentName: string, event: WatchEvent) => void;
|
|
2286
|
+
onError?: (agentName: string, error: string) => void;
|
|
2287
|
+
}
|
|
2288
|
+
interface FleetHandle {
|
|
2289
|
+
stop: () => void;
|
|
2290
|
+
getStatus: () => FleetAgentStatus[];
|
|
2291
|
+
events: WatchEvent[];
|
|
2292
|
+
}
|
|
2293
|
+
/**
|
|
2294
|
+
* Load fleet configuration from a fleet.json file.
|
|
2295
|
+
*/
|
|
2296
|
+
declare function loadFleetConfig(configPath: string): FleetConfig;
|
|
2297
|
+
/**
|
|
2298
|
+
* Auto-discover agents in a directory.
|
|
2299
|
+
* Looks for subdirectories containing .personality.json and a logs/ subfolder.
|
|
2300
|
+
*/
|
|
2301
|
+
declare function discoverAgents(dir: string): FleetConfig;
|
|
2302
|
+
/**
|
|
2303
|
+
* Start monitoring all agents in the fleet.
|
|
2304
|
+
* Creates one startWatch handle per agent, tags events with agentName.
|
|
2305
|
+
*/
|
|
2306
|
+
declare function startFleet(config: FleetConfig, options: FleetOptions): FleetHandle;
|
|
2307
|
+
|
|
2308
|
+
/**
|
|
2309
|
+
* Certify Core — generate verifiable behavioral credentials for agents.
|
|
2310
|
+
*
|
|
2311
|
+
* A BehavioralCredential attests to an agent's alignment state at a point in time.
|
|
2312
|
+
* It includes spec hashes for verification, alignment scores, and certification metadata.
|
|
2313
|
+
*/
|
|
2314
|
+
interface BehavioralCredential {
|
|
2315
|
+
version: "1.0";
|
|
2316
|
+
agent: {
|
|
2317
|
+
name: string;
|
|
2318
|
+
handle: string;
|
|
2319
|
+
specHash: string;
|
|
2320
|
+
};
|
|
2321
|
+
alignment: {
|
|
2322
|
+
grade: string;
|
|
2323
|
+
score: number;
|
|
2324
|
+
driftScore: number;
|
|
2325
|
+
benchmarkPassed?: number;
|
|
2326
|
+
benchmarkTotal?: number;
|
|
2327
|
+
};
|
|
2328
|
+
certification: {
|
|
2329
|
+
certifiedAt: string;
|
|
2330
|
+
holomimeVersion: string;
|
|
2331
|
+
behavioralHash: string;
|
|
2332
|
+
specContentHash: string;
|
|
2333
|
+
method: string;
|
|
2334
|
+
};
|
|
2335
|
+
verifiable: {
|
|
2336
|
+
specPath: string;
|
|
2337
|
+
instructions: string;
|
|
2338
|
+
};
|
|
2339
|
+
}
|
|
2340
|
+
interface CertifyInput {
|
|
2341
|
+
spec: any;
|
|
2342
|
+
specPath: string;
|
|
2343
|
+
benchmarkReport?: {
|
|
2344
|
+
results: Array<{
|
|
2345
|
+
passed: boolean;
|
|
2346
|
+
score?: number;
|
|
2347
|
+
}>;
|
|
2348
|
+
overallScore?: number;
|
|
2349
|
+
grade?: string;
|
|
2350
|
+
};
|
|
2351
|
+
evolveResult?: {
|
|
2352
|
+
converged: boolean;
|
|
2353
|
+
finalTES?: number;
|
|
2354
|
+
totalIterations: number;
|
|
2355
|
+
grade?: string;
|
|
2356
|
+
};
|
|
2357
|
+
}
|
|
2358
|
+
interface VerifyResult {
|
|
2359
|
+
valid: boolean;
|
|
2360
|
+
reason?: string;
|
|
2361
|
+
}
|
|
2362
|
+
/**
|
|
2363
|
+
* Generate a behavioral credential for an agent.
|
|
2364
|
+
*/
|
|
2365
|
+
declare function generateCredential(input: CertifyInput): BehavioralCredential;
|
|
2366
|
+
/**
|
|
2367
|
+
* Verify a credential against a spec.
|
|
2368
|
+
* Checks that the spec hashes match.
|
|
2369
|
+
*/
|
|
2370
|
+
declare function verifyCredential(credential: BehavioralCredential, spec: any): VerifyResult;
|
|
2371
|
+
/**
|
|
2372
|
+
* Save a credential to the .holomime/credentials directory.
|
|
2373
|
+
* Returns the path where the credential was saved.
|
|
2374
|
+
*/
|
|
2375
|
+
declare function saveCredential(credential: BehavioralCredential, outputDir?: string): string;
|
|
2376
|
+
|
|
2377
|
+
/**
|
|
2378
|
+
* Anthropic Messages API client for HoloMime therapy sessions.
|
|
2379
|
+
* Uses native fetch — no SDK dependency.
|
|
2380
|
+
*/
|
|
2381
|
+
|
|
2382
|
+
declare class AnthropicProvider implements LLMProvider {
|
|
2383
|
+
name: string;
|
|
2384
|
+
modelName: string;
|
|
2385
|
+
private apiKey;
|
|
2386
|
+
constructor(apiKey: string, model?: string);
|
|
2387
|
+
chat(messages: LLMMessage[]): Promise<string>;
|
|
2388
|
+
chatStream(messages: LLMMessage[]): AsyncGenerator<string>;
|
|
2389
|
+
}
|
|
2390
|
+
|
|
2391
|
+
/**
|
|
2392
|
+
* OpenAI Chat Completions API client for HoloMime therapy sessions.
|
|
2393
|
+
* Uses native fetch — no SDK dependency.
|
|
2394
|
+
*/
|
|
2395
|
+
|
|
2396
|
+
declare class OpenAIProvider implements LLMProvider {
|
|
2397
|
+
name: string;
|
|
2398
|
+
modelName: string;
|
|
2399
|
+
private apiKey;
|
|
2400
|
+
constructor(apiKey: string, model?: string);
|
|
2401
|
+
chat(messages: LLMMessage[]): Promise<string>;
|
|
2402
|
+
chatStream(messages: LLMMessage[]): AsyncGenerator<string>;
|
|
2403
|
+
}
|
|
2404
|
+
|
|
2405
|
+
/**
|
|
2406
|
+
* Ollama local LLM client for therapy sessions and analysis.
|
|
2407
|
+
*/
|
|
2408
|
+
|
|
2409
|
+
/**
|
|
2410
|
+
* Ollama provider implementing the unified LLMProvider interface.
|
|
2411
|
+
*/
|
|
2412
|
+
declare class OllamaProvider implements LLMProvider {
|
|
2413
|
+
name: string;
|
|
2414
|
+
modelName: string;
|
|
2415
|
+
constructor(model: string);
|
|
2416
|
+
chat(messages: LLMMessage[]): Promise<string>;
|
|
2417
|
+
chatStream(messages: LLMMessage[]): AsyncGenerator<string>;
|
|
2418
|
+
}
|
|
2419
|
+
|
|
2420
|
+
/**
|
|
2421
|
+
* Unified conversation log adapter.
|
|
2422
|
+
* Auto-detects format or uses explicit format parameter.
|
|
2423
|
+
*/
|
|
2424
|
+
|
|
2425
|
+
type LogFormat = "holomime" | "chatgpt" | "claude" | "openai-api" | "auto";
|
|
2426
|
+
/**
|
|
2427
|
+
* Parse a conversation log from any supported format.
|
|
2428
|
+
* Returns normalized Conversation[].
|
|
2429
|
+
*/
|
|
2430
|
+
declare function parseConversationLog(raw: unknown, format?: LogFormat): Conversation[];
|
|
2431
|
+
|
|
2432
|
+
/**
|
|
2433
|
+
* ChatGPT export format adapter.
|
|
2434
|
+
* Handles the JSON extracted from ChatGPT's "Export data" ZIP.
|
|
2435
|
+
* The user should unzip first and pass the conversations.json file.
|
|
2436
|
+
*/
|
|
2437
|
+
|
|
2438
|
+
interface ChatGPTMessage {
|
|
2439
|
+
author: {
|
|
2440
|
+
role: string;
|
|
2441
|
+
};
|
|
2442
|
+
content: {
|
|
2443
|
+
parts?: (string | null)[];
|
|
2444
|
+
};
|
|
2445
|
+
create_time?: number | null;
|
|
2446
|
+
}
|
|
2447
|
+
interface ChatGPTNode {
|
|
2448
|
+
message: ChatGPTMessage | null;
|
|
2449
|
+
children?: string[];
|
|
2450
|
+
}
|
|
2451
|
+
interface ChatGPTConversation {
|
|
2452
|
+
title?: string;
|
|
2453
|
+
mapping: Record<string, ChatGPTNode>;
|
|
2454
|
+
}
|
|
2455
|
+
/**
|
|
2456
|
+
* Parse a ChatGPT export (conversations.json content).
|
|
2457
|
+
* Input is an array of conversation objects with `mapping` structure.
|
|
2458
|
+
*/
|
|
2459
|
+
declare function parseChatGPTExport(data: ChatGPTConversation[]): Conversation[];
|
|
2460
|
+
|
|
2461
|
+
/**
|
|
2462
|
+
* Claude export format adapter.
|
|
2463
|
+
* Handles the JSON from Claude's conversation export.
|
|
2464
|
+
*/
|
|
2465
|
+
|
|
2466
|
+
interface ClaudeChatMessage {
|
|
2467
|
+
sender: "human" | "assistant";
|
|
2468
|
+
text: string;
|
|
2469
|
+
created_at?: string;
|
|
2470
|
+
}
|
|
2471
|
+
interface ClaudeConversation {
|
|
2472
|
+
name?: string;
|
|
2473
|
+
uuid?: string;
|
|
2474
|
+
chat_messages: ClaudeChatMessage[];
|
|
2475
|
+
}
|
|
2476
|
+
interface ClaudeExport {
|
|
2477
|
+
conversations?: ClaudeConversation[];
|
|
2478
|
+
}
|
|
2479
|
+
/**
|
|
2480
|
+
* Parse a Claude export (conversations JSON).
|
|
2481
|
+
*/
|
|
2482
|
+
declare function parseClaudeExport(data: ClaudeExport | ClaudeConversation[]): Conversation[];
|
|
2483
|
+
|
|
2484
|
+
/**
|
|
2485
|
+
* OpenAI API log format adapter.
|
|
2486
|
+
* Handles ChatCompletion response objects (single or array).
|
|
2487
|
+
*/
|
|
2488
|
+
|
|
2489
|
+
interface OpenAIChoice {
|
|
2490
|
+
message: {
|
|
2491
|
+
role: string;
|
|
2492
|
+
content: string | null;
|
|
2493
|
+
};
|
|
2494
|
+
}
|
|
2495
|
+
interface OpenAIResponse {
|
|
2496
|
+
id?: string;
|
|
2497
|
+
choices: OpenAIChoice[];
|
|
2498
|
+
created?: number;
|
|
2499
|
+
}
|
|
2500
|
+
/**
|
|
2501
|
+
* Parse OpenAI API response logs.
|
|
2502
|
+
* Can handle a single response or an array of responses.
|
|
2503
|
+
* Also handles the common pattern of logging request+response pairs.
|
|
2504
|
+
*/
|
|
2505
|
+
declare function parseOpenAIAPILog(data: OpenAIResponse | OpenAIResponse[]): Conversation[];
|
|
2506
|
+
|
|
2507
|
+
/**
|
|
2508
|
+
* HoloMime Personality Marketplace — registry client.
|
|
2509
|
+
* Fetches personality profiles from a GitHub-hosted JSON registry.
|
|
2510
|
+
*/
|
|
2511
|
+
interface RegistryEntry {
|
|
2512
|
+
handle: string;
|
|
2513
|
+
name: string;
|
|
2514
|
+
purpose?: string;
|
|
2515
|
+
author: string;
|
|
2516
|
+
url: string;
|
|
2517
|
+
tags: string[];
|
|
2518
|
+
downloads: number;
|
|
2519
|
+
published_at: string;
|
|
2520
|
+
}
|
|
2521
|
+
interface Registry {
|
|
2522
|
+
version: string;
|
|
2523
|
+
personalities: RegistryEntry[];
|
|
2524
|
+
}
|
|
2525
|
+
/**
|
|
2526
|
+
* Fetch the personality registry index.
|
|
2527
|
+
*/
|
|
2528
|
+
declare function fetchRegistry(): Promise<Registry>;
|
|
2529
|
+
/**
|
|
2530
|
+
* Fetch a personality spec from a URL.
|
|
2531
|
+
*/
|
|
2532
|
+
declare function fetchPersonality(url: string): Promise<unknown>;
|
|
2533
|
+
/**
|
|
2534
|
+
* Create a GitHub Gist with a personality spec.
|
|
2535
|
+
* Requires a GITHUB_TOKEN with gist scope.
|
|
2536
|
+
*/
|
|
2537
|
+
declare function createGist(spec: unknown, handle: string, token: string): Promise<{
|
|
2538
|
+
url: string;
|
|
2539
|
+
rawUrl: string;
|
|
2540
|
+
}>;
|
|
2541
|
+
|
|
2542
|
+
/**
|
|
2543
|
+
* Detector Hub — Plugin interface for community-contributed behavioral detectors.
|
|
2544
|
+
*
|
|
2545
|
+
* Any function matching the DetectorFn signature can be registered as a detector.
|
|
2546
|
+
* Built-in detectors follow this same interface.
|
|
2547
|
+
*/
|
|
2548
|
+
|
|
2549
|
+
/** A detector is any function that analyzes messages and optionally returns a pattern. */
|
|
2550
|
+
type DetectorFn = (messages: Message[]) => DetectedPattern | null;
|
|
2551
|
+
/** Options for configuring a detector instance. */
|
|
2552
|
+
interface DetectorOptions {
|
|
2553
|
+
/** Override the default severity threshold. */
|
|
2554
|
+
threshold?: number;
|
|
2555
|
+
/** Custom pattern ID prefix (for namespacing). */
|
|
2556
|
+
prefix?: string;
|
|
2557
|
+
/** Additional configuration passed to the detector. */
|
|
2558
|
+
[key: string]: unknown;
|
|
2559
|
+
}
|
|
2560
|
+
/** A configurable detector factory — returns a DetectorFn with options baked in. */
|
|
2561
|
+
type DetectorFactory = (options?: DetectorOptions) => DetectorFn;
|
|
2562
|
+
interface HubDetector {
|
|
2563
|
+
/** Unique identifier (e.g., "holomime/apology" or "community/jargon-checker"). */
|
|
2564
|
+
id: string;
|
|
2565
|
+
/** Human-readable name. */
|
|
2566
|
+
name: string;
|
|
2567
|
+
/** Short description of what this detector catches. */
|
|
2568
|
+
description: string;
|
|
2569
|
+
/** Author handle. */
|
|
2570
|
+
author: string;
|
|
2571
|
+
/** Semantic version. */
|
|
2572
|
+
version: string;
|
|
2573
|
+
/** Pattern categories this detector covers. */
|
|
2574
|
+
categories: string[];
|
|
2575
|
+
/** Number of distinct signals this detector checks. */
|
|
2576
|
+
signalCount: number;
|
|
2577
|
+
/** The detector function. */
|
|
2578
|
+
detect: DetectorFn;
|
|
2579
|
+
/** Optional: configurable factory. */
|
|
2580
|
+
factory?: DetectorFactory;
|
|
2581
|
+
/** Tags for discovery. */
|
|
2582
|
+
tags: string[];
|
|
2583
|
+
/** Source URL (GitHub, npm, etc.). */
|
|
2584
|
+
source?: string;
|
|
2585
|
+
}
|
|
2586
|
+
/**
|
|
2587
|
+
* Register a detector in the hub.
|
|
2588
|
+
* Built-in detectors are registered at import time.
|
|
2589
|
+
* Community detectors are registered via `holomime hub install`.
|
|
2590
|
+
*/
|
|
2591
|
+
declare function registerDetector(detector: HubDetector): void;
|
|
2592
|
+
/** Get a registered detector by ID. */
|
|
2593
|
+
declare function getDetector(id: string): HubDetector | undefined;
|
|
2594
|
+
/** List all registered detectors. */
|
|
2595
|
+
declare function listDetectors(): HubDetector[];
|
|
2596
|
+
/** List detectors filtered by category. */
|
|
2597
|
+
declare function listDetectorsByCategory(category: string): HubDetector[];
|
|
2598
|
+
/** List detectors filtered by tag. */
|
|
2599
|
+
declare function listDetectorsByTag(tag: string): HubDetector[];
|
|
2600
|
+
/** Remove a detector from the registry. */
|
|
2601
|
+
declare function unregisterDetector(id: string): boolean;
|
|
2602
|
+
/** Get total signal count across all registered detectors. */
|
|
2603
|
+
declare function getTotalSignalCount(): number;
|
|
2604
|
+
/** Get unique category list across all detectors. */
|
|
2605
|
+
declare function getCategories(): string[];
|
|
2606
|
+
|
|
2607
|
+
/**
|
|
2608
|
+
* Register all 7 built-in detectors in the Hub.
|
|
2609
|
+
* This is called at module load time so built-in detectors are always available.
|
|
2610
|
+
*/
|
|
2611
|
+
|
|
2612
|
+
declare const BUILT_IN_DETECTORS: HubDetector[];
|
|
2613
|
+
/** Register all built-in detectors. */
|
|
2614
|
+
declare function registerBuiltInDetectors(): void;
|
|
2615
|
+
|
|
2616
|
+
/**
|
|
2617
|
+
* Composable Guard API — chain behavioral detectors like Guardrails AI chains validators.
|
|
2618
|
+
*
|
|
2619
|
+
* Usage:
|
|
2620
|
+
* import { Guard } from "holomime";
|
|
2621
|
+
*
|
|
2622
|
+
* const guard = Guard.create("my-agent")
|
|
2623
|
+
* .use(detectApologies)
|
|
2624
|
+
* .use(detectHedging)
|
|
2625
|
+
* .use(detectSentiment);
|
|
2626
|
+
*
|
|
2627
|
+
* const result = guard.run(messages);
|
|
2628
|
+
* if (!result.passed) {
|
|
2629
|
+
* console.log(result.patterns); // failing patterns
|
|
2630
|
+
* }
|
|
2631
|
+
*/
|
|
2632
|
+
|
|
2633
|
+
interface GuardResult {
|
|
2634
|
+
/** Whether all detectors passed (no warning/concern patterns). */
|
|
2635
|
+
passed: boolean;
|
|
2636
|
+
/** Agent name. */
|
|
2637
|
+
agent: string;
|
|
2638
|
+
/** Total messages analyzed. */
|
|
2639
|
+
messagesAnalyzed: number;
|
|
2640
|
+
/** Patterns that triggered (warning or concern severity). */
|
|
2641
|
+
patterns: DetectedPattern[];
|
|
2642
|
+
/** Healthy patterns (info severity). */
|
|
2643
|
+
healthy: DetectedPattern[];
|
|
2644
|
+
/** All detectors that were run. */
|
|
2645
|
+
detectorsRun: number;
|
|
2646
|
+
/** Timestamp. */
|
|
2647
|
+
timestamp: string;
|
|
2648
|
+
/** Overall severity: "clean" | "warning" | "concern". */
|
|
2649
|
+
severity: "clean" | "warning" | "concern";
|
|
2650
|
+
}
|
|
2651
|
+
interface GuardEntry {
|
|
2652
|
+
detector: DetectorFn;
|
|
2653
|
+
id?: string;
|
|
2654
|
+
}
|
|
2655
|
+
declare class Guard {
|
|
2656
|
+
private entries;
|
|
2657
|
+
private agentName;
|
|
2658
|
+
private constructor();
|
|
2659
|
+
/** Create a new Guard for an agent. */
|
|
2660
|
+
static create(agentName?: string): Guard;
|
|
2661
|
+
/**
|
|
2662
|
+
* Add a detector to the guard chain.
|
|
2663
|
+
*
|
|
2664
|
+
* Accepts:
|
|
2665
|
+
* - A DetectorFn: `guard.use(detectApologies)`
|
|
2666
|
+
* - A Hub detector ID: `guard.use("holomime/apology")`
|
|
2667
|
+
* - A HubDetector object: `guard.use(myCustomDetector)`
|
|
2668
|
+
* - A DetectorFactory with options: `guard.use(myFactory, { threshold: 0.3 })`
|
|
2669
|
+
*/
|
|
2670
|
+
use(detector: DetectorFn | string | HubDetector, options?: DetectorOptions): Guard;
|
|
2671
|
+
/** Add all built-in detectors to the guard. */
|
|
2672
|
+
useAll(): Guard;
|
|
2673
|
+
/** Run all chained detectors against the messages. */
|
|
2674
|
+
run(messages: Message[]): GuardResult;
|
|
2675
|
+
/** Get the number of detectors in the chain. */
|
|
2676
|
+
get length(): number;
|
|
2677
|
+
}
|
|
2678
|
+
|
|
2679
|
+
/**
|
|
2680
|
+
* Behavioral Alignment Index — a living benchmark comparing
|
|
2681
|
+
* baseline models, RLHF-only, and HoloMime-aligned agents.
|
|
2682
|
+
*
|
|
2683
|
+
* Modeled after Guardrails AI's "Guardrails Index" —
|
|
2684
|
+
* positions HoloMime as the authority on behavioral alignment evaluation.
|
|
2685
|
+
*/
|
|
2686
|
+
|
|
2687
|
+
interface IndexEntry {
|
|
2688
|
+
/** Display name (e.g., "Claude Sonnet 4 + HoloMime"). */
|
|
2689
|
+
name: string;
|
|
2690
|
+
/** Model provider. */
|
|
2691
|
+
provider: string;
|
|
2692
|
+
/** Model name. */
|
|
2693
|
+
model: string;
|
|
2694
|
+
/** Configuration: "baseline" | "rlhf-only" | "guardrails" | "holomime" | "holomime+guardrails". */
|
|
2695
|
+
configuration: string;
|
|
2696
|
+
/** Benchmark report. */
|
|
2697
|
+
report: BenchmarkReport;
|
|
2698
|
+
/** When this entry was generated. */
|
|
2699
|
+
generatedAt: string;
|
|
2700
|
+
/** HoloMime version used. */
|
|
2701
|
+
holomimeVersion: string;
|
|
2702
|
+
/** Notes about the run. */
|
|
2703
|
+
notes?: string;
|
|
2704
|
+
}
|
|
2705
|
+
interface BehavioralIndex {
|
|
2706
|
+
/** Index version. */
|
|
2707
|
+
version: string;
|
|
2708
|
+
/** When the index was last updated. */
|
|
2709
|
+
updatedAt: string;
|
|
2710
|
+
/** All entries in the index. */
|
|
2711
|
+
entries: IndexEntry[];
|
|
2712
|
+
/** Scenario IDs covered. */
|
|
2713
|
+
scenarios: string[];
|
|
2714
|
+
/** Methodology description. */
|
|
2715
|
+
methodology: string;
|
|
2716
|
+
}
|
|
2717
|
+
interface IndexComparison {
|
|
2718
|
+
/** Scenario-level comparison across entries. */
|
|
2719
|
+
scenarioMatrix: {
|
|
2720
|
+
scenarioId: string;
|
|
2721
|
+
scenarioName: string;
|
|
2722
|
+
results: {
|
|
2723
|
+
entryName: string;
|
|
2724
|
+
passed: boolean;
|
|
2725
|
+
severity: string;
|
|
2726
|
+
}[];
|
|
2727
|
+
}[];
|
|
2728
|
+
/** Rankings by score. */
|
|
2729
|
+
rankings: {
|
|
2730
|
+
name: string;
|
|
2731
|
+
score: number;
|
|
2732
|
+
grade: string;
|
|
2733
|
+
passed: number;
|
|
2734
|
+
failed: number;
|
|
2735
|
+
}[];
|
|
2736
|
+
/** Category-level aggregations. */
|
|
2737
|
+
categoryScores: {
|
|
2738
|
+
category: string;
|
|
2739
|
+
results: {
|
|
2740
|
+
entryName: string;
|
|
2741
|
+
score: number;
|
|
2742
|
+
}[];
|
|
2743
|
+
}[];
|
|
2744
|
+
}
|
|
2745
|
+
declare function createIndexEntry(name: string, provider: string, model: string, configuration: string, report: BenchmarkReport, notes?: string): IndexEntry;
|
|
2746
|
+
declare function createIndex(entries: IndexEntry[]): BehavioralIndex;
|
|
2747
|
+
declare function compareIndex(index: BehavioralIndex): IndexComparison;
|
|
2748
|
+
declare function generateIndexMarkdown(index: BehavioralIndex): string;
|
|
2749
|
+
|
|
2750
|
+
/**
|
|
2751
|
+
* HoloMime MCP Server — exposes diagnose, assess, and profile as MCP tools.
|
|
2752
|
+
* Agents can self-diagnose by calling these tools.
|
|
2753
|
+
*
|
|
2754
|
+
* Run: holomime-mcp (stdio transport)
|
|
2755
|
+
*/
|
|
2756
|
+
declare function startMCPServer(): Promise<void>;
|
|
2757
|
+
|
|
2758
|
+
export { ARCHETYPES, ATTACHMENT_STYLES, type AlpacaExample, AnthropicProvider, type ArchetypeTemplate, type AssessmentReport, type AssessmentResult, type AttachmentStyle, type AutopilotResult, type AutopilotThreshold, BUILT_IN_DETECTORS, type BehavioralCredential, type BehavioralIndex, type BenchmarkCallbacks, type BenchmarkComparison, type BenchmarkReport, type BenchmarkResult, type BenchmarkScenario, type BigFive, CATEGORIES, type CertifyInput, type Communication, type CompileInput, type CompiledConfig, type Conversation, type ConversationLog, DIMENSIONS, type DPOPair, type DetectedPattern, type DetectorFactory, type DetectorFn, type DetectorOptions, type DiagnosisResult, type Domain, type EvolutionEntry, type EvolutionHistory, type EvolutionSummary, type EvolveCallbacks, type EvolveOptions, type EvolveResult, type FleetAgent, type FleetAgentStatus, type FleetConfig, type FleetHandle, type FleetOptions, type Growth, type GrowthArea, type GrowthReport, type GrowthSnapshot, Guard, type GuardEntry, type GuardResult, type HFPushOptions, type HFPushResult, type HubDetector, type IndexComparison, type IndexEntry, type IterationResult, LEARNING_ORIENTATIONS, type LLMMessage, type LLMProvider, type LearningOrientation, type LogFormat, type Message, OllamaProvider, OpenAIProvider, type OutcomeReport, PROVIDER_PARAMS, type PatternDelta, type PatternReport, type PersonalitySpec, type PhaseConfig, type PreSessionDiagnosis, type Prescription, type Provider, type ProviderConfig, type PublishedBenchmark, type RLHFExample, type Registry, type RegistryEntry, SURFACE_MULTIPLIERS, type SelfAuditFlag, type SelfAuditResult, type SessionCallbacks, type SessionOptions, type SessionOutcome, type SessionTranscript, type SessionTurn, type Severity, type Surface, THERAPY_DIMENSIONS, THERAPY_PHASES, type TherapyDimensions, type TherapyPhase, type TrainingExport, type TraitAlignment, type TraitScores, type TreatmentGoal, type TreatmentPlan, type TreatmentProgressReport, type VerifyResult, type WatchCallbacks, type WatchEvent, type WatchHandle, type WatchOptions, appendEvolution, applyRecommendations, bigFiveSchema, buildPatientSystemPrompt, buildTherapistSystemPrompt, communicationSchema, compareBenchmarks, compareIndex, compile, compileForOpenClaw, compiledConfigSchema, computeDimensionScore, conversationLogSchema, conversationSchema, convertToHFFormat, createGist, createIndex, createIndexEntry, createProvider, createTreatmentPlan, deepMergeSpec, detectApologies, detectBoundaryIssues, detectFormalityIssues, detectHedging, detectRecoveryPatterns, detectSentiment, detectVerbosity, discoverAgents, domainSchema, evaluateOutcome, exportTrainingData, extractAlpacaExamples, extractDPOPairs, extractRLHFExamples, extractRecommendations, fetchPersonality, fetchRegistry, generateBenchmarkMarkdown, generateComparisonMarkdown, generateCredential, generateIndexMarkdown, generatePrescriptions, generateProgressReport, generateSystemPrompt, getArchetype, getArchetypesByCategory, getBenchmarkScenarios, getCategories, getDetector, getDimension, getEvolutionSummary, getInheritanceChain, getScenarioById, getTotalSignalCount, growthAreaSchema, growthSchema, listArchetypeIds, listDetectors, listDetectorsByCategory, listDetectorsByTag, loadBenchmarkResults, loadEvolution, loadFleetConfig, loadLatestBenchmark, loadSpec, loadTranscripts, loadTreatmentPlan, messageSchema, parseChatGPTExport, parseClaudeExport, parseConversationLog, parseOpenAIAPILog, personalitySpecSchema, providerSchema, pushToHFHub, recordSessionOutcome, registerBuiltInDetectors, registerDetector, resolveInheritance, runAssessment, runAutopilot, runBenchmark, runDiagnosis, runEvolve, runPreSessionDiagnosis, runSelfAudit, runTherapySession, saveBenchmarkResult, saveCredential, saveTranscript, saveTreatmentPlan, scoreLabel, scoreTraitsFromMessages, severityMeetsThreshold, severitySchema, startFleet, startMCPServer, startWatch, summarize, summarizeTherapy, surfaceSchema, therapyDimensionsSchema, therapyScoreLabel, unregisterDetector, verifyCredential };
|