-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathagentcourt.d.ts
More file actions
63 lines (56 loc) · 1.55 KB
/
Copy pathagentcourt.d.ts
File metadata and controls
63 lines (56 loc) · 1.55 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
/** AgentCourt TypeScript declarations */
export interface Evidence {
type: string;
claimed_fact: string;
source?: string;
timestamp?: string;
}
export interface Ruling {
caseId: string;
status: string;
matchedRule: string;
remedy: string;
confidence: 'high' | 'medium' | 'low';
rulingText: string;
reasoning: string;
policyName: string;
evidenceScores: Array<{ id: string; type: string; score: number }>;
factsEstablished: Array<{ fact: string; value: string }>;
factsDisputed: Array<{ fact: string; value: string }>;
factsUnknown: Array<{ fact: string; reason: string }>;
ruledAt: string;
engineVersion: string;
raw: Record<string, any>;
}
export interface ResolveParams {
policy: string;
claim: string;
claimant: string;
respondent: string;
desiredRemedy?: string;
evidence?: Evidence[];
metadata?: Record<string, any>;
contract?: Record<string, any>;
}
export interface PolicyInfo {
name: string;
version: string;
description: string;
rules_count: number;
}
export interface HealthInfo {
status: string;
version: string;
engine: string;
policies: string[];
}
export declare class AgentCourt {
constructor(apiUrl?: string, timeout?: number);
resolve(params: ResolveParams): Promise<Ruling>;
listPolicies(): Promise<PolicyInfo[]>;
getPolicy(name: string): Promise<PolicyInfo>;
getVerdict(caseId: string): Promise<Ruling>;
listVerdicts(): Promise<{ total: number; verdicts: Ruling[] }>;
health(): Promise<HealthInfo>;
}
export declare function resolveDispute(params: ResolveParams): Promise<Ruling>;