@vorionsys/atsf-core 0.2.0 → 0.2.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/CHANGELOG.md +67 -0
- package/LICENSE +190 -0
- package/README.md +305 -181
- package/dist/api/server.d.ts.map +1 -1
- package/dist/api/server.js +86 -4
- package/dist/api/server.js.map +1 -1
- package/dist/basis/parser.d.ts +210 -210
- package/dist/basis/parser.js.map +1 -1
- package/dist/chain/index.d.ts +147 -0
- package/dist/chain/index.d.ts.map +1 -0
- package/dist/chain/index.js +219 -0
- package/dist/chain/index.js.map +1 -0
- package/dist/common/adapters.d.ts +9 -9
- package/dist/common/adapters.d.ts.map +1 -1
- package/dist/common/adapters.js +6 -6
- package/dist/common/config.d.ts +152 -152
- package/dist/common/types.d.ts +35 -15
- package/dist/common/types.d.ts.map +1 -1
- package/dist/common/types.js.map +1 -1
- package/dist/enforce/index.d.ts +226 -16
- package/dist/enforce/index.d.ts.map +1 -1
- package/dist/enforce/index.js +196 -49
- package/dist/enforce/index.js.map +1 -1
- package/dist/governance/index.d.ts +2 -0
- package/dist/governance/index.d.ts.map +1 -1
- package/dist/governance/index.js +1 -0
- package/dist/governance/index.js.map +1 -1
- package/dist/governance/proof-bridge.d.ts +86 -0
- package/dist/governance/proof-bridge.d.ts.map +1 -0
- package/dist/governance/proof-bridge.js +139 -0
- package/dist/governance/proof-bridge.js.map +1 -0
- package/dist/index.d.ts +11 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +17 -4
- package/dist/index.js.map +1 -1
- package/dist/intent/index.d.ts +127 -10
- package/dist/intent/index.d.ts.map +1 -1
- package/dist/intent/index.js +121 -16
- package/dist/intent/index.js.map +1 -1
- package/dist/langchain/executor.d.ts +19 -5
- package/dist/langchain/executor.d.ts.map +1 -1
- package/dist/langchain/executor.js +287 -36
- package/dist/langchain/executor.js.map +1 -1
- package/dist/langchain/index.d.ts +2 -1
- package/dist/langchain/index.d.ts.map +1 -1
- package/dist/langchain/index.js +3 -1
- package/dist/langchain/index.js.map +1 -1
- package/dist/langchain/tools.d.ts.map +1 -1
- package/dist/langchain/tools.js +2 -1
- package/dist/langchain/tools.js.map +1 -1
- package/dist/langchain/types.d.ts +41 -0
- package/dist/langchain/types.d.ts.map +1 -1
- package/dist/layers/index.d.ts +1 -1
- package/dist/layers/index.d.ts.map +1 -1
- package/dist/persistence/file.d.ts +35 -3
- package/dist/persistence/file.d.ts.map +1 -1
- package/dist/persistence/file.js +138 -11
- package/dist/persistence/file.js.map +1 -1
- package/dist/persistence/index.d.ts +10 -1
- package/dist/persistence/index.d.ts.map +1 -1
- package/dist/persistence/index.js +15 -1
- package/dist/persistence/index.js.map +1 -1
- package/dist/persistence/sqlite.d.ts +135 -0
- package/dist/persistence/sqlite.d.ts.map +1 -0
- package/dist/persistence/sqlite.js +372 -0
- package/dist/persistence/sqlite.js.map +1 -0
- package/dist/phase6/ceiling.d.ts +177 -0
- package/dist/phase6/ceiling.d.ts.map +1 -0
- package/dist/phase6/ceiling.js +463 -0
- package/dist/phase6/ceiling.js.map +1 -0
- package/dist/phase6/context.d.ts +207 -0
- package/dist/phase6/context.d.ts.map +1 -0
- package/dist/phase6/context.js +603 -0
- package/dist/phase6/context.js.map +1 -0
- package/dist/phase6/index.d.ts +79 -0
- package/dist/phase6/index.d.ts.map +1 -0
- package/dist/phase6/index.js +152 -0
- package/dist/phase6/index.js.map +1 -0
- package/dist/phase6/presets.d.ts +148 -0
- package/dist/phase6/presets.d.ts.map +1 -0
- package/dist/phase6/presets.js +467 -0
- package/dist/phase6/presets.js.map +1 -0
- package/dist/phase6/provenance.d.ts +148 -0
- package/dist/phase6/provenance.d.ts.map +1 -0
- package/dist/phase6/provenance.js +545 -0
- package/dist/phase6/provenance.js.map +1 -0
- package/dist/phase6/role-gates/index.d.ts +7 -0
- package/dist/phase6/role-gates/index.d.ts.map +1 -0
- package/dist/phase6/role-gates/index.js +7 -0
- package/dist/phase6/role-gates/index.js.map +1 -0
- package/dist/phase6/role-gates/kernel.d.ts +84 -0
- package/dist/phase6/role-gates/kernel.d.ts.map +1 -0
- package/dist/phase6/role-gates/kernel.js +258 -0
- package/dist/phase6/role-gates/kernel.js.map +1 -0
- package/dist/phase6/role-gates/policy.d.ts +110 -0
- package/dist/phase6/role-gates/policy.d.ts.map +1 -0
- package/dist/phase6/role-gates/policy.js +157 -0
- package/dist/phase6/role-gates/policy.js.map +1 -0
- package/dist/phase6/role-gates.d.ts +164 -0
- package/dist/phase6/role-gates.d.ts.map +1 -0
- package/dist/phase6/role-gates.js +536 -0
- package/dist/phase6/role-gates.js.map +1 -0
- package/dist/phase6/types.d.ts +1829 -0
- package/dist/phase6/types.d.ts.map +1 -0
- package/dist/phase6/types.js +452 -0
- package/dist/phase6/types.js.map +1 -0
- package/dist/phase6/weight-presets/canonical.d.ts +93 -0
- package/dist/phase6/weight-presets/canonical.d.ts.map +1 -0
- package/dist/phase6/weight-presets/canonical.js +122 -0
- package/dist/phase6/weight-presets/canonical.js.map +1 -0
- package/dist/phase6/weight-presets/deltas.d.ts +144 -0
- package/dist/phase6/weight-presets/deltas.d.ts.map +1 -0
- package/dist/phase6/weight-presets/deltas.js +184 -0
- package/dist/phase6/weight-presets/deltas.js.map +1 -0
- package/dist/phase6/weight-presets/index.d.ts +8 -0
- package/dist/phase6/weight-presets/index.d.ts.map +1 -0
- package/dist/phase6/weight-presets/index.js +8 -0
- package/dist/phase6/weight-presets/index.js.map +1 -0
- package/dist/phase6/weight-presets/merger.d.ts +79 -0
- package/dist/phase6/weight-presets/merger.d.ts.map +1 -0
- package/dist/phase6/weight-presets/merger.js +161 -0
- package/dist/phase6/weight-presets/merger.js.map +1 -0
- package/dist/proof/index.d.ts +6 -0
- package/dist/proof/index.d.ts.map +1 -1
- package/dist/proof/index.js +56 -6
- package/dist/proof/index.js.map +1 -1
- package/dist/proof/merkle.d.ts +195 -0
- package/dist/proof/merkle.d.ts.map +1 -0
- package/dist/proof/merkle.js +412 -0
- package/dist/proof/merkle.js.map +1 -0
- package/dist/proof/zk-proofs.d.ts +218 -0
- package/dist/proof/zk-proofs.d.ts.map +1 -0
- package/dist/proof/zk-proofs.js +531 -0
- package/dist/proof/zk-proofs.js.map +1 -0
- package/dist/sandbox-training/challenges.d.ts +16 -0
- package/dist/sandbox-training/challenges.d.ts.map +1 -0
- package/dist/sandbox-training/challenges.js +561 -0
- package/dist/sandbox-training/challenges.js.map +1 -0
- package/dist/sandbox-training/graduation.d.ts +25 -0
- package/dist/sandbox-training/graduation.d.ts.map +1 -0
- package/dist/sandbox-training/graduation.js +143 -0
- package/dist/sandbox-training/graduation.js.map +1 -0
- package/dist/sandbox-training/index.d.ts +19 -0
- package/dist/sandbox-training/index.d.ts.map +1 -0
- package/dist/sandbox-training/index.js +22 -0
- package/dist/sandbox-training/index.js.map +1 -0
- package/dist/sandbox-training/promotion-service.d.ts +76 -0
- package/dist/sandbox-training/promotion-service.d.ts.map +1 -0
- package/dist/sandbox-training/promotion-service.js +117 -0
- package/dist/sandbox-training/promotion-service.js.map +1 -0
- package/dist/sandbox-training/runner.d.ts +58 -0
- package/dist/sandbox-training/runner.d.ts.map +1 -0
- package/dist/sandbox-training/runner.js +388 -0
- package/dist/sandbox-training/runner.js.map +1 -0
- package/dist/sandbox-training/scorer.d.ts +40 -0
- package/dist/sandbox-training/scorer.d.ts.map +1 -0
- package/dist/sandbox-training/scorer.js +79 -0
- package/dist/sandbox-training/scorer.js.map +1 -0
- package/dist/sandbox-training/types.d.ts +162 -0
- package/dist/sandbox-training/types.d.ts.map +1 -0
- package/dist/sandbox-training/types.js +32 -0
- package/dist/sandbox-training/types.js.map +1 -0
- package/dist/trust-engine/ceiling-enforcement/audit.d.ts +98 -0
- package/dist/trust-engine/ceiling-enforcement/audit.d.ts.map +1 -0
- package/dist/trust-engine/ceiling-enforcement/audit.js +160 -0
- package/dist/trust-engine/ceiling-enforcement/audit.js.map +1 -0
- package/dist/trust-engine/ceiling-enforcement/index.d.ts +6 -0
- package/dist/trust-engine/ceiling-enforcement/index.d.ts.map +1 -0
- package/dist/trust-engine/ceiling-enforcement/index.js +6 -0
- package/dist/trust-engine/ceiling-enforcement/index.js.map +1 -0
- package/dist/trust-engine/ceiling-enforcement/kernel.d.ts +112 -0
- package/dist/trust-engine/ceiling-enforcement/kernel.d.ts.map +1 -0
- package/dist/trust-engine/ceiling-enforcement/kernel.js +158 -0
- package/dist/trust-engine/ceiling-enforcement/kernel.js.map +1 -0
- package/dist/trust-engine/context-policy/enforcement.d.ts +62 -0
- package/dist/trust-engine/context-policy/enforcement.d.ts.map +1 -0
- package/dist/trust-engine/context-policy/enforcement.js +104 -0
- package/dist/trust-engine/context-policy/enforcement.js.map +1 -0
- package/dist/trust-engine/context-policy/factory.d.ts +75 -0
- package/dist/trust-engine/context-policy/factory.d.ts.map +1 -0
- package/dist/trust-engine/context-policy/factory.js +130 -0
- package/dist/trust-engine/context-policy/factory.js.map +1 -0
- package/dist/trust-engine/context-policy/index.d.ts +6 -0
- package/dist/trust-engine/context-policy/index.d.ts.map +1 -0
- package/dist/trust-engine/context-policy/index.js +6 -0
- package/dist/trust-engine/context-policy/index.js.map +1 -0
- package/dist/trust-engine/creation-modifiers/index.d.ts +5 -0
- package/dist/trust-engine/creation-modifiers/index.d.ts.map +1 -0
- package/dist/trust-engine/creation-modifiers/index.js +5 -0
- package/dist/trust-engine/creation-modifiers/index.js.map +1 -0
- package/dist/trust-engine/creation-modifiers/types.d.ts +112 -0
- package/dist/trust-engine/creation-modifiers/types.d.ts.map +1 -0
- package/dist/trust-engine/creation-modifiers/types.js +166 -0
- package/dist/trust-engine/creation-modifiers/types.js.map +1 -0
- package/dist/trust-engine/index.d.ts +54 -1
- package/dist/trust-engine/index.d.ts.map +1 -1
- package/dist/trust-engine/index.js +118 -1
- package/dist/trust-engine/index.js.map +1 -1
- package/dist/trust-engine/phase6-types.d.ts +123 -0
- package/dist/trust-engine/phase6-types.d.ts.map +1 -0
- package/dist/trust-engine/phase6-types.js +88 -0
- package/dist/trust-engine/phase6-types.js.map +1 -0
- package/package.json +42 -12
- package/dist/audit/key-manager.d.ts +0 -118
- package/dist/audit/key-manager.d.ts.map +0 -1
- package/dist/audit/key-manager.js +0 -565
- package/dist/audit/key-manager.js.map +0 -1
- package/dist/carbon-aware/carbon-metrics.d.ts +0 -151
- package/dist/carbon-aware/carbon-metrics.d.ts.map +0 -1
- package/dist/carbon-aware/carbon-metrics.js +0 -370
- package/dist/carbon-aware/carbon-metrics.js.map +0 -1
- package/dist/carbon-aware/carbon-router.d.ts +0 -101
- package/dist/carbon-aware/carbon-router.d.ts.map +0 -1
- package/dist/carbon-aware/carbon-router.js +0 -400
- package/dist/carbon-aware/carbon-router.js.map +0 -1
|
@@ -0,0 +1,1829 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Phase 6 Type System - Trust Engine Hardening
|
|
3
|
+
*
|
|
4
|
+
* Implements all 5 architecture decisions:
|
|
5
|
+
* - Q1: Ceiling Enforcement (Hybrid Dual-Layer + Regulatory Observability)
|
|
6
|
+
* - Q2: Hierarchical Context (4-Tier with Tiered Immutability)
|
|
7
|
+
* - Q3: Stratified Role Gates (3-Layer Enforcement)
|
|
8
|
+
* - Q4: Federated Weight Presets (3-Tier with Derivation Chains)
|
|
9
|
+
* - Q5: Provenance Capture + Policy Interpretation
|
|
10
|
+
*
|
|
11
|
+
* Critical Path: Q2 → Q4 → Q5 → Q1 → Q3
|
|
12
|
+
*
|
|
13
|
+
* @packageDocumentation
|
|
14
|
+
*/
|
|
15
|
+
import { z } from 'zod';
|
|
16
|
+
/**
|
|
17
|
+
* Trust tiers (0-7) with score ranges — canonical 8-tier model
|
|
18
|
+
*/
|
|
19
|
+
export declare enum TrustTier {
|
|
20
|
+
T0 = "T0",// 0-199: Sandbox
|
|
21
|
+
T1 = "T1",// 200-349: Observed
|
|
22
|
+
T2 = "T2",// 350-499: Provisional
|
|
23
|
+
T3 = "T3",// 500-649: Monitored
|
|
24
|
+
T4 = "T4",// 650-799: Standard
|
|
25
|
+
T5 = "T5",// 800-875: Trusted
|
|
26
|
+
T6 = "T6",// 876-950: Certified
|
|
27
|
+
T7 = "T7"
|
|
28
|
+
}
|
|
29
|
+
export declare const TRUST_TIER_BOUNDARIES: Record<TrustTier, {
|
|
30
|
+
min: number;
|
|
31
|
+
max: number;
|
|
32
|
+
}>;
|
|
33
|
+
/**
|
|
34
|
+
* Agent role levels (structural capability, not earned trust)
|
|
35
|
+
*/
|
|
36
|
+
export declare enum AgentRole {
|
|
37
|
+
R_L0 = "R-L0",// Listener (observe only)
|
|
38
|
+
R_L1 = "R-L1",// Executor (simple tasks)
|
|
39
|
+
R_L2 = "R-L2",// Planner (multi-step)
|
|
40
|
+
R_L3 = "R-L3",// Orchestrator (coordinate agents)
|
|
41
|
+
R_L4 = "R-L4",// Architect (design systems)
|
|
42
|
+
R_L5 = "R-L5",// Leader (strategic decisions)
|
|
43
|
+
R_L6 = "R-L6",// Domain Authority
|
|
44
|
+
R_L7 = "R-L7",// Strategic
|
|
45
|
+
R_L8 = "R-L8"
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Context types with ceiling implications
|
|
49
|
+
*/
|
|
50
|
+
export declare enum ContextType {
|
|
51
|
+
LOCAL = "local",// Development - ceiling 700
|
|
52
|
+
ENTERPRISE = "enterprise",// Production - ceiling 900
|
|
53
|
+
SOVEREIGN = "sovereign"
|
|
54
|
+
}
|
|
55
|
+
export declare const CONTEXT_CEILINGS: Record<ContextType, number>;
|
|
56
|
+
/**
|
|
57
|
+
* Creation types for provenance tracking
|
|
58
|
+
*/
|
|
59
|
+
export declare enum CreationType {
|
|
60
|
+
FRESH = "fresh",// New agent, no history
|
|
61
|
+
CLONED = "cloned",// Copy of existing agent
|
|
62
|
+
EVOLVED = "evolved",// Has verifiable history
|
|
63
|
+
PROMOTED = "promoted",// Earned advancement
|
|
64
|
+
IMPORTED = "imported"
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Regulatory frameworks for compliance tracking
|
|
68
|
+
*/
|
|
69
|
+
export declare enum RegulatoryFramework {
|
|
70
|
+
NONE = "none",
|
|
71
|
+
HIPAA = "hipaa",
|
|
72
|
+
GDPR = "gdpr",
|
|
73
|
+
EU_AI_ACT = "eu-ai-act",
|
|
74
|
+
SOC2 = "soc2",
|
|
75
|
+
ISO_42001 = "iso-42001"
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* Tier 1: Deployment Context (IMMUTABLE)
|
|
79
|
+
* Set at deployment time, cannot be changed without redeployment.
|
|
80
|
+
* Example: HIPAA compliance mode cannot be disabled at runtime.
|
|
81
|
+
*/
|
|
82
|
+
export interface DeploymentContext {
|
|
83
|
+
readonly deploymentId: string;
|
|
84
|
+
readonly deploymentHash: string;
|
|
85
|
+
readonly regulatoryFramework: RegulatoryFramework;
|
|
86
|
+
readonly maxAllowedTier: TrustTier;
|
|
87
|
+
readonly allowedContextTypes: readonly ContextType[];
|
|
88
|
+
readonly deployedAt: Date;
|
|
89
|
+
readonly deployedBy: string;
|
|
90
|
+
readonly immutable: true;
|
|
91
|
+
}
|
|
92
|
+
export declare const deploymentContextSchema: z.ZodObject<{
|
|
93
|
+
deploymentId: z.ZodString;
|
|
94
|
+
deploymentHash: z.ZodString;
|
|
95
|
+
regulatoryFramework: z.ZodNativeEnum<typeof RegulatoryFramework>;
|
|
96
|
+
maxAllowedTier: z.ZodNativeEnum<typeof TrustTier>;
|
|
97
|
+
allowedContextTypes: z.ZodArray<z.ZodNativeEnum<typeof ContextType>, "many">;
|
|
98
|
+
deployedAt: z.ZodDate;
|
|
99
|
+
deployedBy: z.ZodString;
|
|
100
|
+
immutable: z.ZodLiteral<true>;
|
|
101
|
+
}, "strip", z.ZodTypeAny, {
|
|
102
|
+
deploymentId?: string;
|
|
103
|
+
deploymentHash?: string;
|
|
104
|
+
regulatoryFramework?: RegulatoryFramework;
|
|
105
|
+
maxAllowedTier?: TrustTier;
|
|
106
|
+
allowedContextTypes?: ContextType[];
|
|
107
|
+
deployedAt?: Date;
|
|
108
|
+
deployedBy?: string;
|
|
109
|
+
immutable?: true;
|
|
110
|
+
}, {
|
|
111
|
+
deploymentId?: string;
|
|
112
|
+
deploymentHash?: string;
|
|
113
|
+
regulatoryFramework?: RegulatoryFramework;
|
|
114
|
+
maxAllowedTier?: TrustTier;
|
|
115
|
+
allowedContextTypes?: ContextType[];
|
|
116
|
+
deployedAt?: Date;
|
|
117
|
+
deployedBy?: string;
|
|
118
|
+
immutable?: true;
|
|
119
|
+
}>;
|
|
120
|
+
/**
|
|
121
|
+
* Tier 2: Organizational Context (LOCKED POST-STARTUP)
|
|
122
|
+
* Can be configured during startup, then frozen.
|
|
123
|
+
* Example: Tenant isolation settings locked after initialization.
|
|
124
|
+
*/
|
|
125
|
+
export interface OrganizationalContext {
|
|
126
|
+
readonly orgId: string;
|
|
127
|
+
readonly tenantId: string;
|
|
128
|
+
readonly parentDeployment: DeploymentContext;
|
|
129
|
+
readonly lockedAt?: Date;
|
|
130
|
+
readonly constraints: OrganizationalConstraints;
|
|
131
|
+
readonly orgHash: string;
|
|
132
|
+
}
|
|
133
|
+
export interface OrganizationalConstraints {
|
|
134
|
+
readonly maxTrustTier: TrustTier;
|
|
135
|
+
readonly deniedDomains: readonly string[];
|
|
136
|
+
readonly requiredAttestations: readonly string[];
|
|
137
|
+
readonly dataClassification: 'public' | 'internal' | 'confidential' | 'restricted';
|
|
138
|
+
readonly auditLevel: 'minimal' | 'standard' | 'comprehensive' | 'forensic';
|
|
139
|
+
}
|
|
140
|
+
export declare const organizationalContextSchema: z.ZodObject<{
|
|
141
|
+
orgId: z.ZodString;
|
|
142
|
+
tenantId: z.ZodString;
|
|
143
|
+
parentDeployment: z.ZodObject<{
|
|
144
|
+
deploymentId: z.ZodString;
|
|
145
|
+
deploymentHash: z.ZodString;
|
|
146
|
+
regulatoryFramework: z.ZodNativeEnum<typeof RegulatoryFramework>;
|
|
147
|
+
maxAllowedTier: z.ZodNativeEnum<typeof TrustTier>;
|
|
148
|
+
allowedContextTypes: z.ZodArray<z.ZodNativeEnum<typeof ContextType>, "many">;
|
|
149
|
+
deployedAt: z.ZodDate;
|
|
150
|
+
deployedBy: z.ZodString;
|
|
151
|
+
immutable: z.ZodLiteral<true>;
|
|
152
|
+
}, "strip", z.ZodTypeAny, {
|
|
153
|
+
deploymentId?: string;
|
|
154
|
+
deploymentHash?: string;
|
|
155
|
+
regulatoryFramework?: RegulatoryFramework;
|
|
156
|
+
maxAllowedTier?: TrustTier;
|
|
157
|
+
allowedContextTypes?: ContextType[];
|
|
158
|
+
deployedAt?: Date;
|
|
159
|
+
deployedBy?: string;
|
|
160
|
+
immutable?: true;
|
|
161
|
+
}, {
|
|
162
|
+
deploymentId?: string;
|
|
163
|
+
deploymentHash?: string;
|
|
164
|
+
regulatoryFramework?: RegulatoryFramework;
|
|
165
|
+
maxAllowedTier?: TrustTier;
|
|
166
|
+
allowedContextTypes?: ContextType[];
|
|
167
|
+
deployedAt?: Date;
|
|
168
|
+
deployedBy?: string;
|
|
169
|
+
immutable?: true;
|
|
170
|
+
}>;
|
|
171
|
+
lockedAt: z.ZodOptional<z.ZodDate>;
|
|
172
|
+
constraints: z.ZodObject<{
|
|
173
|
+
maxTrustTier: z.ZodNativeEnum<typeof TrustTier>;
|
|
174
|
+
deniedDomains: z.ZodArray<z.ZodString, "many">;
|
|
175
|
+
requiredAttestations: z.ZodArray<z.ZodString, "many">;
|
|
176
|
+
dataClassification: z.ZodEnum<["public", "internal", "confidential", "restricted"]>;
|
|
177
|
+
auditLevel: z.ZodEnum<["minimal", "standard", "comprehensive", "forensic"]>;
|
|
178
|
+
}, "strip", z.ZodTypeAny, {
|
|
179
|
+
maxTrustTier?: TrustTier;
|
|
180
|
+
deniedDomains?: string[];
|
|
181
|
+
requiredAttestations?: string[];
|
|
182
|
+
dataClassification?: "public" | "internal" | "confidential" | "restricted";
|
|
183
|
+
auditLevel?: "minimal" | "standard" | "comprehensive" | "forensic";
|
|
184
|
+
}, {
|
|
185
|
+
maxTrustTier?: TrustTier;
|
|
186
|
+
deniedDomains?: string[];
|
|
187
|
+
requiredAttestations?: string[];
|
|
188
|
+
dataClassification?: "public" | "internal" | "confidential" | "restricted";
|
|
189
|
+
auditLevel?: "minimal" | "standard" | "comprehensive" | "forensic";
|
|
190
|
+
}>;
|
|
191
|
+
orgHash: z.ZodString;
|
|
192
|
+
}, "strip", z.ZodTypeAny, {
|
|
193
|
+
tenantId?: string;
|
|
194
|
+
constraints?: {
|
|
195
|
+
maxTrustTier?: TrustTier;
|
|
196
|
+
deniedDomains?: string[];
|
|
197
|
+
requiredAttestations?: string[];
|
|
198
|
+
dataClassification?: "public" | "internal" | "confidential" | "restricted";
|
|
199
|
+
auditLevel?: "minimal" | "standard" | "comprehensive" | "forensic";
|
|
200
|
+
};
|
|
201
|
+
orgId?: string;
|
|
202
|
+
parentDeployment?: {
|
|
203
|
+
deploymentId?: string;
|
|
204
|
+
deploymentHash?: string;
|
|
205
|
+
regulatoryFramework?: RegulatoryFramework;
|
|
206
|
+
maxAllowedTier?: TrustTier;
|
|
207
|
+
allowedContextTypes?: ContextType[];
|
|
208
|
+
deployedAt?: Date;
|
|
209
|
+
deployedBy?: string;
|
|
210
|
+
immutable?: true;
|
|
211
|
+
};
|
|
212
|
+
lockedAt?: Date;
|
|
213
|
+
orgHash?: string;
|
|
214
|
+
}, {
|
|
215
|
+
tenantId?: string;
|
|
216
|
+
constraints?: {
|
|
217
|
+
maxTrustTier?: TrustTier;
|
|
218
|
+
deniedDomains?: string[];
|
|
219
|
+
requiredAttestations?: string[];
|
|
220
|
+
dataClassification?: "public" | "internal" | "confidential" | "restricted";
|
|
221
|
+
auditLevel?: "minimal" | "standard" | "comprehensive" | "forensic";
|
|
222
|
+
};
|
|
223
|
+
orgId?: string;
|
|
224
|
+
parentDeployment?: {
|
|
225
|
+
deploymentId?: string;
|
|
226
|
+
deploymentHash?: string;
|
|
227
|
+
regulatoryFramework?: RegulatoryFramework;
|
|
228
|
+
maxAllowedTier?: TrustTier;
|
|
229
|
+
allowedContextTypes?: ContextType[];
|
|
230
|
+
deployedAt?: Date;
|
|
231
|
+
deployedBy?: string;
|
|
232
|
+
immutable?: true;
|
|
233
|
+
};
|
|
234
|
+
lockedAt?: Date;
|
|
235
|
+
orgHash?: string;
|
|
236
|
+
}>;
|
|
237
|
+
/**
|
|
238
|
+
* Tier 3: Agent Context (FROZEN AT CREATION)
|
|
239
|
+
* Set when agent is instantiated, cannot be modified.
|
|
240
|
+
* Example: Agent's assigned context type is permanent.
|
|
241
|
+
*/
|
|
242
|
+
export interface AgentContext {
|
|
243
|
+
readonly agentId: string;
|
|
244
|
+
readonly parentOrg: OrganizationalContext;
|
|
245
|
+
readonly contextType: ContextType;
|
|
246
|
+
readonly createdAt: Date;
|
|
247
|
+
readonly createdBy: string;
|
|
248
|
+
readonly contextHash: string;
|
|
249
|
+
}
|
|
250
|
+
export declare const agentContextSchema: z.ZodObject<{
|
|
251
|
+
agentId: z.ZodString;
|
|
252
|
+
parentOrg: z.ZodObject<{
|
|
253
|
+
orgId: z.ZodString;
|
|
254
|
+
tenantId: z.ZodString;
|
|
255
|
+
parentDeployment: z.ZodObject<{
|
|
256
|
+
deploymentId: z.ZodString;
|
|
257
|
+
deploymentHash: z.ZodString;
|
|
258
|
+
regulatoryFramework: z.ZodNativeEnum<typeof RegulatoryFramework>;
|
|
259
|
+
maxAllowedTier: z.ZodNativeEnum<typeof TrustTier>;
|
|
260
|
+
allowedContextTypes: z.ZodArray<z.ZodNativeEnum<typeof ContextType>, "many">;
|
|
261
|
+
deployedAt: z.ZodDate;
|
|
262
|
+
deployedBy: z.ZodString;
|
|
263
|
+
immutable: z.ZodLiteral<true>;
|
|
264
|
+
}, "strip", z.ZodTypeAny, {
|
|
265
|
+
deploymentId?: string;
|
|
266
|
+
deploymentHash?: string;
|
|
267
|
+
regulatoryFramework?: RegulatoryFramework;
|
|
268
|
+
maxAllowedTier?: TrustTier;
|
|
269
|
+
allowedContextTypes?: ContextType[];
|
|
270
|
+
deployedAt?: Date;
|
|
271
|
+
deployedBy?: string;
|
|
272
|
+
immutable?: true;
|
|
273
|
+
}, {
|
|
274
|
+
deploymentId?: string;
|
|
275
|
+
deploymentHash?: string;
|
|
276
|
+
regulatoryFramework?: RegulatoryFramework;
|
|
277
|
+
maxAllowedTier?: TrustTier;
|
|
278
|
+
allowedContextTypes?: ContextType[];
|
|
279
|
+
deployedAt?: Date;
|
|
280
|
+
deployedBy?: string;
|
|
281
|
+
immutable?: true;
|
|
282
|
+
}>;
|
|
283
|
+
lockedAt: z.ZodOptional<z.ZodDate>;
|
|
284
|
+
constraints: z.ZodObject<{
|
|
285
|
+
maxTrustTier: z.ZodNativeEnum<typeof TrustTier>;
|
|
286
|
+
deniedDomains: z.ZodArray<z.ZodString, "many">;
|
|
287
|
+
requiredAttestations: z.ZodArray<z.ZodString, "many">;
|
|
288
|
+
dataClassification: z.ZodEnum<["public", "internal", "confidential", "restricted"]>;
|
|
289
|
+
auditLevel: z.ZodEnum<["minimal", "standard", "comprehensive", "forensic"]>;
|
|
290
|
+
}, "strip", z.ZodTypeAny, {
|
|
291
|
+
maxTrustTier?: TrustTier;
|
|
292
|
+
deniedDomains?: string[];
|
|
293
|
+
requiredAttestations?: string[];
|
|
294
|
+
dataClassification?: "public" | "internal" | "confidential" | "restricted";
|
|
295
|
+
auditLevel?: "minimal" | "standard" | "comprehensive" | "forensic";
|
|
296
|
+
}, {
|
|
297
|
+
maxTrustTier?: TrustTier;
|
|
298
|
+
deniedDomains?: string[];
|
|
299
|
+
requiredAttestations?: string[];
|
|
300
|
+
dataClassification?: "public" | "internal" | "confidential" | "restricted";
|
|
301
|
+
auditLevel?: "minimal" | "standard" | "comprehensive" | "forensic";
|
|
302
|
+
}>;
|
|
303
|
+
orgHash: z.ZodString;
|
|
304
|
+
}, "strip", z.ZodTypeAny, {
|
|
305
|
+
tenantId?: string;
|
|
306
|
+
constraints?: {
|
|
307
|
+
maxTrustTier?: TrustTier;
|
|
308
|
+
deniedDomains?: string[];
|
|
309
|
+
requiredAttestations?: string[];
|
|
310
|
+
dataClassification?: "public" | "internal" | "confidential" | "restricted";
|
|
311
|
+
auditLevel?: "minimal" | "standard" | "comprehensive" | "forensic";
|
|
312
|
+
};
|
|
313
|
+
orgId?: string;
|
|
314
|
+
parentDeployment?: {
|
|
315
|
+
deploymentId?: string;
|
|
316
|
+
deploymentHash?: string;
|
|
317
|
+
regulatoryFramework?: RegulatoryFramework;
|
|
318
|
+
maxAllowedTier?: TrustTier;
|
|
319
|
+
allowedContextTypes?: ContextType[];
|
|
320
|
+
deployedAt?: Date;
|
|
321
|
+
deployedBy?: string;
|
|
322
|
+
immutable?: true;
|
|
323
|
+
};
|
|
324
|
+
lockedAt?: Date;
|
|
325
|
+
orgHash?: string;
|
|
326
|
+
}, {
|
|
327
|
+
tenantId?: string;
|
|
328
|
+
constraints?: {
|
|
329
|
+
maxTrustTier?: TrustTier;
|
|
330
|
+
deniedDomains?: string[];
|
|
331
|
+
requiredAttestations?: string[];
|
|
332
|
+
dataClassification?: "public" | "internal" | "confidential" | "restricted";
|
|
333
|
+
auditLevel?: "minimal" | "standard" | "comprehensive" | "forensic";
|
|
334
|
+
};
|
|
335
|
+
orgId?: string;
|
|
336
|
+
parentDeployment?: {
|
|
337
|
+
deploymentId?: string;
|
|
338
|
+
deploymentHash?: string;
|
|
339
|
+
regulatoryFramework?: RegulatoryFramework;
|
|
340
|
+
maxAllowedTier?: TrustTier;
|
|
341
|
+
allowedContextTypes?: ContextType[];
|
|
342
|
+
deployedAt?: Date;
|
|
343
|
+
deployedBy?: string;
|
|
344
|
+
immutable?: true;
|
|
345
|
+
};
|
|
346
|
+
lockedAt?: Date;
|
|
347
|
+
orgHash?: string;
|
|
348
|
+
}>;
|
|
349
|
+
contextType: z.ZodNativeEnum<typeof ContextType>;
|
|
350
|
+
createdAt: z.ZodDate;
|
|
351
|
+
createdBy: z.ZodString;
|
|
352
|
+
contextHash: z.ZodString;
|
|
353
|
+
}, "strip", z.ZodTypeAny, {
|
|
354
|
+
createdAt?: Date;
|
|
355
|
+
agentId?: string;
|
|
356
|
+
parentOrg?: {
|
|
357
|
+
tenantId?: string;
|
|
358
|
+
constraints?: {
|
|
359
|
+
maxTrustTier?: TrustTier;
|
|
360
|
+
deniedDomains?: string[];
|
|
361
|
+
requiredAttestations?: string[];
|
|
362
|
+
dataClassification?: "public" | "internal" | "confidential" | "restricted";
|
|
363
|
+
auditLevel?: "minimal" | "standard" | "comprehensive" | "forensic";
|
|
364
|
+
};
|
|
365
|
+
orgId?: string;
|
|
366
|
+
parentDeployment?: {
|
|
367
|
+
deploymentId?: string;
|
|
368
|
+
deploymentHash?: string;
|
|
369
|
+
regulatoryFramework?: RegulatoryFramework;
|
|
370
|
+
maxAllowedTier?: TrustTier;
|
|
371
|
+
allowedContextTypes?: ContextType[];
|
|
372
|
+
deployedAt?: Date;
|
|
373
|
+
deployedBy?: string;
|
|
374
|
+
immutable?: true;
|
|
375
|
+
};
|
|
376
|
+
lockedAt?: Date;
|
|
377
|
+
orgHash?: string;
|
|
378
|
+
};
|
|
379
|
+
contextType?: ContextType;
|
|
380
|
+
createdBy?: string;
|
|
381
|
+
contextHash?: string;
|
|
382
|
+
}, {
|
|
383
|
+
createdAt?: Date;
|
|
384
|
+
agentId?: string;
|
|
385
|
+
parentOrg?: {
|
|
386
|
+
tenantId?: string;
|
|
387
|
+
constraints?: {
|
|
388
|
+
maxTrustTier?: TrustTier;
|
|
389
|
+
deniedDomains?: string[];
|
|
390
|
+
requiredAttestations?: string[];
|
|
391
|
+
dataClassification?: "public" | "internal" | "confidential" | "restricted";
|
|
392
|
+
auditLevel?: "minimal" | "standard" | "comprehensive" | "forensic";
|
|
393
|
+
};
|
|
394
|
+
orgId?: string;
|
|
395
|
+
parentDeployment?: {
|
|
396
|
+
deploymentId?: string;
|
|
397
|
+
deploymentHash?: string;
|
|
398
|
+
regulatoryFramework?: RegulatoryFramework;
|
|
399
|
+
maxAllowedTier?: TrustTier;
|
|
400
|
+
allowedContextTypes?: ContextType[];
|
|
401
|
+
deployedAt?: Date;
|
|
402
|
+
deployedBy?: string;
|
|
403
|
+
immutable?: true;
|
|
404
|
+
};
|
|
405
|
+
lockedAt?: Date;
|
|
406
|
+
orgHash?: string;
|
|
407
|
+
};
|
|
408
|
+
contextType?: ContextType;
|
|
409
|
+
createdBy?: string;
|
|
410
|
+
contextHash?: string;
|
|
411
|
+
}>;
|
|
412
|
+
/**
|
|
413
|
+
* Tier 4: Operation Context (EPHEMERAL)
|
|
414
|
+
* Created per-request, discarded after operation.
|
|
415
|
+
* Example: Request-specific metadata, correlation IDs.
|
|
416
|
+
*/
|
|
417
|
+
export interface OperationContext {
|
|
418
|
+
readonly operationId: string;
|
|
419
|
+
readonly parentAgent: AgentContext;
|
|
420
|
+
readonly requestMetadata: Record<string, unknown>;
|
|
421
|
+
readonly correlationId: string;
|
|
422
|
+
readonly startedAt: Date;
|
|
423
|
+
readonly expiresAt: Date;
|
|
424
|
+
readonly ephemeral: true;
|
|
425
|
+
}
|
|
426
|
+
export declare const operationContextSchema: z.ZodObject<{
|
|
427
|
+
operationId: z.ZodString;
|
|
428
|
+
parentAgent: z.ZodObject<{
|
|
429
|
+
agentId: z.ZodString;
|
|
430
|
+
parentOrg: z.ZodObject<{
|
|
431
|
+
orgId: z.ZodString;
|
|
432
|
+
tenantId: z.ZodString;
|
|
433
|
+
parentDeployment: z.ZodObject<{
|
|
434
|
+
deploymentId: z.ZodString;
|
|
435
|
+
deploymentHash: z.ZodString;
|
|
436
|
+
regulatoryFramework: z.ZodNativeEnum<typeof RegulatoryFramework>;
|
|
437
|
+
maxAllowedTier: z.ZodNativeEnum<typeof TrustTier>;
|
|
438
|
+
allowedContextTypes: z.ZodArray<z.ZodNativeEnum<typeof ContextType>, "many">;
|
|
439
|
+
deployedAt: z.ZodDate;
|
|
440
|
+
deployedBy: z.ZodString;
|
|
441
|
+
immutable: z.ZodLiteral<true>;
|
|
442
|
+
}, "strip", z.ZodTypeAny, {
|
|
443
|
+
deploymentId?: string;
|
|
444
|
+
deploymentHash?: string;
|
|
445
|
+
regulatoryFramework?: RegulatoryFramework;
|
|
446
|
+
maxAllowedTier?: TrustTier;
|
|
447
|
+
allowedContextTypes?: ContextType[];
|
|
448
|
+
deployedAt?: Date;
|
|
449
|
+
deployedBy?: string;
|
|
450
|
+
immutable?: true;
|
|
451
|
+
}, {
|
|
452
|
+
deploymentId?: string;
|
|
453
|
+
deploymentHash?: string;
|
|
454
|
+
regulatoryFramework?: RegulatoryFramework;
|
|
455
|
+
maxAllowedTier?: TrustTier;
|
|
456
|
+
allowedContextTypes?: ContextType[];
|
|
457
|
+
deployedAt?: Date;
|
|
458
|
+
deployedBy?: string;
|
|
459
|
+
immutable?: true;
|
|
460
|
+
}>;
|
|
461
|
+
lockedAt: z.ZodOptional<z.ZodDate>;
|
|
462
|
+
constraints: z.ZodObject<{
|
|
463
|
+
maxTrustTier: z.ZodNativeEnum<typeof TrustTier>;
|
|
464
|
+
deniedDomains: z.ZodArray<z.ZodString, "many">;
|
|
465
|
+
requiredAttestations: z.ZodArray<z.ZodString, "many">;
|
|
466
|
+
dataClassification: z.ZodEnum<["public", "internal", "confidential", "restricted"]>;
|
|
467
|
+
auditLevel: z.ZodEnum<["minimal", "standard", "comprehensive", "forensic"]>;
|
|
468
|
+
}, "strip", z.ZodTypeAny, {
|
|
469
|
+
maxTrustTier?: TrustTier;
|
|
470
|
+
deniedDomains?: string[];
|
|
471
|
+
requiredAttestations?: string[];
|
|
472
|
+
dataClassification?: "public" | "internal" | "confidential" | "restricted";
|
|
473
|
+
auditLevel?: "minimal" | "standard" | "comprehensive" | "forensic";
|
|
474
|
+
}, {
|
|
475
|
+
maxTrustTier?: TrustTier;
|
|
476
|
+
deniedDomains?: string[];
|
|
477
|
+
requiredAttestations?: string[];
|
|
478
|
+
dataClassification?: "public" | "internal" | "confidential" | "restricted";
|
|
479
|
+
auditLevel?: "minimal" | "standard" | "comprehensive" | "forensic";
|
|
480
|
+
}>;
|
|
481
|
+
orgHash: z.ZodString;
|
|
482
|
+
}, "strip", z.ZodTypeAny, {
|
|
483
|
+
tenantId?: string;
|
|
484
|
+
constraints?: {
|
|
485
|
+
maxTrustTier?: TrustTier;
|
|
486
|
+
deniedDomains?: string[];
|
|
487
|
+
requiredAttestations?: string[];
|
|
488
|
+
dataClassification?: "public" | "internal" | "confidential" | "restricted";
|
|
489
|
+
auditLevel?: "minimal" | "standard" | "comprehensive" | "forensic";
|
|
490
|
+
};
|
|
491
|
+
orgId?: string;
|
|
492
|
+
parentDeployment?: {
|
|
493
|
+
deploymentId?: string;
|
|
494
|
+
deploymentHash?: string;
|
|
495
|
+
regulatoryFramework?: RegulatoryFramework;
|
|
496
|
+
maxAllowedTier?: TrustTier;
|
|
497
|
+
allowedContextTypes?: ContextType[];
|
|
498
|
+
deployedAt?: Date;
|
|
499
|
+
deployedBy?: string;
|
|
500
|
+
immutable?: true;
|
|
501
|
+
};
|
|
502
|
+
lockedAt?: Date;
|
|
503
|
+
orgHash?: string;
|
|
504
|
+
}, {
|
|
505
|
+
tenantId?: string;
|
|
506
|
+
constraints?: {
|
|
507
|
+
maxTrustTier?: TrustTier;
|
|
508
|
+
deniedDomains?: string[];
|
|
509
|
+
requiredAttestations?: string[];
|
|
510
|
+
dataClassification?: "public" | "internal" | "confidential" | "restricted";
|
|
511
|
+
auditLevel?: "minimal" | "standard" | "comprehensive" | "forensic";
|
|
512
|
+
};
|
|
513
|
+
orgId?: string;
|
|
514
|
+
parentDeployment?: {
|
|
515
|
+
deploymentId?: string;
|
|
516
|
+
deploymentHash?: string;
|
|
517
|
+
regulatoryFramework?: RegulatoryFramework;
|
|
518
|
+
maxAllowedTier?: TrustTier;
|
|
519
|
+
allowedContextTypes?: ContextType[];
|
|
520
|
+
deployedAt?: Date;
|
|
521
|
+
deployedBy?: string;
|
|
522
|
+
immutable?: true;
|
|
523
|
+
};
|
|
524
|
+
lockedAt?: Date;
|
|
525
|
+
orgHash?: string;
|
|
526
|
+
}>;
|
|
527
|
+
contextType: z.ZodNativeEnum<typeof ContextType>;
|
|
528
|
+
createdAt: z.ZodDate;
|
|
529
|
+
createdBy: z.ZodString;
|
|
530
|
+
contextHash: z.ZodString;
|
|
531
|
+
}, "strip", z.ZodTypeAny, {
|
|
532
|
+
createdAt?: Date;
|
|
533
|
+
agentId?: string;
|
|
534
|
+
parentOrg?: {
|
|
535
|
+
tenantId?: string;
|
|
536
|
+
constraints?: {
|
|
537
|
+
maxTrustTier?: TrustTier;
|
|
538
|
+
deniedDomains?: string[];
|
|
539
|
+
requiredAttestations?: string[];
|
|
540
|
+
dataClassification?: "public" | "internal" | "confidential" | "restricted";
|
|
541
|
+
auditLevel?: "minimal" | "standard" | "comprehensive" | "forensic";
|
|
542
|
+
};
|
|
543
|
+
orgId?: string;
|
|
544
|
+
parentDeployment?: {
|
|
545
|
+
deploymentId?: string;
|
|
546
|
+
deploymentHash?: string;
|
|
547
|
+
regulatoryFramework?: RegulatoryFramework;
|
|
548
|
+
maxAllowedTier?: TrustTier;
|
|
549
|
+
allowedContextTypes?: ContextType[];
|
|
550
|
+
deployedAt?: Date;
|
|
551
|
+
deployedBy?: string;
|
|
552
|
+
immutable?: true;
|
|
553
|
+
};
|
|
554
|
+
lockedAt?: Date;
|
|
555
|
+
orgHash?: string;
|
|
556
|
+
};
|
|
557
|
+
contextType?: ContextType;
|
|
558
|
+
createdBy?: string;
|
|
559
|
+
contextHash?: string;
|
|
560
|
+
}, {
|
|
561
|
+
createdAt?: Date;
|
|
562
|
+
agentId?: string;
|
|
563
|
+
parentOrg?: {
|
|
564
|
+
tenantId?: string;
|
|
565
|
+
constraints?: {
|
|
566
|
+
maxTrustTier?: TrustTier;
|
|
567
|
+
deniedDomains?: string[];
|
|
568
|
+
requiredAttestations?: string[];
|
|
569
|
+
dataClassification?: "public" | "internal" | "confidential" | "restricted";
|
|
570
|
+
auditLevel?: "minimal" | "standard" | "comprehensive" | "forensic";
|
|
571
|
+
};
|
|
572
|
+
orgId?: string;
|
|
573
|
+
parentDeployment?: {
|
|
574
|
+
deploymentId?: string;
|
|
575
|
+
deploymentHash?: string;
|
|
576
|
+
regulatoryFramework?: RegulatoryFramework;
|
|
577
|
+
maxAllowedTier?: TrustTier;
|
|
578
|
+
allowedContextTypes?: ContextType[];
|
|
579
|
+
deployedAt?: Date;
|
|
580
|
+
deployedBy?: string;
|
|
581
|
+
immutable?: true;
|
|
582
|
+
};
|
|
583
|
+
lockedAt?: Date;
|
|
584
|
+
orgHash?: string;
|
|
585
|
+
};
|
|
586
|
+
contextType?: ContextType;
|
|
587
|
+
createdBy?: string;
|
|
588
|
+
contextHash?: string;
|
|
589
|
+
}>;
|
|
590
|
+
requestMetadata: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
591
|
+
correlationId: z.ZodString;
|
|
592
|
+
startedAt: z.ZodDate;
|
|
593
|
+
expiresAt: z.ZodDate;
|
|
594
|
+
ephemeral: z.ZodLiteral<true>;
|
|
595
|
+
}, "strip", z.ZodTypeAny, {
|
|
596
|
+
correlationId?: string;
|
|
597
|
+
startedAt?: Date;
|
|
598
|
+
expiresAt?: Date;
|
|
599
|
+
operationId?: string;
|
|
600
|
+
parentAgent?: {
|
|
601
|
+
createdAt?: Date;
|
|
602
|
+
agentId?: string;
|
|
603
|
+
parentOrg?: {
|
|
604
|
+
tenantId?: string;
|
|
605
|
+
constraints?: {
|
|
606
|
+
maxTrustTier?: TrustTier;
|
|
607
|
+
deniedDomains?: string[];
|
|
608
|
+
requiredAttestations?: string[];
|
|
609
|
+
dataClassification?: "public" | "internal" | "confidential" | "restricted";
|
|
610
|
+
auditLevel?: "minimal" | "standard" | "comprehensive" | "forensic";
|
|
611
|
+
};
|
|
612
|
+
orgId?: string;
|
|
613
|
+
parentDeployment?: {
|
|
614
|
+
deploymentId?: string;
|
|
615
|
+
deploymentHash?: string;
|
|
616
|
+
regulatoryFramework?: RegulatoryFramework;
|
|
617
|
+
maxAllowedTier?: TrustTier;
|
|
618
|
+
allowedContextTypes?: ContextType[];
|
|
619
|
+
deployedAt?: Date;
|
|
620
|
+
deployedBy?: string;
|
|
621
|
+
immutable?: true;
|
|
622
|
+
};
|
|
623
|
+
lockedAt?: Date;
|
|
624
|
+
orgHash?: string;
|
|
625
|
+
};
|
|
626
|
+
contextType?: ContextType;
|
|
627
|
+
createdBy?: string;
|
|
628
|
+
contextHash?: string;
|
|
629
|
+
};
|
|
630
|
+
requestMetadata?: Record<string, unknown>;
|
|
631
|
+
ephemeral?: true;
|
|
632
|
+
}, {
|
|
633
|
+
correlationId?: string;
|
|
634
|
+
startedAt?: Date;
|
|
635
|
+
expiresAt?: Date;
|
|
636
|
+
operationId?: string;
|
|
637
|
+
parentAgent?: {
|
|
638
|
+
createdAt?: Date;
|
|
639
|
+
agentId?: string;
|
|
640
|
+
parentOrg?: {
|
|
641
|
+
tenantId?: string;
|
|
642
|
+
constraints?: {
|
|
643
|
+
maxTrustTier?: TrustTier;
|
|
644
|
+
deniedDomains?: string[];
|
|
645
|
+
requiredAttestations?: string[];
|
|
646
|
+
dataClassification?: "public" | "internal" | "confidential" | "restricted";
|
|
647
|
+
auditLevel?: "minimal" | "standard" | "comprehensive" | "forensic";
|
|
648
|
+
};
|
|
649
|
+
orgId?: string;
|
|
650
|
+
parentDeployment?: {
|
|
651
|
+
deploymentId?: string;
|
|
652
|
+
deploymentHash?: string;
|
|
653
|
+
regulatoryFramework?: RegulatoryFramework;
|
|
654
|
+
maxAllowedTier?: TrustTier;
|
|
655
|
+
allowedContextTypes?: ContextType[];
|
|
656
|
+
deployedAt?: Date;
|
|
657
|
+
deployedBy?: string;
|
|
658
|
+
immutable?: true;
|
|
659
|
+
};
|
|
660
|
+
lockedAt?: Date;
|
|
661
|
+
orgHash?: string;
|
|
662
|
+
};
|
|
663
|
+
contextType?: ContextType;
|
|
664
|
+
createdBy?: string;
|
|
665
|
+
contextHash?: string;
|
|
666
|
+
};
|
|
667
|
+
requestMetadata?: Record<string, unknown>;
|
|
668
|
+
ephemeral?: true;
|
|
669
|
+
}>;
|
|
670
|
+
/**
|
|
671
|
+
* Context hierarchy validation result
|
|
672
|
+
*/
|
|
673
|
+
export interface ContextValidationResult {
|
|
674
|
+
readonly valid: boolean;
|
|
675
|
+
readonly tier: 'deployment' | 'organizational' | 'agent' | 'operation';
|
|
676
|
+
readonly reason?: string;
|
|
677
|
+
readonly constraintViolations: readonly string[];
|
|
678
|
+
readonly hashChainValid: boolean;
|
|
679
|
+
readonly validatedAt: Date;
|
|
680
|
+
}
|
|
681
|
+
/**
|
|
682
|
+
* Preset source tier
|
|
683
|
+
*/
|
|
684
|
+
export type PresetSource = 'basis' | 'vorion' | 'axiom';
|
|
685
|
+
/**
|
|
686
|
+
* Trust dimension weights (sum to 1.0)
|
|
687
|
+
*/
|
|
688
|
+
export interface TrustWeights {
|
|
689
|
+
readonly observability: number;
|
|
690
|
+
readonly capability: number;
|
|
691
|
+
readonly behavior: number;
|
|
692
|
+
readonly governance: number;
|
|
693
|
+
readonly context: number;
|
|
694
|
+
}
|
|
695
|
+
export declare const trustWeightsSchema: z.ZodEffects<z.ZodObject<{
|
|
696
|
+
observability: z.ZodNumber;
|
|
697
|
+
capability: z.ZodNumber;
|
|
698
|
+
behavior: z.ZodNumber;
|
|
699
|
+
governance: z.ZodNumber;
|
|
700
|
+
context: z.ZodNumber;
|
|
701
|
+
}, "strip", z.ZodTypeAny, {
|
|
702
|
+
context?: number;
|
|
703
|
+
governance?: number;
|
|
704
|
+
capability?: number;
|
|
705
|
+
observability?: number;
|
|
706
|
+
behavior?: number;
|
|
707
|
+
}, {
|
|
708
|
+
context?: number;
|
|
709
|
+
governance?: number;
|
|
710
|
+
capability?: number;
|
|
711
|
+
observability?: number;
|
|
712
|
+
behavior?: number;
|
|
713
|
+
}>, {
|
|
714
|
+
context?: number;
|
|
715
|
+
governance?: number;
|
|
716
|
+
capability?: number;
|
|
717
|
+
observability?: number;
|
|
718
|
+
behavior?: number;
|
|
719
|
+
}, {
|
|
720
|
+
context?: number;
|
|
721
|
+
governance?: number;
|
|
722
|
+
capability?: number;
|
|
723
|
+
observability?: number;
|
|
724
|
+
behavior?: number;
|
|
725
|
+
}>;
|
|
726
|
+
/**
|
|
727
|
+
* Trust preset with derivation chain
|
|
728
|
+
*/
|
|
729
|
+
export interface TrustPreset {
|
|
730
|
+
readonly presetId: string;
|
|
731
|
+
readonly name: string;
|
|
732
|
+
readonly description: string;
|
|
733
|
+
readonly source: PresetSource;
|
|
734
|
+
readonly version: number;
|
|
735
|
+
readonly weights: TrustWeights;
|
|
736
|
+
readonly parentPresetId?: string;
|
|
737
|
+
readonly parentHash?: string;
|
|
738
|
+
readonly derivationDelta?: Partial<TrustWeights>;
|
|
739
|
+
readonly createdAt: Date;
|
|
740
|
+
readonly createdBy: string;
|
|
741
|
+
readonly presetHash: string;
|
|
742
|
+
readonly comment?: string;
|
|
743
|
+
}
|
|
744
|
+
export declare const trustPresetSchema: z.ZodObject<{
|
|
745
|
+
presetId: z.ZodString;
|
|
746
|
+
name: z.ZodString;
|
|
747
|
+
description: z.ZodString;
|
|
748
|
+
source: z.ZodEnum<["aci", "vorion", "axiom"]>;
|
|
749
|
+
version: z.ZodNumber;
|
|
750
|
+
weights: z.ZodEffects<z.ZodObject<{
|
|
751
|
+
observability: z.ZodNumber;
|
|
752
|
+
capability: z.ZodNumber;
|
|
753
|
+
behavior: z.ZodNumber;
|
|
754
|
+
governance: z.ZodNumber;
|
|
755
|
+
context: z.ZodNumber;
|
|
756
|
+
}, "strip", z.ZodTypeAny, {
|
|
757
|
+
context?: number;
|
|
758
|
+
governance?: number;
|
|
759
|
+
capability?: number;
|
|
760
|
+
observability?: number;
|
|
761
|
+
behavior?: number;
|
|
762
|
+
}, {
|
|
763
|
+
context?: number;
|
|
764
|
+
governance?: number;
|
|
765
|
+
capability?: number;
|
|
766
|
+
observability?: number;
|
|
767
|
+
behavior?: number;
|
|
768
|
+
}>, {
|
|
769
|
+
context?: number;
|
|
770
|
+
governance?: number;
|
|
771
|
+
capability?: number;
|
|
772
|
+
observability?: number;
|
|
773
|
+
behavior?: number;
|
|
774
|
+
}, {
|
|
775
|
+
context?: number;
|
|
776
|
+
governance?: number;
|
|
777
|
+
capability?: number;
|
|
778
|
+
observability?: number;
|
|
779
|
+
behavior?: number;
|
|
780
|
+
}>;
|
|
781
|
+
parentPresetId: z.ZodOptional<z.ZodString>;
|
|
782
|
+
parentHash: z.ZodOptional<z.ZodString>;
|
|
783
|
+
derivationDelta: z.ZodOptional<z.ZodObject<{
|
|
784
|
+
observability: z.ZodOptional<z.ZodNumber>;
|
|
785
|
+
capability: z.ZodOptional<z.ZodNumber>;
|
|
786
|
+
behavior: z.ZodOptional<z.ZodNumber>;
|
|
787
|
+
governance: z.ZodOptional<z.ZodNumber>;
|
|
788
|
+
context: z.ZodOptional<z.ZodNumber>;
|
|
789
|
+
}, "strip", z.ZodTypeAny, {
|
|
790
|
+
context?: number;
|
|
791
|
+
governance?: number;
|
|
792
|
+
capability?: number;
|
|
793
|
+
observability?: number;
|
|
794
|
+
behavior?: number;
|
|
795
|
+
}, {
|
|
796
|
+
context?: number;
|
|
797
|
+
governance?: number;
|
|
798
|
+
capability?: number;
|
|
799
|
+
observability?: number;
|
|
800
|
+
behavior?: number;
|
|
801
|
+
}>>;
|
|
802
|
+
createdAt: z.ZodDate;
|
|
803
|
+
createdBy: z.ZodString;
|
|
804
|
+
presetHash: z.ZodString;
|
|
805
|
+
comment: z.ZodOptional<z.ZodString>;
|
|
806
|
+
}, "strip", z.ZodTypeAny, {
|
|
807
|
+
name?: string;
|
|
808
|
+
version?: number;
|
|
809
|
+
description?: string;
|
|
810
|
+
createdAt?: Date;
|
|
811
|
+
createdBy?: string;
|
|
812
|
+
presetId?: string;
|
|
813
|
+
source?: "vorion" | "axiom" | "aci";
|
|
814
|
+
weights?: {
|
|
815
|
+
context?: number;
|
|
816
|
+
governance?: number;
|
|
817
|
+
capability?: number;
|
|
818
|
+
observability?: number;
|
|
819
|
+
behavior?: number;
|
|
820
|
+
};
|
|
821
|
+
parentPresetId?: string;
|
|
822
|
+
parentHash?: string;
|
|
823
|
+
derivationDelta?: {
|
|
824
|
+
context?: number;
|
|
825
|
+
governance?: number;
|
|
826
|
+
capability?: number;
|
|
827
|
+
observability?: number;
|
|
828
|
+
behavior?: number;
|
|
829
|
+
};
|
|
830
|
+
presetHash?: string;
|
|
831
|
+
comment?: string;
|
|
832
|
+
}, {
|
|
833
|
+
name?: string;
|
|
834
|
+
version?: number;
|
|
835
|
+
description?: string;
|
|
836
|
+
createdAt?: Date;
|
|
837
|
+
createdBy?: string;
|
|
838
|
+
presetId?: string;
|
|
839
|
+
source?: "vorion" | "axiom" | "aci";
|
|
840
|
+
weights?: {
|
|
841
|
+
context?: number;
|
|
842
|
+
governance?: number;
|
|
843
|
+
capability?: number;
|
|
844
|
+
observability?: number;
|
|
845
|
+
behavior?: number;
|
|
846
|
+
};
|
|
847
|
+
parentPresetId?: string;
|
|
848
|
+
parentHash?: string;
|
|
849
|
+
derivationDelta?: {
|
|
850
|
+
context?: number;
|
|
851
|
+
governance?: number;
|
|
852
|
+
capability?: number;
|
|
853
|
+
observability?: number;
|
|
854
|
+
behavior?: number;
|
|
855
|
+
};
|
|
856
|
+
presetHash?: string;
|
|
857
|
+
comment?: string;
|
|
858
|
+
}>;
|
|
859
|
+
/**
|
|
860
|
+
* Preset lineage tracking (cryptographic chain of custody)
|
|
861
|
+
*/
|
|
862
|
+
export interface PresetLineage {
|
|
863
|
+
readonly leafPresetId: string;
|
|
864
|
+
readonly chain: readonly string[];
|
|
865
|
+
readonly hashes: readonly string[];
|
|
866
|
+
readonly verified: boolean;
|
|
867
|
+
readonly verifiedAt?: Date;
|
|
868
|
+
readonly verifiedBy?: string;
|
|
869
|
+
}
|
|
870
|
+
export declare const presetLineageSchema: z.ZodObject<{
|
|
871
|
+
leafPresetId: z.ZodString;
|
|
872
|
+
chain: z.ZodArray<z.ZodString, "many">;
|
|
873
|
+
hashes: z.ZodArray<z.ZodString, "many">;
|
|
874
|
+
verified: z.ZodBoolean;
|
|
875
|
+
verifiedAt: z.ZodOptional<z.ZodDate>;
|
|
876
|
+
verifiedBy: z.ZodOptional<z.ZodString>;
|
|
877
|
+
}, "strip", z.ZodTypeAny, {
|
|
878
|
+
verifiedAt?: Date;
|
|
879
|
+
chain?: string[];
|
|
880
|
+
leafPresetId?: string;
|
|
881
|
+
hashes?: string[];
|
|
882
|
+
verified?: boolean;
|
|
883
|
+
verifiedBy?: string;
|
|
884
|
+
}, {
|
|
885
|
+
verifiedAt?: Date;
|
|
886
|
+
chain?: string[];
|
|
887
|
+
leafPresetId?: string;
|
|
888
|
+
hashes?: string[];
|
|
889
|
+
verified?: boolean;
|
|
890
|
+
verifiedBy?: string;
|
|
891
|
+
}>;
|
|
892
|
+
/**
|
|
893
|
+
* Agent provenance (IMMUTABLE - captured at instantiation)
|
|
894
|
+
*/
|
|
895
|
+
export interface AgentProvenance {
|
|
896
|
+
readonly agentId: string;
|
|
897
|
+
readonly creationType: CreationType;
|
|
898
|
+
readonly parentAgentId?: string;
|
|
899
|
+
readonly parentProvenanceHash?: string;
|
|
900
|
+
readonly createdAt: Date;
|
|
901
|
+
readonly createdBy: string;
|
|
902
|
+
readonly provenanceHash: string;
|
|
903
|
+
}
|
|
904
|
+
export declare const agentProvenanceSchema: z.ZodObject<{
|
|
905
|
+
agentId: z.ZodString;
|
|
906
|
+
creationType: z.ZodNativeEnum<typeof CreationType>;
|
|
907
|
+
parentAgentId: z.ZodOptional<z.ZodString>;
|
|
908
|
+
parentProvenanceHash: z.ZodOptional<z.ZodString>;
|
|
909
|
+
createdAt: z.ZodDate;
|
|
910
|
+
createdBy: z.ZodString;
|
|
911
|
+
provenanceHash: z.ZodString;
|
|
912
|
+
}, "strip", z.ZodTypeAny, {
|
|
913
|
+
createdAt?: Date;
|
|
914
|
+
provenanceHash?: string;
|
|
915
|
+
agentId?: string;
|
|
916
|
+
createdBy?: string;
|
|
917
|
+
creationType?: CreationType;
|
|
918
|
+
parentAgentId?: string;
|
|
919
|
+
parentProvenanceHash?: string;
|
|
920
|
+
}, {
|
|
921
|
+
createdAt?: Date;
|
|
922
|
+
provenanceHash?: string;
|
|
923
|
+
agentId?: string;
|
|
924
|
+
createdBy?: string;
|
|
925
|
+
creationType?: CreationType;
|
|
926
|
+
parentAgentId?: string;
|
|
927
|
+
parentProvenanceHash?: string;
|
|
928
|
+
}>;
|
|
929
|
+
/**
|
|
930
|
+
* Creation modifier policy (MUTABLE - can evolve independently)
|
|
931
|
+
*/
|
|
932
|
+
export interface CreationModifierPolicy {
|
|
933
|
+
readonly policyId: string;
|
|
934
|
+
readonly version: number;
|
|
935
|
+
readonly creationType: CreationType;
|
|
936
|
+
readonly baselineModifier: number;
|
|
937
|
+
readonly conditions?: CreationModifierConditions;
|
|
938
|
+
readonly effectiveFrom: Date;
|
|
939
|
+
readonly effectiveUntil?: Date;
|
|
940
|
+
readonly createdAt: Date;
|
|
941
|
+
readonly createdBy: string;
|
|
942
|
+
readonly policyHash: string;
|
|
943
|
+
readonly supersedes?: string;
|
|
944
|
+
}
|
|
945
|
+
export interface CreationModifierConditions {
|
|
946
|
+
readonly parentCreationType?: CreationType;
|
|
947
|
+
readonly parentTrustScore?: {
|
|
948
|
+
min: number;
|
|
949
|
+
max: number;
|
|
950
|
+
};
|
|
951
|
+
readonly trustedSources?: readonly string[];
|
|
952
|
+
readonly requiredAttestations?: readonly string[];
|
|
953
|
+
}
|
|
954
|
+
export declare const creationModifierPolicySchema: z.ZodObject<{
|
|
955
|
+
policyId: z.ZodString;
|
|
956
|
+
version: z.ZodNumber;
|
|
957
|
+
creationType: z.ZodNativeEnum<typeof CreationType>;
|
|
958
|
+
baselineModifier: z.ZodNumber;
|
|
959
|
+
conditions: z.ZodOptional<z.ZodObject<{
|
|
960
|
+
parentCreationType: z.ZodOptional<z.ZodNativeEnum<typeof CreationType>>;
|
|
961
|
+
parentTrustScore: z.ZodOptional<z.ZodObject<{
|
|
962
|
+
min: z.ZodNumber;
|
|
963
|
+
max: z.ZodNumber;
|
|
964
|
+
}, "strip", z.ZodTypeAny, {
|
|
965
|
+
min?: number;
|
|
966
|
+
max?: number;
|
|
967
|
+
}, {
|
|
968
|
+
min?: number;
|
|
969
|
+
max?: number;
|
|
970
|
+
}>>;
|
|
971
|
+
trustedSources: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
972
|
+
requiredAttestations: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
973
|
+
}, "strip", z.ZodTypeAny, {
|
|
974
|
+
requiredAttestations?: string[];
|
|
975
|
+
parentCreationType?: CreationType;
|
|
976
|
+
parentTrustScore?: {
|
|
977
|
+
min?: number;
|
|
978
|
+
max?: number;
|
|
979
|
+
};
|
|
980
|
+
trustedSources?: string[];
|
|
981
|
+
}, {
|
|
982
|
+
requiredAttestations?: string[];
|
|
983
|
+
parentCreationType?: CreationType;
|
|
984
|
+
parentTrustScore?: {
|
|
985
|
+
min?: number;
|
|
986
|
+
max?: number;
|
|
987
|
+
};
|
|
988
|
+
trustedSources?: string[];
|
|
989
|
+
}>>;
|
|
990
|
+
effectiveFrom: z.ZodDate;
|
|
991
|
+
effectiveUntil: z.ZodOptional<z.ZodDate>;
|
|
992
|
+
createdAt: z.ZodDate;
|
|
993
|
+
createdBy: z.ZodString;
|
|
994
|
+
policyHash: z.ZodString;
|
|
995
|
+
supersedes: z.ZodOptional<z.ZodString>;
|
|
996
|
+
}, "strip", z.ZodTypeAny, {
|
|
997
|
+
version?: number;
|
|
998
|
+
conditions?: {
|
|
999
|
+
requiredAttestations?: string[];
|
|
1000
|
+
parentCreationType?: CreationType;
|
|
1001
|
+
parentTrustScore?: {
|
|
1002
|
+
min?: number;
|
|
1003
|
+
max?: number;
|
|
1004
|
+
};
|
|
1005
|
+
trustedSources?: string[];
|
|
1006
|
+
};
|
|
1007
|
+
createdAt?: Date;
|
|
1008
|
+
createdBy?: string;
|
|
1009
|
+
creationType?: CreationType;
|
|
1010
|
+
policyId?: string;
|
|
1011
|
+
baselineModifier?: number;
|
|
1012
|
+
effectiveFrom?: Date;
|
|
1013
|
+
effectiveUntil?: Date;
|
|
1014
|
+
policyHash?: string;
|
|
1015
|
+
supersedes?: string;
|
|
1016
|
+
}, {
|
|
1017
|
+
version?: number;
|
|
1018
|
+
conditions?: {
|
|
1019
|
+
requiredAttestations?: string[];
|
|
1020
|
+
parentCreationType?: CreationType;
|
|
1021
|
+
parentTrustScore?: {
|
|
1022
|
+
min?: number;
|
|
1023
|
+
max?: number;
|
|
1024
|
+
};
|
|
1025
|
+
trustedSources?: string[];
|
|
1026
|
+
};
|
|
1027
|
+
createdAt?: Date;
|
|
1028
|
+
createdBy?: string;
|
|
1029
|
+
creationType?: CreationType;
|
|
1030
|
+
policyId?: string;
|
|
1031
|
+
baselineModifier?: number;
|
|
1032
|
+
effectiveFrom?: Date;
|
|
1033
|
+
effectiveUntil?: Date;
|
|
1034
|
+
policyHash?: string;
|
|
1035
|
+
supersedes?: string;
|
|
1036
|
+
}>;
|
|
1037
|
+
/**
|
|
1038
|
+
* Modifier evaluation record (AUDIT TRAIL)
|
|
1039
|
+
*/
|
|
1040
|
+
export interface ModifierEvaluationRecord {
|
|
1041
|
+
readonly evaluationId: string;
|
|
1042
|
+
readonly agentId: string;
|
|
1043
|
+
readonly provenanceHash: string;
|
|
1044
|
+
readonly policyId: string;
|
|
1045
|
+
readonly policyVersion: number;
|
|
1046
|
+
readonly computedModifier: number;
|
|
1047
|
+
readonly conditionsMatched: readonly string[];
|
|
1048
|
+
readonly evaluatedAt: Date;
|
|
1049
|
+
readonly evaluationHash: string;
|
|
1050
|
+
}
|
|
1051
|
+
export declare const modifierEvaluationRecordSchema: z.ZodObject<{
|
|
1052
|
+
evaluationId: z.ZodString;
|
|
1053
|
+
agentId: z.ZodString;
|
|
1054
|
+
provenanceHash: z.ZodString;
|
|
1055
|
+
policyId: z.ZodString;
|
|
1056
|
+
policyVersion: z.ZodNumber;
|
|
1057
|
+
computedModifier: z.ZodNumber;
|
|
1058
|
+
conditionsMatched: z.ZodArray<z.ZodString, "many">;
|
|
1059
|
+
evaluatedAt: z.ZodDate;
|
|
1060
|
+
evaluationHash: z.ZodString;
|
|
1061
|
+
}, "strip", z.ZodTypeAny, {
|
|
1062
|
+
evaluatedAt?: Date;
|
|
1063
|
+
provenanceHash?: string;
|
|
1064
|
+
agentId?: string;
|
|
1065
|
+
policyId?: string;
|
|
1066
|
+
evaluationId?: string;
|
|
1067
|
+
policyVersion?: number;
|
|
1068
|
+
computedModifier?: number;
|
|
1069
|
+
conditionsMatched?: string[];
|
|
1070
|
+
evaluationHash?: string;
|
|
1071
|
+
}, {
|
|
1072
|
+
evaluatedAt?: Date;
|
|
1073
|
+
provenanceHash?: string;
|
|
1074
|
+
agentId?: string;
|
|
1075
|
+
policyId?: string;
|
|
1076
|
+
evaluationId?: string;
|
|
1077
|
+
policyVersion?: number;
|
|
1078
|
+
computedModifier?: number;
|
|
1079
|
+
conditionsMatched?: string[];
|
|
1080
|
+
evaluationHash?: string;
|
|
1081
|
+
}>;
|
|
1082
|
+
/**
|
|
1083
|
+
* Enforcement layer designation
|
|
1084
|
+
*/
|
|
1085
|
+
export type EnforcementLayer = 'kernel' | 'policy' | 'regulatory';
|
|
1086
|
+
/**
|
|
1087
|
+
* Trust computation event with dual logging
|
|
1088
|
+
*/
|
|
1089
|
+
export interface TrustComputationEvent {
|
|
1090
|
+
readonly eventId: string;
|
|
1091
|
+
readonly agentId: string;
|
|
1092
|
+
readonly timestamp: Date;
|
|
1093
|
+
readonly rawScore: number;
|
|
1094
|
+
readonly clampedScore: number;
|
|
1095
|
+
readonly ceilingApplied: boolean;
|
|
1096
|
+
readonly ceilingSource?: CeilingSource;
|
|
1097
|
+
readonly enforcementLayer: EnforcementLayer;
|
|
1098
|
+
readonly kernelValidated: boolean;
|
|
1099
|
+
readonly policyValidated: boolean;
|
|
1100
|
+
readonly regulatoryLogged: boolean;
|
|
1101
|
+
readonly contextType: ContextType;
|
|
1102
|
+
readonly contextCeiling: number;
|
|
1103
|
+
readonly effectiveTier: TrustTier;
|
|
1104
|
+
readonly eventHash: string;
|
|
1105
|
+
readonly previousEventHash?: string;
|
|
1106
|
+
}
|
|
1107
|
+
export interface CeilingSource {
|
|
1108
|
+
readonly type: 'context' | 'organizational' | 'deployment' | 'attestation';
|
|
1109
|
+
readonly value: number;
|
|
1110
|
+
readonly constraint: string;
|
|
1111
|
+
}
|
|
1112
|
+
export declare const trustComputationEventSchema: z.ZodObject<{
|
|
1113
|
+
eventId: z.ZodString;
|
|
1114
|
+
agentId: z.ZodString;
|
|
1115
|
+
timestamp: z.ZodDate;
|
|
1116
|
+
rawScore: z.ZodNumber;
|
|
1117
|
+
clampedScore: z.ZodNumber;
|
|
1118
|
+
ceilingApplied: z.ZodBoolean;
|
|
1119
|
+
ceilingSource: z.ZodOptional<z.ZodObject<{
|
|
1120
|
+
type: z.ZodEnum<["context", "organizational", "deployment", "attestation"]>;
|
|
1121
|
+
value: z.ZodNumber;
|
|
1122
|
+
constraint: z.ZodString;
|
|
1123
|
+
}, "strip", z.ZodTypeAny, {
|
|
1124
|
+
value?: number;
|
|
1125
|
+
type?: "context" | "deployment" | "organizational" | "attestation";
|
|
1126
|
+
constraint?: string;
|
|
1127
|
+
}, {
|
|
1128
|
+
value?: number;
|
|
1129
|
+
type?: "context" | "deployment" | "organizational" | "attestation";
|
|
1130
|
+
constraint?: string;
|
|
1131
|
+
}>>;
|
|
1132
|
+
enforcementLayer: z.ZodEnum<["kernel", "policy", "regulatory"]>;
|
|
1133
|
+
kernelValidated: z.ZodBoolean;
|
|
1134
|
+
policyValidated: z.ZodBoolean;
|
|
1135
|
+
regulatoryLogged: z.ZodBoolean;
|
|
1136
|
+
contextType: z.ZodNativeEnum<typeof ContextType>;
|
|
1137
|
+
contextCeiling: z.ZodNumber;
|
|
1138
|
+
effectiveTier: z.ZodNativeEnum<typeof TrustTier>;
|
|
1139
|
+
eventHash: z.ZodString;
|
|
1140
|
+
previousEventHash: z.ZodOptional<z.ZodString>;
|
|
1141
|
+
}, "strip", z.ZodTypeAny, {
|
|
1142
|
+
timestamp?: Date;
|
|
1143
|
+
agentId?: string;
|
|
1144
|
+
contextType?: ContextType;
|
|
1145
|
+
eventId?: string;
|
|
1146
|
+
rawScore?: number;
|
|
1147
|
+
clampedScore?: number;
|
|
1148
|
+
ceilingApplied?: boolean;
|
|
1149
|
+
ceilingSource?: {
|
|
1150
|
+
value?: number;
|
|
1151
|
+
type?: "context" | "deployment" | "organizational" | "attestation";
|
|
1152
|
+
constraint?: string;
|
|
1153
|
+
};
|
|
1154
|
+
enforcementLayer?: "policy" | "kernel" | "regulatory";
|
|
1155
|
+
kernelValidated?: boolean;
|
|
1156
|
+
policyValidated?: boolean;
|
|
1157
|
+
regulatoryLogged?: boolean;
|
|
1158
|
+
contextCeiling?: number;
|
|
1159
|
+
effectiveTier?: TrustTier;
|
|
1160
|
+
eventHash?: string;
|
|
1161
|
+
previousEventHash?: string;
|
|
1162
|
+
}, {
|
|
1163
|
+
timestamp?: Date;
|
|
1164
|
+
agentId?: string;
|
|
1165
|
+
contextType?: ContextType;
|
|
1166
|
+
eventId?: string;
|
|
1167
|
+
rawScore?: number;
|
|
1168
|
+
clampedScore?: number;
|
|
1169
|
+
ceilingApplied?: boolean;
|
|
1170
|
+
ceilingSource?: {
|
|
1171
|
+
value?: number;
|
|
1172
|
+
type?: "context" | "deployment" | "organizational" | "attestation";
|
|
1173
|
+
constraint?: string;
|
|
1174
|
+
};
|
|
1175
|
+
enforcementLayer?: "policy" | "kernel" | "regulatory";
|
|
1176
|
+
kernelValidated?: boolean;
|
|
1177
|
+
policyValidated?: boolean;
|
|
1178
|
+
regulatoryLogged?: boolean;
|
|
1179
|
+
contextCeiling?: number;
|
|
1180
|
+
effectiveTier?: TrustTier;
|
|
1181
|
+
eventHash?: string;
|
|
1182
|
+
previousEventHash?: string;
|
|
1183
|
+
}>;
|
|
1184
|
+
/**
|
|
1185
|
+
* Regulatory audit ledger entry (SEPARATE from operational events)
|
|
1186
|
+
*/
|
|
1187
|
+
export interface RegulatoryAuditEntry {
|
|
1188
|
+
readonly entryId: string;
|
|
1189
|
+
readonly agentId: string;
|
|
1190
|
+
readonly timestamp: Date;
|
|
1191
|
+
readonly rawScore: number;
|
|
1192
|
+
readonly clampedScore: number;
|
|
1193
|
+
readonly variance: number;
|
|
1194
|
+
readonly varianceAnomaly: boolean;
|
|
1195
|
+
readonly frequencyAnomaly: boolean;
|
|
1196
|
+
readonly patternAnomaly: boolean;
|
|
1197
|
+
readonly regulatoryFramework: RegulatoryFramework;
|
|
1198
|
+
readonly complianceStatus: 'compliant' | 'warning' | 'violation';
|
|
1199
|
+
readonly retentionRequired: boolean;
|
|
1200
|
+
readonly retentionUntil?: Date;
|
|
1201
|
+
readonly entryHash: string;
|
|
1202
|
+
readonly previousEntryHash?: string;
|
|
1203
|
+
readonly ledgerSequence: number;
|
|
1204
|
+
}
|
|
1205
|
+
export declare const regulatoryAuditEntrySchema: z.ZodObject<{
|
|
1206
|
+
entryId: z.ZodString;
|
|
1207
|
+
agentId: z.ZodString;
|
|
1208
|
+
timestamp: z.ZodDate;
|
|
1209
|
+
rawScore: z.ZodNumber;
|
|
1210
|
+
clampedScore: z.ZodNumber;
|
|
1211
|
+
variance: z.ZodNumber;
|
|
1212
|
+
varianceAnomaly: z.ZodBoolean;
|
|
1213
|
+
frequencyAnomaly: z.ZodBoolean;
|
|
1214
|
+
patternAnomaly: z.ZodBoolean;
|
|
1215
|
+
regulatoryFramework: z.ZodNativeEnum<typeof RegulatoryFramework>;
|
|
1216
|
+
complianceStatus: z.ZodEnum<["compliant", "warning", "violation"]>;
|
|
1217
|
+
retentionRequired: z.ZodBoolean;
|
|
1218
|
+
retentionUntil: z.ZodOptional<z.ZodDate>;
|
|
1219
|
+
entryHash: z.ZodString;
|
|
1220
|
+
previousEntryHash: z.ZodOptional<z.ZodString>;
|
|
1221
|
+
ledgerSequence: z.ZodNumber;
|
|
1222
|
+
}, "strip", z.ZodTypeAny, {
|
|
1223
|
+
timestamp?: Date;
|
|
1224
|
+
agentId?: string;
|
|
1225
|
+
regulatoryFramework?: RegulatoryFramework;
|
|
1226
|
+
rawScore?: number;
|
|
1227
|
+
clampedScore?: number;
|
|
1228
|
+
entryId?: string;
|
|
1229
|
+
variance?: number;
|
|
1230
|
+
varianceAnomaly?: boolean;
|
|
1231
|
+
frequencyAnomaly?: boolean;
|
|
1232
|
+
patternAnomaly?: boolean;
|
|
1233
|
+
complianceStatus?: "warning" | "compliant" | "violation";
|
|
1234
|
+
retentionRequired?: boolean;
|
|
1235
|
+
retentionUntil?: Date;
|
|
1236
|
+
entryHash?: string;
|
|
1237
|
+
previousEntryHash?: string;
|
|
1238
|
+
ledgerSequence?: number;
|
|
1239
|
+
}, {
|
|
1240
|
+
timestamp?: Date;
|
|
1241
|
+
agentId?: string;
|
|
1242
|
+
regulatoryFramework?: RegulatoryFramework;
|
|
1243
|
+
rawScore?: number;
|
|
1244
|
+
clampedScore?: number;
|
|
1245
|
+
entryId?: string;
|
|
1246
|
+
variance?: number;
|
|
1247
|
+
varianceAnomaly?: boolean;
|
|
1248
|
+
frequencyAnomaly?: boolean;
|
|
1249
|
+
patternAnomaly?: boolean;
|
|
1250
|
+
complianceStatus?: "warning" | "compliant" | "violation";
|
|
1251
|
+
retentionRequired?: boolean;
|
|
1252
|
+
retentionUntil?: Date;
|
|
1253
|
+
entryHash?: string;
|
|
1254
|
+
previousEntryHash?: string;
|
|
1255
|
+
ledgerSequence?: number;
|
|
1256
|
+
}>;
|
|
1257
|
+
/**
|
|
1258
|
+
* Role gate matrix entry
|
|
1259
|
+
*/
|
|
1260
|
+
export interface RoleGateEntry {
|
|
1261
|
+
readonly role: AgentRole;
|
|
1262
|
+
readonly minimumTier: TrustTier;
|
|
1263
|
+
readonly allowedTiers: readonly TrustTier[];
|
|
1264
|
+
}
|
|
1265
|
+
/**
|
|
1266
|
+
* Pre-computed role gate matrix
|
|
1267
|
+
* Higher-capability roles require higher trust.
|
|
1268
|
+
*/
|
|
1269
|
+
export declare const ROLE_GATE_MATRIX: Record<AgentRole, Record<TrustTier, boolean>>;
|
|
1270
|
+
/**
|
|
1271
|
+
* Policy rule for role gate (policy-as-code layer)
|
|
1272
|
+
*/
|
|
1273
|
+
export interface RoleGatePolicy {
|
|
1274
|
+
readonly policyId: string;
|
|
1275
|
+
readonly version: number;
|
|
1276
|
+
readonly rules: readonly RoleGatePolicyRule[];
|
|
1277
|
+
readonly effectiveFrom: Date;
|
|
1278
|
+
readonly effectiveUntil?: Date;
|
|
1279
|
+
readonly createdAt: Date;
|
|
1280
|
+
readonly createdBy: string;
|
|
1281
|
+
readonly policyHash: string;
|
|
1282
|
+
}
|
|
1283
|
+
export interface RoleGatePolicyRule {
|
|
1284
|
+
readonly ruleId: string;
|
|
1285
|
+
readonly name: string;
|
|
1286
|
+
readonly condition: RoleGateCondition;
|
|
1287
|
+
readonly action: 'ALLOW' | 'DENY' | 'ESCALATE';
|
|
1288
|
+
readonly priority: number;
|
|
1289
|
+
readonly reason: string;
|
|
1290
|
+
}
|
|
1291
|
+
export interface RoleGateCondition {
|
|
1292
|
+
readonly roles?: readonly AgentRole[];
|
|
1293
|
+
readonly tiers?: readonly TrustTier[];
|
|
1294
|
+
readonly contextTypes?: readonly ContextType[];
|
|
1295
|
+
readonly domains?: readonly string[];
|
|
1296
|
+
readonly timeWindow?: {
|
|
1297
|
+
start: string;
|
|
1298
|
+
end: string;
|
|
1299
|
+
};
|
|
1300
|
+
readonly requiresAttestation?: readonly string[];
|
|
1301
|
+
}
|
|
1302
|
+
export declare const roleGatePolicySchema: z.ZodObject<{
|
|
1303
|
+
policyId: z.ZodString;
|
|
1304
|
+
version: z.ZodNumber;
|
|
1305
|
+
rules: z.ZodArray<z.ZodObject<{
|
|
1306
|
+
ruleId: z.ZodString;
|
|
1307
|
+
name: z.ZodString;
|
|
1308
|
+
condition: z.ZodObject<{
|
|
1309
|
+
roles: z.ZodOptional<z.ZodArray<z.ZodNativeEnum<typeof AgentRole>, "many">>;
|
|
1310
|
+
tiers: z.ZodOptional<z.ZodArray<z.ZodNativeEnum<typeof TrustTier>, "many">>;
|
|
1311
|
+
contextTypes: z.ZodOptional<z.ZodArray<z.ZodNativeEnum<typeof ContextType>, "many">>;
|
|
1312
|
+
domains: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
1313
|
+
timeWindow: z.ZodOptional<z.ZodObject<{
|
|
1314
|
+
start: z.ZodString;
|
|
1315
|
+
end: z.ZodString;
|
|
1316
|
+
}, "strip", z.ZodTypeAny, {
|
|
1317
|
+
start?: string;
|
|
1318
|
+
end?: string;
|
|
1319
|
+
}, {
|
|
1320
|
+
start?: string;
|
|
1321
|
+
end?: string;
|
|
1322
|
+
}>>;
|
|
1323
|
+
requiresAttestation: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
1324
|
+
}, "strip", z.ZodTypeAny, {
|
|
1325
|
+
roles?: AgentRole[];
|
|
1326
|
+
tiers?: TrustTier[];
|
|
1327
|
+
contextTypes?: ContextType[];
|
|
1328
|
+
domains?: string[];
|
|
1329
|
+
timeWindow?: {
|
|
1330
|
+
start?: string;
|
|
1331
|
+
end?: string;
|
|
1332
|
+
};
|
|
1333
|
+
requiresAttestation?: string[];
|
|
1334
|
+
}, {
|
|
1335
|
+
roles?: AgentRole[];
|
|
1336
|
+
tiers?: TrustTier[];
|
|
1337
|
+
contextTypes?: ContextType[];
|
|
1338
|
+
domains?: string[];
|
|
1339
|
+
timeWindow?: {
|
|
1340
|
+
start?: string;
|
|
1341
|
+
end?: string;
|
|
1342
|
+
};
|
|
1343
|
+
requiresAttestation?: string[];
|
|
1344
|
+
}>;
|
|
1345
|
+
action: z.ZodEnum<["ALLOW", "DENY", "ESCALATE"]>;
|
|
1346
|
+
priority: z.ZodNumber;
|
|
1347
|
+
reason: z.ZodString;
|
|
1348
|
+
}, "strip", z.ZodTypeAny, {
|
|
1349
|
+
name?: string;
|
|
1350
|
+
ruleId?: string;
|
|
1351
|
+
action?: "ALLOW" | "DENY" | "ESCALATE";
|
|
1352
|
+
reason?: string;
|
|
1353
|
+
priority?: number;
|
|
1354
|
+
condition?: {
|
|
1355
|
+
roles?: AgentRole[];
|
|
1356
|
+
tiers?: TrustTier[];
|
|
1357
|
+
contextTypes?: ContextType[];
|
|
1358
|
+
domains?: string[];
|
|
1359
|
+
timeWindow?: {
|
|
1360
|
+
start?: string;
|
|
1361
|
+
end?: string;
|
|
1362
|
+
};
|
|
1363
|
+
requiresAttestation?: string[];
|
|
1364
|
+
};
|
|
1365
|
+
}, {
|
|
1366
|
+
name?: string;
|
|
1367
|
+
ruleId?: string;
|
|
1368
|
+
action?: "ALLOW" | "DENY" | "ESCALATE";
|
|
1369
|
+
reason?: string;
|
|
1370
|
+
priority?: number;
|
|
1371
|
+
condition?: {
|
|
1372
|
+
roles?: AgentRole[];
|
|
1373
|
+
tiers?: TrustTier[];
|
|
1374
|
+
contextTypes?: ContextType[];
|
|
1375
|
+
domains?: string[];
|
|
1376
|
+
timeWindow?: {
|
|
1377
|
+
start?: string;
|
|
1378
|
+
end?: string;
|
|
1379
|
+
};
|
|
1380
|
+
requiresAttestation?: string[];
|
|
1381
|
+
};
|
|
1382
|
+
}>, "many">;
|
|
1383
|
+
effectiveFrom: z.ZodDate;
|
|
1384
|
+
effectiveUntil: z.ZodOptional<z.ZodDate>;
|
|
1385
|
+
createdAt: z.ZodDate;
|
|
1386
|
+
createdBy: z.ZodString;
|
|
1387
|
+
policyHash: z.ZodString;
|
|
1388
|
+
}, "strip", z.ZodTypeAny, {
|
|
1389
|
+
version?: number;
|
|
1390
|
+
rules?: {
|
|
1391
|
+
name?: string;
|
|
1392
|
+
ruleId?: string;
|
|
1393
|
+
action?: "ALLOW" | "DENY" | "ESCALATE";
|
|
1394
|
+
reason?: string;
|
|
1395
|
+
priority?: number;
|
|
1396
|
+
condition?: {
|
|
1397
|
+
roles?: AgentRole[];
|
|
1398
|
+
tiers?: TrustTier[];
|
|
1399
|
+
contextTypes?: ContextType[];
|
|
1400
|
+
domains?: string[];
|
|
1401
|
+
timeWindow?: {
|
|
1402
|
+
start?: string;
|
|
1403
|
+
end?: string;
|
|
1404
|
+
};
|
|
1405
|
+
requiresAttestation?: string[];
|
|
1406
|
+
};
|
|
1407
|
+
}[];
|
|
1408
|
+
createdAt?: Date;
|
|
1409
|
+
createdBy?: string;
|
|
1410
|
+
policyId?: string;
|
|
1411
|
+
effectiveFrom?: Date;
|
|
1412
|
+
effectiveUntil?: Date;
|
|
1413
|
+
policyHash?: string;
|
|
1414
|
+
}, {
|
|
1415
|
+
version?: number;
|
|
1416
|
+
rules?: {
|
|
1417
|
+
name?: string;
|
|
1418
|
+
ruleId?: string;
|
|
1419
|
+
action?: "ALLOW" | "DENY" | "ESCALATE";
|
|
1420
|
+
reason?: string;
|
|
1421
|
+
priority?: number;
|
|
1422
|
+
condition?: {
|
|
1423
|
+
roles?: AgentRole[];
|
|
1424
|
+
tiers?: TrustTier[];
|
|
1425
|
+
contextTypes?: ContextType[];
|
|
1426
|
+
domains?: string[];
|
|
1427
|
+
timeWindow?: {
|
|
1428
|
+
start?: string;
|
|
1429
|
+
end?: string;
|
|
1430
|
+
};
|
|
1431
|
+
requiresAttestation?: string[];
|
|
1432
|
+
};
|
|
1433
|
+
}[];
|
|
1434
|
+
createdAt?: Date;
|
|
1435
|
+
createdBy?: string;
|
|
1436
|
+
policyId?: string;
|
|
1437
|
+
effectiveFrom?: Date;
|
|
1438
|
+
effectiveUntil?: Date;
|
|
1439
|
+
policyHash?: string;
|
|
1440
|
+
}>;
|
|
1441
|
+
/**
|
|
1442
|
+
* Role gate evaluation result (3-layer)
|
|
1443
|
+
*/
|
|
1444
|
+
export interface RoleGateEvaluation {
|
|
1445
|
+
readonly evaluationId: string;
|
|
1446
|
+
readonly agentId: string;
|
|
1447
|
+
readonly role: AgentRole;
|
|
1448
|
+
readonly tier: TrustTier;
|
|
1449
|
+
readonly timestamp: Date;
|
|
1450
|
+
readonly kernelResult: {
|
|
1451
|
+
readonly valid: boolean;
|
|
1452
|
+
readonly matrixAllows: boolean;
|
|
1453
|
+
readonly reason?: string;
|
|
1454
|
+
};
|
|
1455
|
+
readonly policyResult: {
|
|
1456
|
+
readonly valid: boolean;
|
|
1457
|
+
readonly appliedRuleId?: string;
|
|
1458
|
+
readonly appliedPolicyVersion?: number;
|
|
1459
|
+
readonly action: 'ALLOW' | 'DENY' | 'ESCALATE';
|
|
1460
|
+
readonly reason: string;
|
|
1461
|
+
};
|
|
1462
|
+
readonly basisResult: {
|
|
1463
|
+
readonly valid: boolean;
|
|
1464
|
+
readonly requiresOverride: boolean;
|
|
1465
|
+
readonly overrideSignatures?: readonly string[];
|
|
1466
|
+
readonly contextConstraintsMet: boolean;
|
|
1467
|
+
readonly reason?: string;
|
|
1468
|
+
};
|
|
1469
|
+
readonly decision: 'ALLOW' | 'DENY' | 'ESCALATE';
|
|
1470
|
+
readonly decidedAt: Date;
|
|
1471
|
+
readonly evaluationHash: string;
|
|
1472
|
+
}
|
|
1473
|
+
export declare const roleGateEvaluationSchema: z.ZodObject<{
|
|
1474
|
+
evaluationId: z.ZodString;
|
|
1475
|
+
agentId: z.ZodString;
|
|
1476
|
+
role: z.ZodNativeEnum<typeof AgentRole>;
|
|
1477
|
+
tier: z.ZodNativeEnum<typeof TrustTier>;
|
|
1478
|
+
timestamp: z.ZodDate;
|
|
1479
|
+
kernelResult: z.ZodObject<{
|
|
1480
|
+
valid: z.ZodBoolean;
|
|
1481
|
+
matrixAllows: z.ZodBoolean;
|
|
1482
|
+
reason: z.ZodOptional<z.ZodString>;
|
|
1483
|
+
}, "strip", z.ZodTypeAny, {
|
|
1484
|
+
reason?: string;
|
|
1485
|
+
valid?: boolean;
|
|
1486
|
+
matrixAllows?: boolean;
|
|
1487
|
+
}, {
|
|
1488
|
+
reason?: string;
|
|
1489
|
+
valid?: boolean;
|
|
1490
|
+
matrixAllows?: boolean;
|
|
1491
|
+
}>;
|
|
1492
|
+
policyResult: z.ZodObject<{
|
|
1493
|
+
valid: z.ZodBoolean;
|
|
1494
|
+
appliedRuleId: z.ZodOptional<z.ZodString>;
|
|
1495
|
+
appliedPolicyVersion: z.ZodOptional<z.ZodNumber>;
|
|
1496
|
+
action: z.ZodEnum<["ALLOW", "DENY", "ESCALATE"]>;
|
|
1497
|
+
reason: z.ZodString;
|
|
1498
|
+
}, "strip", z.ZodTypeAny, {
|
|
1499
|
+
action?: "ALLOW" | "DENY" | "ESCALATE";
|
|
1500
|
+
reason?: string;
|
|
1501
|
+
valid?: boolean;
|
|
1502
|
+
appliedRuleId?: string;
|
|
1503
|
+
appliedPolicyVersion?: number;
|
|
1504
|
+
}, {
|
|
1505
|
+
action?: "ALLOW" | "DENY" | "ESCALATE";
|
|
1506
|
+
reason?: string;
|
|
1507
|
+
valid?: boolean;
|
|
1508
|
+
appliedRuleId?: string;
|
|
1509
|
+
appliedPolicyVersion?: number;
|
|
1510
|
+
}>;
|
|
1511
|
+
basisResult: z.ZodObject<{
|
|
1512
|
+
valid: z.ZodBoolean;
|
|
1513
|
+
requiresOverride: z.ZodBoolean;
|
|
1514
|
+
overrideSignatures: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
1515
|
+
contextConstraintsMet: z.ZodBoolean;
|
|
1516
|
+
reason: z.ZodOptional<z.ZodString>;
|
|
1517
|
+
}, "strip", z.ZodTypeAny, {
|
|
1518
|
+
reason?: string;
|
|
1519
|
+
valid?: boolean;
|
|
1520
|
+
requiresOverride?: boolean;
|
|
1521
|
+
overrideSignatures?: string[];
|
|
1522
|
+
contextConstraintsMet?: boolean;
|
|
1523
|
+
}, {
|
|
1524
|
+
reason?: string;
|
|
1525
|
+
valid?: boolean;
|
|
1526
|
+
requiresOverride?: boolean;
|
|
1527
|
+
overrideSignatures?: string[];
|
|
1528
|
+
contextConstraintsMet?: boolean;
|
|
1529
|
+
}>;
|
|
1530
|
+
decision: z.ZodEnum<["ALLOW", "DENY", "ESCALATE"]>;
|
|
1531
|
+
decidedAt: z.ZodDate;
|
|
1532
|
+
evaluationHash: z.ZodString;
|
|
1533
|
+
}, "strip", z.ZodTypeAny, {
|
|
1534
|
+
timestamp?: Date;
|
|
1535
|
+
tier?: TrustTier;
|
|
1536
|
+
decision?: "ALLOW" | "DENY" | "ESCALATE";
|
|
1537
|
+
decidedAt?: Date;
|
|
1538
|
+
agentId?: string;
|
|
1539
|
+
role?: AgentRole;
|
|
1540
|
+
evaluationId?: string;
|
|
1541
|
+
evaluationHash?: string;
|
|
1542
|
+
kernelResult?: {
|
|
1543
|
+
reason?: string;
|
|
1544
|
+
valid?: boolean;
|
|
1545
|
+
matrixAllows?: boolean;
|
|
1546
|
+
};
|
|
1547
|
+
policyResult?: {
|
|
1548
|
+
action?: "ALLOW" | "DENY" | "ESCALATE";
|
|
1549
|
+
reason?: string;
|
|
1550
|
+
valid?: boolean;
|
|
1551
|
+
appliedRuleId?: string;
|
|
1552
|
+
appliedPolicyVersion?: number;
|
|
1553
|
+
};
|
|
1554
|
+
basisResult?: {
|
|
1555
|
+
reason?: string;
|
|
1556
|
+
valid?: boolean;
|
|
1557
|
+
requiresOverride?: boolean;
|
|
1558
|
+
overrideSignatures?: string[];
|
|
1559
|
+
contextConstraintsMet?: boolean;
|
|
1560
|
+
};
|
|
1561
|
+
}, {
|
|
1562
|
+
timestamp?: Date;
|
|
1563
|
+
tier?: TrustTier;
|
|
1564
|
+
decision?: "ALLOW" | "DENY" | "ESCALATE";
|
|
1565
|
+
decidedAt?: Date;
|
|
1566
|
+
agentId?: string;
|
|
1567
|
+
role?: AgentRole;
|
|
1568
|
+
evaluationId?: string;
|
|
1569
|
+
evaluationHash?: string;
|
|
1570
|
+
kernelResult?: {
|
|
1571
|
+
reason?: string;
|
|
1572
|
+
valid?: boolean;
|
|
1573
|
+
matrixAllows?: boolean;
|
|
1574
|
+
};
|
|
1575
|
+
policyResult?: {
|
|
1576
|
+
action?: "ALLOW" | "DENY" | "ESCALATE";
|
|
1577
|
+
reason?: string;
|
|
1578
|
+
valid?: boolean;
|
|
1579
|
+
appliedRuleId?: string;
|
|
1580
|
+
appliedPolicyVersion?: number;
|
|
1581
|
+
};
|
|
1582
|
+
basisResult?: {
|
|
1583
|
+
reason?: string;
|
|
1584
|
+
valid?: boolean;
|
|
1585
|
+
requiresOverride?: boolean;
|
|
1586
|
+
overrideSignatures?: string[];
|
|
1587
|
+
contextConstraintsMet?: boolean;
|
|
1588
|
+
};
|
|
1589
|
+
}>;
|
|
1590
|
+
/**
|
|
1591
|
+
* Trust score computation configuration
|
|
1592
|
+
*/
|
|
1593
|
+
export interface TrustScoreConfig {
|
|
1594
|
+
readonly agentContext: AgentContext;
|
|
1595
|
+
readonly provenance: AgentProvenance;
|
|
1596
|
+
readonly preset: TrustPreset;
|
|
1597
|
+
readonly role: AgentRole;
|
|
1598
|
+
}
|
|
1599
|
+
/**
|
|
1600
|
+
* Trust metrics input
|
|
1601
|
+
*/
|
|
1602
|
+
export interface TrustMetrics {
|
|
1603
|
+
readonly observability: number;
|
|
1604
|
+
readonly capability: number;
|
|
1605
|
+
readonly behavior: number;
|
|
1606
|
+
readonly governance: number;
|
|
1607
|
+
readonly context: number;
|
|
1608
|
+
}
|
|
1609
|
+
export declare const trustMetricsSchema: z.ZodObject<{
|
|
1610
|
+
observability: z.ZodNumber;
|
|
1611
|
+
capability: z.ZodNumber;
|
|
1612
|
+
behavior: z.ZodNumber;
|
|
1613
|
+
governance: z.ZodNumber;
|
|
1614
|
+
context: z.ZodNumber;
|
|
1615
|
+
}, "strip", z.ZodTypeAny, {
|
|
1616
|
+
context?: number;
|
|
1617
|
+
governance?: number;
|
|
1618
|
+
capability?: number;
|
|
1619
|
+
observability?: number;
|
|
1620
|
+
behavior?: number;
|
|
1621
|
+
}, {
|
|
1622
|
+
context?: number;
|
|
1623
|
+
governance?: number;
|
|
1624
|
+
capability?: number;
|
|
1625
|
+
observability?: number;
|
|
1626
|
+
behavior?: number;
|
|
1627
|
+
}>;
|
|
1628
|
+
/**
|
|
1629
|
+
* Complete trust computation result
|
|
1630
|
+
*/
|
|
1631
|
+
export interface TrustComputationResult {
|
|
1632
|
+
readonly agentId: string;
|
|
1633
|
+
readonly computedAt: Date;
|
|
1634
|
+
readonly rawScore: number;
|
|
1635
|
+
readonly finalScore: number;
|
|
1636
|
+
readonly effectiveTier: TrustTier;
|
|
1637
|
+
readonly ceilingApplied: boolean;
|
|
1638
|
+
readonly ceilingValue: number;
|
|
1639
|
+
readonly ceilingSource: CeilingSource;
|
|
1640
|
+
readonly creationModifier: number;
|
|
1641
|
+
readonly modifierPolicyVersion: number;
|
|
1642
|
+
readonly weightsUsed: TrustWeights;
|
|
1643
|
+
readonly presetId: string;
|
|
1644
|
+
readonly presetLineage: PresetLineage;
|
|
1645
|
+
readonly contextValid: boolean;
|
|
1646
|
+
readonly roleGateValid: boolean;
|
|
1647
|
+
readonly overallValid: boolean;
|
|
1648
|
+
readonly computationHash: string;
|
|
1649
|
+
readonly auditTrail: readonly string[];
|
|
1650
|
+
}
|
|
1651
|
+
export declare const trustComputationResultSchema: z.ZodObject<{
|
|
1652
|
+
agentId: z.ZodString;
|
|
1653
|
+
computedAt: z.ZodDate;
|
|
1654
|
+
rawScore: z.ZodNumber;
|
|
1655
|
+
finalScore: z.ZodNumber;
|
|
1656
|
+
effectiveTier: z.ZodNativeEnum<typeof TrustTier>;
|
|
1657
|
+
ceilingApplied: z.ZodBoolean;
|
|
1658
|
+
ceilingValue: z.ZodNumber;
|
|
1659
|
+
ceilingSource: z.ZodObject<{
|
|
1660
|
+
type: z.ZodEnum<["context", "organizational", "deployment", "attestation"]>;
|
|
1661
|
+
value: z.ZodNumber;
|
|
1662
|
+
constraint: z.ZodString;
|
|
1663
|
+
}, "strip", z.ZodTypeAny, {
|
|
1664
|
+
value?: number;
|
|
1665
|
+
type?: "context" | "deployment" | "organizational" | "attestation";
|
|
1666
|
+
constraint?: string;
|
|
1667
|
+
}, {
|
|
1668
|
+
value?: number;
|
|
1669
|
+
type?: "context" | "deployment" | "organizational" | "attestation";
|
|
1670
|
+
constraint?: string;
|
|
1671
|
+
}>;
|
|
1672
|
+
creationModifier: z.ZodNumber;
|
|
1673
|
+
modifierPolicyVersion: z.ZodNumber;
|
|
1674
|
+
weightsUsed: z.ZodEffects<z.ZodObject<{
|
|
1675
|
+
observability: z.ZodNumber;
|
|
1676
|
+
capability: z.ZodNumber;
|
|
1677
|
+
behavior: z.ZodNumber;
|
|
1678
|
+
governance: z.ZodNumber;
|
|
1679
|
+
context: z.ZodNumber;
|
|
1680
|
+
}, "strip", z.ZodTypeAny, {
|
|
1681
|
+
context?: number;
|
|
1682
|
+
governance?: number;
|
|
1683
|
+
capability?: number;
|
|
1684
|
+
observability?: number;
|
|
1685
|
+
behavior?: number;
|
|
1686
|
+
}, {
|
|
1687
|
+
context?: number;
|
|
1688
|
+
governance?: number;
|
|
1689
|
+
capability?: number;
|
|
1690
|
+
observability?: number;
|
|
1691
|
+
behavior?: number;
|
|
1692
|
+
}>, {
|
|
1693
|
+
context?: number;
|
|
1694
|
+
governance?: number;
|
|
1695
|
+
capability?: number;
|
|
1696
|
+
observability?: number;
|
|
1697
|
+
behavior?: number;
|
|
1698
|
+
}, {
|
|
1699
|
+
context?: number;
|
|
1700
|
+
governance?: number;
|
|
1701
|
+
capability?: number;
|
|
1702
|
+
observability?: number;
|
|
1703
|
+
behavior?: number;
|
|
1704
|
+
}>;
|
|
1705
|
+
presetId: z.ZodString;
|
|
1706
|
+
presetLineage: z.ZodObject<{
|
|
1707
|
+
leafPresetId: z.ZodString;
|
|
1708
|
+
chain: z.ZodArray<z.ZodString, "many">;
|
|
1709
|
+
hashes: z.ZodArray<z.ZodString, "many">;
|
|
1710
|
+
verified: z.ZodBoolean;
|
|
1711
|
+
verifiedAt: z.ZodOptional<z.ZodDate>;
|
|
1712
|
+
verifiedBy: z.ZodOptional<z.ZodString>;
|
|
1713
|
+
}, "strip", z.ZodTypeAny, {
|
|
1714
|
+
verifiedAt?: Date;
|
|
1715
|
+
chain?: string[];
|
|
1716
|
+
leafPresetId?: string;
|
|
1717
|
+
hashes?: string[];
|
|
1718
|
+
verified?: boolean;
|
|
1719
|
+
verifiedBy?: string;
|
|
1720
|
+
}, {
|
|
1721
|
+
verifiedAt?: Date;
|
|
1722
|
+
chain?: string[];
|
|
1723
|
+
leafPresetId?: string;
|
|
1724
|
+
hashes?: string[];
|
|
1725
|
+
verified?: boolean;
|
|
1726
|
+
verifiedBy?: string;
|
|
1727
|
+
}>;
|
|
1728
|
+
contextValid: z.ZodBoolean;
|
|
1729
|
+
roleGateValid: z.ZodBoolean;
|
|
1730
|
+
overallValid: z.ZodBoolean;
|
|
1731
|
+
computationHash: z.ZodString;
|
|
1732
|
+
auditTrail: z.ZodArray<z.ZodString, "many">;
|
|
1733
|
+
}, "strip", z.ZodTypeAny, {
|
|
1734
|
+
agentId?: string;
|
|
1735
|
+
finalScore?: number;
|
|
1736
|
+
presetId?: string;
|
|
1737
|
+
rawScore?: number;
|
|
1738
|
+
ceilingApplied?: boolean;
|
|
1739
|
+
ceilingSource?: {
|
|
1740
|
+
value?: number;
|
|
1741
|
+
type?: "context" | "deployment" | "organizational" | "attestation";
|
|
1742
|
+
constraint?: string;
|
|
1743
|
+
};
|
|
1744
|
+
effectiveTier?: TrustTier;
|
|
1745
|
+
computedAt?: Date;
|
|
1746
|
+
ceilingValue?: number;
|
|
1747
|
+
creationModifier?: number;
|
|
1748
|
+
modifierPolicyVersion?: number;
|
|
1749
|
+
weightsUsed?: {
|
|
1750
|
+
context?: number;
|
|
1751
|
+
governance?: number;
|
|
1752
|
+
capability?: number;
|
|
1753
|
+
observability?: number;
|
|
1754
|
+
behavior?: number;
|
|
1755
|
+
};
|
|
1756
|
+
presetLineage?: {
|
|
1757
|
+
verifiedAt?: Date;
|
|
1758
|
+
chain?: string[];
|
|
1759
|
+
leafPresetId?: string;
|
|
1760
|
+
hashes?: string[];
|
|
1761
|
+
verified?: boolean;
|
|
1762
|
+
verifiedBy?: string;
|
|
1763
|
+
};
|
|
1764
|
+
contextValid?: boolean;
|
|
1765
|
+
roleGateValid?: boolean;
|
|
1766
|
+
overallValid?: boolean;
|
|
1767
|
+
computationHash?: string;
|
|
1768
|
+
auditTrail?: string[];
|
|
1769
|
+
}, {
|
|
1770
|
+
agentId?: string;
|
|
1771
|
+
finalScore?: number;
|
|
1772
|
+
presetId?: string;
|
|
1773
|
+
rawScore?: number;
|
|
1774
|
+
ceilingApplied?: boolean;
|
|
1775
|
+
ceilingSource?: {
|
|
1776
|
+
value?: number;
|
|
1777
|
+
type?: "context" | "deployment" | "organizational" | "attestation";
|
|
1778
|
+
constraint?: string;
|
|
1779
|
+
};
|
|
1780
|
+
effectiveTier?: TrustTier;
|
|
1781
|
+
computedAt?: Date;
|
|
1782
|
+
ceilingValue?: number;
|
|
1783
|
+
creationModifier?: number;
|
|
1784
|
+
modifierPolicyVersion?: number;
|
|
1785
|
+
weightsUsed?: {
|
|
1786
|
+
context?: number;
|
|
1787
|
+
governance?: number;
|
|
1788
|
+
capability?: number;
|
|
1789
|
+
observability?: number;
|
|
1790
|
+
behavior?: number;
|
|
1791
|
+
};
|
|
1792
|
+
presetLineage?: {
|
|
1793
|
+
verifiedAt?: Date;
|
|
1794
|
+
chain?: string[];
|
|
1795
|
+
leafPresetId?: string;
|
|
1796
|
+
hashes?: string[];
|
|
1797
|
+
verified?: boolean;
|
|
1798
|
+
verifiedBy?: string;
|
|
1799
|
+
};
|
|
1800
|
+
contextValid?: boolean;
|
|
1801
|
+
roleGateValid?: boolean;
|
|
1802
|
+
overallValid?: boolean;
|
|
1803
|
+
computationHash?: string;
|
|
1804
|
+
auditTrail?: string[];
|
|
1805
|
+
}>;
|
|
1806
|
+
export declare const BASIS_CANONICAL_PRESETS: Record<string, TrustPreset>;
|
|
1807
|
+
/** @deprecated Use BASIS_CANONICAL_PRESETS instead */
|
|
1808
|
+
export declare const ACI_CANONICAL_PRESETS: Record<string, TrustPreset>;
|
|
1809
|
+
/**
|
|
1810
|
+
* Get trust tier from score
|
|
1811
|
+
*/
|
|
1812
|
+
export declare function getTierFromScore(score: number): TrustTier;
|
|
1813
|
+
/**
|
|
1814
|
+
* Get ceiling for context type
|
|
1815
|
+
*/
|
|
1816
|
+
export declare function getCeilingForContext(contextType: ContextType): number;
|
|
1817
|
+
/**
|
|
1818
|
+
* Validate role+tier combination against kernel matrix
|
|
1819
|
+
*/
|
|
1820
|
+
export declare function validateRoleGateKernel(role: AgentRole, tier: TrustTier): boolean;
|
|
1821
|
+
/**
|
|
1822
|
+
* Clamp score to ceiling
|
|
1823
|
+
*/
|
|
1824
|
+
export declare function clampToCeiling(score: number, ceiling: number): number;
|
|
1825
|
+
/**
|
|
1826
|
+
* Generate SHA-256 hash (placeholder - use crypto in implementation)
|
|
1827
|
+
*/
|
|
1828
|
+
export declare function generateHash(data: string): string;
|
|
1829
|
+
//# sourceMappingURL=types.d.ts.map
|