@lucern/sdk 1.0.29 → 1.0.30
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/CHANGELOG.md +8 -0
- package/dist/accessControl.d.ts +31 -31
- package/dist/accessControl.js +1 -0
- package/dist/adminClient.d.ts +74 -74
- package/dist/adminClient.js +38 -30
- package/dist/{answersClient.d.ts → answers-client.d.ts} +1 -1
- package/dist/{answersClient.js → answers-client.js} +2 -2
- package/dist/audience/index.d.ts +12 -12
- package/dist/{audiencesClient.d.ts → audiences-client.d.ts} +1 -1
- package/dist/audiences-client.js +107 -0
- package/dist/{auditClient.d.ts → audit-client.d.ts} +2 -3
- package/dist/{auditClient.js → audit-client.js} +8 -7
- package/dist/authContext.d.ts +26 -26
- package/dist/authDeviceClient.d.ts +11 -11
- package/dist/authDeviceClient.js +4 -6
- package/dist/beliefs/index.d.ts +56 -28
- package/dist/beliefs/index.js +2 -1
- package/dist/beliefsClient.d.ts +71 -63
- package/dist/beliefsClient.js +90 -67
- package/dist/{boundaryClientSurface.d.ts → boundary-client-surface.d.ts} +4 -4
- package/dist/{boundaryClientSurface.js → boundary-client-surface.js} +9 -7
- package/dist/client-assembly-types.d.ts +219 -0
- package/dist/client-assembly-types.js +2 -0
- package/dist/{clientConfig.d.ts → client-config.d.ts} +16 -32
- package/dist/client-config.js +2 -0
- package/dist/{clientEvidenceCompat.d.ts → client-evidence-compat.d.ts} +24 -24
- package/dist/{clientEvidenceCompat.js → client-evidence-compat.js} +2 -2
- package/dist/client.d.ts +1906 -352
- package/dist/client.js +34 -30
- package/dist/clientGraphNamespaces.d.ts +35 -25
- package/dist/clientGraphNamespaces.js +11 -5
- package/dist/clientHelpers.js +8 -5
- package/dist/clientKnowledgeNamespaces.d.ts +124 -84
- package/dist/clientKnowledgeNamespaces.js +35 -34
- package/dist/clientLocalHelpers.d.ts +81 -52
- package/dist/clientLocalHelpers.js +193 -43
- package/dist/clientPlatformNamespaces.d.ts +1541 -150
- package/dist/clientPlatformNamespaces.js +10 -5
- package/dist/clientRuntime.d.ts +1 -1
- package/dist/clientRuntime.js +1 -1
- package/dist/clientWorkflowNamespaces.d.ts +211 -97
- package/dist/clientWorkflowNamespaces.js +22 -19
- package/dist/contextClient.d.ts +2 -2
- package/dist/contextClient.js +79 -50
- package/dist/contextFacade.d.ts +1 -1
- package/dist/contextFacade.js +2 -0
- package/dist/contextPackCompiler.d.ts +52 -52
- package/dist/contextPackCompiler.js +192 -122
- package/dist/contextPackPolicy.d.ts +22 -22
- package/dist/contextPackPolicy.js +21 -9
- package/dist/contextPackSchema.d.ts +3 -3
- package/dist/contextPackSchema.js +1 -0
- package/dist/contextTypes.d.ts +155 -155
- package/dist/contracts/api-enums.contract.js +2 -11
- package/dist/contracts/auth-session.contract.d.ts +16 -16
- package/dist/contracts/auth-session.contract.js +3 -2
- package/dist/contracts/context-pack.contract.d.ts +216 -216
- package/dist/contracts/contextPack.js +2 -0
- package/dist/contracts/index.d.ts +1 -1
- package/dist/contracts/index.js +2 -1
- package/dist/contracts/lens-filter.contract.d.ts +8 -8
- package/dist/contracts/lens-filter.contract.js +10 -10
- package/dist/contracts/lens-workflow.contract.d.ts +32 -32
- package/dist/contracts/lens-workflow.contract.js +2 -1
- package/dist/contracts/lensFilter.js +2 -0
- package/dist/contracts/lensWorkflow.js +2 -0
- package/dist/contracts/mcpTools.d.ts +19 -19
- package/dist/contracts/mcpTools.js +3 -1
- package/dist/contracts/prompt.contract.d.ts +12 -12
- package/dist/contracts/prompt.js +1 -0
- package/dist/contracts/sdk-tools.contract.js +1 -0
- package/dist/contracts/sdkTools.js +2 -0
- package/dist/contracts/tool-contracts.js +1 -0
- package/dist/contracts/workflow-runtime.contract.d.ts +45 -45
- package/dist/contracts/workflow-runtime.contract.js +1 -5
- package/dist/contracts/workflowRuntime.js +2 -0
- package/dist/contradictions/index.d.ts +8 -8
- package/dist/contradictions/index.js +1 -0
- package/dist/control-plane.d.ts +10 -10
- package/dist/control-plane.js +2 -2
- package/dist/controlObjectOwnership.d.ts +11 -11
- package/dist/controlObjectOwnership.js +1 -0
- package/dist/coreClient.d.ts +51 -51
- package/dist/coreClient.js +269 -101
- package/dist/customTools.d.ts +19 -19
- package/dist/customTools.js +4 -2
- package/dist/decisions/index.d.ts +18 -18
- package/dist/decisions/index.js +1 -0
- package/dist/decisionsClient.d.ts +4 -4
- package/dist/decisionsClient.js +36 -27
- package/dist/edges/index.d.ts +20 -18
- package/dist/edges/index.js +1 -0
- package/dist/embeddingsClient.d.ts +29 -29
- package/dist/embeddingsClient.js +15 -8
- package/dist/eventingClient.d.ts +27 -27
- package/dist/eventingClient.js +10 -5
- package/dist/events.d.ts +83 -83
- package/dist/events.js +19 -15
- package/dist/eventsCore.d.ts +7 -7
- package/dist/eventsCore.js +11 -10
- package/dist/evidence/index.d.ts +23 -21
- package/dist/evidence/index.js +1 -0
- package/dist/evidenceClient.d.ts +23 -23
- package/dist/evidenceClient.js +10 -6
- package/dist/facade/context.d.ts +9 -9
- package/dist/facade/context.js +67 -41
- package/dist/functionSurface.js +2 -0
- package/dist/functionSurfaceClient.js +2 -0
- package/dist/gatewayFacades.d.ts +215 -215
- package/dist/gatewayFacades.factories.d.ts +23 -44
- package/dist/gatewayFacades.factories.js +63 -62
- package/dist/gatewayFacades.js +31 -32
- package/dist/graphAnalysisClient.d.ts +60 -60
- package/dist/graphAnalysisClient.js +19 -18
- package/dist/graphClient.d.ts +34 -34
- package/dist/graphClient.js +56 -35
- package/dist/graphIntel.js +2 -0
- package/dist/graphIntelligence.d.ts +2 -2
- package/dist/graphIntelligence.js +1 -1
- package/dist/graphRecommendationsClient.d.ts +24 -24
- package/dist/graphRecommendationsClient.js +12 -7
- package/dist/graphStateClassifierClient.d.ts +13 -13
- package/dist/graphStateClassifierClient.js +10 -5
- package/dist/harnessClient.d.ts +61 -61
- package/dist/harnessClient.js +44 -31
- package/dist/identityClient.d.ts +33 -59
- package/dist/identityClient.js +126 -98
- package/dist/index.d.ts +20 -20
- package/dist/index.js +20 -19
- package/dist/infisicalRuntime.d.ts +11 -11
- package/dist/infisicalRuntime.js +20 -14
- package/dist/jobsClient.d.ts +28 -28
- package/dist/jobsClient.js +6 -3
- package/dist/learningClient.js +13 -8
- package/dist/lenses/index.d.ts +124 -28
- package/dist/lenses/index.js +1 -0
- package/dist/mcpClient.d.ts +1 -1
- package/dist/mcpClient.js +3 -3
- package/dist/modelRuntimeClient.d.ts +27 -27
- package/dist/modelRuntimeClient.js +10 -5
- package/dist/nodes/index.d.ts +9 -9
- package/dist/nodes/index.js +1 -0
- package/dist/ontologies/index.d.ts +68 -22
- package/dist/ontologies/index.js +1 -0
- package/dist/ontologyClient.js +24 -17
- package/dist/ontologyLinksClient.d.ts +35 -35
- package/dist/ontologyLinksClient.js +9 -6
- package/dist/opinion.d.ts +3 -3
- package/dist/opinion.js +12 -5
- package/dist/orgGraphSearchClient.d.ts +39 -39
- package/dist/orgGraphSearchClient.js +22 -13
- package/dist/packsClient.d.ts +1 -1
- package/dist/packsClient.js +28 -19
- package/dist/policyClient.d.ts +79 -68
- package/dist/policyClient.js +18 -12
- package/dist/proof-attestation.json +1 -1
- package/dist/questions/index.d.ts +38 -27
- package/dist/questions/index.js +1 -0
- package/dist/realtime/index.d.ts +3 -3
- package/dist/realtime/index.js +1 -0
- package/dist/realtime/refs.d.ts +2 -2
- package/dist/{reportsClient.d.ts → reports-client.d.ts} +2 -2
- package/dist/{reportsClient.js → reports-client.js} +19 -13
- package/dist/{schemaClient.d.ts → schema-client.d.ts} +2 -3
- package/dist/{schemaClient.js → schema-client.js} +14 -11
- package/dist/sdkSurface.d.ts +12 -12
- package/dist/sdkSurface.js +14 -10
- package/dist/secrets.d.ts +1 -1
- package/dist/secrets.js +2 -1
- package/dist/{sourcesClient.d.ts → sources-client.d.ts} +8 -9
- package/dist/{sourcesClient.js → sources-client.js} +4 -5
- package/dist/{telemetryClient.d.ts → telemetry-client.d.ts} +14 -14
- package/dist/{telemetryClient.js → telemetry-client.js} +6 -4
- package/dist/toolRegistryClient.d.ts +46 -46
- package/dist/toolRegistryClient.js +22 -11
- package/dist/topics/index.d.ts +23 -23
- package/dist/topics/index.js +2 -1
- package/dist/topicsClient.d.ts +6 -6
- package/dist/topicsClient.js +29 -18
- package/dist/types.d.ts +356 -355
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/dist/workflowClient.d.ts +36 -35
- package/dist/workflowClient.js +88 -60
- package/dist/worktrees/index.d.ts +118 -32
- package/dist/worktrees/index.js +2 -1
- package/package.json +45 -5
- package/dist/audiencesClient.js +0 -115
- package/dist/clientAssemblyTypes.d.ts +0 -33
- package/dist/clientAssemblyTypes.js +0 -2
- package/dist/clientConfig.js +0 -2
package/dist/events.d.ts
CHANGED
|
@@ -7,141 +7,141 @@ export type DomainEventType = (typeof DOMAIN_EVENT_TYPES)[number];
|
|
|
7
7
|
export type DomainResourceType = "belief" | "evidence" | "question" | "edge" | "contradiction" | "worktree" | "topic" | "task" | "ontology" | "context" | "identity" | "webhook";
|
|
8
8
|
export type DomainActorType = "human" | "agent" | "service";
|
|
9
9
|
export type DomainEventData = Record<string, unknown>;
|
|
10
|
-
export
|
|
11
|
-
eventId: string;
|
|
12
|
-
type: DomainEventType | string;
|
|
13
|
-
version: typeof DOMAIN_EVENT_VERSION;
|
|
14
|
-
timestamp: number;
|
|
15
|
-
tenantId?: string;
|
|
16
|
-
workspaceId?: string;
|
|
17
|
-
topicId: string;
|
|
18
|
-
resourceId: string;
|
|
19
|
-
resourceType: DomainResourceType | string;
|
|
10
|
+
export interface DomainEvent {
|
|
20
11
|
actorId: string;
|
|
21
12
|
actorType: DomainActorType;
|
|
22
|
-
data: DomainEventData;
|
|
23
13
|
correlationId?: string;
|
|
14
|
+
data: DomainEventData;
|
|
15
|
+
eventId: string;
|
|
24
16
|
expiresAt: number;
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
eventId?: string;
|
|
28
|
-
timestamp?: number;
|
|
17
|
+
resourceId: string;
|
|
18
|
+
resourceType: DomainResourceType | string;
|
|
29
19
|
tenantId?: string;
|
|
30
|
-
|
|
20
|
+
timestamp: number;
|
|
31
21
|
topicId: string;
|
|
32
22
|
type: DomainEventType | string;
|
|
33
|
-
|
|
34
|
-
|
|
23
|
+
version: typeof DOMAIN_EVENT_VERSION;
|
|
24
|
+
workspaceId?: string;
|
|
25
|
+
}
|
|
26
|
+
export interface CreateDomainEventInput {
|
|
35
27
|
actorId: string;
|
|
36
28
|
actorType: DomainActorType;
|
|
37
|
-
data?: DomainEventData;
|
|
38
29
|
correlationId?: string;
|
|
30
|
+
data?: DomainEventData;
|
|
31
|
+
eventId?: string;
|
|
32
|
+
resourceId: string;
|
|
33
|
+
resourceType: DomainResourceType | string;
|
|
39
34
|
retentionDays?: number;
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
35
|
+
tenantId?: string;
|
|
36
|
+
timestamp?: number;
|
|
37
|
+
topicId: string;
|
|
38
|
+
type: DomainEventType | string;
|
|
39
|
+
workspaceId?: string;
|
|
40
|
+
}
|
|
41
|
+
export interface EventCursor {
|
|
43
42
|
eventId: string;
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
43
|
+
timestamp: number;
|
|
44
|
+
}
|
|
45
|
+
export interface EventListQuery {
|
|
47
46
|
after?: string;
|
|
48
|
-
types?: string[];
|
|
49
|
-
startTime?: number;
|
|
50
47
|
endTime?: number;
|
|
51
48
|
limit?: number;
|
|
52
|
-
|
|
53
|
-
|
|
49
|
+
startTime?: number;
|
|
50
|
+
topicId?: string;
|
|
51
|
+
types?: string[];
|
|
52
|
+
}
|
|
53
|
+
export interface EventListResult {
|
|
54
54
|
events: DomainEvent[];
|
|
55
55
|
nextCursor: string | null;
|
|
56
|
-
}
|
|
56
|
+
}
|
|
57
57
|
export type WebhookSecretMode = "configured";
|
|
58
|
-
export
|
|
59
|
-
id: string;
|
|
60
|
-
webhookId: string;
|
|
61
|
-
tenantId?: string;
|
|
62
|
-
workspaceId?: string;
|
|
63
|
-
topicId?: string;
|
|
64
|
-
url: string;
|
|
65
|
-
events: string[];
|
|
58
|
+
export interface WebhookRecord {
|
|
66
59
|
active: boolean;
|
|
67
|
-
secretConfigured: boolean;
|
|
68
60
|
createdAt: number;
|
|
69
|
-
updatedAt: number;
|
|
70
61
|
createdBy: string;
|
|
71
|
-
|
|
62
|
+
events: string[];
|
|
63
|
+
id: string;
|
|
72
64
|
lastDeliveryAt?: number;
|
|
73
65
|
lastSuccessfulDeliveryAt?: number;
|
|
74
|
-
|
|
75
|
-
|
|
66
|
+
secretConfigured: boolean;
|
|
67
|
+
tenantId?: string;
|
|
68
|
+
topicId?: string;
|
|
69
|
+
updatedAt: number;
|
|
70
|
+
updatedBy: string;
|
|
76
71
|
url: string;
|
|
72
|
+
webhookId: string;
|
|
73
|
+
workspaceId?: string;
|
|
74
|
+
}
|
|
75
|
+
export interface WebhookCreateInput {
|
|
76
|
+
active?: boolean;
|
|
77
77
|
events: string[];
|
|
78
78
|
secret: string;
|
|
79
79
|
topicId?: string;
|
|
80
|
+
url: string;
|
|
81
|
+
}
|
|
82
|
+
export interface WebhookUpdateInput {
|
|
80
83
|
active?: boolean;
|
|
81
|
-
};
|
|
82
|
-
export type WebhookUpdateInput = {
|
|
83
|
-
url?: string;
|
|
84
84
|
events?: string[];
|
|
85
85
|
secret?: string;
|
|
86
86
|
topicId?: string | null;
|
|
87
|
-
|
|
88
|
-
}
|
|
87
|
+
url?: string;
|
|
88
|
+
}
|
|
89
89
|
export type WebhookDeliveryStatus = "pending" | "delivering" | "succeeded" | "failed" | "dead_letter";
|
|
90
|
-
export
|
|
91
|
-
|
|
90
|
+
export interface WebhookDeliveryRecord {
|
|
91
|
+
attemptCount: number;
|
|
92
|
+
createdAt: number;
|
|
93
|
+
deliveredAt?: number;
|
|
92
94
|
deliveryId: string;
|
|
93
|
-
webhookId: string;
|
|
94
95
|
eventId: string;
|
|
95
96
|
eventType: string;
|
|
96
|
-
|
|
97
|
-
status: WebhookDeliveryStatus;
|
|
98
|
-
attemptCount: number;
|
|
99
|
-
maxAttempts: number;
|
|
100
|
-
nextAttemptAt?: number;
|
|
97
|
+
id: string;
|
|
101
98
|
lastAttemptAt?: number;
|
|
102
|
-
lastStatusCode?: number;
|
|
103
99
|
lastError?: string;
|
|
104
|
-
|
|
105
|
-
|
|
100
|
+
lastStatusCode?: number;
|
|
101
|
+
maxAttempts: number;
|
|
102
|
+
nextAttemptAt?: number;
|
|
103
|
+
status: WebhookDeliveryStatus;
|
|
104
|
+
topicId: string;
|
|
106
105
|
updatedAt: number;
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
106
|
+
webhookId: string;
|
|
107
|
+
}
|
|
108
|
+
export interface WebhookDeliveryAttemptRecord {
|
|
110
109
|
attemptId: string;
|
|
110
|
+
attemptNumber: number;
|
|
111
|
+
createdAt: number;
|
|
111
112
|
deliveryId: string;
|
|
112
|
-
|
|
113
|
+
durationMs?: number;
|
|
114
|
+
error?: string;
|
|
113
115
|
eventId: string;
|
|
114
116
|
eventType: string;
|
|
115
|
-
|
|
117
|
+
id: string;
|
|
118
|
+
responseBody?: string;
|
|
116
119
|
status: "succeeded" | "failed";
|
|
117
120
|
statusCode?: number;
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
createdAt: number;
|
|
122
|
-
};
|
|
123
|
-
export type WebhookDeliveriesResult = {
|
|
121
|
+
webhookId: string;
|
|
122
|
+
}
|
|
123
|
+
export interface WebhookDeliveriesResult {
|
|
124
124
|
deliveries: Array<WebhookDeliveryRecord & {
|
|
125
125
|
attempts?: WebhookDeliveryAttemptRecord[];
|
|
126
126
|
}>;
|
|
127
|
-
}
|
|
128
|
-
export
|
|
129
|
-
webhookId: string;
|
|
130
|
-
totalAttempts: number;
|
|
131
|
-
successfulAttempts: number;
|
|
132
|
-
failedAttempts: number;
|
|
133
|
-
successRate: number;
|
|
134
|
-
pendingDeliveries: number;
|
|
127
|
+
}
|
|
128
|
+
export interface WebhookHealthResult {
|
|
135
129
|
deadLetterDeliveries: number;
|
|
130
|
+
failedAttempts: number;
|
|
136
131
|
lastDeliveryAt?: number;
|
|
137
132
|
lastSuccessfulDeliveryAt?: number;
|
|
138
|
-
|
|
139
|
-
|
|
133
|
+
pendingDeliveries: number;
|
|
134
|
+
successfulAttempts: number;
|
|
135
|
+
successRate: number;
|
|
136
|
+
totalAttempts: number;
|
|
140
137
|
webhookId: string;
|
|
138
|
+
}
|
|
139
|
+
export interface WebhookTestResult {
|
|
140
|
+
attempts: number;
|
|
141
141
|
deliveryId: string;
|
|
142
142
|
status: WebhookDeliveryStatus;
|
|
143
|
-
|
|
144
|
-
}
|
|
143
|
+
webhookId: string;
|
|
144
|
+
}
|
|
145
145
|
export type ReplayEventsInput = EventListQuery & {
|
|
146
146
|
webhookId?: string;
|
|
147
147
|
};
|
|
@@ -165,7 +165,7 @@ export declare function inferActorType(args: {
|
|
|
165
165
|
authMode?: string;
|
|
166
166
|
principalType?: string;
|
|
167
167
|
}): DomainActorType;
|
|
168
|
-
export declare function emitDomainEvent(invokeMutation: (reference:
|
|
168
|
+
export declare function emitDomainEvent(invokeMutation: (reference: string, args: CreateDomainEventInput) => Promise<unknown>, input: CreateDomainEventInput): Promise<unknown>;
|
|
169
169
|
export declare function assertValidWebhookUrl(url: string): string;
|
|
170
170
|
export declare function normalizeWebhookPatterns(patterns: readonly string[]): string[];
|
|
171
171
|
export declare function assertValidWebhookSecret(secret: string): string;
|
package/dist/events.js
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
export const DOMAIN_EVENT_VERSION = "1.0";
|
|
2
2
|
export const EVENT_RETENTION_DEFAULT_DAYS = 30;
|
|
3
3
|
export const WEBHOOK_MAX_ATTEMPTS = 5;
|
|
4
|
-
export const WEBHOOK_RETRY_DELAYS_MS = [
|
|
4
|
+
export const WEBHOOK_RETRY_DELAYS_MS = [1000, 5000, 30_000, 300_000];
|
|
5
|
+
const EMPTY_EVENT_PATTERN = /^$/;
|
|
6
|
+
const ANY_EVENT_PATTERN = /^.*$/;
|
|
5
7
|
export const DOMAIN_EVENT_TYPES = [
|
|
6
8
|
"belief.created",
|
|
7
9
|
"belief.forked",
|
|
@@ -47,10 +49,10 @@ function escapeRegex(value) {
|
|
|
47
49
|
export function eventPatternToRegExp(pattern) {
|
|
48
50
|
const normalized = pattern.trim();
|
|
49
51
|
if (!normalized) {
|
|
50
|
-
return
|
|
52
|
+
return EMPTY_EVENT_PATTERN;
|
|
51
53
|
}
|
|
52
54
|
if (normalized === "*") {
|
|
53
|
-
return
|
|
55
|
+
return ANY_EVENT_PATTERN;
|
|
54
56
|
}
|
|
55
57
|
const source = escapeRegex(normalized).replace(/\\\*/g, ".*");
|
|
56
58
|
return new RegExp(`^${source}$`);
|
|
@@ -144,8 +146,7 @@ export function decodeEventCursor(cursor) {
|
|
|
144
146
|
eventId: parsed.eventId.trim(),
|
|
145
147
|
};
|
|
146
148
|
}
|
|
147
|
-
catch
|
|
148
|
-
void error;
|
|
149
|
+
catch {
|
|
149
150
|
return null;
|
|
150
151
|
}
|
|
151
152
|
}
|
|
@@ -169,16 +170,15 @@ export function inferActorType(args) {
|
|
|
169
170
|
}
|
|
170
171
|
return "human";
|
|
171
172
|
}
|
|
172
|
-
export
|
|
173
|
-
return
|
|
173
|
+
export function emitDomainEvent(invokeMutation, input) {
|
|
174
|
+
return invokeMutation("events:recordEvent", input);
|
|
174
175
|
}
|
|
175
176
|
const LOCALHOST_HOSTS = new Set(["localhost", "127.0.0.1", "::1"]);
|
|
176
177
|
function normalizeUrl(url) {
|
|
177
178
|
try {
|
|
178
179
|
return new URL(url.trim());
|
|
179
180
|
}
|
|
180
|
-
catch
|
|
181
|
-
void error;
|
|
181
|
+
catch {
|
|
182
182
|
throw new Error("Webhook URL must be a valid absolute URL.");
|
|
183
183
|
}
|
|
184
184
|
}
|
|
@@ -187,7 +187,8 @@ export function assertValidWebhookUrl(url) {
|
|
|
187
187
|
const hostname = parsed.hostname.trim().toLowerCase();
|
|
188
188
|
const nodeEnv = RUNTIME_ENV?.NODE_ENV;
|
|
189
189
|
const allowLocalHttp = nodeEnv === "test" || LOCALHOST_HOSTS.has(hostname);
|
|
190
|
-
if (parsed.protocol !== "https:" &&
|
|
190
|
+
if (parsed.protocol !== "https:" &&
|
|
191
|
+
!(allowLocalHttp && parsed.protocol === "http:")) {
|
|
191
192
|
throw new Error("Webhook URL must use HTTPS.");
|
|
192
193
|
}
|
|
193
194
|
return parsed.toString();
|
|
@@ -218,7 +219,7 @@ export async function computeWebhookSignature(payload, secret) {
|
|
|
218
219
|
}
|
|
219
220
|
export function nextDeliveryAttemptAt(currentAttemptCount, now = Date.now()) {
|
|
220
221
|
if (currentAttemptCount >= WEBHOOK_MAX_ATTEMPTS) {
|
|
221
|
-
return
|
|
222
|
+
return;
|
|
222
223
|
}
|
|
223
224
|
const retryIndex = currentAttemptCount - 1;
|
|
224
225
|
const delay = WEBHOOK_RETRY_DELAYS_MS[retryIndex];
|
|
@@ -234,7 +235,8 @@ export function sanitizeWebhookRecord(value) {
|
|
|
234
235
|
tenantId: typeof value.tenantId === "string" && value.tenantId.trim().length > 0
|
|
235
236
|
? value.tenantId
|
|
236
237
|
: undefined,
|
|
237
|
-
workspaceId: typeof value.workspaceId === "string" &&
|
|
238
|
+
workspaceId: typeof value.workspaceId === "string" &&
|
|
239
|
+
value.workspaceId.trim().length > 0
|
|
238
240
|
? value.workspaceId
|
|
239
241
|
: undefined,
|
|
240
242
|
topicId: typeof value.topicId === "string" && value.topicId.trim().length > 0
|
|
@@ -252,15 +254,17 @@ export function sanitizeWebhookRecord(value) {
|
|
|
252
254
|
updatedAt: Number(value.updatedAt ?? value.createdAt ?? Date.now()),
|
|
253
255
|
createdBy: String(value.createdBy ?? ""),
|
|
254
256
|
updatedBy: String(value.updatedBy ?? value.createdBy ?? ""),
|
|
255
|
-
lastDeliveryAt: typeof value.lastDeliveryAt === "number"
|
|
257
|
+
lastDeliveryAt: typeof value.lastDeliveryAt === "number"
|
|
258
|
+
? value.lastDeliveryAt
|
|
259
|
+
: undefined,
|
|
256
260
|
lastSuccessfulDeliveryAt: typeof value.lastSuccessfulDeliveryAt === "number"
|
|
257
261
|
? value.lastSuccessfulDeliveryAt
|
|
258
262
|
: undefined,
|
|
259
263
|
};
|
|
260
264
|
}
|
|
261
|
-
export function truncateWebhookResponseBody(responseBody, maxLength =
|
|
265
|
+
export function truncateWebhookResponseBody(responseBody, maxLength = 2000) {
|
|
262
266
|
if (!responseBody) {
|
|
263
|
-
return
|
|
267
|
+
return;
|
|
264
268
|
}
|
|
265
269
|
if (responseBody.length <= maxLength) {
|
|
266
270
|
return responseBody;
|
package/dist/eventsCore.d.ts
CHANGED
|
@@ -4,16 +4,16 @@ export type EventsClientCoreConfig = GatewayClientConfig;
|
|
|
4
4
|
export type EventsListResponse = PlatformGatewaySuccess<EventListResult>;
|
|
5
5
|
export type EventsReplayResponse = PlatformGatewaySuccess<ReplayEventsResult>;
|
|
6
6
|
export type WebhooksClientCoreConfig = GatewayClientConfig;
|
|
7
|
-
export
|
|
7
|
+
export interface WebhookListQuery {
|
|
8
8
|
topicId?: string;
|
|
9
|
-
}
|
|
10
|
-
export
|
|
9
|
+
}
|
|
10
|
+
export interface WebhookDeliveriesQuery {
|
|
11
11
|
limit?: number;
|
|
12
|
-
}
|
|
13
|
-
export
|
|
14
|
-
webhookId: string;
|
|
12
|
+
}
|
|
13
|
+
export interface WebhookDeleteResult {
|
|
15
14
|
deleted: boolean;
|
|
16
|
-
|
|
15
|
+
webhookId: string;
|
|
16
|
+
}
|
|
17
17
|
export type WebhooksCreateResponse = PlatformGatewaySuccess<WebhookRecord>;
|
|
18
18
|
export type WebhooksListResponse = PlatformGatewaySuccess<{
|
|
19
19
|
webhooks: WebhookRecord[];
|
package/dist/eventsCore.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
// biome-ignore-all lint/style/useFilenamingConvention: This file is an @lucern/sdk public import ABI / package subpath compatibility surface; the camelCase filename is intentional.
|
|
1
2
|
import { createGatewayRequestClient, randomIdempotencyKey, toQueryString, } from "./coreClient.js";
|
|
2
3
|
function serializeTypes(types) {
|
|
3
4
|
return Array.isArray(types) && types.length > 0 ? types.join(",") : undefined;
|
|
@@ -5,7 +6,7 @@ function serializeTypes(types) {
|
|
|
5
6
|
export function createEventsClientCore(config = {}) {
|
|
6
7
|
const gateway = createGatewayRequestClient(config);
|
|
7
8
|
return {
|
|
8
|
-
|
|
9
|
+
list(query = {}) {
|
|
9
10
|
return gateway.request({
|
|
10
11
|
path: `/v1/events${toQueryString({
|
|
11
12
|
topicId: query.topicId,
|
|
@@ -17,7 +18,7 @@ export function createEventsClientCore(config = {}) {
|
|
|
17
18
|
})}`,
|
|
18
19
|
});
|
|
19
20
|
},
|
|
20
|
-
|
|
21
|
+
replay(input, idempotencyKey = randomIdempotencyKey()) {
|
|
21
22
|
return gateway.request({
|
|
22
23
|
path: "/v1/events/replay",
|
|
23
24
|
method: "POST",
|
|
@@ -30,7 +31,7 @@ export function createEventsClientCore(config = {}) {
|
|
|
30
31
|
export function createWebhooksClientCore(config = {}) {
|
|
31
32
|
const gateway = createGatewayRequestClient(config);
|
|
32
33
|
return {
|
|
33
|
-
|
|
34
|
+
create(input, idempotencyKey = randomIdempotencyKey()) {
|
|
34
35
|
return gateway.request({
|
|
35
36
|
path: "/v1/webhooks",
|
|
36
37
|
method: "POST",
|
|
@@ -38,19 +39,19 @@ export function createWebhooksClientCore(config = {}) {
|
|
|
38
39
|
idempotencyKey,
|
|
39
40
|
});
|
|
40
41
|
},
|
|
41
|
-
|
|
42
|
+
list(query = {}) {
|
|
42
43
|
return gateway.request({
|
|
43
44
|
path: `/v1/webhooks${toQueryString({
|
|
44
45
|
topicId: query.topicId,
|
|
45
46
|
})}`,
|
|
46
47
|
});
|
|
47
48
|
},
|
|
48
|
-
|
|
49
|
+
get(id) {
|
|
49
50
|
return gateway.request({
|
|
50
51
|
path: `/v1/webhooks/${encodeURIComponent(id)}`,
|
|
51
52
|
});
|
|
52
53
|
},
|
|
53
|
-
|
|
54
|
+
update(id, input, idempotencyKey = randomIdempotencyKey()) {
|
|
54
55
|
return gateway.request({
|
|
55
56
|
path: `/v1/webhooks/${encodeURIComponent(id)}`,
|
|
56
57
|
method: "PATCH",
|
|
@@ -58,14 +59,14 @@ export function createWebhooksClientCore(config = {}) {
|
|
|
58
59
|
idempotencyKey,
|
|
59
60
|
});
|
|
60
61
|
},
|
|
61
|
-
|
|
62
|
+
delete(id, idempotencyKey = randomIdempotencyKey()) {
|
|
62
63
|
return gateway.request({
|
|
63
64
|
path: `/v1/webhooks/${encodeURIComponent(id)}`,
|
|
64
65
|
method: "DELETE",
|
|
65
66
|
idempotencyKey,
|
|
66
67
|
});
|
|
67
68
|
},
|
|
68
|
-
|
|
69
|
+
test(id, input = {}, idempotencyKey = randomIdempotencyKey()) {
|
|
69
70
|
return gateway.request({
|
|
70
71
|
path: `/v1/webhooks/${encodeURIComponent(id)}/test`,
|
|
71
72
|
method: "POST",
|
|
@@ -73,14 +74,14 @@ export function createWebhooksClientCore(config = {}) {
|
|
|
73
74
|
idempotencyKey,
|
|
74
75
|
});
|
|
75
76
|
},
|
|
76
|
-
|
|
77
|
+
deliveries(id, query = {}) {
|
|
77
78
|
return gateway.request({
|
|
78
79
|
path: `/v1/webhooks/${encodeURIComponent(id)}/deliveries${toQueryString({
|
|
79
80
|
limit: query.limit,
|
|
80
81
|
})}`,
|
|
81
82
|
});
|
|
82
83
|
},
|
|
83
|
-
|
|
84
|
+
health(id) {
|
|
84
85
|
return gateway.request({
|
|
85
86
|
path: `/v1/webhooks/${encodeURIComponent(id)}/health`,
|
|
86
87
|
});
|
package/dist/evidence/index.d.ts
CHANGED
|
@@ -4,14 +4,14 @@ export * as toolSchemas from "@lucern/contracts/tool-contracts";
|
|
|
4
4
|
export type EvidenceClientConfig = LucernClientConfig;
|
|
5
5
|
export type EvidenceClient = ReturnType<typeof createEvidenceClient>;
|
|
6
6
|
export declare function createEvidenceClient(config?: EvidenceClientConfig): {
|
|
7
|
-
createEvidence: (args: import("../
|
|
8
|
-
getEvidence: (evidenceId: string) =>
|
|
7
|
+
createEvidence: (args: import("../client-evidence-compat").EvidenceCompatInput) => Promise<import("../client-config").GatewayDataEnvelope<Record<string, unknown>>>;
|
|
8
|
+
getEvidence: (evidenceId: string) => Promise<import("../client-config").GatewayDataEnvelope<import("../gatewayFacades").GatewayRecord>>;
|
|
9
9
|
listEvidence: (args: {
|
|
10
10
|
topicId?: string;
|
|
11
11
|
targetId?: string;
|
|
12
12
|
limit?: number;
|
|
13
13
|
cursor?: string;
|
|
14
|
-
}) =>
|
|
14
|
+
}) => Promise<import("../client-config").GatewayDataEnvelope<import("../gatewayFacades").GatewayList>>;
|
|
15
15
|
searchEvidence: (args: {
|
|
16
16
|
q?: string;
|
|
17
17
|
query?: string;
|
|
@@ -20,7 +20,7 @@ export declare function createEvidenceClient(config?: EvidenceClientConfig): {
|
|
|
20
20
|
methodology?: string;
|
|
21
21
|
limit?: number;
|
|
22
22
|
cursor?: string;
|
|
23
|
-
}) =>
|
|
23
|
+
}) => Promise<import("../client-config").GatewayDataEnvelope<import("../gatewayFacades").GatewayList>>;
|
|
24
24
|
linkEvidence: (args: {
|
|
25
25
|
evidenceId: string;
|
|
26
26
|
targetId?: string;
|
|
@@ -31,19 +31,19 @@ export declare function createEvidenceClient(config?: EvidenceClientConfig): {
|
|
|
31
31
|
evidenceRelation?: "supports" | "contradicts";
|
|
32
32
|
confidence?: number;
|
|
33
33
|
rationale?: string;
|
|
34
|
-
}) =>
|
|
35
|
-
classifyEvidence: (beliefId: string, evidenceId: string, config?: Parameters<
|
|
36
|
-
classifyEvidenceBatch: (beliefId: string, evidence: Parameters<
|
|
34
|
+
}) => Promise<import("../client-config").GatewayDataEnvelope<import("../gatewayFacades").EvidenceLinkResult>>;
|
|
35
|
+
classifyEvidence: (beliefId: string, evidenceId: string, config?: Parameters<(beliefId: string, evidenceId: string, classificationConfig?: import("..").EvidenceClassificationRequestConfig, idempotencyKey?: string) => Promise<import("..").PlatformGatewaySuccess<import("..").ClassifyEvidenceResult>>>[2], idempotencyKey?: string) => Promise<import("../client-config").GatewayDataEnvelope<import("..").ClassifyEvidenceResult>>;
|
|
36
|
+
classifyEvidenceBatch: (beliefId: string, evidence: Parameters<(beliefId: string, evidence: import("..").ClassifyEvidenceBatchItem[], classificationConfig?: import("..").EvidenceClassificationRequestConfig, idempotencyKey?: string) => Promise<import("..").PlatformGatewaySuccess<import("..").ClassifyEvidenceBatchResult>>>[1], config?: Parameters<(beliefId: string, evidence: import("..").ClassifyEvidenceBatchItem[], classificationConfig?: import("..").EvidenceClassificationRequestConfig, idempotencyKey?: string) => Promise<import("..").PlatformGatewaySuccess<import("..").ClassifyEvidenceBatchResult>>>[2], idempotencyKey?: string) => Promise<import("../client-config").GatewayDataEnvelope<import("..").ClassifyEvidenceBatchResult>>;
|
|
37
37
|
raw: {
|
|
38
|
-
create(args: import("../
|
|
39
|
-
add:
|
|
40
|
-
get(evidenceId: string):
|
|
38
|
+
create(args: import("../client-evidence-compat").EvidenceCompatInput): Promise<import("../client-config").GatewayDataEnvelope<Record<string, unknown>>>;
|
|
39
|
+
add: (args_0: import("../client-evidence-compat").EvidenceCompatInput) => Promise<import("..").PlatformGatewaySuccess<Record<string, unknown>> & Record<string, unknown>>;
|
|
40
|
+
get(evidenceId: string): Promise<import("../client-config").GatewayDataEnvelope<import("../gatewayFacades").GatewayRecord>>;
|
|
41
41
|
list(args: {
|
|
42
42
|
topicId?: string;
|
|
43
43
|
targetId?: string;
|
|
44
44
|
limit?: number;
|
|
45
45
|
cursor?: string;
|
|
46
|
-
}):
|
|
46
|
+
}): Promise<import("../client-config").GatewayDataEnvelope<import("../gatewayFacades").GatewayList>>;
|
|
47
47
|
search(args: {
|
|
48
48
|
q?: string;
|
|
49
49
|
query?: string;
|
|
@@ -52,7 +52,7 @@ export declare function createEvidenceClient(config?: EvidenceClientConfig): {
|
|
|
52
52
|
methodology?: string;
|
|
53
53
|
limit?: number;
|
|
54
54
|
cursor?: string;
|
|
55
|
-
}):
|
|
55
|
+
}): Promise<import("../client-config").GatewayDataEnvelope<import("../gatewayFacades").GatewayList>>;
|
|
56
56
|
link(args: {
|
|
57
57
|
evidenceId: string;
|
|
58
58
|
targetId?: string;
|
|
@@ -63,7 +63,7 @@ export declare function createEvidenceClient(config?: EvidenceClientConfig): {
|
|
|
63
63
|
evidenceRelation?: "supports" | "contradicts";
|
|
64
64
|
confidence?: number;
|
|
65
65
|
rationale?: string;
|
|
66
|
-
}):
|
|
66
|
+
}): Promise<import("../client-config").GatewayDataEnvelope<import("../gatewayFacades").EvidenceLinkResult>>;
|
|
67
67
|
linkToBelief(args: {
|
|
68
68
|
evidenceId: string;
|
|
69
69
|
beliefId: string;
|
|
@@ -71,14 +71,16 @@ export declare function createEvidenceClient(config?: EvidenceClientConfig): {
|
|
|
71
71
|
evidenceRelation?: "supports" | "contradicts";
|
|
72
72
|
confidence?: number;
|
|
73
73
|
rationale?: string;
|
|
74
|
-
}):
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
74
|
+
}): Promise<{
|
|
75
|
+
beliefId: string;
|
|
76
|
+
}>;
|
|
77
|
+
classifyEvidence(beliefId: string, evidenceId: string, config?: Parameters<(beliefId: string, evidenceId: string, classificationConfig?: import("..").EvidenceClassificationRequestConfig, idempotencyKey?: string) => Promise<import("..").PlatformGatewaySuccess<import("..").ClassifyEvidenceResult>>>[2], idempotencyKey?: string): Promise<import("../client-config").GatewayDataEnvelope<import("..").ClassifyEvidenceResult>>;
|
|
78
|
+
classifyEvidenceBatch(beliefId: string, evidence: Parameters<(beliefId: string, evidence: import("..").ClassifyEvidenceBatchItem[], classificationConfig?: import("..").EvidenceClassificationRequestConfig, idempotencyKey?: string) => Promise<import("..").PlatformGatewaySuccess<import("..").ClassifyEvidenceBatchResult>>>[1], config?: Parameters<(beliefId: string, evidence: import("..").ClassifyEvidenceBatchItem[], classificationConfig?: import("..").EvidenceClassificationRequestConfig, idempotencyKey?: string) => Promise<import("..").PlatformGatewaySuccess<import("..").ClassifyEvidenceBatchResult>>>[2], idempotencyKey?: string): Promise<import("../client-config").GatewayDataEnvelope<import("..").ClassifyEvidenceBatchResult>>;
|
|
79
|
+
updateStatus(input: Parameters<(input: import("../gatewayFacades").GatewayRecord, idempotencyKey?: string) => Promise<import("..").PlatformGatewaySuccess<import("../gatewayFacades").GatewayRecord>>>[0], idempotencyKey?: string): Promise<import("../client-config").GatewayDataEnvelope<import("../gatewayFacades").GatewayRecord>>;
|
|
80
|
+
update(input: Parameters<(input: import("../gatewayFacades").GatewayRecord, idempotencyKey?: string) => Promise<import("..").PlatformGatewaySuccess<import("../gatewayFacades").GatewayRecord>>>[0], idempotencyKey?: string): Promise<import("../client-config").GatewayDataEnvelope<import("../gatewayFacades").GatewayRecord>>;
|
|
81
|
+
flagIncorrect(input: Parameters<(input: import("../gatewayFacades").GatewayRecord, idempotencyKey?: string) => Promise<import("..").PlatformGatewaySuccess<import("../gatewayFacades").GatewayRecord>>>[0], idempotencyKey?: string): Promise<import("../client-config").GatewayDataEnvelope<import("../gatewayFacades").GatewayRecord>>;
|
|
82
|
+
remove(input: Parameters<(input: import("../gatewayFacades").GatewayRecord, idempotencyKey?: string) => Promise<import("..").PlatformGatewaySuccess<import("../gatewayFacades").GatewayRecord>>>[0], idempotencyKey?: string): Promise<import("../client-config").GatewayDataEnvelope<import("../gatewayFacades").GatewayRecord>>;
|
|
83
|
+
updateVerificationStatus(input: Parameters<(input: import("../gatewayFacades").GatewayRecord, idempotencyKey?: string) => Promise<import("..").PlatformGatewaySuccess<import("../gatewayFacades").GatewayRecord>>>[0], idempotencyKey?: string): Promise<import("../client-config").GatewayDataEnvelope<import("../gatewayFacades").GatewayRecord>>;
|
|
82
84
|
};
|
|
83
85
|
};
|
|
84
86
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/evidence/index.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
// biome-ignore-all lint/performance/noBarrelFile: This file is an @lucern/sdk public import ABI / package subpath compatibility surface; the facade/barrel export is intentional.
|
|
1
2
|
import { createLucernClient } from "../client.js";
|
|
2
3
|
export * as evidenceContracts from "@lucern/contracts/evidence/v1";
|
|
3
4
|
export * as toolSchemas from "@lucern/contracts/tool-contracts";
|
package/dist/evidenceClient.d.ts
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { type GatewayClientConfig } from "./coreClient";
|
|
2
2
|
type EvidenceClassificationRelation = "supports" | "contradicts" | "irrelevant";
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
interface ModelFallbackConfig {
|
|
4
|
+
maxTokens: number;
|
|
5
5
|
modelId: string;
|
|
6
|
+
modelKey: string;
|
|
6
7
|
temperature: number;
|
|
7
|
-
|
|
8
|
-
};
|
|
8
|
+
}
|
|
9
9
|
type ResolvedModelConfig = ModelFallbackConfig & {
|
|
10
10
|
promptName: string;
|
|
11
11
|
};
|
|
12
|
-
|
|
12
|
+
interface TracingAdapter {
|
|
13
13
|
startGeneration(input: {
|
|
14
14
|
name: string;
|
|
15
15
|
userId?: string;
|
|
@@ -21,7 +21,7 @@ type TracingAdapter = {
|
|
|
21
21
|
end: (output: unknown) => Promise<void>;
|
|
22
22
|
error: (err: unknown) => Promise<void>;
|
|
23
23
|
}>;
|
|
24
|
-
}
|
|
24
|
+
}
|
|
25
25
|
type PromptResolver = (name: string) => Promise<string | null>;
|
|
26
26
|
type ModelResolver = (slotKey: string, fallback: ResolvedModelConfig) => Promise<ResolvedModelConfig>;
|
|
27
27
|
type ClassificationRuntimeAdapter = (input: {
|
|
@@ -35,20 +35,20 @@ type ClassificationRuntimeAdapter = (input: {
|
|
|
35
35
|
relation: EvidenceClassificationRelation;
|
|
36
36
|
rationale: string;
|
|
37
37
|
}>;
|
|
38
|
-
export
|
|
39
|
-
promptName?: string;
|
|
40
|
-
modelSlotKey?: string;
|
|
41
|
-
modelFallback?: ModelFallbackConfig;
|
|
38
|
+
export interface SerializableClassifyEvidenceConfig {
|
|
42
39
|
edgeWeightPolicy?: {
|
|
43
40
|
supports: number;
|
|
44
41
|
contradicts: number;
|
|
45
42
|
};
|
|
43
|
+
modelFallback?: ModelFallbackConfig;
|
|
44
|
+
modelSlotKey?: string;
|
|
45
|
+
promptName?: string;
|
|
46
46
|
statusTransition?: {
|
|
47
47
|
onSupports: string;
|
|
48
48
|
onContradicts: string;
|
|
49
49
|
};
|
|
50
50
|
writeLegacyTables?: boolean;
|
|
51
|
-
}
|
|
51
|
+
}
|
|
52
52
|
export type ClassifyEvidenceConfig = SerializableClassifyEvidenceConfig & {
|
|
53
53
|
trustDiscountPolicy?: (relation: Exclude<EvidenceClassificationRelation, "irrelevant">, rationale: string) => number;
|
|
54
54
|
tracing?: TracingAdapter;
|
|
@@ -56,41 +56,41 @@ export type ClassifyEvidenceConfig = SerializableClassifyEvidenceConfig & {
|
|
|
56
56
|
modelResolver?: ModelResolver;
|
|
57
57
|
classifier?: ClassificationRuntimeAdapter;
|
|
58
58
|
};
|
|
59
|
-
export
|
|
59
|
+
export interface ClassifyEvidenceResult {
|
|
60
60
|
beliefId: string;
|
|
61
|
-
evidenceId: string;
|
|
62
|
-
relation: EvidenceClassificationRelation;
|
|
63
|
-
rationale: string;
|
|
64
|
-
usedFallback: boolean;
|
|
65
61
|
edgeWeight?: number;
|
|
66
|
-
|
|
67
|
-
model: ResolvedModelConfig;
|
|
62
|
+
evidenceId: string;
|
|
68
63
|
link?: {
|
|
69
64
|
edgeGlobalId: string;
|
|
70
65
|
linkId?: string;
|
|
71
66
|
confidence: number;
|
|
72
67
|
writeLegacyTables: boolean;
|
|
73
68
|
};
|
|
69
|
+
model: ResolvedModelConfig;
|
|
70
|
+
promptName: string;
|
|
71
|
+
rationale: string;
|
|
72
|
+
relation: EvidenceClassificationRelation;
|
|
74
73
|
statusUpdate?: {
|
|
75
74
|
previousStatus?: string;
|
|
76
75
|
newStatus: string;
|
|
77
76
|
historyWritten: boolean;
|
|
78
77
|
};
|
|
79
|
-
|
|
80
|
-
|
|
78
|
+
usedFallback: boolean;
|
|
79
|
+
}
|
|
80
|
+
export interface ClassifyEvidenceBatchItem {
|
|
81
81
|
evidenceId?: string;
|
|
82
82
|
insightId?: string;
|
|
83
83
|
nodeId?: string;
|
|
84
84
|
text?: string;
|
|
85
|
-
}
|
|
86
|
-
export
|
|
85
|
+
}
|
|
86
|
+
export interface ClassifyEvidenceBatchResult {
|
|
87
87
|
items: ClassifyEvidenceResult[];
|
|
88
88
|
summary: {
|
|
89
89
|
supporting: number;
|
|
90
90
|
contradicting: number;
|
|
91
91
|
irrelevant: number;
|
|
92
92
|
};
|
|
93
|
-
}
|
|
93
|
+
}
|
|
94
94
|
export type { PlatformGatewaySuccess } from "./coreClient";
|
|
95
95
|
/** Configuration for the evidence classification client. */
|
|
96
96
|
export type EvidenceClientConfig = GatewayClientConfig;
|