@vorionsys/atsf-core 0.2.2 → 0.2.4
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 +3 -3
- package/README.md +77 -11
- package/dist/api/server.d.ts +4 -1
- package/dist/api/server.d.ts.map +1 -1
- package/dist/api/server.js +3 -3
- package/dist/api/server.js.map +1 -1
- package/dist/basis/parser.d.ts +14 -14
- package/dist/common/adapters.d.ts +16 -9
- package/dist/common/adapters.d.ts.map +1 -1
- package/dist/common/adapters.js +69 -58
- package/dist/common/adapters.js.map +1 -1
- package/dist/common/config.d.ts +4 -3
- package/dist/common/config.d.ts.map +1 -1
- package/dist/common/config.js +2 -2
- package/dist/common/config.js.map +1 -1
- package/dist/common/types.d.ts +3 -3
- package/dist/crewai/callback.d.ts +91 -0
- package/dist/crewai/callback.d.ts.map +1 -0
- package/dist/crewai/callback.js +271 -0
- package/dist/crewai/callback.js.map +1 -0
- package/dist/crewai/executor.d.ts +226 -0
- package/dist/crewai/executor.d.ts.map +1 -0
- package/dist/crewai/executor.js +822 -0
- package/dist/crewai/executor.js.map +1 -0
- package/dist/crewai/index.d.ts +12 -0
- package/dist/crewai/index.d.ts.map +1 -0
- package/dist/crewai/index.js +12 -0
- package/dist/crewai/index.js.map +1 -0
- package/dist/crewai/tools.d.ts +21 -0
- package/dist/crewai/tools.d.ts.map +1 -0
- package/dist/crewai/tools.js +163 -0
- package/dist/crewai/tools.js.map +1 -0
- package/dist/crewai/types.d.ts +202 -0
- package/dist/crewai/types.d.ts.map +1 -0
- package/dist/crewai/types.js +9 -0
- package/dist/crewai/types.js.map +1 -0
- package/dist/enforce/index.d.ts +50 -2
- package/dist/enforce/index.d.ts.map +1 -1
- package/dist/enforce/index.js +73 -4
- package/dist/enforce/index.js.map +1 -1
- package/dist/enforce/trust-aware-enforcement-service.d.ts +121 -0
- package/dist/enforce/trust-aware-enforcement-service.d.ts.map +1 -0
- package/dist/enforce/trust-aware-enforcement-service.js +583 -0
- package/dist/enforce/trust-aware-enforcement-service.js.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -0
- package/dist/index.js.map +1 -1
- package/dist/intent/index.d.ts +18 -3
- package/dist/intent/index.d.ts.map +1 -1
- package/dist/intent/index.js +37 -6
- package/dist/intent/index.js.map +1 -1
- package/dist/intent/persistent-intent-service.d.ts +68 -0
- package/dist/intent/persistent-intent-service.d.ts.map +1 -0
- package/dist/intent/persistent-intent-service.js +265 -0
- package/dist/intent/persistent-intent-service.js.map +1 -0
- package/dist/intent/supabase-intent-repository.d.ts +124 -0
- package/dist/intent/supabase-intent-repository.d.ts.map +1 -0
- package/dist/intent/supabase-intent-repository.js +404 -0
- package/dist/intent/supabase-intent-repository.js.map +1 -0
- package/dist/langchain/tools.d.ts.map +1 -1
- package/dist/langchain/tools.js +1 -3
- package/dist/langchain/tools.js.map +1 -1
- package/dist/layers/implementations/L0-request-format.d.ts +37 -0
- package/dist/layers/implementations/L0-request-format.d.ts.map +1 -0
- package/dist/layers/implementations/L0-request-format.js +216 -0
- package/dist/layers/implementations/L0-request-format.js.map +1 -0
- package/dist/layers/implementations/L1-input-size.d.ts +36 -0
- package/dist/layers/implementations/L1-input-size.d.ts.map +1 -0
- package/dist/layers/implementations/L1-input-size.js +150 -0
- package/dist/layers/implementations/L1-input-size.js.map +1 -0
- package/dist/layers/implementations/L2-charset-sanitizer.d.ts +28 -0
- package/dist/layers/implementations/L2-charset-sanitizer.d.ts.map +1 -0
- package/dist/layers/implementations/L2-charset-sanitizer.js +220 -0
- package/dist/layers/implementations/L2-charset-sanitizer.js.map +1 -0
- package/dist/layers/implementations/L3-schema-conformance.d.ts +47 -0
- package/dist/layers/implementations/L3-schema-conformance.d.ts.map +1 -0
- package/dist/layers/implementations/L3-schema-conformance.js +258 -0
- package/dist/layers/implementations/L3-schema-conformance.js.map +1 -0
- package/dist/layers/implementations/L4-injection-detector.d.ts +47 -0
- package/dist/layers/implementations/L4-injection-detector.d.ts.map +1 -0
- package/dist/layers/implementations/L4-injection-detector.js +256 -0
- package/dist/layers/implementations/L4-injection-detector.js.map +1 -0
- package/dist/layers/implementations/L5-rate-limiter.d.ts +51 -0
- package/dist/layers/implementations/L5-rate-limiter.d.ts.map +1 -0
- package/dist/layers/implementations/L5-rate-limiter.js +183 -0
- package/dist/layers/implementations/L5-rate-limiter.js.map +1 -0
- package/dist/layers/implementations/index.d.ts +16 -0
- package/dist/layers/implementations/index.d.ts.map +1 -0
- package/dist/layers/implementations/index.js +16 -0
- package/dist/layers/implementations/index.js.map +1 -0
- package/dist/persistence/sqlite.d.ts.map +1 -1
- package/dist/persistence/sqlite.js +4 -3
- package/dist/persistence/sqlite.js.map +1 -1
- package/dist/persistence/supabase.js +2 -2
- package/dist/persistence/supabase.js.map +1 -1
- package/dist/phase6/ceiling.js +5 -5
- package/dist/phase6/ceiling.js.map +1 -1
- package/dist/phase6/context.js +6 -6
- package/dist/phase6/context.js.map +1 -1
- package/dist/phase6/index.d.ts +1 -1
- package/dist/phase6/index.js +1 -1
- package/dist/phase6/role-gates.js +2 -2
- package/dist/phase6/role-gates.js.map +1 -1
- package/dist/phase6/types.d.ts +31 -30
- package/dist/phase6/types.d.ts.map +1 -1
- package/dist/phase6/types.js +17 -12
- package/dist/phase6/types.js.map +1 -1
- package/dist/phase6/weight-presets/canonical.d.ts +2 -2
- package/dist/phase6/weight-presets/canonical.js +2 -2
- package/dist/phase6/weight-presets/index.d.ts +1 -1
- package/dist/phase6/weight-presets/index.js +1 -1
- package/dist/phase6/weight-presets/merger.d.ts +1 -1
- package/dist/phase6/weight-presets/merger.js +1 -1
- package/dist/proof/merkle.d.ts +21 -0
- package/dist/proof/merkle.d.ts.map +1 -1
- package/dist/proof/merkle.js +92 -7
- package/dist/proof/merkle.js.map +1 -1
- package/dist/trust-engine/ceiling-enforcement/kernel.d.ts +11 -9
- package/dist/trust-engine/ceiling-enforcement/kernel.d.ts.map +1 -1
- package/dist/trust-engine/ceiling-enforcement/kernel.js +25 -19
- package/dist/trust-engine/ceiling-enforcement/kernel.js.map +1 -1
- package/dist/trust-engine/decay-profiles.d.ts +37 -136
- package/dist/trust-engine/decay-profiles.d.ts.map +1 -1
- package/dist/trust-engine/decay-profiles.js +68 -178
- package/dist/trust-engine/decay-profiles.js.map +1 -1
- package/dist/trust-engine/index.d.ts +96 -63
- package/dist/trust-engine/index.d.ts.map +1 -1
- package/dist/trust-engine/index.js +183 -112
- package/dist/trust-engine/index.js.map +1 -1
- package/dist/trust-engine/phase6-types.d.ts +10 -3
- package/dist/trust-engine/phase6-types.d.ts.map +1 -1
- package/dist/trust-engine/phase6-types.js +19 -13
- package/dist/trust-engine/phase6-types.js.map +1 -1
- package/package.json +5 -4
|
@@ -0,0 +1,271 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CrewAI Trust Callback Handler
|
|
3
|
+
*
|
|
4
|
+
* Records crew agent behavior as trust signals during CrewAI execution.
|
|
5
|
+
*
|
|
6
|
+
* @packageDocumentation
|
|
7
|
+
*/
|
|
8
|
+
import { createLogger } from '../common/logger.js';
|
|
9
|
+
const logger = createLogger({ component: 'crewai-callback' });
|
|
10
|
+
/**
|
|
11
|
+
* Default signal weights for crew operations
|
|
12
|
+
*/
|
|
13
|
+
const DEFAULT_WEIGHTS = {
|
|
14
|
+
taskSuccess: 0.85,
|
|
15
|
+
taskFailure: 0.1,
|
|
16
|
+
delegationSuccess: 0.8,
|
|
17
|
+
delegationFailure: 0.15,
|
|
18
|
+
crewSuccess: 0.9,
|
|
19
|
+
crewFailure: 0.1,
|
|
20
|
+
};
|
|
21
|
+
/**
|
|
22
|
+
* CrewAI callback handler for trust signal recording
|
|
23
|
+
*
|
|
24
|
+
* This handler tracks crew agent behavior and records trust signals
|
|
25
|
+
* for task execution, delegation, and crew-level events.
|
|
26
|
+
*/
|
|
27
|
+
export class CrewTrustCallbackHandler {
|
|
28
|
+
trustEngine;
|
|
29
|
+
config;
|
|
30
|
+
signalCount = 0;
|
|
31
|
+
startTimes = new Map();
|
|
32
|
+
constructor(trustEngine, config) {
|
|
33
|
+
this.trustEngine = trustEngine;
|
|
34
|
+
this.config = {
|
|
35
|
+
agentId: config.agentId,
|
|
36
|
+
role: config.role,
|
|
37
|
+
goal: config.goal ?? '',
|
|
38
|
+
initialTrustLevel: config.initialTrustLevel ?? 1,
|
|
39
|
+
minTrustLevel: config.minTrustLevel ?? 1,
|
|
40
|
+
allowDelegation: config.allowDelegation ?? true,
|
|
41
|
+
recordTaskExecution: config.recordTaskExecution ?? true,
|
|
42
|
+
recordDelegation: config.recordDelegation ?? true,
|
|
43
|
+
recordErrors: config.recordErrors ?? true,
|
|
44
|
+
signalWeights: {
|
|
45
|
+
...DEFAULT_WEIGHTS,
|
|
46
|
+
...config.signalWeights,
|
|
47
|
+
},
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Get the agent ID
|
|
52
|
+
*/
|
|
53
|
+
get agentId() {
|
|
54
|
+
return this.config.agentId;
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Get the agent role
|
|
58
|
+
*/
|
|
59
|
+
get role() {
|
|
60
|
+
return this.config.role;
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Get the number of signals recorded
|
|
64
|
+
*/
|
|
65
|
+
get signalsRecorded() {
|
|
66
|
+
return this.signalCount;
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Initialize the agent in the trust engine if not exists
|
|
70
|
+
*/
|
|
71
|
+
async initialize() {
|
|
72
|
+
const existing = await this.trustEngine.getScore(this.config.agentId);
|
|
73
|
+
if (!existing) {
|
|
74
|
+
await this.trustEngine.initializeEntity(this.config.agentId, this.config.initialTrustLevel);
|
|
75
|
+
logger.info({ agentId: this.config.agentId, role: this.config.role }, 'Initialized trust for crew agent');
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* Record a trust signal
|
|
80
|
+
*/
|
|
81
|
+
async recordSignal(source) {
|
|
82
|
+
const weights = this.config.signalWeights;
|
|
83
|
+
let value;
|
|
84
|
+
let signalType;
|
|
85
|
+
switch (source.event) {
|
|
86
|
+
case 'task_end':
|
|
87
|
+
value = weights.taskSuccess ?? DEFAULT_WEIGHTS.taskSuccess;
|
|
88
|
+
signalType = `behavioral.task_success.${source.taskId ?? 'unknown'}`;
|
|
89
|
+
break;
|
|
90
|
+
case 'task_error':
|
|
91
|
+
value = weights.taskFailure ?? DEFAULT_WEIGHTS.taskFailure;
|
|
92
|
+
signalType = `behavioral.task_failure.${source.taskId ?? 'unknown'}`;
|
|
93
|
+
break;
|
|
94
|
+
case 'delegation_end':
|
|
95
|
+
value = weights.delegationSuccess ?? DEFAULT_WEIGHTS.delegationSuccess;
|
|
96
|
+
signalType = `behavioral.delegation_success.${source.targetAgentId ?? 'unknown'}`;
|
|
97
|
+
break;
|
|
98
|
+
case 'delegation_error':
|
|
99
|
+
value = weights.delegationFailure ?? DEFAULT_WEIGHTS.delegationFailure;
|
|
100
|
+
signalType = `behavioral.delegation_failure.${source.targetAgentId ?? 'unknown'}`;
|
|
101
|
+
break;
|
|
102
|
+
case 'crew_end':
|
|
103
|
+
value = weights.crewSuccess ?? DEFAULT_WEIGHTS.crewSuccess;
|
|
104
|
+
signalType = `behavioral.crew_success.${source.crewId ?? 'unknown'}`;
|
|
105
|
+
break;
|
|
106
|
+
case 'crew_error':
|
|
107
|
+
value = weights.crewFailure ?? DEFAULT_WEIGHTS.crewFailure;
|
|
108
|
+
signalType = `behavioral.crew_failure.${source.crewId ?? 'unknown'}`;
|
|
109
|
+
break;
|
|
110
|
+
default:
|
|
111
|
+
return; // Don't record start events as signals
|
|
112
|
+
}
|
|
113
|
+
const signal = {
|
|
114
|
+
id: crypto.randomUUID(),
|
|
115
|
+
entityId: source.agentId ?? this.config.agentId,
|
|
116
|
+
type: signalType,
|
|
117
|
+
value,
|
|
118
|
+
source: 'crewai',
|
|
119
|
+
timestamp: new Date().toISOString(),
|
|
120
|
+
metadata: {
|
|
121
|
+
event: source.event,
|
|
122
|
+
taskId: source.taskId,
|
|
123
|
+
agentId: source.agentId,
|
|
124
|
+
targetAgentId: source.targetAgentId,
|
|
125
|
+
crewId: source.crewId,
|
|
126
|
+
duration: source.duration,
|
|
127
|
+
error: source.error?.message,
|
|
128
|
+
role: this.config.role,
|
|
129
|
+
},
|
|
130
|
+
};
|
|
131
|
+
await this.trustEngine.recordSignal(signal);
|
|
132
|
+
this.signalCount++;
|
|
133
|
+
logger.debug({ signal }, 'Recorded trust signal from CrewAI');
|
|
134
|
+
}
|
|
135
|
+
/**
|
|
136
|
+
* Start tracking execution time
|
|
137
|
+
*/
|
|
138
|
+
startTimer(runId) {
|
|
139
|
+
this.startTimes.set(runId, Date.now());
|
|
140
|
+
}
|
|
141
|
+
/**
|
|
142
|
+
* Get elapsed time and clear timer
|
|
143
|
+
*/
|
|
144
|
+
endTimer(runId) {
|
|
145
|
+
const startTime = this.startTimes.get(runId);
|
|
146
|
+
this.startTimes.delete(runId);
|
|
147
|
+
return startTime ? Date.now() - startTime : 0;
|
|
148
|
+
}
|
|
149
|
+
// ============================================
|
|
150
|
+
// Task Lifecycle
|
|
151
|
+
// ============================================
|
|
152
|
+
/**
|
|
153
|
+
* Called when a task starts
|
|
154
|
+
*/
|
|
155
|
+
async handleTaskStart(taskId, runId) {
|
|
156
|
+
if (!this.config.recordTaskExecution)
|
|
157
|
+
return;
|
|
158
|
+
this.startTimer(runId);
|
|
159
|
+
logger.debug({ taskId, runId, role: this.config.role }, 'Task started');
|
|
160
|
+
}
|
|
161
|
+
/**
|
|
162
|
+
* Called when a task completes successfully
|
|
163
|
+
*/
|
|
164
|
+
async handleTaskEnd(taskId, runId) {
|
|
165
|
+
if (!this.config.recordTaskExecution)
|
|
166
|
+
return;
|
|
167
|
+
const duration = this.endTimer(runId);
|
|
168
|
+
await this.recordSignal({
|
|
169
|
+
event: 'task_end',
|
|
170
|
+
taskId,
|
|
171
|
+
duration,
|
|
172
|
+
});
|
|
173
|
+
}
|
|
174
|
+
/**
|
|
175
|
+
* Called when a task errors
|
|
176
|
+
*/
|
|
177
|
+
async handleTaskError(taskId, error, runId) {
|
|
178
|
+
if (!this.config.recordErrors)
|
|
179
|
+
return;
|
|
180
|
+
const duration = this.endTimer(runId);
|
|
181
|
+
await this.recordSignal({
|
|
182
|
+
event: 'task_error',
|
|
183
|
+
taskId,
|
|
184
|
+
duration,
|
|
185
|
+
error,
|
|
186
|
+
});
|
|
187
|
+
}
|
|
188
|
+
// ============================================
|
|
189
|
+
// Delegation Lifecycle
|
|
190
|
+
// ============================================
|
|
191
|
+
/**
|
|
192
|
+
* Called when delegation starts
|
|
193
|
+
*/
|
|
194
|
+
async handleDelegationStart(targetAgentId, taskId, runId) {
|
|
195
|
+
if (!this.config.recordDelegation)
|
|
196
|
+
return;
|
|
197
|
+
this.startTimer(runId);
|
|
198
|
+
logger.debug({ targetAgentId, taskId, runId }, 'Delegation started');
|
|
199
|
+
}
|
|
200
|
+
/**
|
|
201
|
+
* Called when delegation completes successfully
|
|
202
|
+
*/
|
|
203
|
+
async handleDelegationEnd(targetAgentId, taskId, runId) {
|
|
204
|
+
if (!this.config.recordDelegation)
|
|
205
|
+
return;
|
|
206
|
+
const duration = this.endTimer(runId);
|
|
207
|
+
await this.recordSignal({
|
|
208
|
+
event: 'delegation_end',
|
|
209
|
+
targetAgentId,
|
|
210
|
+
taskId,
|
|
211
|
+
duration,
|
|
212
|
+
});
|
|
213
|
+
}
|
|
214
|
+
/**
|
|
215
|
+
* Called when delegation errors
|
|
216
|
+
*/
|
|
217
|
+
async handleDelegationError(targetAgentId, taskId, error, runId) {
|
|
218
|
+
if (!this.config.recordErrors)
|
|
219
|
+
return;
|
|
220
|
+
const duration = this.endTimer(runId);
|
|
221
|
+
await this.recordSignal({
|
|
222
|
+
event: 'delegation_error',
|
|
223
|
+
targetAgentId,
|
|
224
|
+
taskId,
|
|
225
|
+
duration,
|
|
226
|
+
error,
|
|
227
|
+
});
|
|
228
|
+
}
|
|
229
|
+
// ============================================
|
|
230
|
+
// Crew Lifecycle
|
|
231
|
+
// ============================================
|
|
232
|
+
/**
|
|
233
|
+
* Called when a crew run starts
|
|
234
|
+
*/
|
|
235
|
+
async handleCrewStart(crewId, runId) {
|
|
236
|
+
this.startTimer(runId);
|
|
237
|
+
logger.debug({ crewId, runId }, 'Crew started');
|
|
238
|
+
}
|
|
239
|
+
/**
|
|
240
|
+
* Called when a crew run completes successfully
|
|
241
|
+
*/
|
|
242
|
+
async handleCrewEnd(crewId, runId) {
|
|
243
|
+
const duration = this.endTimer(runId);
|
|
244
|
+
await this.recordSignal({
|
|
245
|
+
event: 'crew_end',
|
|
246
|
+
crewId,
|
|
247
|
+
duration,
|
|
248
|
+
});
|
|
249
|
+
}
|
|
250
|
+
/**
|
|
251
|
+
* Called when a crew run errors
|
|
252
|
+
*/
|
|
253
|
+
async handleCrewError(crewId, error, runId) {
|
|
254
|
+
if (!this.config.recordErrors)
|
|
255
|
+
return;
|
|
256
|
+
const duration = this.endTimer(runId);
|
|
257
|
+
await this.recordSignal({
|
|
258
|
+
event: 'crew_error',
|
|
259
|
+
crewId,
|
|
260
|
+
duration,
|
|
261
|
+
error,
|
|
262
|
+
});
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
/**
|
|
266
|
+
* Create a crew trust callback handler
|
|
267
|
+
*/
|
|
268
|
+
export function createCrewTrustCallback(trustEngine, config) {
|
|
269
|
+
return new CrewTrustCallbackHandler(trustEngine, config);
|
|
270
|
+
}
|
|
271
|
+
//# sourceMappingURL=callback.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"callback.js","sourceRoot":"","sources":["../../src/crewai/callback.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AASnD,MAAM,MAAM,GAAG,YAAY,CAAC,EAAE,SAAS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
+
* @packageDocumentation
|
|
7
|
+
*/
|
|
8
|
+
import type { TrustLevel, TrustScore } from '../common/types.js';
|
|
9
|
+
import type { TrustEngine, TrustRecord } from '../trust-engine/index.js';
|
|
10
|
+
import type { TrustAwareEnforcementService } from '../enforce/trust-aware-enforcement-service.js';
|
|
11
|
+
import type { FluidDecisionResult } from '../enforce/index.js';
|
|
12
|
+
import { CrewTrustCallbackHandler } from './callback.js';
|
|
13
|
+
import type { CrewAgentConfig, CrewConfig, CrewTaskConfig, CrewTrustCheckResult, TrustedTaskResult, TrustedCrewResult, DelegationResult, TrustGatedCrewExecutorConfig, TrustGatedTaskResult, TrustGatedCrewResult } from './types.js';
|
|
14
|
+
/**
|
|
15
|
+
* Trust-aware executor for a single crew agent
|
|
16
|
+
*
|
|
17
|
+
* Provides trust-gated task execution and delegation for CrewAI agents.
|
|
18
|
+
*/
|
|
19
|
+
export declare class CrewAgentExecutor {
|
|
20
|
+
private trustEngine;
|
|
21
|
+
private callback;
|
|
22
|
+
private config;
|
|
23
|
+
constructor(trustEngine: TrustEngine, config: CrewAgentConfig);
|
|
24
|
+
/**
|
|
25
|
+
* Get the callback handler
|
|
26
|
+
*/
|
|
27
|
+
get callbackHandler(): CrewTrustCallbackHandler;
|
|
28
|
+
/**
|
|
29
|
+
* Get the agent ID
|
|
30
|
+
*/
|
|
31
|
+
get agentId(): string;
|
|
32
|
+
/**
|
|
33
|
+
* Get the agent role
|
|
34
|
+
*/
|
|
35
|
+
get role(): string;
|
|
36
|
+
/**
|
|
37
|
+
* Initialize the executor
|
|
38
|
+
*/
|
|
39
|
+
initialize(): Promise<void>;
|
|
40
|
+
/**
|
|
41
|
+
* Check if the agent has sufficient trust
|
|
42
|
+
*/
|
|
43
|
+
checkTrust(requiredLevel?: TrustLevel): Promise<CrewTrustCheckResult>;
|
|
44
|
+
/**
|
|
45
|
+
* Execute a task with trust gating
|
|
46
|
+
*
|
|
47
|
+
* @param task - Task configuration
|
|
48
|
+
* @param fn - The function to execute (typically the actual CrewAI task runner)
|
|
49
|
+
* @throws TrustInsufficientError if trust is too low
|
|
50
|
+
*/
|
|
51
|
+
executeTask<T>(task: CrewTaskConfig, fn: () => Promise<T>): Promise<TrustedTaskResult<T>>;
|
|
52
|
+
/**
|
|
53
|
+
* Delegate a task to another agent with trust gating on both sides
|
|
54
|
+
*
|
|
55
|
+
* @param task - Task to delegate
|
|
56
|
+
* @param targetExecutor - The target agent's executor
|
|
57
|
+
* @param fn - The function to execute on the target agent
|
|
58
|
+
* @throws TrustInsufficientError if either agent lacks trust
|
|
59
|
+
*/
|
|
60
|
+
delegateTask<T>(task: CrewTaskConfig, targetExecutor: CrewAgentExecutor, fn: () => Promise<T>): Promise<DelegationResult<T>>;
|
|
61
|
+
/**
|
|
62
|
+
* Get current trust record for the agent
|
|
63
|
+
*/
|
|
64
|
+
getTrustRecord(): Promise<TrustRecord | undefined>;
|
|
65
|
+
/**
|
|
66
|
+
* Manually record a positive signal
|
|
67
|
+
*/
|
|
68
|
+
recordSuccess(type: string, value?: number): Promise<void>;
|
|
69
|
+
/**
|
|
70
|
+
* Manually record a negative signal
|
|
71
|
+
*/
|
|
72
|
+
recordFailure(type: string, value?: number): Promise<void>;
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Trust-aware crew executor
|
|
76
|
+
*
|
|
77
|
+
* Manages a crew of agents with collective trust governance.
|
|
78
|
+
* Ensures all agents meet minimum trust requirements before crew execution.
|
|
79
|
+
*/
|
|
80
|
+
export declare class CrewExecutor {
|
|
81
|
+
private trustEngine;
|
|
82
|
+
private config;
|
|
83
|
+
private agents;
|
|
84
|
+
constructor(trustEngine: TrustEngine, config: CrewConfig);
|
|
85
|
+
/**
|
|
86
|
+
* Get the crew ID
|
|
87
|
+
*/
|
|
88
|
+
get crewId(): string;
|
|
89
|
+
/**
|
|
90
|
+
* Get the execution process type
|
|
91
|
+
*/
|
|
92
|
+
get process(): string;
|
|
93
|
+
/**
|
|
94
|
+
* Get all agent executors
|
|
95
|
+
*/
|
|
96
|
+
get agentExecutors(): CrewAgentExecutor[];
|
|
97
|
+
/**
|
|
98
|
+
* Add an agent to the crew
|
|
99
|
+
*/
|
|
100
|
+
addAgent(executor: CrewAgentExecutor): void;
|
|
101
|
+
/**
|
|
102
|
+
* Get an agent executor by ID
|
|
103
|
+
*/
|
|
104
|
+
getAgent(agentId: string): CrewAgentExecutor | undefined;
|
|
105
|
+
/**
|
|
106
|
+
* Initialize all agents in the crew
|
|
107
|
+
*/
|
|
108
|
+
initialize(): Promise<void>;
|
|
109
|
+
/**
|
|
110
|
+
* Get the average trust level across all crew members
|
|
111
|
+
*/
|
|
112
|
+
getCrewTrust(): Promise<{
|
|
113
|
+
averageScore: number;
|
|
114
|
+
averageLevel: number;
|
|
115
|
+
allMeetMinimum: boolean;
|
|
116
|
+
}>;
|
|
117
|
+
/**
|
|
118
|
+
* Execute a set of tasks with the crew
|
|
119
|
+
*
|
|
120
|
+
* Tasks are assigned to agents based on the configured process (sequential/hierarchical).
|
|
121
|
+
* All agents must meet the minimum crew trust requirement.
|
|
122
|
+
*
|
|
123
|
+
* @param tasks - Tasks to execute
|
|
124
|
+
* @param taskRunner - Function that runs a single task given task config and agent executor
|
|
125
|
+
* @throws TrustInsufficientError if any agent fails trust check
|
|
126
|
+
*/
|
|
127
|
+
kickoff<T>(tasks: CrewTaskConfig[], taskRunner: (task: CrewTaskConfig, agent: CrewAgentExecutor) => Promise<T>): Promise<TrustedCrewResult<T>>;
|
|
128
|
+
}
|
|
129
|
+
/**
|
|
130
|
+
* Create a trust-aware crew agent executor
|
|
131
|
+
*/
|
|
132
|
+
export declare function createCrewAgentExecutor(trustEngine: TrustEngine, config: CrewAgentConfig): CrewAgentExecutor;
|
|
133
|
+
/**
|
|
134
|
+
* Create a trust-aware crew executor
|
|
135
|
+
*/
|
|
136
|
+
export declare function createCrewExecutor(trustEngine: TrustEngine, config: CrewConfig): CrewExecutor;
|
|
137
|
+
/**
|
|
138
|
+
* Trust-Gated Crew Executor
|
|
139
|
+
*
|
|
140
|
+
* High-level wrapper that composes TrustEngine + CrewExecutor + TrustAwareEnforcementService
|
|
141
|
+
* to provide a full intent -> enforce -> execute pipeline with live trust gating.
|
|
142
|
+
*
|
|
143
|
+
* Features:
|
|
144
|
+
* - Pre-task trust score checks with configurable thresholds
|
|
145
|
+
* - Optional enforcement service integration (intent -> enforce -> execute)
|
|
146
|
+
* - Automatic trust decay signals on task failures
|
|
147
|
+
* - Automatic trust recovery signals on task successes
|
|
148
|
+
* - Detailed logging of all trust decisions
|
|
149
|
+
* - Backwards-compatible: enforcement service is optional
|
|
150
|
+
*/
|
|
151
|
+
export declare class TrustGatedCrewExecutor {
|
|
152
|
+
private trustEngine;
|
|
153
|
+
private crewExecutor;
|
|
154
|
+
private enforcementService;
|
|
155
|
+
private config;
|
|
156
|
+
constructor(trustEngine: TrustEngine, config: TrustGatedCrewExecutorConfig, enforcementService?: TrustAwareEnforcementService | null);
|
|
157
|
+
/**
|
|
158
|
+
* Get the inner CrewExecutor
|
|
159
|
+
*/
|
|
160
|
+
get executor(): CrewExecutor;
|
|
161
|
+
/**
|
|
162
|
+
* Get the TrustEngine instance
|
|
163
|
+
*/
|
|
164
|
+
get engine(): TrustEngine;
|
|
165
|
+
/**
|
|
166
|
+
* Get the crew ID
|
|
167
|
+
*/
|
|
168
|
+
get crewId(): string;
|
|
169
|
+
/**
|
|
170
|
+
* Initialize all agents in the crew
|
|
171
|
+
*/
|
|
172
|
+
initialize(): Promise<void>;
|
|
173
|
+
/**
|
|
174
|
+
* Check if an agent passes the trust gate for a task.
|
|
175
|
+
*
|
|
176
|
+
* Performs two checks:
|
|
177
|
+
* 1. Trust score threshold check (score >= configured threshold)
|
|
178
|
+
* 2. Trust level threshold check (level >= configured threshold)
|
|
179
|
+
*
|
|
180
|
+
* If enforcement service is available and enabled, also runs full enforcement.
|
|
181
|
+
*/
|
|
182
|
+
checkTrustGate(agentId: string, task: CrewTaskConfig): Promise<{
|
|
183
|
+
allowed: boolean;
|
|
184
|
+
trustScore: TrustScore;
|
|
185
|
+
trustLevel: TrustLevel;
|
|
186
|
+
enforcementResult?: FluidDecisionResult;
|
|
187
|
+
reason: string;
|
|
188
|
+
}>;
|
|
189
|
+
/**
|
|
190
|
+
* Execute a single task through the trust gate.
|
|
191
|
+
*
|
|
192
|
+
* Pipeline: check trust -> (optional) enforce -> execute -> record signals
|
|
193
|
+
*/
|
|
194
|
+
executeGatedTask<T>(task: CrewTaskConfig, taskRunner: (task: CrewTaskConfig, agent: CrewAgentExecutor) => Promise<T>): Promise<TrustGatedTaskResult<T>>;
|
|
195
|
+
/**
|
|
196
|
+
* Execute a full crew kickoff with trust gating on every task.
|
|
197
|
+
*
|
|
198
|
+
* Unlike the inner CrewExecutor.kickoff(), this method:
|
|
199
|
+
* - Checks trust gate before each task individually
|
|
200
|
+
* - Skips tasks that fail the trust gate (instead of throwing)
|
|
201
|
+
* - Records trust signals after each success/failure
|
|
202
|
+
* - Returns a comprehensive result including denied tasks
|
|
203
|
+
*/
|
|
204
|
+
kickoff<T>(tasks: CrewTaskConfig[], taskRunner: (task: CrewTaskConfig, agent: CrewAgentExecutor) => Promise<T>): Promise<TrustGatedCrewResult<T>>;
|
|
205
|
+
/**
|
|
206
|
+
* Resolve the agent executor for a given task
|
|
207
|
+
*/
|
|
208
|
+
private resolveAgent;
|
|
209
|
+
/**
|
|
210
|
+
* Run enforcement pipeline: build intent -> call TrustAwareEnforcementService.decide()
|
|
211
|
+
*/
|
|
212
|
+
private runEnforcement;
|
|
213
|
+
/**
|
|
214
|
+
* Record a trust signal to the engine
|
|
215
|
+
*/
|
|
216
|
+
private recordTrustSignal;
|
|
217
|
+
}
|
|
218
|
+
/**
|
|
219
|
+
* Create a TrustGatedCrewExecutor
|
|
220
|
+
*
|
|
221
|
+
* @param trustEngine - The TrustEngine instance for score lookups and signal recording
|
|
222
|
+
* @param config - Configuration for the gated executor
|
|
223
|
+
* @param enforcementService - Optional TrustAwareEnforcementService for full intent enforcement
|
|
224
|
+
*/
|
|
225
|
+
export declare function createTrustGatedCrewExecutor(trustEngine: TrustEngine, config: TrustGatedCrewExecutorConfig, enforcementService?: TrustAwareEnforcementService | null): TrustGatedCrewExecutor;
|
|
226
|
+
//# sourceMappingURL=executor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"executor.d.ts","sourceRoot":"","sources":["../../src/crewai/executor.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,KAAK,EAAE,UAAU,EAAE,UAAU,EAAU,MAAM,oBAAoB,CAAC;AAEzE,OAAO,KAAK,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAEzE,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,+CAA+C,CAAC;AAClG,OAAO,KAAK,EAAsB,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAEnF,OAAO,EAAE,wBAAwB,EAA2B,MAAM,eAAe,CAAC;AAClF,OAAO,KAAK,EACV,eAAe,EACf,UAAU,EACV,cAAc,EACd,oBAAoB,EACpB,iBAAiB,EACjB,iBAAiB,EACjB,gBAAgB,EAChB,4BAA4B,EAC5B,oBAAoB,EACpB,oBAAoB,EACrB,MAAM,YAAY,CAAC;AAQpB;;;;GAIG;AACH,qBAAa,iBAAiB;IAC5B,OAAO,CAAC,WAAW,CAAc;IACjC,OAAO,CAAC,QAAQ,CAA2B;IAC3C,OAAO,CAAC,MAAM,CAAkB;gBAEpB,WAAW,EAAE,WAAW,EAAE,MAAM,EAAE,eAAe;IAM7D;;OAEG;IACH,IAAI,eAAe,IAAI,wBAAwB,CAE9C;IAED;;OAEG;IACH,IAAI,OAAO,IAAI,MAAM,CAEpB;IAED;;OAEG;IACH,IAAI,IAAI,IAAI,MAAM,CAEjB;IAED;;OAEG;IACG,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC;IAIjC;;OAEG;IACG,UAAU,CAAC,aAAa,CAAC,EAAE,UAAU,GAAG,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