holomime 1.5.0 → 1.6.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/README.md +82 -0
- package/dist/cli.js +550 -123
- package/dist/index.d.ts +388 -1
- package/dist/index.js +930 -109
- package/dist/mcp-server.js +261 -9
- package/dist/neuralspace/index.html +7 -0
- package/dist/neuralspace/neuralspace.js +64 -1
- package/dist/neuralspace/styles.css +45 -0
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -2784,6 +2784,36 @@ interface CorpusFilter {
|
|
|
2784
2784
|
* Returns matching events, most recent first.
|
|
2785
2785
|
*/
|
|
2786
2786
|
declare function queryCorpus(filters?: CorpusFilter, corpusPath?: string): BehavioralEvent[];
|
|
2787
|
+
interface AnonymizedPatternReport {
|
|
2788
|
+
/** Pattern IDs detected (e.g., "over-apologizing", "hedge-stacking"). */
|
|
2789
|
+
patterns: string[];
|
|
2790
|
+
/** Severity per pattern. */
|
|
2791
|
+
severities: Record<string, string>;
|
|
2792
|
+
/** Number of messages analyzed (no content). */
|
|
2793
|
+
messageCount: number;
|
|
2794
|
+
/** Spec hash (anonymized — no actual spec content). */
|
|
2795
|
+
specHash: string;
|
|
2796
|
+
/** Holomime version. */
|
|
2797
|
+
version: string;
|
|
2798
|
+
/** Timestamp. */
|
|
2799
|
+
timestamp: string;
|
|
2800
|
+
}
|
|
2801
|
+
/**
|
|
2802
|
+
* Share anonymized behavioral patterns with the holomime.dev aggregate dataset.
|
|
2803
|
+
* Only shares pattern types + severity + context size — NO conversation content.
|
|
2804
|
+
*
|
|
2805
|
+
* This powers the data flywheel: more users → better pattern detection → more users.
|
|
2806
|
+
* Opt-in only — call `holomime telemetry --share-patterns` to enable.
|
|
2807
|
+
*/
|
|
2808
|
+
declare function shareAnonymizedPatterns(report: AnonymizedPatternReport, apiKey?: string, apiUrl?: string): Promise<{
|
|
2809
|
+
success: boolean;
|
|
2810
|
+
error?: string;
|
|
2811
|
+
}>;
|
|
2812
|
+
/**
|
|
2813
|
+
* Build an anonymized pattern report from a diagnosis result.
|
|
2814
|
+
* Strips all conversation content — only pattern metadata is shared.
|
|
2815
|
+
*/
|
|
2816
|
+
declare function buildAnonymizedReport(patternIds: string[], severities: Record<string, string>, messageCount: number, specHash: string): AnonymizedPatternReport;
|
|
2787
2817
|
|
|
2788
2818
|
/**
|
|
2789
2819
|
* Unified LLM provider interface for HoloMime.
|
|
@@ -2846,6 +2876,12 @@ interface PatternTracker {
|
|
|
2846
2876
|
interventionsAttempted: string[];
|
|
2847
2877
|
lastSeverity: string;
|
|
2848
2878
|
lastSeen: string;
|
|
2879
|
+
/** Confidence score 0-1 — increases with repeated detection, decays when not seen. */
|
|
2880
|
+
confidence?: number;
|
|
2881
|
+
/** Trend direction based on recent severity changes. */
|
|
2882
|
+
trending?: "improving" | "worsening" | "stable";
|
|
2883
|
+
/** History of severity scores for trend calculation. */
|
|
2884
|
+
severityHistory?: string[];
|
|
2849
2885
|
}
|
|
2850
2886
|
interface RollingContext {
|
|
2851
2887
|
recentSummaries: SessionSummary[];
|
|
@@ -2880,6 +2916,11 @@ declare function summarizeSessionForMemory(transcript: SessionTranscript, provid
|
|
|
2880
2916
|
* Kept concise (~500 tokens) to avoid overwhelming the context.
|
|
2881
2917
|
*/
|
|
2882
2918
|
declare function getMemoryContext(memory: TherapyMemory): string;
|
|
2919
|
+
/**
|
|
2920
|
+
* Decay confidence for patterns not seen in the current session.
|
|
2921
|
+
* Call after addSessionToMemory with the list of detected pattern IDs.
|
|
2922
|
+
*/
|
|
2923
|
+
declare function decayUnseenPatterns(memory: TherapyMemory, seenPatternIds: string[]): void;
|
|
2883
2924
|
/**
|
|
2884
2925
|
* Derive the agent handle from a spec for memory lookup.
|
|
2885
2926
|
*/
|
|
@@ -3421,6 +3462,26 @@ interface EvolveOptions {
|
|
|
3421
3462
|
specPath?: string;
|
|
3422
3463
|
exportDpoPath?: string;
|
|
3423
3464
|
callbacks?: EvolveCallbacks;
|
|
3465
|
+
/**
|
|
3466
|
+
* Use staging spec workflow (default: true).
|
|
3467
|
+
* Changes write to .personality.staging.json first.
|
|
3468
|
+
* Only committed to real spec on explicit approval.
|
|
3469
|
+
*/
|
|
3470
|
+
useStaging?: boolean;
|
|
3471
|
+
/** Auto-approve staging changes without prompt (for CI/automation). */
|
|
3472
|
+
autoApprove?: boolean;
|
|
3473
|
+
/** Called with the staging diff for approval. Return true to commit. */
|
|
3474
|
+
onStagingReview?: (diff: StagingDiff) => Promise<boolean>;
|
|
3475
|
+
}
|
|
3476
|
+
interface StagingDiff {
|
|
3477
|
+
/** Path to the staging spec file. */
|
|
3478
|
+
stagingPath: string;
|
|
3479
|
+
/** Human-readable diff of changes. */
|
|
3480
|
+
changes: string[];
|
|
3481
|
+
/** Before spec (original). */
|
|
3482
|
+
before: any;
|
|
3483
|
+
/** After spec (staged). */
|
|
3484
|
+
after: any;
|
|
3424
3485
|
}
|
|
3425
3486
|
interface IterationResult {
|
|
3426
3487
|
iteration: number;
|
|
@@ -3655,6 +3716,41 @@ declare function compareBenchmarks(before: PublishedBenchmark, after: PublishedB
|
|
|
3655
3716
|
* Generate a markdown-formatted benchmark results table.
|
|
3656
3717
|
*/
|
|
3657
3718
|
declare function generateBenchmarkMarkdown(benchmarks: PublishedBenchmark[]): string;
|
|
3719
|
+
interface LeaderboardSubmission {
|
|
3720
|
+
agent: string;
|
|
3721
|
+
provider: string;
|
|
3722
|
+
model: string;
|
|
3723
|
+
score: number;
|
|
3724
|
+
grade: string;
|
|
3725
|
+
scenarioResults: Array<{
|
|
3726
|
+
scenarioId: string;
|
|
3727
|
+
passed: boolean;
|
|
3728
|
+
}>;
|
|
3729
|
+
holomimeVersion: string;
|
|
3730
|
+
timestamp: string;
|
|
3731
|
+
}
|
|
3732
|
+
interface LeaderboardEntry {
|
|
3733
|
+
rank: number;
|
|
3734
|
+
agent: string;
|
|
3735
|
+
provider: string;
|
|
3736
|
+
model: string;
|
|
3737
|
+
score: number;
|
|
3738
|
+
grade: string;
|
|
3739
|
+
timestamp: string;
|
|
3740
|
+
}
|
|
3741
|
+
/**
|
|
3742
|
+
* Publish a benchmark result to the holomime.dev public leaderboard.
|
|
3743
|
+
* Requires an API key (from `holomime activate` or HOLOMIME_API_KEY env).
|
|
3744
|
+
*/
|
|
3745
|
+
declare function publishToLeaderboard(benchmark: PublishedBenchmark, apiKey?: string, apiUrl?: string): Promise<{
|
|
3746
|
+
success: boolean;
|
|
3747
|
+
rank?: number;
|
|
3748
|
+
error?: string;
|
|
3749
|
+
}>;
|
|
3750
|
+
/**
|
|
3751
|
+
* Fetch the current public leaderboard from holomime.dev.
|
|
3752
|
+
*/
|
|
3753
|
+
declare function fetchLeaderboard(limit?: number, apiUrl?: string): Promise<LeaderboardEntry[]>;
|
|
3658
3754
|
/**
|
|
3659
3755
|
* Generate a comparison markdown string.
|
|
3660
3756
|
*/
|
|
@@ -3735,6 +3831,8 @@ interface FleetOptions {
|
|
|
3735
3831
|
autoEvolve?: boolean;
|
|
3736
3832
|
maxEvolveIterations?: number;
|
|
3737
3833
|
callbacks?: FleetCallbacks;
|
|
3834
|
+
/** Max concurrent agents being processed. Default: 5. */
|
|
3835
|
+
concurrency?: number;
|
|
3738
3836
|
}
|
|
3739
3837
|
interface FleetCallbacks {
|
|
3740
3838
|
onAgentEvent?: (agentName: string, event: WatchEvent) => void;
|
|
@@ -4393,6 +4491,138 @@ interface WrappedAgent {
|
|
|
4393
4491
|
}
|
|
4394
4492
|
declare function wrapAgent(options: WrapAgentOptions): WrappedAgent;
|
|
4395
4493
|
|
|
4494
|
+
/**
|
|
4495
|
+
* Runtime Guard Middleware — intercept LLM calls and enforce behavioral alignment.
|
|
4496
|
+
*
|
|
4497
|
+
* Unlike Guard.run() which analyzes messages after the fact, the middleware
|
|
4498
|
+
* sits in the request path and can detect + correct responses before they
|
|
4499
|
+
* reach the user. Think firewall, not antivirus.
|
|
4500
|
+
*
|
|
4501
|
+
* Usage:
|
|
4502
|
+
* import { createGuardMiddleware } from "holomime";
|
|
4503
|
+
*
|
|
4504
|
+
* const middleware = createGuardMiddleware({
|
|
4505
|
+
* personality: ".personality.json",
|
|
4506
|
+
* mode: "enforce", // "monitor" | "enforce" | "strict"
|
|
4507
|
+
* onViolation: (v) => console.log(v),
|
|
4508
|
+
* });
|
|
4509
|
+
*
|
|
4510
|
+
* // Wrap an OpenAI call
|
|
4511
|
+
* const response = await middleware.wrap(
|
|
4512
|
+
* openai.chat.completions.create({ model: "gpt-4o", messages })
|
|
4513
|
+
* );
|
|
4514
|
+
*
|
|
4515
|
+
* // Or use as a message filter
|
|
4516
|
+
* const filtered = await middleware.filter(messages, assistantResponse);
|
|
4517
|
+
*/
|
|
4518
|
+
|
|
4519
|
+
type GuardMode =
|
|
4520
|
+
/** Monitor only — log violations but pass responses through unchanged. */
|
|
4521
|
+
"monitor"
|
|
4522
|
+
/** Enforce — attempt to correct responses that fail the guard. */
|
|
4523
|
+
| "enforce"
|
|
4524
|
+
/** Strict — block responses that fail the guard entirely. */
|
|
4525
|
+
| "strict";
|
|
4526
|
+
interface GuardViolation {
|
|
4527
|
+
/** The patterns that triggered. */
|
|
4528
|
+
patterns: DetectedPattern[];
|
|
4529
|
+
/** Overall severity. */
|
|
4530
|
+
severity: "warning" | "concern";
|
|
4531
|
+
/** The original response text. */
|
|
4532
|
+
originalResponse: string;
|
|
4533
|
+
/** The corrected response (only in enforce mode). */
|
|
4534
|
+
correctedResponse?: string;
|
|
4535
|
+
/** Whether the response was blocked (strict mode). */
|
|
4536
|
+
blocked: boolean;
|
|
4537
|
+
/** Timestamp. */
|
|
4538
|
+
timestamp: string;
|
|
4539
|
+
}
|
|
4540
|
+
interface GuardMiddlewareOptions {
|
|
4541
|
+
/** Path to .personality.json, inline spec, or pre-loaded PersonalitySpec. */
|
|
4542
|
+
personality?: string | object;
|
|
4543
|
+
/** Guard mode. Default: "enforce". */
|
|
4544
|
+
mode?: GuardMode;
|
|
4545
|
+
/** Callback fired on every violation. */
|
|
4546
|
+
onViolation?: (violation: GuardViolation) => void;
|
|
4547
|
+
/** Minimum severity to trigger action. Default: "warning". */
|
|
4548
|
+
minSeverity?: "warning" | "concern";
|
|
4549
|
+
/** Custom Guard instance (overrides default all-detectors guard). */
|
|
4550
|
+
guard?: Guard;
|
|
4551
|
+
/** Agent name for reports. */
|
|
4552
|
+
name?: string;
|
|
4553
|
+
/** Maximum correction attempts before falling back to original. Default: 1. */
|
|
4554
|
+
maxCorrections?: number;
|
|
4555
|
+
}
|
|
4556
|
+
interface GuardMiddleware {
|
|
4557
|
+
/** The underlying Guard instance. */
|
|
4558
|
+
guard: Guard;
|
|
4559
|
+
/** The guard mode. */
|
|
4560
|
+
mode: GuardMode;
|
|
4561
|
+
/**
|
|
4562
|
+
* Filter a single assistant response against the conversation history.
|
|
4563
|
+
* Returns the (possibly corrected) response text.
|
|
4564
|
+
*/
|
|
4565
|
+
filter(conversationHistory: Message[], assistantResponse: string): GuardFilterResult;
|
|
4566
|
+
/**
|
|
4567
|
+
* Wrap a Promise that resolves to an LLM API response.
|
|
4568
|
+
* Extracts the response text, runs the guard, and returns the
|
|
4569
|
+
* (possibly corrected) result in the same shape.
|
|
4570
|
+
*
|
|
4571
|
+
* Works with any object that has a nested string response —
|
|
4572
|
+
* provide an extractor/injector for custom shapes.
|
|
4573
|
+
*/
|
|
4574
|
+
wrap<T>(llmCall: Promise<T>, options?: WrapOptions<T>): Promise<GuardWrapResult<T>>;
|
|
4575
|
+
/** Get cumulative stats for this middleware instance. */
|
|
4576
|
+
stats(): GuardMiddlewareStats;
|
|
4577
|
+
}
|
|
4578
|
+
interface WrapOptions<T> {
|
|
4579
|
+
/** Extract the assistant's text from the LLM response object. */
|
|
4580
|
+
extractResponse?: (response: T) => string;
|
|
4581
|
+
/** Inject corrected text back into the response object. */
|
|
4582
|
+
injectResponse?: (response: T, corrected: string) => T;
|
|
4583
|
+
/** Conversation history (messages sent to the LLM). */
|
|
4584
|
+
messages?: Message[];
|
|
4585
|
+
}
|
|
4586
|
+
interface GuardFilterResult {
|
|
4587
|
+
/** The final response text (original or corrected). */
|
|
4588
|
+
text: string;
|
|
4589
|
+
/** Whether the guard passed. */
|
|
4590
|
+
passed: boolean;
|
|
4591
|
+
/** Full guard result. */
|
|
4592
|
+
guardResult: GuardResult;
|
|
4593
|
+
/** Violation details (if any). */
|
|
4594
|
+
violation?: GuardViolation;
|
|
4595
|
+
/** Whether the response was corrected. */
|
|
4596
|
+
corrected: boolean;
|
|
4597
|
+
}
|
|
4598
|
+
interface GuardWrapResult<T> {
|
|
4599
|
+
/** The LLM response (possibly with corrected text injected). */
|
|
4600
|
+
response: T;
|
|
4601
|
+
/** Whether the guard passed. */
|
|
4602
|
+
passed: boolean;
|
|
4603
|
+
/** Full guard result. */
|
|
4604
|
+
guardResult: GuardResult;
|
|
4605
|
+
/** Violation details (if any). */
|
|
4606
|
+
violation?: GuardViolation;
|
|
4607
|
+
/** Whether the response was corrected. */
|
|
4608
|
+
corrected: boolean;
|
|
4609
|
+
}
|
|
4610
|
+
interface GuardMiddlewareStats {
|
|
4611
|
+
/** Total calls processed. */
|
|
4612
|
+
totalCalls: number;
|
|
4613
|
+
/** Calls that passed the guard. */
|
|
4614
|
+
passed: number;
|
|
4615
|
+
/** Calls that violated. */
|
|
4616
|
+
violated: number;
|
|
4617
|
+
/** Calls that were corrected (enforce mode). */
|
|
4618
|
+
corrected: number;
|
|
4619
|
+
/** Calls that were blocked (strict mode). */
|
|
4620
|
+
blocked: number;
|
|
4621
|
+
/** Pattern frequency map. */
|
|
4622
|
+
patternCounts: Record<string, number>;
|
|
4623
|
+
}
|
|
4624
|
+
declare function createGuardMiddleware(options?: GuardMiddlewareOptions): GuardMiddleware;
|
|
4625
|
+
|
|
4396
4626
|
/**
|
|
4397
4627
|
* Behavioral Alignment Index — a living benchmark comparing
|
|
4398
4628
|
* baseline models, RLHF-only, and HoloMime-aligned agents.
|
|
@@ -4699,6 +4929,28 @@ declare function processReACTResponse(rawResponse: string, ctx: ReACTContext): {
|
|
|
4699
4929
|
*/
|
|
4700
4930
|
declare function buildReACTContext(agentHandle: string, diagnosis: PreSessionDiagnosis): ReACTContext;
|
|
4701
4931
|
|
|
4932
|
+
/**
|
|
4933
|
+
* Progressive Context Layers — load relevant context per therapy phase.
|
|
4934
|
+
*
|
|
4935
|
+
* Instead of dumping everything into the therapist prompt upfront,
|
|
4936
|
+
* inject focused context at each phase transition. This improves
|
|
4937
|
+
* LLM performance (less noise) and enables longer sessions.
|
|
4938
|
+
*
|
|
4939
|
+
* DeerFlow-inspired: skills/context loaded only when relevant to the sub-task.
|
|
4940
|
+
*/
|
|
4941
|
+
|
|
4942
|
+
interface ContextLayerInput {
|
|
4943
|
+
spec: any;
|
|
4944
|
+
diagnosis: PreSessionDiagnosis;
|
|
4945
|
+
memory?: TherapyMemory;
|
|
4946
|
+
interview?: InterviewResult;
|
|
4947
|
+
}
|
|
4948
|
+
/**
|
|
4949
|
+
* Get the context injection for a specific therapy phase.
|
|
4950
|
+
* Returns a string to append to the therapist's context at phase transition.
|
|
4951
|
+
*/
|
|
4952
|
+
declare function getPhaseContext(phase: TherapyPhase, input: ContextLayerInput): string | null;
|
|
4953
|
+
|
|
4702
4954
|
/**
|
|
4703
4955
|
* Custom Behavioral Detectors — user-defined detectors as JSON config.
|
|
4704
4956
|
*
|
|
@@ -4769,6 +5021,32 @@ declare function loadCustomDetectors(dir?: string): {
|
|
|
4769
5021
|
detectors: DetectorFn[];
|
|
4770
5022
|
errors: string[];
|
|
4771
5023
|
};
|
|
5024
|
+
/**
|
|
5025
|
+
* Parse a Markdown detector definition into a CustomDetectorConfig.
|
|
5026
|
+
*
|
|
5027
|
+
* Format:
|
|
5028
|
+
* ```markdown
|
|
5029
|
+
* ---
|
|
5030
|
+
* id: over-cautious
|
|
5031
|
+
* name: Over-Cautiousness
|
|
5032
|
+
* description: Excessive caveats and qualifiers
|
|
5033
|
+
* severity: warning
|
|
5034
|
+
* threshold: 20
|
|
5035
|
+
* prescription: "Increase emotional_stability.confidence to 0.8"
|
|
5036
|
+
* ---
|
|
5037
|
+
*
|
|
5038
|
+
* # Over-Cautiousness Detector
|
|
5039
|
+
*
|
|
5040
|
+
* ## Patterns
|
|
5041
|
+
* - `\b(possibly|maybe|perhaps)\b` weight=1.0
|
|
5042
|
+
* - `\b(tend to|might)\b` weight=0.8
|
|
5043
|
+
*
|
|
5044
|
+
* ## Examples
|
|
5045
|
+
* - BAD: "I might possibly help"
|
|
5046
|
+
* - GOOD: "I can help"
|
|
5047
|
+
* ```
|
|
5048
|
+
*/
|
|
5049
|
+
declare function parseMarkdownDetector(markdown: string): CustomDetectorConfig | null;
|
|
4772
5050
|
|
|
4773
5051
|
/**
|
|
4774
5052
|
* Cross-Agent Knowledge Sharing — fleet and network share learned interventions.
|
|
@@ -4930,4 +5208,113 @@ declare const THERAPIST_META_SPEC: PersonalitySpec;
|
|
|
4930
5208
|
*/
|
|
4931
5209
|
declare function buildAgentTherapistPrompt(therapistSpec: PersonalitySpec, patientSpec: PersonalitySpec, diagnosis: PreSessionDiagnosis): string;
|
|
4932
5210
|
|
|
4933
|
-
|
|
5211
|
+
/**
|
|
5212
|
+
* Compliance Audit Trail — tamper-evident logging for behavioral monitoring.
|
|
5213
|
+
*
|
|
5214
|
+
* EU AI Act + executive orders require auditable evidence of AI behavioral alignment.
|
|
5215
|
+
* This module provides:
|
|
5216
|
+
* 1. Append-only audit log with chained hashes (tamper-evident)
|
|
5217
|
+
* 2. Compliance report generation (Markdown/JSON)
|
|
5218
|
+
* 3. Continuous monitoring certificates
|
|
5219
|
+
*/
|
|
5220
|
+
|
|
5221
|
+
interface AuditEntry {
|
|
5222
|
+
/** Sequential entry number. */
|
|
5223
|
+
seq: number;
|
|
5224
|
+
/** ISO timestamp. */
|
|
5225
|
+
timestamp: string;
|
|
5226
|
+
/** Event type. */
|
|
5227
|
+
event: AuditEventType;
|
|
5228
|
+
/** Agent name/handle. */
|
|
5229
|
+
agent: string;
|
|
5230
|
+
/** Event-specific data. */
|
|
5231
|
+
data: Record<string, unknown>;
|
|
5232
|
+
/** Hash of this entry (sha256-like djb2 chain). */
|
|
5233
|
+
hash: string;
|
|
5234
|
+
/** Hash of the previous entry (chain link). */
|
|
5235
|
+
prevHash: string;
|
|
5236
|
+
}
|
|
5237
|
+
type AuditEventType = "diagnosis" | "session" | "evolve" | "certify" | "benchmark" | "drift_detected" | "spec_changed" | "guard_violation" | "manual_review";
|
|
5238
|
+
interface ComplianceReport {
|
|
5239
|
+
/** Report generation timestamp. */
|
|
5240
|
+
generatedAt: string;
|
|
5241
|
+
/** Agent name. */
|
|
5242
|
+
agent: string;
|
|
5243
|
+
/** Reporting period. */
|
|
5244
|
+
period: {
|
|
5245
|
+
from: string;
|
|
5246
|
+
to: string;
|
|
5247
|
+
};
|
|
5248
|
+
/** Summary statistics. */
|
|
5249
|
+
summary: {
|
|
5250
|
+
totalEvents: number;
|
|
5251
|
+
diagnoses: number;
|
|
5252
|
+
sessions: number;
|
|
5253
|
+
driftEvents: number;
|
|
5254
|
+
guardViolations: number;
|
|
5255
|
+
averageGrade: string;
|
|
5256
|
+
gradeHistory: Array<{
|
|
5257
|
+
date: string;
|
|
5258
|
+
grade: string;
|
|
5259
|
+
score: number;
|
|
5260
|
+
}>;
|
|
5261
|
+
};
|
|
5262
|
+
/** Credentials issued during period. */
|
|
5263
|
+
credentials: BehavioralCredential[];
|
|
5264
|
+
/** Chain integrity: whether the audit log is tamper-free. */
|
|
5265
|
+
chainIntegrity: boolean;
|
|
5266
|
+
/** Compliance standard references. */
|
|
5267
|
+
standards: string[];
|
|
5268
|
+
}
|
|
5269
|
+
interface MonitoringCertificate {
|
|
5270
|
+
/** Agent name. */
|
|
5271
|
+
agent: string;
|
|
5272
|
+
/** Certificate period. */
|
|
5273
|
+
period: {
|
|
5274
|
+
from: string;
|
|
5275
|
+
to: string;
|
|
5276
|
+
};
|
|
5277
|
+
/** Maintained grade during period. */
|
|
5278
|
+
maintainedGrade: string;
|
|
5279
|
+
/** Minimum score during period. */
|
|
5280
|
+
minScore: number;
|
|
5281
|
+
/** Maximum score during period. */
|
|
5282
|
+
maxScore: number;
|
|
5283
|
+
/** Total monitoring events. */
|
|
5284
|
+
totalEvents: number;
|
|
5285
|
+
/** Chain integrity verified. */
|
|
5286
|
+
verified: boolean;
|
|
5287
|
+
/** Issue timestamp. */
|
|
5288
|
+
issuedAt: string;
|
|
5289
|
+
/** Human-readable statement. */
|
|
5290
|
+
statement: string;
|
|
5291
|
+
}
|
|
5292
|
+
/**
|
|
5293
|
+
* Append an event to the tamper-evident audit log.
|
|
5294
|
+
* Each entry includes a hash chained to the previous entry.
|
|
5295
|
+
*/
|
|
5296
|
+
declare function appendAuditEntry(event: AuditEventType, agent: string, data: Record<string, unknown>, agentHandle?: string): AuditEntry;
|
|
5297
|
+
/**
|
|
5298
|
+
* Load all audit entries from the log.
|
|
5299
|
+
*/
|
|
5300
|
+
declare function loadAuditLog(agentHandle?: string): AuditEntry[];
|
|
5301
|
+
/**
|
|
5302
|
+
* Verify the integrity of the audit chain.
|
|
5303
|
+
* Returns true if no entries have been tampered with.
|
|
5304
|
+
*/
|
|
5305
|
+
declare function verifyAuditChain(entries: AuditEntry[]): boolean;
|
|
5306
|
+
/**
|
|
5307
|
+
* Generate a compliance report for a given period.
|
|
5308
|
+
*/
|
|
5309
|
+
declare function generateComplianceReport(agent: string, from: string, to: string, agentHandle?: string): ComplianceReport;
|
|
5310
|
+
/**
|
|
5311
|
+
* Generate a continuous monitoring certificate.
|
|
5312
|
+
* Attests that an agent maintained a certain behavioral grade over a period.
|
|
5313
|
+
*/
|
|
5314
|
+
declare function generateMonitoringCertificate(agent: string, from: string, to: string, agentHandle?: string): MonitoringCertificate;
|
|
5315
|
+
/**
|
|
5316
|
+
* Format a compliance report as Markdown.
|
|
5317
|
+
*/
|
|
5318
|
+
declare function formatComplianceReportMarkdown(report: ComplianceReport): string;
|
|
5319
|
+
|
|
5320
|
+
export { ARCHETYPES, ATTACHMENT_STYLES, type AlpacaExample, type AnonymizedPatternReport, AnthropicProvider, type ArchetypeTemplate, type AssessmentReport, type AssessmentResult, type AssetReview, type AssetType, type AttachmentStyle, type AuditEntry, type AuditEventType, type AutopilotResult, type AutopilotThreshold, type AwarenessDimension, BUILT_IN_DETECTORS, type BehavioralCredential, type BehavioralEvent, type BehavioralEventType, type BehavioralIndex, type BenchmarkCallbacks, type BenchmarkComparison, type BenchmarkReport, type BenchmarkResult, type BenchmarkScenario, type BigFive, CATEGORIES, type CertifyInput, type Communication, type CompileInput, type CompiledConfig, type CompiledEmbodiedConfig, type ComplianceReport, type ContextLayerInput, type Conversation, type ConversationLog, type CorpusFilter, type CorpusStats, type CrossAgentQuery, type CustomDetectorConfig, DEFAULT_OVERSIGHT, DIMENSIONS, type DPOPair, type DetectedPattern, type DetectorFactory, type DetectorFn$1 as DetectorFn, type DetectorOptions, type DiagnosisResult, type Domain, type EdgeType, type Embodiment, type EvolutionEntry, type EvolutionHistory, type EvolutionSummary, type EvolveCallbacks, type EvolveOptions, type EvolveResult, type Expression, type FleetAgent, type FleetAgentStatus, type FleetConfig, type FleetHandle, type FleetOptions, type GazePolicy, type Gesture, type GraphEdge, type GraphNode, type Growth, type GrowthArea, type GrowthReport, type GrowthSnapshot, Guard, type GuardEntry, type GuardFilterResult, type GuardMiddleware, type GuardMiddlewareOptions, type GuardMiddlewareStats, type GuardMode, type GuardResult, type GuardViolation, type GuardWrapResult, type HFPushOptions, type HFPushResult, type HapticPolicy, type HubDetector, type IndexComparison, type IndexEntry, type Intervention, type InterventionRepertoire, type InterventionSource, type InterviewCallbacks, type InterviewProbe, type InterviewResponse, type InterviewResult, type IterationResult, type KnowledgeGraph, LEARNING_ORIENTATIONS, type LLMMessage, type LLMProvider, type LeaderboardEntry, type LeaderboardSubmission, type LearningOrientation, LocalMarketplaceBackend, type LogFormat, type MarketplaceAsset, type MarketplaceBackend, MarketplaceClient, type MarketplaceSearchQuery, type MarketplaceSearchResult, type Message, type Modality, type MonitoringCertificate, type Morphology, type MotionParameters, type NetworkCallbacks, type NetworkConfig, type NetworkNode, type NetworkResult, type NetworkSession, type NodeType, OllamaProvider, OpenAIProvider, type OutcomeReport, type OversightAction, type OversightMode, type OversightNotification, type OversightPolicy, PROVIDER_PARAMS, type PairingStrategy, type PatternCorrelation, type PatternDelta, type PatternReport, type PatternStatus, type PatternTracker, type PersonalitySpec, type PhaseConfig, type PhysicalSafety, type PreSessionDiagnosis, type Prescription, type Prosody, type Provider, type ProviderConfig, type ProxemicZone, type PublishRequest, type PublishedBenchmark, type RLHFExample, type ReACTAction, type ReACTContext, type ReACTStep, type Registry, type RegistryEntry, type RollingContext, STANDARD_PROBES, SURFACE_MULTIPLIERS, type SafetyEnvelope, type SelfAuditFlag, type SelfAuditResult, type SessionCallbacks, type SessionOptions, type SessionOutcome, type SessionSummary, type SessionTranscript, type SessionTurn, type Severity, type SharedIntervention, type SharedKnowledge, type SortField, type StagingDiff, type Surface, type SyncAnchor, type SyncProfile, type SyncRule, THERAPIST_META_SPEC, THERAPY_DIMENSIONS, THERAPY_PHASES, type TherapistPromptOptions, type TherapyDimensions, type TherapyMemory, type TherapyPhase, type TrainingExport, type TraitAlignment, type TraitScores, type TreatmentGoal, type TreatmentPlan, type TreatmentProgressReport, type VerifyResult, type WatchCallbacks, type WatchEvent, type WatchHandle, type WatchOptions, type WrapAgentOptions, type WrapOptions, type WrappedAgent, addEdge, addNode, addSessionToMemory, agentHandleFromSpec, appendAuditEntry, appendEvolution, applyRecommendations, bigFiveSchema, buildAgentTherapistPrompt, buildAnonymizedReport, buildPatientSystemPrompt, buildReACTContext, buildReACTFraming, buildSharedKnowledge, buildTherapistSystemPrompt, checkApproval, checkIterationBudget, communicationSchema, compareBenchmarks, compareIndex, compile, compileCustomDetector, compileEmbodied, compileForOpenClaw, compiledConfigSchema, compiledEmbodiedConfigSchema, computeDimensionScore, computeGazePolicy, computeMotionParameters, computeProsody, computeProxemics, computeSyncProfile, conversationLogSchema, conversationSchema, convertToHFFormat, corpusStats, createGist, createGraph, createGuardMiddleware, createIndex, createIndexEntry, createMemory, createProvider, createRepertoire, createTreatmentPlan, decayUnseenPatterns, deepMergeSpec, detectApologies, detectBoundaryIssues, detectFormalityIssues, detectHedging, detectRecoveryPatterns, detectSentiment, detectVerbosity, discoverAgentData, discoverAgents, discoverNetworkAgents, domainSchema, embodimentSchema, emitBehavioralEvent, evaluateOutcome, expireOldEdges, exportTrainingData, expressionSchema, extractAlpacaExamples, extractDPOPairs, extractDPOPairsWithLLM, extractRLHFExamples, extractRecommendations, fetchLeaderboard, fetchPersonality, fetchRegistry, findCrossAgentCorrelations, findEdges, findNode, findNodesByType, formatComplianceReportMarkdown, gazePolicySchema, generateBenchmarkMarkdown, generateComparisonMarkdown, generateComplianceReport, generateCredential, generateIndexMarkdown, generateMonitoringCertificate, generatePrescriptions, generateProgressReport, generateSystemPrompt, gestureSchema, getAgentBehaviors, getArchetype, getArchetypesByCategory, getBenchmarkScenarios, getCategories, getDetector, getDimension, getEvolutionSummary, getInheritanceChain, getInterviewContext, getMarketplaceClient, getMemoryContext, getNeighbors, getPhaseContext, getScenarioById, getTotalSignalCount, graphStats, growthAreaSchema, growthSchema, hapticPolicySchema, hashSpec, learnIntervention, listArchetypeIds, listDetectors, listDetectorsByCategory, listDetectorsByTag, loadAuditLog, loadBenchmarkResults, loadCorpus, loadCustomDetectors, loadEvolution, loadFleetConfig, loadGraph, loadLatestBenchmark, loadMemory, loadNetworkConfig, loadRepertoire, loadSpec, loadTranscripts, loadTreatmentPlan, messageSchema, modalitySchema, morphologySchema, motionParametersSchema, pairAgents, parseAnthropicAPILog, parseChatGPTExport, parseClaudeExport, parseConversationLog, parseConversationLogFromString, parseJSONLLog, parseMarkdownDetector, parseOTelGenAIExport, parseOpenAIAPILog, personalitySpecSchema, physicalSafetySchema, populateFromDiagnosis, populateFromEvolve, populateFromSession, prescribeDPOPairs, processReACTResponse, prosodySchema, providerSchema, proxemicZoneSchema, publishToLeaderboard, pushToHFHub, queryCorpus, queryInterventions, querySharedKnowledge, recordInterventionOutcome, recordSessionOutcome, registerBuiltInDetectors, registerDetector, resetMarketplaceClient, resolveInheritance, resolveOversight, runAssessment, runAutopilot, runBenchmark, runDiagnosis, runEvolve, runInterview, runNetwork, runPreSessionDiagnosis, runSelfAudit, runTherapySession, safetyEnvelopeSchema, saveBenchmarkResult, saveCredential, saveGraph, saveMemory, saveRepertoire, saveTranscript, saveTreatmentPlan, scoreLabel, scoreTraitsFromMessages, seedBuiltInPersonalities, selectIntervention, severityMeetsThreshold, severitySchema, shareAnonymizedPatterns, startFleet, startMCPServer, startWatch, summarize, summarizeSessionForMemory, summarizeTherapy, surfaceSchema, syncAnchorSchema, syncProfileSchema, syncRuleSchema, therapyDimensionsSchema, therapyScoreLabel, transferIntervention, unregisterDetector, updateEdgeWeight, validateDetectorConfig, verifyAuditChain, verifyCredential, wrapAgent };
|