@vorionsys/contracts 0.1.1 → 0.1.3
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 +44 -0
- package/LICENSE +190 -0
- package/README.md +373 -84
- package/dist/aci/index.d.ts +4 -70
- package/dist/aci/index.d.ts.map +1 -1
- package/dist/aci/index.js +18 -373
- package/dist/aci/index.js.map +1 -1
- package/dist/canonical/agent.d.ts +15 -15
- package/dist/canonical/agent.d.ts.map +1 -1
- package/dist/canonical/governance.d.ts +8 -8
- package/dist/canonical/intent.d.ts +18 -18
- package/dist/canonical/middleware.d.ts +4 -4
- package/dist/canonical/trust-signal.d.ts +48 -45
- package/dist/canonical/trust-signal.d.ts.map +1 -1
- package/dist/canonical/trust-signal.js +7 -2
- package/dist/canonical/trust-signal.js.map +1 -1
- package/dist/canonical/validation.d.ts +11 -26
- package/dist/canonical/validation.d.ts.map +1 -1
- package/dist/canonical/validation.js +30 -101
- package/dist/canonical/validation.js.map +1 -1
- package/dist/car/attestation.d.ts +30 -30
- package/dist/car/attestation.d.ts.map +1 -1
- package/dist/car/attestation.js +3 -1
- package/dist/car/attestation.js.map +1 -1
- package/dist/car/car-string.d.ts +47 -47
- package/dist/car/car-string.d.ts.map +1 -1
- package/dist/car/car-string.js +36 -36
- package/dist/car/car-string.js.map +1 -1
- package/dist/car/domains.d.ts +34 -18
- package/dist/car/domains.d.ts.map +1 -1
- package/dist/car/domains.js +53 -15
- package/dist/car/domains.js.map +1 -1
- package/dist/car/effective-permission.d.ts +61 -13
- package/dist/car/effective-permission.d.ts.map +1 -1
- package/dist/car/effective-permission.js +30 -2
- package/dist/car/effective-permission.js.map +1 -1
- package/dist/car/identity.d.ts +327 -108
- package/dist/car/identity.d.ts.map +1 -1
- package/dist/car/identity.js +112 -10
- package/dist/car/identity.js.map +1 -1
- package/dist/car/index.d.ts +3 -3
- package/dist/car/index.d.ts.map +1 -1
- package/dist/car/index.js +15 -7
- package/dist/car/index.js.map +1 -1
- package/dist/car/jwt-claims.d.ts +273 -273
- package/dist/car/jwt-claims.d.ts.map +1 -1
- package/dist/car/jwt-claims.js +39 -46
- package/dist/car/jwt-claims.js.map +1 -1
- package/dist/car/levels.d.ts +2 -2
- package/dist/car/mapping.d.ts +36 -36
- package/dist/car/mapping.d.ts.map +1 -1
- package/dist/car/mapping.js +107 -43
- package/dist/car/mapping.js.map +1 -1
- package/dist/car/skills.d.ts +4 -4
- package/dist/car/tiers.d.ts +7 -7
- package/dist/car/tiers.js +10 -10
- package/dist/car/tiers.js.map +1 -1
- package/dist/common/primitives.d.ts +2 -2
- package/dist/db/agents.d.ts +549 -9
- package/dist/db/agents.d.ts.map +1 -1
- package/dist/db/agents.js +4 -4
- package/dist/db/agents.js.map +1 -1
- package/dist/db/api-keys.d.ts +144 -3
- package/dist/db/api-keys.d.ts.map +1 -1
- package/dist/db/escalations.d.ts +156 -2
- package/dist/db/escalations.d.ts.map +1 -1
- package/dist/db/intents.d.ts +154 -3
- package/dist/db/intents.d.ts.map +1 -1
- package/dist/db/merkle.d.ts +134 -3
- package/dist/db/merkle.d.ts.map +1 -1
- package/dist/db/operations.d.ts +71 -2
- package/dist/db/operations.d.ts.map +1 -1
- package/dist/db/policy-versions.d.ts +38 -1
- package/dist/db/policy-versions.d.ts.map +1 -1
- package/dist/db/proofs.d.ts +119 -3
- package/dist/db/proofs.d.ts.map +1 -1
- package/dist/db/rbac.d.ts +233 -6
- package/dist/db/rbac.d.ts.map +1 -1
- package/dist/db/service-accounts.d.ts +218 -6
- package/dist/db/service-accounts.d.ts.map +1 -1
- package/dist/db/trust.d.ts +168 -2
- package/dist/db/trust.d.ts.map +1 -1
- package/dist/db/webhooks.d.ts +103 -1
- package/dist/db/webhooks.d.ts.map +1 -1
- package/dist/v2/enums.d.ts +5 -0
- package/dist/v2/enums.d.ts.map +1 -1
- package/dist/v2/enums.js +5 -0
- package/dist/v2/enums.js.map +1 -1
- package/dist/v2/evidence.d.ts +20 -20
- package/dist/v2/pre-action-gate.js +5 -5
- package/dist/v2/pre-action-gate.js.map +1 -1
- package/dist/v2/proof-event.d.ts +3 -1
- package/dist/v2/proof-event.d.ts.map +1 -1
- package/dist/v2/retention.d.ts +14 -14
- package/dist/v2/trust-delta.d.ts +6 -6
- package/dist/v2/trust-delta.d.ts.map +1 -1
- package/dist/v2/trust-profile.d.ts +116 -54
- package/dist/v2/trust-profile.d.ts.map +1 -1
- package/dist/v2/trust-profile.js +22 -17
- package/dist/v2/trust-profile.js.map +1 -1
- package/dist/validators/decision.d.ts +6 -6
- package/dist/validators/intent.d.ts +8 -8
- package/dist/validators/proof-event.d.ts +57 -54
- package/dist/validators/proof-event.d.ts.map +1 -1
- package/dist/validators/proof-event.js +2 -1
- package/dist/validators/proof-event.js.map +1 -1
- package/dist/validators/trust-profile.d.ts +76 -244
- package/dist/validators/trust-profile.d.ts.map +1 -1
- package/dist/validators/trust-profile.js +21 -35
- package/dist/validators/trust-profile.js.map +1 -1
- package/package.json +26 -11
- package/dist/aci/aci-string.d.ts +0 -539
- package/dist/aci/aci-string.d.ts.map +0 -1
- package/dist/aci/aci-string.js +0 -581
- package/dist/aci/aci-string.js.map +0 -1
- package/dist/aci/attestation.d.ts +0 -648
- package/dist/aci/attestation.d.ts.map +0 -1
- package/dist/aci/attestation.js +0 -299
- package/dist/aci/attestation.js.map +0 -1
- package/dist/aci/domains.d.ts +0 -260
- package/dist/aci/domains.d.ts.map +0 -1
- package/dist/aci/domains.js +0 -340
- package/dist/aci/domains.js.map +0 -1
- package/dist/aci/effective-permission.d.ts +0 -371
- package/dist/aci/effective-permission.d.ts.map +0 -1
- package/dist/aci/effective-permission.js +0 -364
- package/dist/aci/effective-permission.js.map +0 -1
- package/dist/aci/identity.d.ts +0 -1100
- package/dist/aci/identity.d.ts.map +0 -1
- package/dist/aci/identity.js +0 -338
- package/dist/aci/identity.js.map +0 -1
- package/dist/aci/jwt-claims.d.ts +0 -756
- package/dist/aci/jwt-claims.d.ts.map +0 -1
- package/dist/aci/jwt-claims.js +0 -345
- package/dist/aci/jwt-claims.js.map +0 -1
- package/dist/aci/levels.d.ts +0 -279
- package/dist/aci/levels.d.ts.map +0 -1
- package/dist/aci/levels.js +0 -486
- package/dist/aci/levels.js.map +0 -1
- package/dist/aci/mapping.d.ts +0 -291
- package/dist/aci/mapping.d.ts.map +0 -1
- package/dist/aci/mapping.js +0 -447
- package/dist/aci/mapping.js.map +0 -1
- package/dist/aci/skills.d.ts +0 -314
- package/dist/aci/skills.d.ts.map +0 -1
- package/dist/aci/skills.js +0 -426
- package/dist/aci/skills.js.map +0 -1
- package/dist/aci/tiers.d.ts +0 -403
- package/dist/aci/tiers.d.ts.map +0 -1
- package/dist/aci/tiers.js +0 -686
- package/dist/aci/tiers.js.map +0 -1
|
@@ -147,6 +147,7 @@ export declare const authorizationResultSchema: z.ZodObject<{
|
|
|
147
147
|
expiresAt: z.ZodOptional<z.ZodDate>;
|
|
148
148
|
}, "strip", z.ZodTypeAny, {
|
|
149
149
|
allowed: boolean;
|
|
150
|
+
expiresAt?: Date | undefined;
|
|
150
151
|
constraints?: {
|
|
151
152
|
custom?: Record<string, unknown> | undefined;
|
|
152
153
|
maxOperations?: number | undefined;
|
|
@@ -155,7 +156,6 @@ export declare const authorizationResultSchema: z.ZodObject<{
|
|
|
155
156
|
allowedSensitivity?: string[] | undefined;
|
|
156
157
|
requiresOversight?: boolean | undefined;
|
|
157
158
|
} | undefined;
|
|
158
|
-
expiresAt?: Date | undefined;
|
|
159
159
|
denialReason?: DenialReason | undefined;
|
|
160
160
|
reason?: string | undefined;
|
|
161
161
|
governanceDenialReason?: GovernanceDenialReason | undefined;
|
|
@@ -164,6 +164,7 @@ export declare const authorizationResultSchema: z.ZodObject<{
|
|
|
164
164
|
remediations?: readonly string[] | undefined;
|
|
165
165
|
}, {
|
|
166
166
|
allowed: boolean;
|
|
167
|
+
expiresAt?: Date | undefined;
|
|
167
168
|
constraints?: {
|
|
168
169
|
custom?: Record<string, unknown> | undefined;
|
|
169
170
|
maxOperations?: number | undefined;
|
|
@@ -172,7 +173,6 @@ export declare const authorizationResultSchema: z.ZodObject<{
|
|
|
172
173
|
allowedSensitivity?: string[] | undefined;
|
|
173
174
|
requiresOversight?: boolean | undefined;
|
|
174
175
|
} | undefined;
|
|
175
|
-
expiresAt?: Date | undefined;
|
|
176
176
|
denialReason?: DenialReason | undefined;
|
|
177
177
|
reason?: string | undefined;
|
|
178
178
|
governanceDenialReason?: GovernanceDenialReason | undefined;
|
|
@@ -235,9 +235,9 @@ export declare const authContextSchema: z.ZodObject<{
|
|
|
235
235
|
hierarchyLevel: z.ZodOptional<z.ZodLazy<z.ZodEnum<["hitl", "orch", "metagoat", "agent", "bot"]>>>;
|
|
236
236
|
attributes: z.ZodOptional<z.ZodReadonly<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
237
237
|
}, "strip", z.ZodTypeAny, {
|
|
238
|
+
tenantId: string;
|
|
238
239
|
userId: string;
|
|
239
240
|
permissions: readonly string[];
|
|
240
|
-
tenantId: string;
|
|
241
241
|
roles: readonly string[];
|
|
242
242
|
agentId?: string | undefined;
|
|
243
243
|
sessionId?: string | undefined;
|
|
@@ -245,9 +245,9 @@ export declare const authContextSchema: z.ZodObject<{
|
|
|
245
245
|
hierarchyLevel?: "agent" | "hitl" | "orch" | "metagoat" | "bot" | undefined;
|
|
246
246
|
attributes?: Readonly<Record<string, unknown>> | undefined;
|
|
247
247
|
}, {
|
|
248
|
+
tenantId: string;
|
|
248
249
|
userId: string;
|
|
249
250
|
permissions: readonly string[];
|
|
250
|
-
tenantId: string;
|
|
251
251
|
roles: readonly string[];
|
|
252
252
|
agentId?: string | undefined;
|
|
253
253
|
sessionId?: string | undefined;
|
|
@@ -347,8 +347,8 @@ export declare const hierarchyLevelConfigSchema: z.ZodObject<{
|
|
|
347
347
|
requiresHumanOversight: z.ZodBoolean;
|
|
348
348
|
minTrustScore: z.ZodNumber;
|
|
349
349
|
}, "strip", z.ZodTypeAny, {
|
|
350
|
-
name: string;
|
|
351
350
|
description: string;
|
|
351
|
+
name: string;
|
|
352
352
|
minTrustScore: number;
|
|
353
353
|
level: "agent" | "hitl" | "orch" | "metagoat" | "bot";
|
|
354
354
|
tier: number;
|
|
@@ -361,8 +361,8 @@ export declare const hierarchyLevelConfigSchema: z.ZodObject<{
|
|
|
361
361
|
canApproveOthers: boolean;
|
|
362
362
|
requiresHumanOversight: boolean;
|
|
363
363
|
}, {
|
|
364
|
-
name: string;
|
|
365
364
|
description: string;
|
|
365
|
+
name: string;
|
|
366
366
|
minTrustScore: number;
|
|
367
367
|
level: "agent" | "hitl" | "orch" | "metagoat" | "bot";
|
|
368
368
|
tier: number;
|
|
@@ -718,7 +718,6 @@ export declare const authoritySchema: z.ZodObject<{
|
|
|
718
718
|
approvedAt?: Date | undefined;
|
|
719
719
|
}>;
|
|
720
720
|
}, "strip", z.ZodTypeAny, {
|
|
721
|
-
active: boolean;
|
|
722
721
|
audit: {
|
|
723
722
|
createdAt: Date;
|
|
724
723
|
updatedAt: Date;
|
|
@@ -728,6 +727,7 @@ export declare const authoritySchema: z.ZodObject<{
|
|
|
728
727
|
approvedAt?: Date | undefined;
|
|
729
728
|
};
|
|
730
729
|
type: "delegated" | "system" | "role" | "temporary" | "emergency";
|
|
730
|
+
active: boolean;
|
|
731
731
|
name: string;
|
|
732
732
|
scope: {
|
|
733
733
|
type: "governance" | "coordination" | "management" | "execution" | "interaction";
|
|
@@ -755,7 +755,6 @@ export declare const authoritySchema: z.ZodObject<{
|
|
|
755
755
|
expiresAt?: Date | undefined;
|
|
756
756
|
delegatedFrom?: string | undefined;
|
|
757
757
|
}, {
|
|
758
|
-
active: boolean;
|
|
759
758
|
audit: {
|
|
760
759
|
createdAt: Date;
|
|
761
760
|
updatedAt: Date;
|
|
@@ -765,6 +764,7 @@ export declare const authoritySchema: z.ZodObject<{
|
|
|
765
764
|
approvedAt?: Date | undefined;
|
|
766
765
|
};
|
|
767
766
|
type: "delegated" | "system" | "role" | "temporary" | "emergency";
|
|
767
|
+
active: boolean;
|
|
768
768
|
name: string;
|
|
769
769
|
scope: {
|
|
770
770
|
type: "governance" | "coordination" | "management" | "execution" | "interaction";
|
|
@@ -492,11 +492,12 @@ export declare const intentSchema: z.ZodObject<{
|
|
|
492
492
|
executionId: z.ZodOptional<z.ZodString>;
|
|
493
493
|
}, "strip", z.ZodTypeAny, {
|
|
494
494
|
status: "completed" | "failed" | "cancelled" | "pending" | "evaluating" | "approved" | "denied" | "escalated" | "executing";
|
|
495
|
-
|
|
495
|
+
agentId: string;
|
|
496
|
+
tenantId: string;
|
|
496
497
|
intentId: string;
|
|
498
|
+
correlationId: string;
|
|
497
499
|
createdAt: Date;
|
|
498
500
|
updatedAt: Date;
|
|
499
|
-
agentId: string;
|
|
500
501
|
context: {
|
|
501
502
|
metadata?: Record<string, unknown> | undefined;
|
|
502
503
|
domain?: string | undefined;
|
|
@@ -510,7 +511,6 @@ export declare const intentSchema: z.ZodObject<{
|
|
|
510
511
|
jurisdictions?: string[] | undefined;
|
|
511
512
|
tags?: string[] | undefined;
|
|
512
513
|
};
|
|
513
|
-
tenantId: string;
|
|
514
514
|
action: string;
|
|
515
515
|
actionType: ActionType;
|
|
516
516
|
resourceScope: string[];
|
|
@@ -522,21 +522,22 @@ export declare const intentSchema: z.ZodObject<{
|
|
|
522
522
|
capturedAt: Date;
|
|
523
523
|
profileVersion?: number | undefined;
|
|
524
524
|
};
|
|
525
|
-
|
|
525
|
+
source?: string | undefined;
|
|
526
526
|
expiresAt?: Date | undefined;
|
|
527
|
+
decisionId?: string | undefined;
|
|
527
528
|
deletedAt?: Date | undefined;
|
|
528
|
-
source?: string | undefined;
|
|
529
529
|
cancellationReason?: string | undefined;
|
|
530
530
|
denialReason?: string | undefined;
|
|
531
531
|
failureReason?: string | undefined;
|
|
532
532
|
executionId?: string | undefined;
|
|
533
533
|
}, {
|
|
534
534
|
status: "completed" | "failed" | "cancelled" | "pending" | "evaluating" | "approved" | "denied" | "escalated" | "executing";
|
|
535
|
-
|
|
535
|
+
agentId: string;
|
|
536
|
+
tenantId: string;
|
|
536
537
|
intentId: string;
|
|
538
|
+
correlationId: string;
|
|
537
539
|
createdAt: Date;
|
|
538
540
|
updatedAt: Date;
|
|
539
|
-
agentId: string;
|
|
540
541
|
context: {
|
|
541
542
|
metadata?: Record<string, unknown> | undefined;
|
|
542
543
|
domain?: string | undefined;
|
|
@@ -550,7 +551,6 @@ export declare const intentSchema: z.ZodObject<{
|
|
|
550
551
|
jurisdictions?: string[] | undefined;
|
|
551
552
|
tags?: string[] | undefined;
|
|
552
553
|
};
|
|
553
|
-
tenantId: string;
|
|
554
554
|
action: string;
|
|
555
555
|
actionType: ActionType;
|
|
556
556
|
resourceScope: string[];
|
|
@@ -562,10 +562,10 @@ export declare const intentSchema: z.ZodObject<{
|
|
|
562
562
|
capturedAt: Date;
|
|
563
563
|
profileVersion?: number | undefined;
|
|
564
564
|
};
|
|
565
|
-
|
|
565
|
+
source?: string | undefined;
|
|
566
566
|
expiresAt?: Date | undefined;
|
|
567
|
+
decisionId?: string | undefined;
|
|
567
568
|
deletedAt?: Date | undefined;
|
|
568
|
-
source?: string | undefined;
|
|
569
569
|
cancellationReason?: string | undefined;
|
|
570
570
|
denialReason?: string | undefined;
|
|
571
571
|
failureReason?: string | undefined;
|
|
@@ -587,22 +587,22 @@ export declare const intentSummarySchema: z.ZodObject<{
|
|
|
587
587
|
createdAt: z.ZodDate;
|
|
588
588
|
}, "strip", z.ZodTypeAny, {
|
|
589
589
|
status: "completed" | "failed" | "cancelled" | "pending" | "evaluating" | "approved" | "denied" | "escalated" | "executing";
|
|
590
|
-
correlationId: string;
|
|
591
|
-
intentId: string;
|
|
592
|
-
createdAt: Date;
|
|
593
590
|
agentId: string;
|
|
594
591
|
tenantId: string;
|
|
592
|
+
intentId: string;
|
|
593
|
+
correlationId: string;
|
|
594
|
+
createdAt: Date;
|
|
595
595
|
action: string;
|
|
596
596
|
actionType: ActionType;
|
|
597
597
|
dataSensitivity: DataSensitivity;
|
|
598
598
|
trustBand: TrustBand;
|
|
599
599
|
}, {
|
|
600
600
|
status: "completed" | "failed" | "cancelled" | "pending" | "evaluating" | "approved" | "denied" | "escalated" | "executing";
|
|
601
|
-
correlationId: string;
|
|
602
|
-
intentId: string;
|
|
603
|
-
createdAt: Date;
|
|
604
601
|
agentId: string;
|
|
605
602
|
tenantId: string;
|
|
603
|
+
intentId: string;
|
|
604
|
+
correlationId: string;
|
|
605
|
+
createdAt: Date;
|
|
606
606
|
action: string;
|
|
607
607
|
actionType: ActionType;
|
|
608
608
|
dataSensitivity: DataSensitivity;
|
|
@@ -665,6 +665,7 @@ export declare const createIntentRequestSchema: z.ZodObject<{
|
|
|
665
665
|
resourceScope: string[];
|
|
666
666
|
dataSensitivity: DataSensitivity;
|
|
667
667
|
reversibility: Reversibility;
|
|
668
|
+
source?: string | undefined;
|
|
668
669
|
correlationId?: string | undefined;
|
|
669
670
|
context?: {
|
|
670
671
|
metadata?: Record<string, unknown> | undefined;
|
|
@@ -679,7 +680,6 @@ export declare const createIntentRequestSchema: z.ZodObject<{
|
|
|
679
680
|
jurisdictions?: string[] | undefined;
|
|
680
681
|
tags?: string[] | undefined;
|
|
681
682
|
} | undefined;
|
|
682
|
-
source?: string | undefined;
|
|
683
683
|
expiresInMs?: number | undefined;
|
|
684
684
|
}, {
|
|
685
685
|
agentId: string;
|
|
@@ -688,6 +688,7 @@ export declare const createIntentRequestSchema: z.ZodObject<{
|
|
|
688
688
|
resourceScope: string[];
|
|
689
689
|
dataSensitivity: DataSensitivity;
|
|
690
690
|
reversibility: Reversibility;
|
|
691
|
+
source?: string | undefined;
|
|
691
692
|
correlationId?: string | undefined;
|
|
692
693
|
context?: {
|
|
693
694
|
metadata?: Record<string, unknown> | undefined;
|
|
@@ -702,7 +703,6 @@ export declare const createIntentRequestSchema: z.ZodObject<{
|
|
|
702
703
|
jurisdictions?: string[] | undefined;
|
|
703
704
|
tags?: string[] | undefined;
|
|
704
705
|
} | undefined;
|
|
705
|
-
source?: string | undefined;
|
|
706
706
|
expiresInMs?: number | undefined;
|
|
707
707
|
}>;
|
|
708
708
|
/**
|
|
@@ -258,15 +258,15 @@ export declare const errorResponseSchema: z.ZodObject<{
|
|
|
258
258
|
code: string;
|
|
259
259
|
message: string;
|
|
260
260
|
path?: string | undefined;
|
|
261
|
-
details?: Readonly<Record<string, unknown>> | undefined;
|
|
262
261
|
timestamp?: string | undefined;
|
|
262
|
+
details?: Readonly<Record<string, unknown>> | undefined;
|
|
263
263
|
requestId?: string | undefined;
|
|
264
264
|
}, {
|
|
265
265
|
code: string;
|
|
266
266
|
message: string;
|
|
267
267
|
path?: string | undefined;
|
|
268
|
-
details?: Readonly<Record<string, unknown>> | undefined;
|
|
269
268
|
timestamp?: string | undefined;
|
|
269
|
+
details?: Readonly<Record<string, unknown>> | undefined;
|
|
270
270
|
requestId?: string | undefined;
|
|
271
271
|
}>;
|
|
272
272
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -274,8 +274,8 @@ export declare const errorResponseSchema: z.ZodObject<{
|
|
|
274
274
|
code: string;
|
|
275
275
|
message: string;
|
|
276
276
|
path?: string | undefined;
|
|
277
|
-
details?: Readonly<Record<string, unknown>> | undefined;
|
|
278
277
|
timestamp?: string | undefined;
|
|
278
|
+
details?: Readonly<Record<string, unknown>> | undefined;
|
|
279
279
|
requestId?: string | undefined;
|
|
280
280
|
};
|
|
281
281
|
}, {
|
|
@@ -283,8 +283,8 @@ export declare const errorResponseSchema: z.ZodObject<{
|
|
|
283
283
|
code: string;
|
|
284
284
|
message: string;
|
|
285
285
|
path?: string | undefined;
|
|
286
|
-
details?: Readonly<Record<string, unknown>> | undefined;
|
|
287
286
|
timestamp?: string | undefined;
|
|
287
|
+
details?: Readonly<Record<string, unknown>> | undefined;
|
|
288
288
|
requestId?: string | undefined;
|
|
289
289
|
};
|
|
290
290
|
}>;
|
|
@@ -312,7 +312,10 @@ export declare function isNegativeSignal(type: SignalType): boolean;
|
|
|
312
312
|
/**
|
|
313
313
|
* Calculates the effective impact of a signal.
|
|
314
314
|
*
|
|
315
|
-
*
|
|
315
|
+
* For positive signals: applies weight, confidence, and magnitude multiplier.
|
|
316
|
+
* For negative signals: magnitudeMultiplier is clamped to max 1.0 — negative
|
|
317
|
+
* signals are never amplified here. The tier-scaled penalty formula (7-10x)
|
|
318
|
+
* is the sole mechanism for negative amplification.
|
|
316
319
|
*
|
|
317
320
|
* @param signal - Trust signal
|
|
318
321
|
* @returns Calculated effective impact value
|
|
@@ -387,14 +390,14 @@ export declare const signalImpactSchema: z.ZodObject<{
|
|
|
387
390
|
confidence: z.ZodOptional<z.ZodNumber>;
|
|
388
391
|
}, "strip", z.ZodTypeAny, {
|
|
389
392
|
baseImpact: number;
|
|
393
|
+
dimensions?: ("capability" | "behavioral" | "governance" | "contextual" | "assurance")[] | undefined;
|
|
390
394
|
magnitudeMultiplier?: number | undefined;
|
|
391
395
|
confidence?: number | undefined;
|
|
392
|
-
dimensions?: ("governance" | "capability" | "behavioral" | "contextual" | "assurance")[] | undefined;
|
|
393
396
|
}, {
|
|
394
397
|
baseImpact: number;
|
|
398
|
+
dimensions?: ("capability" | "behavioral" | "governance" | "contextual" | "assurance")[] | undefined;
|
|
395
399
|
magnitudeMultiplier?: number | undefined;
|
|
396
400
|
confidence?: number | undefined;
|
|
397
|
-
dimensions?: ("governance" | "capability" | "behavioral" | "contextual" | "assurance")[] | undefined;
|
|
398
401
|
}>;
|
|
399
402
|
/**
|
|
400
403
|
* Zod schema for TrustSignal.
|
|
@@ -413,14 +416,14 @@ export declare const trustSignalSchema: z.ZodObject<{
|
|
|
413
416
|
confidence: z.ZodOptional<z.ZodNumber>;
|
|
414
417
|
}, "strip", z.ZodTypeAny, {
|
|
415
418
|
baseImpact: number;
|
|
419
|
+
dimensions?: ("capability" | "behavioral" | "governance" | "contextual" | "assurance")[] | undefined;
|
|
416
420
|
magnitudeMultiplier?: number | undefined;
|
|
417
421
|
confidence?: number | undefined;
|
|
418
|
-
dimensions?: ("governance" | "capability" | "behavioral" | "contextual" | "assurance")[] | undefined;
|
|
419
422
|
}, {
|
|
420
423
|
baseImpact: number;
|
|
424
|
+
dimensions?: ("capability" | "behavioral" | "governance" | "contextual" | "assurance")[] | undefined;
|
|
421
425
|
magnitudeMultiplier?: number | undefined;
|
|
422
426
|
confidence?: number | undefined;
|
|
423
|
-
dimensions?: ("governance" | "capability" | "behavioral" | "contextual" | "assurance")[] | undefined;
|
|
424
427
|
}>;
|
|
425
428
|
description: z.ZodOptional<z.ZodString>;
|
|
426
429
|
weight: z.ZodOptional<z.ZodNumber>;
|
|
@@ -434,47 +437,47 @@ export declare const trustSignalSchema: z.ZodObject<{
|
|
|
434
437
|
deltaId: z.ZodOptional<z.ZodString>;
|
|
435
438
|
}, "strip", z.ZodTypeAny, {
|
|
436
439
|
type: SignalType;
|
|
437
|
-
|
|
440
|
+
signalId: string;
|
|
438
441
|
agentId: string;
|
|
439
|
-
source: "unknown" | "external" | "admin" | "a3i" | "era" | "atsf" | "canary" | "compliance" | "anomaly" | "peer" | "scheduler";
|
|
440
442
|
tenantId: string;
|
|
443
|
+
source: "a3i" | "era" | "atsf" | "canary" | "admin" | "external" | "compliance" | "anomaly" | "peer" | "scheduler" | "unknown";
|
|
444
|
+
timestamp: Date;
|
|
441
445
|
impact: {
|
|
442
446
|
baseImpact: number;
|
|
447
|
+
dimensions?: ("capability" | "behavioral" | "governance" | "contextual" | "assurance")[] | undefined;
|
|
443
448
|
magnitudeMultiplier?: number | undefined;
|
|
444
449
|
confidence?: number | undefined;
|
|
445
|
-
dimensions?: ("governance" | "capability" | "behavioral" | "contextual" | "assurance")[] | undefined;
|
|
446
450
|
};
|
|
447
|
-
signalId: string;
|
|
448
|
-
metadata?: Record<string, unknown> | undefined;
|
|
449
|
-
correlationId?: string | undefined;
|
|
450
|
-
intentId?: string | undefined;
|
|
451
|
-
expiresAt?: Date | undefined;
|
|
452
451
|
description?: string | undefined;
|
|
453
452
|
weight?: number | undefined;
|
|
453
|
+
intentId?: string | undefined;
|
|
454
454
|
actionId?: string | undefined;
|
|
455
|
+
correlationId?: string | undefined;
|
|
456
|
+
expiresAt?: Date | undefined;
|
|
457
|
+
metadata?: Record<string, unknown> | undefined;
|
|
455
458
|
processed?: boolean | undefined;
|
|
456
459
|
processedAt?: Date | undefined;
|
|
457
460
|
deltaId?: string | undefined;
|
|
458
461
|
}, {
|
|
459
462
|
type: SignalType;
|
|
460
|
-
|
|
463
|
+
signalId: string;
|
|
461
464
|
agentId: string;
|
|
462
|
-
source: "unknown" | "external" | "admin" | "a3i" | "era" | "atsf" | "canary" | "compliance" | "anomaly" | "peer" | "scheduler";
|
|
463
465
|
tenantId: string;
|
|
466
|
+
source: "a3i" | "era" | "atsf" | "canary" | "admin" | "external" | "compliance" | "anomaly" | "peer" | "scheduler" | "unknown";
|
|
467
|
+
timestamp: Date;
|
|
464
468
|
impact: {
|
|
465
469
|
baseImpact: number;
|
|
470
|
+
dimensions?: ("capability" | "behavioral" | "governance" | "contextual" | "assurance")[] | undefined;
|
|
466
471
|
magnitudeMultiplier?: number | undefined;
|
|
467
472
|
confidence?: number | undefined;
|
|
468
|
-
dimensions?: ("governance" | "capability" | "behavioral" | "contextual" | "assurance")[] | undefined;
|
|
469
473
|
};
|
|
470
|
-
signalId: string;
|
|
471
|
-
metadata?: Record<string, unknown> | undefined;
|
|
472
|
-
correlationId?: string | undefined;
|
|
473
|
-
intentId?: string | undefined;
|
|
474
|
-
expiresAt?: Date | undefined;
|
|
475
474
|
description?: string | undefined;
|
|
476
475
|
weight?: number | undefined;
|
|
476
|
+
intentId?: string | undefined;
|
|
477
477
|
actionId?: string | undefined;
|
|
478
|
+
correlationId?: string | undefined;
|
|
479
|
+
expiresAt?: Date | undefined;
|
|
480
|
+
metadata?: Record<string, unknown> | undefined;
|
|
478
481
|
processed?: boolean | undefined;
|
|
479
482
|
processedAt?: Date | undefined;
|
|
480
483
|
deltaId?: string | undefined;
|
|
@@ -492,18 +495,18 @@ export declare const trustSignalSummarySchema: z.ZodObject<{
|
|
|
492
495
|
description: z.ZodOptional<z.ZodString>;
|
|
493
496
|
}, "strip", z.ZodTypeAny, {
|
|
494
497
|
type: SignalType;
|
|
495
|
-
timestamp: Date;
|
|
496
|
-
agentId: string;
|
|
497
|
-
source: "unknown" | "external" | "admin" | "a3i" | "era" | "atsf" | "canary" | "compliance" | "anomaly" | "peer" | "scheduler";
|
|
498
498
|
signalId: string;
|
|
499
|
+
agentId: string;
|
|
500
|
+
source: "a3i" | "era" | "atsf" | "canary" | "admin" | "external" | "compliance" | "anomaly" | "peer" | "scheduler" | "unknown";
|
|
501
|
+
timestamp: Date;
|
|
499
502
|
impactValue: number;
|
|
500
503
|
description?: string | undefined;
|
|
501
504
|
}, {
|
|
502
505
|
type: SignalType;
|
|
503
|
-
timestamp: Date;
|
|
504
|
-
agentId: string;
|
|
505
|
-
source: "unknown" | "external" | "admin" | "a3i" | "era" | "atsf" | "canary" | "compliance" | "anomaly" | "peer" | "scheduler";
|
|
506
506
|
signalId: string;
|
|
507
|
+
agentId: string;
|
|
508
|
+
source: "a3i" | "era" | "atsf" | "canary" | "admin" | "external" | "compliance" | "anomaly" | "peer" | "scheduler" | "unknown";
|
|
509
|
+
timestamp: Date;
|
|
507
510
|
impactValue: number;
|
|
508
511
|
description?: string | undefined;
|
|
509
512
|
}>;
|
|
@@ -521,14 +524,14 @@ export declare const createTrustSignalRequestSchema: z.ZodObject<{
|
|
|
521
524
|
confidence: z.ZodOptional<z.ZodNumber>;
|
|
522
525
|
}, "strip", z.ZodTypeAny, {
|
|
523
526
|
baseImpact: number;
|
|
527
|
+
dimensions?: ("capability" | "behavioral" | "governance" | "contextual" | "assurance")[] | undefined;
|
|
524
528
|
magnitudeMultiplier?: number | undefined;
|
|
525
529
|
confidence?: number | undefined;
|
|
526
|
-
dimensions?: ("governance" | "capability" | "behavioral" | "contextual" | "assurance")[] | undefined;
|
|
527
530
|
}, {
|
|
528
531
|
baseImpact: number;
|
|
532
|
+
dimensions?: ("capability" | "behavioral" | "governance" | "contextual" | "assurance")[] | undefined;
|
|
529
533
|
magnitudeMultiplier?: number | undefined;
|
|
530
534
|
confidence?: number | undefined;
|
|
531
|
-
dimensions?: ("governance" | "capability" | "behavioral" | "contextual" | "assurance")[] | undefined;
|
|
532
535
|
}>;
|
|
533
536
|
description: z.ZodOptional<z.ZodString>;
|
|
534
537
|
weight: z.ZodOptional<z.ZodNumber>;
|
|
@@ -540,37 +543,37 @@ export declare const createTrustSignalRequestSchema: z.ZodObject<{
|
|
|
540
543
|
}, "strip", z.ZodTypeAny, {
|
|
541
544
|
type: SignalType;
|
|
542
545
|
agentId: string;
|
|
543
|
-
source: "
|
|
546
|
+
source: "a3i" | "era" | "atsf" | "canary" | "admin" | "external" | "compliance" | "anomaly" | "peer" | "scheduler" | "unknown";
|
|
544
547
|
impact: {
|
|
545
548
|
baseImpact: number;
|
|
549
|
+
dimensions?: ("capability" | "behavioral" | "governance" | "contextual" | "assurance")[] | undefined;
|
|
546
550
|
magnitudeMultiplier?: number | undefined;
|
|
547
551
|
confidence?: number | undefined;
|
|
548
|
-
dimensions?: ("governance" | "capability" | "behavioral" | "contextual" | "assurance")[] | undefined;
|
|
549
552
|
};
|
|
550
|
-
metadata?: Record<string, unknown> | undefined;
|
|
551
|
-
correlationId?: string | undefined;
|
|
552
|
-
intentId?: string | undefined;
|
|
553
|
-
expiresAt?: Date | undefined;
|
|
554
553
|
description?: string | undefined;
|
|
555
554
|
weight?: number | undefined;
|
|
555
|
+
intentId?: string | undefined;
|
|
556
556
|
actionId?: string | undefined;
|
|
557
|
+
correlationId?: string | undefined;
|
|
558
|
+
expiresAt?: Date | undefined;
|
|
559
|
+
metadata?: Record<string, unknown> | undefined;
|
|
557
560
|
}, {
|
|
558
561
|
type: SignalType;
|
|
559
562
|
agentId: string;
|
|
560
|
-
source: "
|
|
563
|
+
source: "a3i" | "era" | "atsf" | "canary" | "admin" | "external" | "compliance" | "anomaly" | "peer" | "scheduler" | "unknown";
|
|
561
564
|
impact: {
|
|
562
565
|
baseImpact: number;
|
|
566
|
+
dimensions?: ("capability" | "behavioral" | "governance" | "contextual" | "assurance")[] | undefined;
|
|
563
567
|
magnitudeMultiplier?: number | undefined;
|
|
564
568
|
confidence?: number | undefined;
|
|
565
|
-
dimensions?: ("governance" | "capability" | "behavioral" | "contextual" | "assurance")[] | undefined;
|
|
566
569
|
};
|
|
567
|
-
metadata?: Record<string, unknown> | undefined;
|
|
568
|
-
correlationId?: string | undefined;
|
|
569
|
-
intentId?: string | undefined;
|
|
570
|
-
expiresAt?: Date | undefined;
|
|
571
570
|
description?: string | undefined;
|
|
572
571
|
weight?: number | undefined;
|
|
572
|
+
intentId?: string | undefined;
|
|
573
573
|
actionId?: string | undefined;
|
|
574
|
+
correlationId?: string | undefined;
|
|
575
|
+
expiresAt?: Date | undefined;
|
|
576
|
+
metadata?: Record<string, unknown> | undefined;
|
|
574
577
|
}>;
|
|
575
578
|
/**
|
|
576
579
|
* Zod schema for SignalAggregation.
|
|
@@ -586,22 +589,22 @@ export declare const signalAggregationSchema: z.ZodObject<{
|
|
|
586
589
|
positiveImpact: z.ZodNumber;
|
|
587
590
|
negativeImpact: z.ZodNumber;
|
|
588
591
|
}, "strip", z.ZodTypeAny, {
|
|
592
|
+
agentId: string;
|
|
589
593
|
periodStart: Date;
|
|
590
594
|
periodEnd: Date;
|
|
591
|
-
agentId: string;
|
|
592
595
|
signalCount: number;
|
|
593
596
|
byType: Partial<Record<SignalType, number>>;
|
|
594
|
-
bySource: Partial<Record<"
|
|
597
|
+
bySource: Partial<Record<"a3i" | "era" | "atsf" | "canary" | "admin" | "external" | "compliance" | "anomaly" | "peer" | "scheduler" | "unknown", number>>;
|
|
595
598
|
netImpact: number;
|
|
596
599
|
positiveImpact: number;
|
|
597
600
|
negativeImpact: number;
|
|
598
601
|
}, {
|
|
602
|
+
agentId: string;
|
|
599
603
|
periodStart: Date;
|
|
600
604
|
periodEnd: Date;
|
|
601
|
-
agentId: string;
|
|
602
605
|
signalCount: number;
|
|
603
606
|
byType: Partial<Record<SignalType, number>>;
|
|
604
|
-
bySource: Partial<Record<"
|
|
607
|
+
bySource: Partial<Record<"a3i" | "era" | "atsf" | "canary" | "admin" | "external" | "compliance" | "anomaly" | "peer" | "scheduler" | "unknown", number>>;
|
|
605
608
|
netImpact: number;
|
|
606
609
|
positiveImpact: number;
|
|
607
610
|
negativeImpact: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"trust-signal.d.ts","sourceRoot":"","sources":["../../src/canonical/trust-signal.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAOxB;;;;;;GAMG;AACH,oBAAY,UAAU;IACpB,6CAA6C;IAC7C,cAAc,mBAAmB;IACjC,yCAAyC;IACzC,cAAc,mBAAmB;IACjC,+CAA+C;IAC/C,cAAc,mBAAmB;IACjC,0CAA0C;IAC1C,oBAAoB,yBAAyB;IAC7C,sCAAsC;IACtC,mBAAmB,wBAAwB;IAC3C,gDAAgD;IAChD,kBAAkB,uBAAuB;IACzC,yCAAyC;IACzC,gBAAgB,qBAAqB;IACrC,+CAA+C;IAC/C,iBAAiB,sBAAsB;IACvC,oCAAoC;IACpC,KAAK,UAAU;IACf,6CAA6C;IAC7C,aAAa,kBAAkB;IAC/B,yCAAyC;IACzC,cAAc,mBAAmB;IACjC,uCAAuC;IACvC,aAAa,kBAAkB;IAC/B,uCAAuC;IACvC,aAAa,kBAAkB;IAC/B,uCAAuC;IACvC,WAAW,gBAAgB;IAC3B,iCAAiC;IACjC,gBAAgB,qBAAqB;IACrC,4DAA4D;IAC5D,gBAAgB,qBAAqB;CACtC;AAED;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG,UAAU,GAAG,UAAU,GAAG,SAAS,CAAC;AAEjE;;GAEG;AACH,eAAO,MAAM,oBAAoB,EAAE,QAAQ,CA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAkB5B,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;EAQnC,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,8BAA8B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAYzC,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAUlC,CAAC;AAMH;;GAEG;AACH,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAEjE;;GAEG;AACH,MAAM,MAAM,6BAA6B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,8BAA8B,CAAC,CAAC"}
|
|
@@ -151,7 +151,10 @@ function isNegativeSignal(type) {
|
|
|
151
151
|
/**
|
|
152
152
|
* Calculates the effective impact of a signal.
|
|
153
153
|
*
|
|
154
|
-
*
|
|
154
|
+
* For positive signals: applies weight, confidence, and magnitude multiplier.
|
|
155
|
+
* For negative signals: magnitudeMultiplier is clamped to max 1.0 — negative
|
|
156
|
+
* signals are never amplified here. The tier-scaled penalty formula (7-10x)
|
|
157
|
+
* is the sole mechanism for negative amplification.
|
|
155
158
|
*
|
|
156
159
|
* @param signal - Trust signal
|
|
157
160
|
* @returns Calculated effective impact value
|
|
@@ -159,7 +162,9 @@ function isNegativeSignal(type) {
|
|
|
159
162
|
function calculateEffectiveImpact(signal) {
|
|
160
163
|
const { impact, weight = 1.0 } = signal;
|
|
161
164
|
const { baseImpact, magnitudeMultiplier = 1.0, confidence = 1.0 } = impact;
|
|
162
|
-
|
|
165
|
+
// Clamp magnitudeMultiplier to 1.0 for negative signals — no extra amplification
|
|
166
|
+
const effectiveMultiplier = baseImpact < 0 ? Math.min(1.0, magnitudeMultiplier) : magnitudeMultiplier;
|
|
167
|
+
return baseImpact * weight * effectiveMultiplier * confidence;
|
|
163
168
|
}
|
|
164
169
|
/**
|
|
165
170
|
* Checks if a signal has expired.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"trust-signal.js","sourceRoot":"","sources":["../../src/canonical/trust-signal.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;GAYG;;;AAqYH,8CAEC;AAQD,4CAEC;AAQD,4CAEC;
|
|
1
|
+
{"version":3,"file":"trust-signal.js","sourceRoot":"","sources":["../../src/canonical/trust-signal.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;GAYG;;;AAqYH,8CAEC;AAQD,4CAEC;AAQD,4CAEC;AAaD,4DAQC;AASD,0CAGC;AASD,oDAEC;AAWD,4CAwCC;AAYD,oCAEC;AAQD,wCAEC;AAQD,4CAEC;AA1hBD,6BAAwB;AACxB,uDAAuD;AAEvD,+EAA+E;AAC/E,sBAAsB;AACtB,+EAA+E;AAE/E;;;;;;GAMG;AACH,IAAY,UAiCX;AAjCD,WAAY,UAAU;IACpB,6CAA6C;IAC7C,+CAAiC,CAAA;IACjC,yCAAyC;IACzC,+CAAiC,CAAA;IACjC,+CAA+C;IAC/C,+CAAiC,CAAA;IACjC,0CAA0C;IAC1C,2DAA6C,CAAA;IAC7C,sCAAsC;IACtC,yDAA2C,CAAA;IAC3C,gDAAgD;IAChD,uDAAyC,CAAA;IACzC,yCAAyC;IACzC,mDAAqC,CAAA;IACrC,+CAA+C;IAC/C,qDAAuC,CAAA;IACvC,oCAAoC;IACpC,6BAAe,CAAA;IACf,6CAA6C;IAC7C,6CAA+B,CAAA;IAC/B,yCAAyC;IACzC,+CAAiC,CAAA;IACjC,uCAAuC;IACvC,6CAA+B,CAAA;IAC/B,uCAAuC;IACvC,6CAA+B,CAAA;IAC/B,uCAAuC;IACvC,yCAA2B,CAAA;IAC3B,iCAAiC;IACjC,mDAAqC,CAAA;IACrC,4DA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
|
|
11
11
|
*/
|
|
12
12
|
import { TrustBand, ObservationTier, DataSensitivity, Reversibility, ActionType, ProofEventType, ComponentType, ComponentStatus, ApprovalType } from '../v2/enums.js';
|
|
13
|
-
import {
|
|
13
|
+
import { TrustFactorScores, BandThresholds, RiskProfile } from '../v2/trust-profile.js';
|
|
14
14
|
import { TrustDeltaReason } from '../v2/trust-delta.js';
|
|
15
15
|
import { DenialReason } from '../v2/decision.js';
|
|
16
16
|
/**
|
|
@@ -21,17 +21,10 @@ export declare const TRUST_SCORE_RANGE: {
|
|
|
21
21
|
readonly max: 1000;
|
|
22
22
|
};
|
|
23
23
|
/**
|
|
24
|
-
* Valid range for trust
|
|
25
|
-
* Note:
|
|
24
|
+
* Valid range for trust factor scores (0.0-1.0 normalized scale)
|
|
25
|
+
* Note: Factor scores use 0.0-1.0, composite score uses 0-1000
|
|
26
26
|
*/
|
|
27
|
-
export declare const
|
|
28
|
-
readonly min: 0;
|
|
29
|
-
readonly max: 100;
|
|
30
|
-
};
|
|
31
|
-
/**
|
|
32
|
-
* Valid range for trust weights (must sum to 1.0)
|
|
33
|
-
*/
|
|
34
|
-
export declare const WEIGHT_RANGE: {
|
|
27
|
+
export declare const FACTOR_SCORE_RANGE: {
|
|
35
28
|
readonly min: 0;
|
|
36
29
|
readonly max: 1;
|
|
37
30
|
};
|
|
@@ -190,23 +183,14 @@ export declare function isRiskProfile(value: unknown): value is RiskProfile;
|
|
|
190
183
|
*/
|
|
191
184
|
export declare function assertValidRiskProfile(value: unknown, field?: string): asserts value is RiskProfile;
|
|
192
185
|
/**
|
|
193
|
-
* Check if a value has valid
|
|
194
|
-
*/
|
|
195
|
-
export declare function isTrustDimensions(value: unknown): value is TrustDimensions;
|
|
196
|
-
/**
|
|
197
|
-
* Assert that a value has valid TrustDimensions
|
|
198
|
-
* @throws ValidationError if invalid
|
|
199
|
-
*/
|
|
200
|
-
export declare function assertValidTrustDimensions(value: unknown, field?: string): asserts value is TrustDimensions;
|
|
201
|
-
/**
|
|
202
|
-
* Check if a value has valid TrustWeights structure
|
|
186
|
+
* Check if a value has valid TrustFactorScores structure
|
|
203
187
|
*/
|
|
204
|
-
export declare function
|
|
188
|
+
export declare function isTrustFactorScores(value: unknown): value is TrustFactorScores;
|
|
205
189
|
/**
|
|
206
|
-
* Assert that a value has valid
|
|
190
|
+
* Assert that a value has valid TrustFactorScores
|
|
207
191
|
* @throws ValidationError if invalid
|
|
208
192
|
*/
|
|
209
|
-
export declare function
|
|
193
|
+
export declare function assertValidTrustFactorScores(value: unknown, field?: string): asserts value is TrustFactorScores;
|
|
210
194
|
/**
|
|
211
195
|
* Check if a value has valid BandThresholds structure
|
|
212
196
|
*/
|
|
@@ -221,9 +205,10 @@ export declare function assertValidBandThresholds(value: unknown, field?: string
|
|
|
221
205
|
*/
|
|
222
206
|
export declare function calculateTrustBand(score: number, thresholds?: BandThresholds): TrustBand;
|
|
223
207
|
/**
|
|
224
|
-
* Calculate composite trust score from
|
|
208
|
+
* Calculate composite trust score from factor scores
|
|
209
|
+
* Simple average scaled to 0-1000
|
|
225
210
|
*/
|
|
226
|
-
export declare function calculateCompositeScore(
|
|
211
|
+
export declare function calculateCompositeScore(factorScores: TrustFactorScores): number;
|
|
227
212
|
/**
|
|
228
213
|
* Validate all fields of an object against a schema
|
|
229
214
|
*/
|