@vorionsys/atsf-core 0.3.1 → 0.4.1
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/basis/parser.d.ts +46 -46
- package/dist/common/config.d.ts +2 -2
- package/dist/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -1
- package/dist/index.js.map +1 -1
- package/dist/paramesphere/paramesphere-engine.d.ts +27 -1
- package/dist/paramesphere/paramesphere-engine.d.ts.map +1 -1
- package/dist/paramesphere/paramesphere-engine.js +82 -1
- package/dist/paramesphere/paramesphere-engine.js.map +1 -1
- package/dist/phase6/provenance.d.ts +2 -2
- package/dist/phase6/provenance.js +2 -2
- package/dist/phase6/types.d.ts +168 -168
- package/dist/trust-engine/index.d.ts +31 -2
- package/dist/trust-engine/index.d.ts.map +1 -1
- package/dist/trust-engine/index.js +74 -4
- package/dist/trust-engine/index.js.map +1 -1
- package/dist/trust-engine/scheduled-verifier.d.ts +127 -0
- package/dist/trust-engine/scheduled-verifier.d.ts.map +1 -0
- package/dist/trust-engine/scheduled-verifier.js +257 -0
- package/dist/trust-engine/scheduled-verifier.js.map +1 -0
- package/package.json +140 -140
|
@@ -0,0 +1,257 @@
|
|
|
1
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
2
|
+
// Copyright 2024-2026 Vorion LLC
|
|
3
|
+
/**
|
|
4
|
+
* Scheduled Trust Integrity Verifier
|
|
5
|
+
*
|
|
6
|
+
* Runs periodic integrity checks on all tracked agents' trust scores by
|
|
7
|
+
* verifying their cryptographic commitment chains. Alerts on any divergence.
|
|
8
|
+
*
|
|
9
|
+
* Frequency scales by trust tier:
|
|
10
|
+
* T5-T7: every hour (high-trust agents are high-value targets)
|
|
11
|
+
* T2-T4: every 4 hours
|
|
12
|
+
* T0-T1: every 24 hours (low trust, low blast radius)
|
|
13
|
+
*
|
|
14
|
+
* @packageDocumentation
|
|
15
|
+
*/
|
|
16
|
+
import { EventEmitter } from 'node:events';
|
|
17
|
+
export const DEFAULT_SCHEDULED_VERIFIER_CONFIG = {
|
|
18
|
+
highTrustIntervalMs: 3_600_000, // 1 hour
|
|
19
|
+
mediumTrustIntervalMs: 14_400_000, // 4 hours
|
|
20
|
+
lowTrustIntervalMs: 86_400_000, // 24 hours
|
|
21
|
+
tickIntervalMs: 60_000, // 1 minute
|
|
22
|
+
emitEvents: true,
|
|
23
|
+
};
|
|
24
|
+
// ---------------------------------------------------------------------------
|
|
25
|
+
// ScheduledVerifier
|
|
26
|
+
// ---------------------------------------------------------------------------
|
|
27
|
+
export class ScheduledVerifier extends EventEmitter {
|
|
28
|
+
verifier;
|
|
29
|
+
config;
|
|
30
|
+
/** When each agent was last verified (agentId → timestamp) */
|
|
31
|
+
lastVerified = new Map();
|
|
32
|
+
/** Audit trail of verification results */
|
|
33
|
+
auditLog = [];
|
|
34
|
+
/** Maximum audit entries to retain in memory */
|
|
35
|
+
maxAuditEntries = 10_000;
|
|
36
|
+
/** Tick timer handle */
|
|
37
|
+
tickTimer = null;
|
|
38
|
+
/** Current registered agents and their trust state */
|
|
39
|
+
agents = new Map();
|
|
40
|
+
/** Running flag */
|
|
41
|
+
running = false;
|
|
42
|
+
constructor(verifier, config) {
|
|
43
|
+
super();
|
|
44
|
+
this.verifier = verifier;
|
|
45
|
+
this.config = { ...DEFAULT_SCHEDULED_VERIFIER_CONFIG, ...config };
|
|
46
|
+
}
|
|
47
|
+
// -----------------------------------------------------------------------
|
|
48
|
+
// Agent registration
|
|
49
|
+
// -----------------------------------------------------------------------
|
|
50
|
+
/**
|
|
51
|
+
* Register or update an agent's trust state for scheduled verification.
|
|
52
|
+
*/
|
|
53
|
+
registerAgent(agentId, score, tier) {
|
|
54
|
+
this.agents.set(agentId, { agentId, score, tier });
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Remove an agent from scheduled verification.
|
|
58
|
+
*/
|
|
59
|
+
unregisterAgent(agentId) {
|
|
60
|
+
this.agents.delete(agentId);
|
|
61
|
+
this.lastVerified.delete(agentId);
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Update an agent's trust state (called after score changes).
|
|
65
|
+
*/
|
|
66
|
+
updateAgentState(agentId, score, tier) {
|
|
67
|
+
const existing = this.agents.get(agentId);
|
|
68
|
+
if (existing) {
|
|
69
|
+
existing.score = score;
|
|
70
|
+
existing.tier = tier;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
// -----------------------------------------------------------------------
|
|
74
|
+
// Scheduling
|
|
75
|
+
// -----------------------------------------------------------------------
|
|
76
|
+
/**
|
|
77
|
+
* Start the periodic verification scheduler.
|
|
78
|
+
*/
|
|
79
|
+
start() {
|
|
80
|
+
if (this.running)
|
|
81
|
+
return;
|
|
82
|
+
this.running = true;
|
|
83
|
+
this.tickTimer = setInterval(() => this.tick(), this.config.tickIntervalMs);
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* Stop the scheduler.
|
|
87
|
+
*/
|
|
88
|
+
stop() {
|
|
89
|
+
this.running = false;
|
|
90
|
+
if (this.tickTimer) {
|
|
91
|
+
clearInterval(this.tickTimer);
|
|
92
|
+
this.tickTimer = null;
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
* Check if the scheduler is running.
|
|
97
|
+
*/
|
|
98
|
+
isRunning() {
|
|
99
|
+
return this.running;
|
|
100
|
+
}
|
|
101
|
+
// -----------------------------------------------------------------------
|
|
102
|
+
// Core verification loop
|
|
103
|
+
// -----------------------------------------------------------------------
|
|
104
|
+
/**
|
|
105
|
+
* Single tick: check which agents are due for verification and run them.
|
|
106
|
+
* Can also be called manually for on-demand checks.
|
|
107
|
+
*/
|
|
108
|
+
tick() {
|
|
109
|
+
const now = Date.now();
|
|
110
|
+
const due = [];
|
|
111
|
+
for (const agent of this.agents.values()) {
|
|
112
|
+
const interval = this.getIntervalForTier(agent.tier);
|
|
113
|
+
const lastChecked = this.lastVerified.get(agent.agentId) ?? 0;
|
|
114
|
+
if (now - lastChecked >= interval) {
|
|
115
|
+
due.push(agent);
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
if (due.length === 0)
|
|
119
|
+
return [];
|
|
120
|
+
const entries = [];
|
|
121
|
+
let failedCount = 0;
|
|
122
|
+
for (const agent of due) {
|
|
123
|
+
const result = this.verifier.verifyAgent(agent.agentId, agent.score, agent.tier);
|
|
124
|
+
this.lastVerified.set(agent.agentId, now);
|
|
125
|
+
const entry = {
|
|
126
|
+
agentId: agent.agentId,
|
|
127
|
+
verified: result.verified,
|
|
128
|
+
divergence: result.divergence,
|
|
129
|
+
commitmentChainValid: result.commitmentChainValid,
|
|
130
|
+
checkpointsVerified: result.checkpointsVerified,
|
|
131
|
+
issues: result.issues,
|
|
132
|
+
verifiedAt: now,
|
|
133
|
+
};
|
|
134
|
+
entries.push(entry);
|
|
135
|
+
this.appendAudit(entry);
|
|
136
|
+
if (!result.verified) {
|
|
137
|
+
failedCount++;
|
|
138
|
+
if (this.config.emitEvents) {
|
|
139
|
+
// Determine if this is an integrity violation (score tampering) vs chain break
|
|
140
|
+
const isIntegrityViolation = result.issues.some(i => i.includes('INTEGRITY_VIOLATION'));
|
|
141
|
+
this.emit(isIntegrityViolation ? 'verification:integrity_violation' : 'verification:failed', {
|
|
142
|
+
type: isIntegrityViolation ? 'verification:integrity_violation' : 'verification:failed',
|
|
143
|
+
agentId: agent.agentId,
|
|
144
|
+
result,
|
|
145
|
+
timestamp: now,
|
|
146
|
+
});
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
else if (this.config.emitEvents) {
|
|
150
|
+
this.emit('verification:passed', {
|
|
151
|
+
type: 'verification:passed',
|
|
152
|
+
agentId: agent.agentId,
|
|
153
|
+
result,
|
|
154
|
+
timestamp: now,
|
|
155
|
+
});
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
// Emit cycle-complete summary
|
|
159
|
+
if (this.config.emitEvents && entries.length > 0) {
|
|
160
|
+
this.emit('verification:cycle_complete', {
|
|
161
|
+
type: 'verification:cycle_complete',
|
|
162
|
+
agentsChecked: entries.length,
|
|
163
|
+
failedCount,
|
|
164
|
+
timestamp: now,
|
|
165
|
+
});
|
|
166
|
+
}
|
|
167
|
+
return entries;
|
|
168
|
+
}
|
|
169
|
+
// -----------------------------------------------------------------------
|
|
170
|
+
// Immediate verification
|
|
171
|
+
// -----------------------------------------------------------------------
|
|
172
|
+
/**
|
|
173
|
+
* Verify a specific agent immediately, regardless of schedule.
|
|
174
|
+
*/
|
|
175
|
+
verifyNow(agentId) {
|
|
176
|
+
const agent = this.agents.get(agentId);
|
|
177
|
+
if (!agent)
|
|
178
|
+
return null;
|
|
179
|
+
const result = this.verifier.verifyAgent(agentId, agent.score, agent.tier);
|
|
180
|
+
this.lastVerified.set(agentId, Date.now());
|
|
181
|
+
const entry = {
|
|
182
|
+
agentId,
|
|
183
|
+
verified: result.verified,
|
|
184
|
+
divergence: result.divergence,
|
|
185
|
+
commitmentChainValid: result.commitmentChainValid,
|
|
186
|
+
checkpointsVerified: result.checkpointsVerified,
|
|
187
|
+
issues: result.issues,
|
|
188
|
+
verifiedAt: Date.now(),
|
|
189
|
+
};
|
|
190
|
+
this.appendAudit(entry);
|
|
191
|
+
return result;
|
|
192
|
+
}
|
|
193
|
+
/**
|
|
194
|
+
* Verify all registered agents immediately.
|
|
195
|
+
*/
|
|
196
|
+
verifyAllNow() {
|
|
197
|
+
const results = new Map();
|
|
198
|
+
for (const agent of this.agents.values()) {
|
|
199
|
+
const result = this.verifier.verifyAgent(agent.agentId, agent.score, agent.tier);
|
|
200
|
+
results.set(agent.agentId, result);
|
|
201
|
+
this.lastVerified.set(agent.agentId, Date.now());
|
|
202
|
+
}
|
|
203
|
+
return results;
|
|
204
|
+
}
|
|
205
|
+
// -----------------------------------------------------------------------
|
|
206
|
+
// Audit log
|
|
207
|
+
// -----------------------------------------------------------------------
|
|
208
|
+
/**
|
|
209
|
+
* Get the audit trail of verification results.
|
|
210
|
+
* Optionally filter by agentId.
|
|
211
|
+
*/
|
|
212
|
+
getAuditLog(agentId) {
|
|
213
|
+
if (agentId) {
|
|
214
|
+
return this.auditLog.filter(e => e.agentId === agentId);
|
|
215
|
+
}
|
|
216
|
+
return [...this.auditLog];
|
|
217
|
+
}
|
|
218
|
+
/**
|
|
219
|
+
* Get failed verifications from the audit log.
|
|
220
|
+
*/
|
|
221
|
+
getFailedVerifications() {
|
|
222
|
+
return this.auditLog.filter(e => !e.verified);
|
|
223
|
+
}
|
|
224
|
+
/**
|
|
225
|
+
* Clear the audit log.
|
|
226
|
+
*/
|
|
227
|
+
clearAuditLog() {
|
|
228
|
+
this.auditLog = [];
|
|
229
|
+
}
|
|
230
|
+
// -----------------------------------------------------------------------
|
|
231
|
+
// Internals
|
|
232
|
+
// -----------------------------------------------------------------------
|
|
233
|
+
getIntervalForTier(tier) {
|
|
234
|
+
if (tier >= 5)
|
|
235
|
+
return this.config.highTrustIntervalMs;
|
|
236
|
+
if (tier >= 2)
|
|
237
|
+
return this.config.mediumTrustIntervalMs;
|
|
238
|
+
return this.config.lowTrustIntervalMs;
|
|
239
|
+
}
|
|
240
|
+
appendAudit(entry) {
|
|
241
|
+
this.auditLog.push(entry);
|
|
242
|
+
// Trim if over capacity
|
|
243
|
+
if (this.auditLog.length > this.maxAuditEntries) {
|
|
244
|
+
this.auditLog = this.auditLog.slice(-this.maxAuditEntries);
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
// ---------------------------------------------------------------------------
|
|
249
|
+
// Factory
|
|
250
|
+
// ---------------------------------------------------------------------------
|
|
251
|
+
/**
|
|
252
|
+
* Create a ScheduledVerifier with optional config overrides.
|
|
253
|
+
*/
|
|
254
|
+
export function createScheduledVerifier(verifier, config) {
|
|
255
|
+
return new ScheduledVerifier(verifier, config);
|
|
256
|
+
}
|
|
257
|
+
//# sourceMappingURL=scheduled-verifier.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
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AAiB,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;AACjD,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,140 +1,140 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@vorionsys/atsf-core",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "Agentic Trust Scoring Framework - Core runtime for AI agent governance, trust scoring (8-tier T0-T7 model), and policy enforcement",
|
|
5
|
-
"type": "module",
|
|
6
|
-
"main": "./dist/index.js",
|
|
7
|
-
"types": "./dist/index.d.ts",
|
|
8
|
-
"exports": {
|
|
9
|
-
".": {
|
|
10
|
-
"types": "./dist/index.d.ts",
|
|
11
|
-
"import": "./dist/index.js",
|
|
12
|
-
"default": "./dist/index.js"
|
|
13
|
-
},
|
|
14
|
-
"./trust-engine": {
|
|
15
|
-
"types": "./dist/trust-engine/index.d.ts",
|
|
16
|
-
"import": "./dist/trust-engine/index.js"
|
|
17
|
-
},
|
|
18
|
-
"./basis": {
|
|
19
|
-
"types": "./dist/basis/index.d.ts",
|
|
20
|
-
"import": "./dist/basis/index.js"
|
|
21
|
-
},
|
|
22
|
-
"./intent": {
|
|
23
|
-
"types": "./dist/intent/index.d.ts",
|
|
24
|
-
"import": "./dist/intent/index.js"
|
|
25
|
-
},
|
|
26
|
-
"./enforce": {
|
|
27
|
-
"types": "./dist/enforce/index.d.ts",
|
|
28
|
-
"import": "./dist/enforce/index.js"
|
|
29
|
-
},
|
|
30
|
-
"./proof": {
|
|
31
|
-
"types": "./dist/proof/index.d.ts",
|
|
32
|
-
"import": "./dist/proof/index.js"
|
|
33
|
-
},
|
|
34
|
-
"./chain": {
|
|
35
|
-
"types": "./dist/chain/index.d.ts",
|
|
36
|
-
"import": "./dist/chain/index.js"
|
|
37
|
-
},
|
|
38
|
-
"./cognigate": {
|
|
39
|
-
"types": "./dist/cognigate/index.d.ts",
|
|
40
|
-
"import": "./dist/cognigate/index.js"
|
|
41
|
-
},
|
|
42
|
-
"./types": {
|
|
43
|
-
"types": "./dist/common/types.d.ts",
|
|
44
|
-
"import": "./dist/common/types.js"
|
|
45
|
-
},
|
|
46
|
-
"./persistence": {
|
|
47
|
-
"types": "./dist/persistence/index.d.ts",
|
|
48
|
-
"import": "./dist/persistence/index.js"
|
|
49
|
-
},
|
|
50
|
-
"./langchain": {
|
|
51
|
-
"types": "./dist/langchain/index.d.ts",
|
|
52
|
-
"import": "./dist/langchain/index.js"
|
|
53
|
-
},
|
|
54
|
-
"./sandbox-training": {
|
|
55
|
-
"types": "./dist/sandbox-training/index.d.ts",
|
|
56
|
-
"import": "./dist/sandbox-training/index.js"
|
|
57
|
-
},
|
|
58
|
-
"./paramesphere": {
|
|
59
|
-
"types": "./dist/paramesphere/index.d.ts",
|
|
60
|
-
"import": "./dist/paramesphere/index.js"
|
|
61
|
-
}
|
|
62
|
-
},
|
|
63
|
-
"files": [
|
|
64
|
-
"dist",
|
|
65
|
-
"README.md",
|
|
66
|
-
"LICENSE",
|
|
67
|
-
"CHANGELOG.md"
|
|
68
|
-
],
|
|
69
|
-
"scripts": {
|
|
70
|
-
"build": "tsc",
|
|
71
|
-
"dev": "tsc --watch",
|
|
72
|
-
"test": "vitest run",
|
|
73
|
-
"test:watch": "vitest",
|
|
74
|
-
"typecheck": "tsc --noEmit",
|
|
75
|
-
"lint": "eslint src",
|
|
76
|
-
"clean": "rm -rf dist"
|
|
77
|
-
},
|
|
78
|
-
"dependencies": {
|
|
79
|
-
"@vorionsys/basis": "*",
|
|
80
|
-
"@vorionsys/contracts": "^0.2.0",
|
|
81
|
-
"@fastify/cors": "^10.0.0",
|
|
82
|
-
"@fastify/helmet": "^12.0.0",
|
|
83
|
-
"@fastify/rate-limit": "^10.0.0",
|
|
84
|
-
"fastify": "^5.0.0",
|
|
85
|
-
"pino": "^9.0.0",
|
|
86
|
-
"pino-pretty": "^11.0.0",
|
|
87
|
-
"zod": "^3.24.1"
|
|
88
|
-
},
|
|
89
|
-
"devDependencies": {
|
|
90
|
-
"@types/node": "^22.10.5",
|
|
91
|
-
"typescript": "^5.7.2",
|
|
92
|
-
"vitest": "^4.0.18"
|
|
93
|
-
},
|
|
94
|
-
"peerDependencies": {
|
|
95
|
-
"@langchain/core": ">=0.2.0",
|
|
96
|
-
"better-sqlite3": ">=9.0.0",
|
|
97
|
-
"typescript": "^5.0.0"
|
|
98
|
-
},
|
|
99
|
-
"peerDependenciesMeta": {
|
|
100
|
-
"@langchain/core": {
|
|
101
|
-
"optional": true
|
|
102
|
-
},
|
|
103
|
-
"better-sqlite3": {
|
|
104
|
-
"optional": true
|
|
105
|
-
}
|
|
106
|
-
},
|
|
107
|
-
"keywords": [
|
|
108
|
-
"ai",
|
|
109
|
-
"agent",
|
|
110
|
-
"trust",
|
|
111
|
-
"trust-scoring",
|
|
112
|
-
"governance",
|
|
113
|
-
"ai-governance",
|
|
114
|
-
"ai-safety",
|
|
115
|
-
"atsf",
|
|
116
|
-
"vorion",
|
|
117
|
-
"policy-enforcement",
|
|
118
|
-
"audit-trail",
|
|
119
|
-
"multi-agent",
|
|
120
|
-
"langchain",
|
|
121
|
-
"agentic"
|
|
122
|
-
],
|
|
123
|
-
"author": "Vorion <team@vorion.org>",
|
|
124
|
-
"license": "Apache-2.0",
|
|
125
|
-
"repository": {
|
|
126
|
-
"type": "git",
|
|
127
|
-
"url": "git+https://github.com/vorionsys/vorion.git",
|
|
128
|
-
"directory": "packages/atsf-core"
|
|
129
|
-
},
|
|
130
|
-
"homepage": "https://vorion.org",
|
|
131
|
-
"bugs": {
|
|
132
|
-
"url": "https://github.com/vorionsys/vorion/issues"
|
|
133
|
-
},
|
|
134
|
-
"engines": {
|
|
135
|
-
"node": ">=18.0.0"
|
|
136
|
-
},
|
|
137
|
-
"publishConfig": {
|
|
138
|
-
"access": "public"
|
|
139
|
-
}
|
|
140
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@vorionsys/atsf-core",
|
|
3
|
+
"version": "0.4.1",
|
|
4
|
+
"description": "Agentic Trust Scoring Framework - Core runtime for AI agent governance, trust scoring (8-tier T0-T7 model), and policy enforcement",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "./dist/index.js",
|
|
7
|
+
"types": "./dist/index.d.ts",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"types": "./dist/index.d.ts",
|
|
11
|
+
"import": "./dist/index.js",
|
|
12
|
+
"default": "./dist/index.js"
|
|
13
|
+
},
|
|
14
|
+
"./trust-engine": {
|
|
15
|
+
"types": "./dist/trust-engine/index.d.ts",
|
|
16
|
+
"import": "./dist/trust-engine/index.js"
|
|
17
|
+
},
|
|
18
|
+
"./basis": {
|
|
19
|
+
"types": "./dist/basis/index.d.ts",
|
|
20
|
+
"import": "./dist/basis/index.js"
|
|
21
|
+
},
|
|
22
|
+
"./intent": {
|
|
23
|
+
"types": "./dist/intent/index.d.ts",
|
|
24
|
+
"import": "./dist/intent/index.js"
|
|
25
|
+
},
|
|
26
|
+
"./enforce": {
|
|
27
|
+
"types": "./dist/enforce/index.d.ts",
|
|
28
|
+
"import": "./dist/enforce/index.js"
|
|
29
|
+
},
|
|
30
|
+
"./proof": {
|
|
31
|
+
"types": "./dist/proof/index.d.ts",
|
|
32
|
+
"import": "./dist/proof/index.js"
|
|
33
|
+
},
|
|
34
|
+
"./chain": {
|
|
35
|
+
"types": "./dist/chain/index.d.ts",
|
|
36
|
+
"import": "./dist/chain/index.js"
|
|
37
|
+
},
|
|
38
|
+
"./cognigate": {
|
|
39
|
+
"types": "./dist/cognigate/index.d.ts",
|
|
40
|
+
"import": "./dist/cognigate/index.js"
|
|
41
|
+
},
|
|
42
|
+
"./types": {
|
|
43
|
+
"types": "./dist/common/types.d.ts",
|
|
44
|
+
"import": "./dist/common/types.js"
|
|
45
|
+
},
|
|
46
|
+
"./persistence": {
|
|
47
|
+
"types": "./dist/persistence/index.d.ts",
|
|
48
|
+
"import": "./dist/persistence/index.js"
|
|
49
|
+
},
|
|
50
|
+
"./langchain": {
|
|
51
|
+
"types": "./dist/langchain/index.d.ts",
|
|
52
|
+
"import": "./dist/langchain/index.js"
|
|
53
|
+
},
|
|
54
|
+
"./sandbox-training": {
|
|
55
|
+
"types": "./dist/sandbox-training/index.d.ts",
|
|
56
|
+
"import": "./dist/sandbox-training/index.js"
|
|
57
|
+
},
|
|
58
|
+
"./paramesphere": {
|
|
59
|
+
"types": "./dist/paramesphere/index.d.ts",
|
|
60
|
+
"import": "./dist/paramesphere/index.js"
|
|
61
|
+
}
|
|
62
|
+
},
|
|
63
|
+
"files": [
|
|
64
|
+
"dist",
|
|
65
|
+
"README.md",
|
|
66
|
+
"LICENSE",
|
|
67
|
+
"CHANGELOG.md"
|
|
68
|
+
],
|
|
69
|
+
"scripts": {
|
|
70
|
+
"build": "tsc",
|
|
71
|
+
"dev": "tsc --watch",
|
|
72
|
+
"test": "vitest run",
|
|
73
|
+
"test:watch": "vitest",
|
|
74
|
+
"typecheck": "tsc --noEmit",
|
|
75
|
+
"lint": "eslint src",
|
|
76
|
+
"clean": "rm -rf dist"
|
|
77
|
+
},
|
|
78
|
+
"dependencies": {
|
|
79
|
+
"@vorionsys/basis": "*",
|
|
80
|
+
"@vorionsys/contracts": "^0.2.0",
|
|
81
|
+
"@fastify/cors": "^10.0.0",
|
|
82
|
+
"@fastify/helmet": "^12.0.0",
|
|
83
|
+
"@fastify/rate-limit": "^10.0.0",
|
|
84
|
+
"fastify": "^5.0.0",
|
|
85
|
+
"pino": "^9.0.0",
|
|
86
|
+
"pino-pretty": "^11.0.0",
|
|
87
|
+
"zod": "^3.24.1"
|
|
88
|
+
},
|
|
89
|
+
"devDependencies": {
|
|
90
|
+
"@types/node": "^22.10.5",
|
|
91
|
+
"typescript": "^5.7.2",
|
|
92
|
+
"vitest": "^4.0.18"
|
|
93
|
+
},
|
|
94
|
+
"peerDependencies": {
|
|
95
|
+
"@langchain/core": ">=0.2.0",
|
|
96
|
+
"better-sqlite3": ">=9.0.0",
|
|
97
|
+
"typescript": "^5.0.0"
|
|
98
|
+
},
|
|
99
|
+
"peerDependenciesMeta": {
|
|
100
|
+
"@langchain/core": {
|
|
101
|
+
"optional": true
|
|
102
|
+
},
|
|
103
|
+
"better-sqlite3": {
|
|
104
|
+
"optional": true
|
|
105
|
+
}
|
|
106
|
+
},
|
|
107
|
+
"keywords": [
|
|
108
|
+
"ai",
|
|
109
|
+
"agent",
|
|
110
|
+
"trust",
|
|
111
|
+
"trust-scoring",
|
|
112
|
+
"governance",
|
|
113
|
+
"ai-governance",
|
|
114
|
+
"ai-safety",
|
|
115
|
+
"atsf",
|
|
116
|
+
"vorion",
|
|
117
|
+
"policy-enforcement",
|
|
118
|
+
"audit-trail",
|
|
119
|
+
"multi-agent",
|
|
120
|
+
"langchain",
|
|
121
|
+
"agentic"
|
|
122
|
+
],
|
|
123
|
+
"author": "Vorion <team@vorion.org>",
|
|
124
|
+
"license": "Apache-2.0",
|
|
125
|
+
"repository": {
|
|
126
|
+
"type": "git",
|
|
127
|
+
"url": "git+https://github.com/vorionsys/vorion.git",
|
|
128
|
+
"directory": "packages/atsf-core"
|
|
129
|
+
},
|
|
130
|
+
"homepage": "https://vorion.org",
|
|
131
|
+
"bugs": {
|
|
132
|
+
"url": "https://github.com/vorionsys/vorion/issues"
|
|
133
|
+
},
|
|
134
|
+
"engines": {
|
|
135
|
+
"node": ">=18.0.0"
|
|
136
|
+
},
|
|
137
|
+
"publishConfig": {
|
|
138
|
+
"access": "public"
|
|
139
|
+
}
|
|
140
|
+
}
|