@capabilityhostprotocol/types 0.5.0 → 0.5.2
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/dist/index.d.mts +71 -1
- package/dist/index.d.ts +71 -1
- package/dist/index.js +27 -0
- package/dist/index.mjs +24 -0
- package/package.json +1 -1
- package/src/v0_1.ts +101 -0
package/dist/index.d.mts
CHANGED
|
@@ -20,6 +20,76 @@ type InvariantFailureBehavior = "deny" | "warn" | "degrade";
|
|
|
20
20
|
declare const CHP_V0_1_OUTCOMES: readonly ["success", "failure", "denied", "skipped"];
|
|
21
21
|
declare const CHP_V0_1_CORE_EVIDENCE_TYPES: readonly ["execution_started", "execution_completed", "execution_failed", "execution_denied", "execution_skipped"];
|
|
22
22
|
declare const CHP_AGENTIC_EVIDENCE_TYPES: readonly ["tool_use", "tool_use_requested", "session_completed", "session_spawn"];
|
|
23
|
+
declare const CHP_INCIDENT_EVIDENCE_TYPES: readonly ["incident_opened", "incident_escalated", "incident_remediation_applied", "incident_resolved", "incident_closed", "incident_trigger_fired"];
|
|
24
|
+
type IncidentSeverity = "P1" | "P2" | "P3" | "P4";
|
|
25
|
+
type IncidentStatus = "open" | "investigating" | "escalated" | "resolved" | "closed";
|
|
26
|
+
type RemediationActionType = "auto" | "manual" | "escalate";
|
|
27
|
+
interface IncidentTrigger {
|
|
28
|
+
pattern: string;
|
|
29
|
+
threshold: number;
|
|
30
|
+
window_seconds: number;
|
|
31
|
+
}
|
|
32
|
+
interface Incident {
|
|
33
|
+
incident_id: string;
|
|
34
|
+
title: string;
|
|
35
|
+
severity: IncidentSeverity;
|
|
36
|
+
status: IncidentStatus;
|
|
37
|
+
trigger?: IncidentTrigger | null;
|
|
38
|
+
correlation_ids: string[];
|
|
39
|
+
detected_at: string;
|
|
40
|
+
resolved_at?: string | null;
|
|
41
|
+
timeline: JsonObject[];
|
|
42
|
+
}
|
|
43
|
+
interface RemediationAction {
|
|
44
|
+
action_id: string;
|
|
45
|
+
incident_id: string;
|
|
46
|
+
action_type: RemediationActionType;
|
|
47
|
+
description: string;
|
|
48
|
+
executed_at: string;
|
|
49
|
+
outcome?: string | null;
|
|
50
|
+
}
|
|
51
|
+
declare const CHP_SAFETY_EVIDENCE_TYPES: readonly ["safety_assessment_started", "safety_assessment_completed", "safety_guardrail_triggered", "safety_action_blocked", "safety_action_approved"];
|
|
52
|
+
declare const CHP_COMPLIANCE_EVIDENCE_TYPES: readonly ["retention_policy_applied", "evidence_purged", "evidence_redacted", "compliance_report_generated"];
|
|
53
|
+
type RiskLevel = "low" | "medium" | "high" | "critical";
|
|
54
|
+
type SafetyRecommendation = "allow" | "warn" | "require_approval" | "block";
|
|
55
|
+
interface RiskAssessment {
|
|
56
|
+
level: RiskLevel;
|
|
57
|
+
score: number;
|
|
58
|
+
factors: string[];
|
|
59
|
+
recommendation: SafetyRecommendation;
|
|
60
|
+
assessed_at: string;
|
|
61
|
+
}
|
|
62
|
+
interface GuardrailDefinition {
|
|
63
|
+
id: string;
|
|
64
|
+
capability_id_pattern: string;
|
|
65
|
+
max_risk_level: RiskLevel;
|
|
66
|
+
requires_human_for: string[];
|
|
67
|
+
}
|
|
68
|
+
interface SafetyReport {
|
|
69
|
+
report_id: string;
|
|
70
|
+
capability_id: string;
|
|
71
|
+
payload_hash: string;
|
|
72
|
+
assessment: RiskAssessment;
|
|
73
|
+
guardrails_evaluated: string[];
|
|
74
|
+
approved: boolean;
|
|
75
|
+
block_reason?: string | null;
|
|
76
|
+
generated_at: string;
|
|
77
|
+
}
|
|
78
|
+
interface RetentionPolicy {
|
|
79
|
+
policy_id: string;
|
|
80
|
+
retain_days: number;
|
|
81
|
+
applies_to: string[];
|
|
82
|
+
redact_payload_after_days?: number | null;
|
|
83
|
+
}
|
|
84
|
+
interface ComplianceReport {
|
|
85
|
+
report_id: string;
|
|
86
|
+
policy_ids: string[];
|
|
87
|
+
store_path: string;
|
|
88
|
+
events_inspected: number;
|
|
89
|
+
events_purged: number;
|
|
90
|
+
events_redacted: number;
|
|
91
|
+
generated_at: string;
|
|
92
|
+
}
|
|
23
93
|
interface AssuranceMetadata {
|
|
24
94
|
level: AssuranceLevel;
|
|
25
95
|
evidence_policy?: string;
|
|
@@ -225,4 +295,4 @@ declare function isChpV01Outcome(value: string): value is ChpV01ExecutionOutcome
|
|
|
225
295
|
declare const CHP_VERSION = "0.2";
|
|
226
296
|
declare const VERSION = "0.2.2";
|
|
227
297
|
|
|
228
|
-
export { type AssuranceLevel, type AssuranceMetadata, type BlastRadius, CHP_AGENTIC_EVIDENCE_TYPES, CHP_V0_1_CORE_EVIDENCE_TYPES, CHP_V0_1_OUTCOMES, CHP_V0_1_VERSION, CHP_VERSION, type CapabilityDescriptor, type CapabilityRisk, type ChpV01ExecutionOutcome, type ChpV01InvocationMode, type CorrelationContext, type CostHint, type DenialReason, type ExecutionEvidence, type HostDescriptor, type InvariantDescriptor, type InvariantEnforcement, type InvariantFailureBehavior, type InvocationEnvelope, type InvocationResult, type JsonObject, type JsonPrimitive, type JsonValue, type PreToolEvidence, type ReplayQuery, type ReplayResult, type SafetyHint, type SessionEvidence, type SessionSpawnEvidence, type StateMachineDefinition, type StateMachineRecord, type StateMachineStatus, type StateMachineTransitionResult, type ToolUseEvidence, VERSION, capabilityUri, isChpV01Outcome };
|
|
298
|
+
export { type AssuranceLevel, type AssuranceMetadata, type BlastRadius, CHP_AGENTIC_EVIDENCE_TYPES, CHP_COMPLIANCE_EVIDENCE_TYPES, CHP_INCIDENT_EVIDENCE_TYPES, CHP_SAFETY_EVIDENCE_TYPES, CHP_V0_1_CORE_EVIDENCE_TYPES, CHP_V0_1_OUTCOMES, CHP_V0_1_VERSION, CHP_VERSION, type CapabilityDescriptor, type CapabilityRisk, type ChpV01ExecutionOutcome, type ChpV01InvocationMode, type ComplianceReport, type CorrelationContext, type CostHint, type DenialReason, type ExecutionEvidence, type GuardrailDefinition, type HostDescriptor, type Incident, type IncidentSeverity, type IncidentStatus, type IncidentTrigger, type InvariantDescriptor, type InvariantEnforcement, type InvariantFailureBehavior, type InvocationEnvelope, type InvocationResult, type JsonObject, type JsonPrimitive, type JsonValue, type PreToolEvidence, type RemediationAction, type RemediationActionType, type ReplayQuery, type ReplayResult, type RetentionPolicy, type RiskAssessment, type RiskLevel, type SafetyHint, type SafetyRecommendation, type SafetyReport, type SessionEvidence, type SessionSpawnEvidence, type StateMachineDefinition, type StateMachineRecord, type StateMachineStatus, type StateMachineTransitionResult, type ToolUseEvidence, VERSION, capabilityUri, isChpV01Outcome };
|
package/dist/index.d.ts
CHANGED
|
@@ -20,6 +20,76 @@ type InvariantFailureBehavior = "deny" | "warn" | "degrade";
|
|
|
20
20
|
declare const CHP_V0_1_OUTCOMES: readonly ["success", "failure", "denied", "skipped"];
|
|
21
21
|
declare const CHP_V0_1_CORE_EVIDENCE_TYPES: readonly ["execution_started", "execution_completed", "execution_failed", "execution_denied", "execution_skipped"];
|
|
22
22
|
declare const CHP_AGENTIC_EVIDENCE_TYPES: readonly ["tool_use", "tool_use_requested", "session_completed", "session_spawn"];
|
|
23
|
+
declare const CHP_INCIDENT_EVIDENCE_TYPES: readonly ["incident_opened", "incident_escalated", "incident_remediation_applied", "incident_resolved", "incident_closed", "incident_trigger_fired"];
|
|
24
|
+
type IncidentSeverity = "P1" | "P2" | "P3" | "P4";
|
|
25
|
+
type IncidentStatus = "open" | "investigating" | "escalated" | "resolved" | "closed";
|
|
26
|
+
type RemediationActionType = "auto" | "manual" | "escalate";
|
|
27
|
+
interface IncidentTrigger {
|
|
28
|
+
pattern: string;
|
|
29
|
+
threshold: number;
|
|
30
|
+
window_seconds: number;
|
|
31
|
+
}
|
|
32
|
+
interface Incident {
|
|
33
|
+
incident_id: string;
|
|
34
|
+
title: string;
|
|
35
|
+
severity: IncidentSeverity;
|
|
36
|
+
status: IncidentStatus;
|
|
37
|
+
trigger?: IncidentTrigger | null;
|
|
38
|
+
correlation_ids: string[];
|
|
39
|
+
detected_at: string;
|
|
40
|
+
resolved_at?: string | null;
|
|
41
|
+
timeline: JsonObject[];
|
|
42
|
+
}
|
|
43
|
+
interface RemediationAction {
|
|
44
|
+
action_id: string;
|
|
45
|
+
incident_id: string;
|
|
46
|
+
action_type: RemediationActionType;
|
|
47
|
+
description: string;
|
|
48
|
+
executed_at: string;
|
|
49
|
+
outcome?: string | null;
|
|
50
|
+
}
|
|
51
|
+
declare const CHP_SAFETY_EVIDENCE_TYPES: readonly ["safety_assessment_started", "safety_assessment_completed", "safety_guardrail_triggered", "safety_action_blocked", "safety_action_approved"];
|
|
52
|
+
declare const CHP_COMPLIANCE_EVIDENCE_TYPES: readonly ["retention_policy_applied", "evidence_purged", "evidence_redacted", "compliance_report_generated"];
|
|
53
|
+
type RiskLevel = "low" | "medium" | "high" | "critical";
|
|
54
|
+
type SafetyRecommendation = "allow" | "warn" | "require_approval" | "block";
|
|
55
|
+
interface RiskAssessment {
|
|
56
|
+
level: RiskLevel;
|
|
57
|
+
score: number;
|
|
58
|
+
factors: string[];
|
|
59
|
+
recommendation: SafetyRecommendation;
|
|
60
|
+
assessed_at: string;
|
|
61
|
+
}
|
|
62
|
+
interface GuardrailDefinition {
|
|
63
|
+
id: string;
|
|
64
|
+
capability_id_pattern: string;
|
|
65
|
+
max_risk_level: RiskLevel;
|
|
66
|
+
requires_human_for: string[];
|
|
67
|
+
}
|
|
68
|
+
interface SafetyReport {
|
|
69
|
+
report_id: string;
|
|
70
|
+
capability_id: string;
|
|
71
|
+
payload_hash: string;
|
|
72
|
+
assessment: RiskAssessment;
|
|
73
|
+
guardrails_evaluated: string[];
|
|
74
|
+
approved: boolean;
|
|
75
|
+
block_reason?: string | null;
|
|
76
|
+
generated_at: string;
|
|
77
|
+
}
|
|
78
|
+
interface RetentionPolicy {
|
|
79
|
+
policy_id: string;
|
|
80
|
+
retain_days: number;
|
|
81
|
+
applies_to: string[];
|
|
82
|
+
redact_payload_after_days?: number | null;
|
|
83
|
+
}
|
|
84
|
+
interface ComplianceReport {
|
|
85
|
+
report_id: string;
|
|
86
|
+
policy_ids: string[];
|
|
87
|
+
store_path: string;
|
|
88
|
+
events_inspected: number;
|
|
89
|
+
events_purged: number;
|
|
90
|
+
events_redacted: number;
|
|
91
|
+
generated_at: string;
|
|
92
|
+
}
|
|
23
93
|
interface AssuranceMetadata {
|
|
24
94
|
level: AssuranceLevel;
|
|
25
95
|
evidence_policy?: string;
|
|
@@ -225,4 +295,4 @@ declare function isChpV01Outcome(value: string): value is ChpV01ExecutionOutcome
|
|
|
225
295
|
declare const CHP_VERSION = "0.2";
|
|
226
296
|
declare const VERSION = "0.2.2";
|
|
227
297
|
|
|
228
|
-
export { type AssuranceLevel, type AssuranceMetadata, type BlastRadius, CHP_AGENTIC_EVIDENCE_TYPES, CHP_V0_1_CORE_EVIDENCE_TYPES, CHP_V0_1_OUTCOMES, CHP_V0_1_VERSION, CHP_VERSION, type CapabilityDescriptor, type CapabilityRisk, type ChpV01ExecutionOutcome, type ChpV01InvocationMode, type CorrelationContext, type CostHint, type DenialReason, type ExecutionEvidence, type HostDescriptor, type InvariantDescriptor, type InvariantEnforcement, type InvariantFailureBehavior, type InvocationEnvelope, type InvocationResult, type JsonObject, type JsonPrimitive, type JsonValue, type PreToolEvidence, type ReplayQuery, type ReplayResult, type SafetyHint, type SessionEvidence, type SessionSpawnEvidence, type StateMachineDefinition, type StateMachineRecord, type StateMachineStatus, type StateMachineTransitionResult, type ToolUseEvidence, VERSION, capabilityUri, isChpV01Outcome };
|
|
298
|
+
export { type AssuranceLevel, type AssuranceMetadata, type BlastRadius, CHP_AGENTIC_EVIDENCE_TYPES, CHP_COMPLIANCE_EVIDENCE_TYPES, CHP_INCIDENT_EVIDENCE_TYPES, CHP_SAFETY_EVIDENCE_TYPES, CHP_V0_1_CORE_EVIDENCE_TYPES, CHP_V0_1_OUTCOMES, CHP_V0_1_VERSION, CHP_VERSION, type CapabilityDescriptor, type CapabilityRisk, type ChpV01ExecutionOutcome, type ChpV01InvocationMode, type ComplianceReport, type CorrelationContext, type CostHint, type DenialReason, type ExecutionEvidence, type GuardrailDefinition, type HostDescriptor, type Incident, type IncidentSeverity, type IncidentStatus, type IncidentTrigger, type InvariantDescriptor, type InvariantEnforcement, type InvariantFailureBehavior, type InvocationEnvelope, type InvocationResult, type JsonObject, type JsonPrimitive, type JsonValue, type PreToolEvidence, type RemediationAction, type RemediationActionType, type ReplayQuery, type ReplayResult, type RetentionPolicy, type RiskAssessment, type RiskLevel, type SafetyHint, type SafetyRecommendation, type SafetyReport, type SessionEvidence, type SessionSpawnEvidence, type StateMachineDefinition, type StateMachineRecord, type StateMachineStatus, type StateMachineTransitionResult, type ToolUseEvidence, VERSION, capabilityUri, isChpV01Outcome };
|
package/dist/index.js
CHANGED
|
@@ -20,6 +20,9 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
20
20
|
var index_exports = {};
|
|
21
21
|
__export(index_exports, {
|
|
22
22
|
CHP_AGENTIC_EVIDENCE_TYPES: () => CHP_AGENTIC_EVIDENCE_TYPES,
|
|
23
|
+
CHP_COMPLIANCE_EVIDENCE_TYPES: () => CHP_COMPLIANCE_EVIDENCE_TYPES,
|
|
24
|
+
CHP_INCIDENT_EVIDENCE_TYPES: () => CHP_INCIDENT_EVIDENCE_TYPES,
|
|
25
|
+
CHP_SAFETY_EVIDENCE_TYPES: () => CHP_SAFETY_EVIDENCE_TYPES,
|
|
23
26
|
CHP_V0_1_CORE_EVIDENCE_TYPES: () => CHP_V0_1_CORE_EVIDENCE_TYPES,
|
|
24
27
|
CHP_V0_1_OUTCOMES: () => CHP_V0_1_OUTCOMES,
|
|
25
28
|
CHP_V0_1_VERSION: () => CHP_V0_1_VERSION,
|
|
@@ -51,6 +54,27 @@ var CHP_AGENTIC_EVIDENCE_TYPES = [
|
|
|
51
54
|
"session_completed",
|
|
52
55
|
"session_spawn"
|
|
53
56
|
];
|
|
57
|
+
var CHP_INCIDENT_EVIDENCE_TYPES = [
|
|
58
|
+
"incident_opened",
|
|
59
|
+
"incident_escalated",
|
|
60
|
+
"incident_remediation_applied",
|
|
61
|
+
"incident_resolved",
|
|
62
|
+
"incident_closed",
|
|
63
|
+
"incident_trigger_fired"
|
|
64
|
+
];
|
|
65
|
+
var CHP_SAFETY_EVIDENCE_TYPES = [
|
|
66
|
+
"safety_assessment_started",
|
|
67
|
+
"safety_assessment_completed",
|
|
68
|
+
"safety_guardrail_triggered",
|
|
69
|
+
"safety_action_blocked",
|
|
70
|
+
"safety_action_approved"
|
|
71
|
+
];
|
|
72
|
+
var CHP_COMPLIANCE_EVIDENCE_TYPES = [
|
|
73
|
+
"retention_policy_applied",
|
|
74
|
+
"evidence_purged",
|
|
75
|
+
"evidence_redacted",
|
|
76
|
+
"compliance_report_generated"
|
|
77
|
+
];
|
|
54
78
|
function capabilityUri(descriptor) {
|
|
55
79
|
return `${descriptor.id}:${descriptor.version}`;
|
|
56
80
|
}
|
|
@@ -64,6 +88,9 @@ var VERSION = "0.2.2";
|
|
|
64
88
|
// Annotate the CommonJS export names for ESM import in node:
|
|
65
89
|
0 && (module.exports = {
|
|
66
90
|
CHP_AGENTIC_EVIDENCE_TYPES,
|
|
91
|
+
CHP_COMPLIANCE_EVIDENCE_TYPES,
|
|
92
|
+
CHP_INCIDENT_EVIDENCE_TYPES,
|
|
93
|
+
CHP_SAFETY_EVIDENCE_TYPES,
|
|
67
94
|
CHP_V0_1_CORE_EVIDENCE_TYPES,
|
|
68
95
|
CHP_V0_1_OUTCOMES,
|
|
69
96
|
CHP_V0_1_VERSION,
|
package/dist/index.mjs
CHANGED
|
@@ -19,6 +19,27 @@ var CHP_AGENTIC_EVIDENCE_TYPES = [
|
|
|
19
19
|
"session_completed",
|
|
20
20
|
"session_spawn"
|
|
21
21
|
];
|
|
22
|
+
var CHP_INCIDENT_EVIDENCE_TYPES = [
|
|
23
|
+
"incident_opened",
|
|
24
|
+
"incident_escalated",
|
|
25
|
+
"incident_remediation_applied",
|
|
26
|
+
"incident_resolved",
|
|
27
|
+
"incident_closed",
|
|
28
|
+
"incident_trigger_fired"
|
|
29
|
+
];
|
|
30
|
+
var CHP_SAFETY_EVIDENCE_TYPES = [
|
|
31
|
+
"safety_assessment_started",
|
|
32
|
+
"safety_assessment_completed",
|
|
33
|
+
"safety_guardrail_triggered",
|
|
34
|
+
"safety_action_blocked",
|
|
35
|
+
"safety_action_approved"
|
|
36
|
+
];
|
|
37
|
+
var CHP_COMPLIANCE_EVIDENCE_TYPES = [
|
|
38
|
+
"retention_policy_applied",
|
|
39
|
+
"evidence_purged",
|
|
40
|
+
"evidence_redacted",
|
|
41
|
+
"compliance_report_generated"
|
|
42
|
+
];
|
|
22
43
|
function capabilityUri(descriptor) {
|
|
23
44
|
return `${descriptor.id}:${descriptor.version}`;
|
|
24
45
|
}
|
|
@@ -31,6 +52,9 @@ var CHP_VERSION = "0.2";
|
|
|
31
52
|
var VERSION = "0.2.2";
|
|
32
53
|
export {
|
|
33
54
|
CHP_AGENTIC_EVIDENCE_TYPES,
|
|
55
|
+
CHP_COMPLIANCE_EVIDENCE_TYPES,
|
|
56
|
+
CHP_INCIDENT_EVIDENCE_TYPES,
|
|
57
|
+
CHP_SAFETY_EVIDENCE_TYPES,
|
|
34
58
|
CHP_V0_1_CORE_EVIDENCE_TYPES,
|
|
35
59
|
CHP_V0_1_OUTCOMES,
|
|
36
60
|
CHP_V0_1_VERSION,
|
package/package.json
CHANGED
package/src/v0_1.ts
CHANGED
|
@@ -43,6 +43,107 @@ export const CHP_AGENTIC_EVIDENCE_TYPES = [
|
|
|
43
43
|
"session_spawn",
|
|
44
44
|
] as const;
|
|
45
45
|
|
|
46
|
+
export const CHP_INCIDENT_EVIDENCE_TYPES = [
|
|
47
|
+
"incident_opened",
|
|
48
|
+
"incident_escalated",
|
|
49
|
+
"incident_remediation_applied",
|
|
50
|
+
"incident_resolved",
|
|
51
|
+
"incident_closed",
|
|
52
|
+
"incident_trigger_fired",
|
|
53
|
+
] as const;
|
|
54
|
+
|
|
55
|
+
export type IncidentSeverity = "P1" | "P2" | "P3" | "P4";
|
|
56
|
+
export type IncidentStatus = "open" | "investigating" | "escalated" | "resolved" | "closed";
|
|
57
|
+
export type RemediationActionType = "auto" | "manual" | "escalate";
|
|
58
|
+
|
|
59
|
+
export interface IncidentTrigger {
|
|
60
|
+
pattern: string;
|
|
61
|
+
threshold: number;
|
|
62
|
+
window_seconds: number;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export interface Incident {
|
|
66
|
+
incident_id: string;
|
|
67
|
+
title: string;
|
|
68
|
+
severity: IncidentSeverity;
|
|
69
|
+
status: IncidentStatus;
|
|
70
|
+
trigger?: IncidentTrigger | null;
|
|
71
|
+
correlation_ids: string[];
|
|
72
|
+
detected_at: string;
|
|
73
|
+
resolved_at?: string | null;
|
|
74
|
+
timeline: JsonObject[];
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
export interface RemediationAction {
|
|
78
|
+
action_id: string;
|
|
79
|
+
incident_id: string;
|
|
80
|
+
action_type: RemediationActionType;
|
|
81
|
+
description: string;
|
|
82
|
+
executed_at: string;
|
|
83
|
+
outcome?: string | null;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
export const CHP_SAFETY_EVIDENCE_TYPES = [
|
|
87
|
+
"safety_assessment_started",
|
|
88
|
+
"safety_assessment_completed",
|
|
89
|
+
"safety_guardrail_triggered",
|
|
90
|
+
"safety_action_blocked",
|
|
91
|
+
"safety_action_approved",
|
|
92
|
+
] as const;
|
|
93
|
+
|
|
94
|
+
export const CHP_COMPLIANCE_EVIDENCE_TYPES = [
|
|
95
|
+
"retention_policy_applied",
|
|
96
|
+
"evidence_purged",
|
|
97
|
+
"evidence_redacted",
|
|
98
|
+
"compliance_report_generated",
|
|
99
|
+
] as const;
|
|
100
|
+
|
|
101
|
+
export type RiskLevel = "low" | "medium" | "high" | "critical";
|
|
102
|
+
export type SafetyRecommendation = "allow" | "warn" | "require_approval" | "block";
|
|
103
|
+
|
|
104
|
+
export interface RiskAssessment {
|
|
105
|
+
level: RiskLevel;
|
|
106
|
+
score: number;
|
|
107
|
+
factors: string[];
|
|
108
|
+
recommendation: SafetyRecommendation;
|
|
109
|
+
assessed_at: string;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
export interface GuardrailDefinition {
|
|
113
|
+
id: string;
|
|
114
|
+
capability_id_pattern: string;
|
|
115
|
+
max_risk_level: RiskLevel;
|
|
116
|
+
requires_human_for: string[];
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
export interface SafetyReport {
|
|
120
|
+
report_id: string;
|
|
121
|
+
capability_id: string;
|
|
122
|
+
payload_hash: string;
|
|
123
|
+
assessment: RiskAssessment;
|
|
124
|
+
guardrails_evaluated: string[];
|
|
125
|
+
approved: boolean;
|
|
126
|
+
block_reason?: string | null;
|
|
127
|
+
generated_at: string;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
export interface RetentionPolicy {
|
|
131
|
+
policy_id: string;
|
|
132
|
+
retain_days: number;
|
|
133
|
+
applies_to: string[];
|
|
134
|
+
redact_payload_after_days?: number | null;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
export interface ComplianceReport {
|
|
138
|
+
report_id: string;
|
|
139
|
+
policy_ids: string[];
|
|
140
|
+
store_path: string;
|
|
141
|
+
events_inspected: number;
|
|
142
|
+
events_purged: number;
|
|
143
|
+
events_redacted: number;
|
|
144
|
+
generated_at: string;
|
|
145
|
+
}
|
|
146
|
+
|
|
46
147
|
export interface AssuranceMetadata {
|
|
47
148
|
level: AssuranceLevel;
|
|
48
149
|
evidence_policy?: string;
|