@vorionsys/contracts 0.1.0
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/aci/aci-string.d.ts +539 -0
- package/dist/aci/aci-string.d.ts.map +1 -0
- package/dist/aci/aci-string.js +563 -0
- package/dist/aci/aci-string.js.map +1 -0
- package/dist/aci/attestation.d.ts +648 -0
- package/dist/aci/attestation.d.ts.map +1 -0
- package/dist/aci/attestation.js +289 -0
- package/dist/aci/attestation.js.map +1 -0
- package/dist/aci/domains.d.ts +260 -0
- package/dist/aci/domains.d.ts.map +1 -0
- package/dist/aci/domains.js +322 -0
- package/dist/aci/domains.js.map +1 -0
- package/dist/aci/effective-permission.d.ts +371 -0
- package/dist/aci/effective-permission.d.ts.map +1 -0
- package/dist/aci/effective-permission.js +351 -0
- package/dist/aci/effective-permission.js.map +1 -0
- package/dist/aci/identity.d.ts +1100 -0
- package/dist/aci/identity.d.ts.map +1 -0
- package/dist/aci/identity.js +328 -0
- package/dist/aci/identity.js.map +1 -0
- package/dist/aci/index.d.ts +67 -0
- package/dist/aci/index.d.ts.map +1 -0
- package/dist/aci/index.js +157 -0
- package/dist/aci/index.js.map +1 -0
- package/dist/aci/jwt-claims.d.ts +756 -0
- package/dist/aci/jwt-claims.d.ts.map +1 -0
- package/dist/aci/jwt-claims.js +335 -0
- package/dist/aci/jwt-claims.js.map +1 -0
- package/dist/aci/levels.d.ts +279 -0
- package/dist/aci/levels.d.ts.map +1 -0
- package/dist/aci/levels.js +467 -0
- package/dist/aci/levels.js.map +1 -0
- package/dist/aci/mapping.d.ts +291 -0
- package/dist/aci/mapping.d.ts.map +1 -0
- package/dist/aci/mapping.js +427 -0
- package/dist/aci/mapping.js.map +1 -0
- package/dist/aci/skills.d.ts +314 -0
- package/dist/aci/skills.d.ts.map +1 -0
- package/dist/aci/skills.js +404 -0
- package/dist/aci/skills.js.map +1 -0
- package/dist/aci/tiers.d.ts +403 -0
- package/dist/aci/tiers.d.ts.map +1 -0
- package/dist/aci/tiers.js +659 -0
- package/dist/aci/tiers.js.map +1 -0
- package/dist/canonical/agent.d.ts +796 -0
- package/dist/canonical/agent.d.ts.map +1 -0
- package/dist/canonical/agent.js +527 -0
- package/dist/canonical/agent.js.map +1 -0
- package/dist/canonical/governance.d.ts +905 -0
- package/dist/canonical/governance.d.ts.map +1 -0
- package/dist/canonical/governance.js +454 -0
- package/dist/canonical/governance.js.map +1 -0
- package/dist/canonical/index.d.ts +17 -0
- package/dist/canonical/index.d.ts.map +1 -0
- package/dist/canonical/index.js +21 -0
- package/dist/canonical/index.js.map +1 -0
- package/dist/canonical/intent.d.ts +727 -0
- package/dist/canonical/intent.d.ts.map +1 -0
- package/dist/canonical/intent.js +203 -0
- package/dist/canonical/intent.js.map +1 -0
- package/dist/canonical/risk-level.d.ts +344 -0
- package/dist/canonical/risk-level.d.ts.map +1 -0
- package/dist/canonical/risk-level.js +472 -0
- package/dist/canonical/risk-level.js.map +1 -0
- package/dist/canonical/trust-band.d.ts +239 -0
- package/dist/canonical/trust-band.d.ts.map +1 -0
- package/dist/canonical/trust-band.js +298 -0
- package/dist/canonical/trust-band.js.map +1 -0
- package/dist/canonical/trust-score.d.ts +301 -0
- package/dist/canonical/trust-score.d.ts.map +1 -0
- package/dist/canonical/trust-score.js +390 -0
- package/dist/canonical/trust-score.js.map +1 -0
- package/dist/canonical/trust-signal.d.ts +617 -0
- package/dist/canonical/trust-signal.d.ts.map +1 -0
- package/dist/canonical/trust-signal.js +355 -0
- package/dist/canonical/trust-signal.js.map +1 -0
- package/dist/canonical/validation.d.ts +231 -0
- package/dist/canonical/validation.d.ts.map +1 -0
- package/dist/canonical/validation.js +558 -0
- package/dist/canonical/validation.js.map +1 -0
- package/dist/common/index.d.ts +7 -0
- package/dist/common/index.d.ts.map +1 -0
- package/dist/common/index.js +7 -0
- package/dist/common/index.js.map +1 -0
- package/dist/common/primitives.d.ts +56 -0
- package/dist/common/primitives.d.ts.map +1 -0
- package/dist/common/primitives.js +70 -0
- package/dist/common/primitives.js.map +1 -0
- package/dist/index.d.ts +11 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +15 -0
- package/dist/index.js.map +1 -0
- package/dist/v2/canary-probe.d.ts +201 -0
- package/dist/v2/canary-probe.d.ts.map +1 -0
- package/dist/v2/canary-probe.js +99 -0
- package/dist/v2/canary-probe.js.map +1 -0
- package/dist/v2/component.d.ts +132 -0
- package/dist/v2/component.d.ts.map +1 -0
- package/dist/v2/component.js +5 -0
- package/dist/v2/component.js.map +1 -0
- package/dist/v2/decision.d.ts +310 -0
- package/dist/v2/decision.d.ts.map +1 -0
- package/dist/v2/decision.js +21 -0
- package/dist/v2/decision.js.map +1 -0
- package/dist/v2/enums.d.ts +185 -0
- package/dist/v2/enums.d.ts.map +1 -0
- package/dist/v2/enums.js +203 -0
- package/dist/v2/enums.js.map +1 -0
- package/dist/v2/evidence.d.ts +368 -0
- package/dist/v2/evidence.d.ts.map +1 -0
- package/dist/v2/evidence.js +152 -0
- package/dist/v2/evidence.js.map +1 -0
- package/dist/v2/execution.d.ts +190 -0
- package/dist/v2/execution.d.ts.map +1 -0
- package/dist/v2/execution.js +5 -0
- package/dist/v2/execution.js.map +1 -0
- package/dist/v2/index.d.ts +19 -0
- package/dist/v2/index.d.ts.map +1 -0
- package/dist/v2/index.js +32 -0
- package/dist/v2/index.js.map +1 -0
- package/dist/v2/intent.d.ts +89 -0
- package/dist/v2/intent.d.ts.map +1 -0
- package/dist/v2/intent.js +5 -0
- package/dist/v2/intent.js.map +1 -0
- package/dist/v2/policy-bundle.d.ts +166 -0
- package/dist/v2/policy-bundle.d.ts.map +1 -0
- package/dist/v2/policy-bundle.js +20 -0
- package/dist/v2/policy-bundle.js.map +1 -0
- package/dist/v2/pre-action-gate.d.ts +185 -0
- package/dist/v2/pre-action-gate.d.ts.map +1 -0
- package/dist/v2/pre-action-gate.js +64 -0
- package/dist/v2/pre-action-gate.js.map +1 -0
- package/dist/v2/proof-event.d.ts +201 -0
- package/dist/v2/proof-event.d.ts.map +1 -0
- package/dist/v2/proof-event.js +5 -0
- package/dist/v2/proof-event.js.map +1 -0
- package/dist/v2/retention.d.ts +329 -0
- package/dist/v2/retention.d.ts.map +1 -0
- package/dist/v2/retention.js +162 -0
- package/dist/v2/retention.js.map +1 -0
- package/dist/v2/trust-delta.d.ts +119 -0
- package/dist/v2/trust-delta.d.ts.map +1 -0
- package/dist/v2/trust-delta.js +28 -0
- package/dist/v2/trust-delta.js.map +1 -0
- package/dist/v2/trust-profile.d.ts +337 -0
- package/dist/v2/trust-profile.d.ts.map +1 -0
- package/dist/v2/trust-profile.js +96 -0
- package/dist/v2/trust-profile.js.map +1 -0
- package/dist/validators/decision.d.ts +430 -0
- package/dist/validators/decision.d.ts.map +1 -0
- package/dist/validators/decision.js +61 -0
- package/dist/validators/decision.js.map +1 -0
- package/dist/validators/enums.d.ts +24 -0
- package/dist/validators/enums.d.ts.map +1 -0
- package/dist/validators/enums.js +24 -0
- package/dist/validators/enums.js.map +1 -0
- package/dist/validators/index.d.ts +30 -0
- package/dist/validators/index.d.ts.map +1 -0
- package/dist/validators/index.js +42 -0
- package/dist/validators/index.js.map +1 -0
- package/dist/validators/intent.d.ts +229 -0
- package/dist/validators/intent.d.ts.map +1 -0
- package/dist/validators/intent.js +47 -0
- package/dist/validators/intent.js.map +1 -0
- package/dist/validators/proof-event.d.ts +981 -0
- package/dist/validators/proof-event.d.ts.map +1 -0
- package/dist/validators/proof-event.js +134 -0
- package/dist/validators/proof-event.js.map +1 -0
- package/dist/validators/trust-profile.d.ts +350 -0
- package/dist/validators/trust-profile.d.ts.map +1 -0
- package/dist/validators/trust-profile.js +65 -0
- package/dist/validators/trust-profile.js.map +1 -0
- package/package.json +65 -0
|
@@ -0,0 +1,796 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Canonical Agent type definitions for the Vorion Platform.
|
|
3
|
+
*
|
|
4
|
+
* This file provides the authoritative definitions for agent-related types,
|
|
5
|
+
* unifying the various representations found across packages into a single
|
|
6
|
+
* canonical source with Zod validation schemas.
|
|
7
|
+
*
|
|
8
|
+
* Agent types cover:
|
|
9
|
+
* - Agent lifecycle status
|
|
10
|
+
* - Runtime operational status
|
|
11
|
+
* - Capabilities and permissions
|
|
12
|
+
* - Configuration and settings
|
|
13
|
+
* - Performance metrics
|
|
14
|
+
* - Task management
|
|
15
|
+
*
|
|
16
|
+
* @module @vorion/contracts/canonical/agent
|
|
17
|
+
*/
|
|
18
|
+
import { z } from 'zod';
|
|
19
|
+
/**
|
|
20
|
+
* Canonical agent lifecycle status.
|
|
21
|
+
*
|
|
22
|
+
* Represents the administrative/lifecycle state of an agent in the platform.
|
|
23
|
+
* This is distinct from runtime operational status.
|
|
24
|
+
*
|
|
25
|
+
* States:
|
|
26
|
+
* - `draft`: Initial creation, not yet deployed
|
|
27
|
+
* - `training`: Undergoing training/certification
|
|
28
|
+
* - `active`: Deployed and operational
|
|
29
|
+
* - `suspended`: Temporarily disabled (can be reactivated)
|
|
30
|
+
* - `archived`: Permanently deactivated (historical record)
|
|
31
|
+
*
|
|
32
|
+
* @example
|
|
33
|
+
* ```typescript
|
|
34
|
+
* const status: AgentLifecycleStatus = 'active';
|
|
35
|
+
* ```
|
|
36
|
+
*/
|
|
37
|
+
export type AgentLifecycleStatus = 'draft' | 'training' | 'active' | 'suspended' | 'archived';
|
|
38
|
+
/**
|
|
39
|
+
* Array of all lifecycle statuses in logical order.
|
|
40
|
+
*/
|
|
41
|
+
export declare const AGENT_LIFECYCLE_STATUSES: readonly AgentLifecycleStatus[];
|
|
42
|
+
/**
|
|
43
|
+
* Human-readable labels for lifecycle statuses.
|
|
44
|
+
*/
|
|
45
|
+
export declare const AGENT_LIFECYCLE_LABELS: Readonly<Record<AgentLifecycleStatus, string>>;
|
|
46
|
+
/**
|
|
47
|
+
* Color codes for lifecycle statuses (for UI display).
|
|
48
|
+
*/
|
|
49
|
+
export declare const AGENT_LIFECYCLE_COLORS: Readonly<Record<AgentLifecycleStatus, string>>;
|
|
50
|
+
/**
|
|
51
|
+
* Zod schema for AgentLifecycleStatus validation.
|
|
52
|
+
*/
|
|
53
|
+
export declare const agentLifecycleStatusSchema: z.ZodEnum<["draft", "training", "active", "suspended", "archived"]>;
|
|
54
|
+
/**
|
|
55
|
+
* Canonical agent runtime operational status.
|
|
56
|
+
*
|
|
57
|
+
* Represents the current operational state of an agent during execution.
|
|
58
|
+
* Used for real-time monitoring and coordination.
|
|
59
|
+
*
|
|
60
|
+
* States:
|
|
61
|
+
* - `IDLE`: Ready and waiting for tasks
|
|
62
|
+
* - `WORKING`: Actively processing a task
|
|
63
|
+
* - `PAUSED`: Temporarily halted (can resume)
|
|
64
|
+
* - `ERROR`: In error state requiring attention
|
|
65
|
+
* - `OFFLINE`: Not connected/available
|
|
66
|
+
*
|
|
67
|
+
* @example
|
|
68
|
+
* ```typescript
|
|
69
|
+
* const status: AgentRuntimeStatus = 'WORKING';
|
|
70
|
+
* ```
|
|
71
|
+
*/
|
|
72
|
+
export type AgentRuntimeStatus = 'IDLE' | 'WORKING' | 'PAUSED' | 'ERROR' | 'OFFLINE';
|
|
73
|
+
/**
|
|
74
|
+
* Array of all runtime statuses.
|
|
75
|
+
*/
|
|
76
|
+
export declare const AGENT_RUNTIME_STATUSES: readonly AgentRuntimeStatus[];
|
|
77
|
+
/**
|
|
78
|
+
* Human-readable labels for runtime statuses.
|
|
79
|
+
*/
|
|
80
|
+
export declare const AGENT_RUNTIME_LABELS: Readonly<Record<AgentRuntimeStatus, string>>;
|
|
81
|
+
/**
|
|
82
|
+
* Color codes for runtime statuses (for UI display).
|
|
83
|
+
*/
|
|
84
|
+
export declare const AGENT_RUNTIME_COLORS: Readonly<Record<AgentRuntimeStatus, string>>;
|
|
85
|
+
/**
|
|
86
|
+
* Zod schema for AgentRuntimeStatus validation.
|
|
87
|
+
*/
|
|
88
|
+
export declare const agentRuntimeStatusSchema: z.ZodEnum<["IDLE", "WORKING", "PAUSED", "ERROR", "OFFLINE"]>;
|
|
89
|
+
/**
|
|
90
|
+
* Canonical permission-based agent capability.
|
|
91
|
+
*
|
|
92
|
+
* Represents what actions an agent is authorized to perform.
|
|
93
|
+
* Used for permission enforcement and delegation.
|
|
94
|
+
*
|
|
95
|
+
* Capabilities:
|
|
96
|
+
* - `execute`: Can execute tasks locally
|
|
97
|
+
* - `external`: Can make external API calls
|
|
98
|
+
* - `delegate`: Can delegate tasks to other agents
|
|
99
|
+
* - `spawn`: Can create/spawn new agents
|
|
100
|
+
* - `admin`: Has administrative privileges
|
|
101
|
+
*
|
|
102
|
+
* @example
|
|
103
|
+
* ```typescript
|
|
104
|
+
* const caps: AgentPermission[] = ['execute', 'external'];
|
|
105
|
+
* ```
|
|
106
|
+
*/
|
|
107
|
+
export type AgentPermission = 'execute' | 'external' | 'delegate' | 'spawn' | 'admin';
|
|
108
|
+
/**
|
|
109
|
+
* Array of all agent permissions.
|
|
110
|
+
*/
|
|
111
|
+
export declare const AGENT_PERMISSIONS: readonly AgentPermission[];
|
|
112
|
+
/**
|
|
113
|
+
* Descriptions for each permission.
|
|
114
|
+
*/
|
|
115
|
+
export declare const AGENT_PERMISSION_DESCRIPTIONS: Readonly<Record<AgentPermission, string>>;
|
|
116
|
+
/**
|
|
117
|
+
* Zod schema for AgentPermission validation.
|
|
118
|
+
*/
|
|
119
|
+
export declare const agentPermissionSchema: z.ZodEnum<["execute", "external", "delegate", "spawn", "admin"]>;
|
|
120
|
+
/**
|
|
121
|
+
* Collaboration mode types for agent interactions.
|
|
122
|
+
*/
|
|
123
|
+
export type CollaborationMode = 'DELEGATE' | 'CONSULT' | 'PARALLEL' | 'SEQUENTIAL' | 'CONSENSUS';
|
|
124
|
+
/**
|
|
125
|
+
* Array of all collaboration modes.
|
|
126
|
+
*/
|
|
127
|
+
export declare const COLLABORATION_MODES: readonly CollaborationMode[];
|
|
128
|
+
/**
|
|
129
|
+
* Zod schema for CollaborationMode validation.
|
|
130
|
+
*/
|
|
131
|
+
export declare const collaborationModeSchema: z.ZodEnum<["DELEGATE", "CONSULT", "PARALLEL", "SEQUENTIAL", "CONSENSUS"]>;
|
|
132
|
+
/**
|
|
133
|
+
* Extended agent capability definition with domain and skills.
|
|
134
|
+
*
|
|
135
|
+
* Provides detailed capability information for agent matching and routing.
|
|
136
|
+
*/
|
|
137
|
+
export interface AgentCapability {
|
|
138
|
+
/** Primary domain of expertise (e.g., 'security', 'data-analysis') */
|
|
139
|
+
domain: string;
|
|
140
|
+
/** Specific skills within the domain */
|
|
141
|
+
skills: string[];
|
|
142
|
+
/** Minimum trust score required to handle tasks (0-1000) */
|
|
143
|
+
trustLevel: number;
|
|
144
|
+
/** Autonomy level (0-7, maps to TrustBand) */
|
|
145
|
+
autonomyLevel: number;
|
|
146
|
+
/** Preferred modes for collaboration */
|
|
147
|
+
collaborationPreference: CollaborationMode[];
|
|
148
|
+
}
|
|
149
|
+
/**
|
|
150
|
+
* Zod schema for AgentCapability validation.
|
|
151
|
+
*/
|
|
152
|
+
export declare const agentCapabilitySchema: z.ZodObject<{
|
|
153
|
+
domain: z.ZodString;
|
|
154
|
+
skills: z.ZodArray<z.ZodString, "many">;
|
|
155
|
+
trustLevel: z.ZodNumber;
|
|
156
|
+
autonomyLevel: z.ZodNumber;
|
|
157
|
+
collaborationPreference: z.ZodArray<z.ZodEnum<["DELEGATE", "CONSULT", "PARALLEL", "SEQUENTIAL", "CONSENSUS"]>, "many">;
|
|
158
|
+
}, "strip", z.ZodTypeAny, {
|
|
159
|
+
domain: string;
|
|
160
|
+
skills: string[];
|
|
161
|
+
trustLevel: number;
|
|
162
|
+
autonomyLevel: number;
|
|
163
|
+
collaborationPreference: ("DELEGATE" | "CONSULT" | "PARALLEL" | "SEQUENTIAL" | "CONSENSUS")[];
|
|
164
|
+
}, {
|
|
165
|
+
domain: string;
|
|
166
|
+
skills: string[];
|
|
167
|
+
trustLevel: number;
|
|
168
|
+
autonomyLevel: number;
|
|
169
|
+
collaborationPreference: ("DELEGATE" | "CONSULT" | "PARALLEL" | "SEQUENTIAL" | "CONSENSUS")[];
|
|
170
|
+
}>;
|
|
171
|
+
/** Inferred type from schema */
|
|
172
|
+
export type AgentCapabilityInput = z.input<typeof agentCapabilitySchema>;
|
|
173
|
+
/**
|
|
174
|
+
* Agent specialization categories.
|
|
175
|
+
*
|
|
176
|
+
* Predefined categories for agent domain expertise.
|
|
177
|
+
*/
|
|
178
|
+
export type AgentSpecialization = 'core' | 'customer_service' | 'technical' | 'creative' | 'research' | 'education' | 'security' | 'data_analysis' | 'development' | 'operations';
|
|
179
|
+
/**
|
|
180
|
+
* Array of all specializations.
|
|
181
|
+
*/
|
|
182
|
+
export declare const AGENT_SPECIALIZATIONS: readonly AgentSpecialization[];
|
|
183
|
+
/**
|
|
184
|
+
* Human-readable labels for specializations.
|
|
185
|
+
*/
|
|
186
|
+
export declare const AGENT_SPECIALIZATION_LABELS: Readonly<Record<AgentSpecialization, string>>;
|
|
187
|
+
/**
|
|
188
|
+
* Zod schema for AgentSpecialization validation.
|
|
189
|
+
*/
|
|
190
|
+
export declare const agentSpecializationSchema: z.ZodEnum<["core", "customer_service", "technical", "creative", "research", "education", "security", "data_analysis", "development", "operations"]>;
|
|
191
|
+
/**
|
|
192
|
+
* Runtime operational metrics for agent monitoring.
|
|
193
|
+
*
|
|
194
|
+
* Used for real-time health monitoring and load balancing.
|
|
195
|
+
*/
|
|
196
|
+
export interface AgentRuntimeMetrics {
|
|
197
|
+
/** CPU usage percentage (0-100) */
|
|
198
|
+
cpuUsage?: number;
|
|
199
|
+
/** Memory usage percentage (0-100) */
|
|
200
|
+
memoryUsage?: number;
|
|
201
|
+
/** Number of tasks in queue */
|
|
202
|
+
taskQueue?: number;
|
|
203
|
+
/** Number of currently active tasks */
|
|
204
|
+
activeTasks?: number;
|
|
205
|
+
/** Uptime in milliseconds */
|
|
206
|
+
uptime?: number;
|
|
207
|
+
/** Custom metrics for domain-specific monitoring */
|
|
208
|
+
customMetrics?: Record<string, number>;
|
|
209
|
+
}
|
|
210
|
+
/**
|
|
211
|
+
* Zod schema for AgentRuntimeMetrics validation.
|
|
212
|
+
*/
|
|
213
|
+
export declare const agentRuntimeMetricsSchema: z.ZodObject<{
|
|
214
|
+
cpuUsage: z.ZodOptional<z.ZodNumber>;
|
|
215
|
+
memoryUsage: z.ZodOptional<z.ZodNumber>;
|
|
216
|
+
taskQueue: z.ZodOptional<z.ZodNumber>;
|
|
217
|
+
activeTasks: z.ZodOptional<z.ZodNumber>;
|
|
218
|
+
uptime: z.ZodOptional<z.ZodNumber>;
|
|
219
|
+
customMetrics: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
|
|
220
|
+
}, "strip", z.ZodTypeAny, {
|
|
221
|
+
cpuUsage?: number | undefined;
|
|
222
|
+
memoryUsage?: number | undefined;
|
|
223
|
+
taskQueue?: number | undefined;
|
|
224
|
+
activeTasks?: number | undefined;
|
|
225
|
+
uptime?: number | undefined;
|
|
226
|
+
customMetrics?: Record<string, number> | undefined;
|
|
227
|
+
}, {
|
|
228
|
+
cpuUsage?: number | undefined;
|
|
229
|
+
memoryUsage?: number | undefined;
|
|
230
|
+
taskQueue?: number | undefined;
|
|
231
|
+
activeTasks?: number | undefined;
|
|
232
|
+
uptime?: number | undefined;
|
|
233
|
+
customMetrics?: Record<string, number> | undefined;
|
|
234
|
+
}>;
|
|
235
|
+
/** Inferred type from schema */
|
|
236
|
+
export type AgentRuntimeMetricsInput = z.input<typeof agentRuntimeMetricsSchema>;
|
|
237
|
+
/**
|
|
238
|
+
* Performance metrics for agent quality assessment.
|
|
239
|
+
*
|
|
240
|
+
* Used for trust scoring, performance reviews, and optimization.
|
|
241
|
+
*/
|
|
242
|
+
export interface AgentPerformanceMetrics {
|
|
243
|
+
/** Total number of tasks completed */
|
|
244
|
+
tasksCompleted: number;
|
|
245
|
+
/** Total number of tasks that failed */
|
|
246
|
+
tasksFailed: number;
|
|
247
|
+
/** Average quality score (0-1) */
|
|
248
|
+
averageQuality: number;
|
|
249
|
+
/** Average response time in milliseconds */
|
|
250
|
+
averageResponseTime: number;
|
|
251
|
+
/** User satisfaction score (0-1) */
|
|
252
|
+
userSatisfaction: number;
|
|
253
|
+
/** Rate of escalations to higher authority (0-1) */
|
|
254
|
+
escalationRate: number;
|
|
255
|
+
/** Collaboration effectiveness score (0-1) */
|
|
256
|
+
collaborationScore: number;
|
|
257
|
+
}
|
|
258
|
+
/**
|
|
259
|
+
* Zod schema for AgentPerformanceMetrics validation.
|
|
260
|
+
*/
|
|
261
|
+
export declare const agentPerformanceMetricsSchema: z.ZodObject<{
|
|
262
|
+
tasksCompleted: z.ZodNumber;
|
|
263
|
+
tasksFailed: z.ZodNumber;
|
|
264
|
+
averageQuality: z.ZodNumber;
|
|
265
|
+
averageResponseTime: z.ZodNumber;
|
|
266
|
+
userSatisfaction: z.ZodNumber;
|
|
267
|
+
escalationRate: z.ZodNumber;
|
|
268
|
+
collaborationScore: z.ZodNumber;
|
|
269
|
+
}, "strip", z.ZodTypeAny, {
|
|
270
|
+
tasksCompleted: number;
|
|
271
|
+
tasksFailed: number;
|
|
272
|
+
averageQuality: number;
|
|
273
|
+
averageResponseTime: number;
|
|
274
|
+
userSatisfaction: number;
|
|
275
|
+
escalationRate: number;
|
|
276
|
+
collaborationScore: number;
|
|
277
|
+
}, {
|
|
278
|
+
tasksCompleted: number;
|
|
279
|
+
tasksFailed: number;
|
|
280
|
+
averageQuality: number;
|
|
281
|
+
averageResponseTime: number;
|
|
282
|
+
userSatisfaction: number;
|
|
283
|
+
escalationRate: number;
|
|
284
|
+
collaborationScore: number;
|
|
285
|
+
}>;
|
|
286
|
+
/** Inferred type from schema */
|
|
287
|
+
export type AgentPerformanceMetricsInput = z.input<typeof agentPerformanceMetricsSchema>;
|
|
288
|
+
/**
|
|
289
|
+
* Task priority levels.
|
|
290
|
+
*/
|
|
291
|
+
export type TaskPriority = 'low' | 'medium' | 'high' | 'critical';
|
|
292
|
+
/**
|
|
293
|
+
* Array of all task priorities in ascending order.
|
|
294
|
+
*/
|
|
295
|
+
export declare const TASK_PRIORITIES: readonly TaskPriority[];
|
|
296
|
+
/**
|
|
297
|
+
* Zod schema for TaskPriority validation.
|
|
298
|
+
*/
|
|
299
|
+
export declare const taskPrioritySchema: z.ZodEnum<["low", "medium", "high", "critical"]>;
|
|
300
|
+
/**
|
|
301
|
+
* Task status values.
|
|
302
|
+
*/
|
|
303
|
+
export type TaskStatus = 'queued' | 'assigned' | 'active' | 'paused' | 'completed' | 'failed' | 'delegated' | 'cancelled';
|
|
304
|
+
/**
|
|
305
|
+
* Array of all task statuses.
|
|
306
|
+
*/
|
|
307
|
+
export declare const TASK_STATUSES: readonly TaskStatus[];
|
|
308
|
+
/**
|
|
309
|
+
* Zod schema for TaskStatus validation.
|
|
310
|
+
*/
|
|
311
|
+
export declare const taskStatusSchema: z.ZodEnum<["queued", "assigned", "active", "paused", "completed", "failed", "delegated", "cancelled"]>;
|
|
312
|
+
/**
|
|
313
|
+
* Task source indicating where the task originated.
|
|
314
|
+
*/
|
|
315
|
+
export type TaskSource = 'system' | 'user' | 'agent' | 'collaboration' | 'proactive' | 'scheduled';
|
|
316
|
+
/**
|
|
317
|
+
* Array of all task sources.
|
|
318
|
+
*/
|
|
319
|
+
export declare const TASK_SOURCES: readonly TaskSource[];
|
|
320
|
+
/**
|
|
321
|
+
* Zod schema for TaskSource validation.
|
|
322
|
+
*/
|
|
323
|
+
export declare const taskSourceSchema: z.ZodEnum<["system", "user", "agent", "collaboration", "proactive", "scheduled"]>;
|
|
324
|
+
/**
|
|
325
|
+
* Canonical agent task definition.
|
|
326
|
+
*
|
|
327
|
+
* Comprehensive task structure for agent workloads.
|
|
328
|
+
*/
|
|
329
|
+
export interface AgentTask {
|
|
330
|
+
/** Unique task identifier */
|
|
331
|
+
id: string;
|
|
332
|
+
/** Agent ID this task is assigned to */
|
|
333
|
+
agentId: string;
|
|
334
|
+
/** Type/category of the task */
|
|
335
|
+
taskType: string;
|
|
336
|
+
/** Human-readable title */
|
|
337
|
+
title?: string;
|
|
338
|
+
/** Detailed description */
|
|
339
|
+
description: string;
|
|
340
|
+
/** Task context and parameters */
|
|
341
|
+
context: Record<string, unknown>;
|
|
342
|
+
/** Priority level */
|
|
343
|
+
priority: TaskPriority;
|
|
344
|
+
/** Current status */
|
|
345
|
+
status: TaskStatus;
|
|
346
|
+
/** Origin of the task */
|
|
347
|
+
source: TaskSource;
|
|
348
|
+
/** Reference ID for the source (e.g., user ID, agent ID) */
|
|
349
|
+
sourceId?: string;
|
|
350
|
+
/** ID of agent/entity that assigned the task */
|
|
351
|
+
assignedBy?: string;
|
|
352
|
+
/** ID of agent task was delegated to */
|
|
353
|
+
delegatedTo?: string;
|
|
354
|
+
/** Scheduled execution time */
|
|
355
|
+
scheduledFor?: Date | string;
|
|
356
|
+
/** Deadline for completion */
|
|
357
|
+
deadline?: Date | string;
|
|
358
|
+
/** When the task started processing */
|
|
359
|
+
startedAt?: Date | string;
|
|
360
|
+
/** When the task completed */
|
|
361
|
+
completedAt?: Date | string;
|
|
362
|
+
/** Task creation timestamp */
|
|
363
|
+
createdAt: Date | string;
|
|
364
|
+
/** Task input data */
|
|
365
|
+
input?: Record<string, unknown>;
|
|
366
|
+
/** Task output/result */
|
|
367
|
+
output?: Record<string, unknown>;
|
|
368
|
+
/** Error message if failed */
|
|
369
|
+
error?: string;
|
|
370
|
+
/** Additional metadata */
|
|
371
|
+
metadata?: Record<string, unknown>;
|
|
372
|
+
}
|
|
373
|
+
/**
|
|
374
|
+
* Zod schema for AgentTask validation.
|
|
375
|
+
*/
|
|
376
|
+
export declare const agentTaskSchema: z.ZodObject<{
|
|
377
|
+
id: z.ZodString;
|
|
378
|
+
agentId: z.ZodString;
|
|
379
|
+
taskType: z.ZodString;
|
|
380
|
+
title: z.ZodOptional<z.ZodString>;
|
|
381
|
+
description: z.ZodString;
|
|
382
|
+
context: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
383
|
+
priority: z.ZodEnum<["low", "medium", "high", "critical"]>;
|
|
384
|
+
status: z.ZodEnum<["queued", "assigned", "active", "paused", "completed", "failed", "delegated", "cancelled"]>;
|
|
385
|
+
source: z.ZodEnum<["system", "user", "agent", "collaboration", "proactive", "scheduled"]>;
|
|
386
|
+
sourceId: z.ZodOptional<z.ZodString>;
|
|
387
|
+
assignedBy: z.ZodOptional<z.ZodString>;
|
|
388
|
+
delegatedTo: z.ZodOptional<z.ZodString>;
|
|
389
|
+
scheduledFor: z.ZodOptional<z.ZodUnion<[z.ZodDate, z.ZodString]>>;
|
|
390
|
+
deadline: z.ZodOptional<z.ZodUnion<[z.ZodDate, z.ZodString]>>;
|
|
391
|
+
startedAt: z.ZodOptional<z.ZodUnion<[z.ZodDate, z.ZodString]>>;
|
|
392
|
+
completedAt: z.ZodOptional<z.ZodUnion<[z.ZodDate, z.ZodString]>>;
|
|
393
|
+
createdAt: z.ZodUnion<[z.ZodDate, z.ZodString]>;
|
|
394
|
+
input: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
395
|
+
output: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
396
|
+
error: z.ZodOptional<z.ZodString>;
|
|
397
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
398
|
+
}, "strip", z.ZodTypeAny, {
|
|
399
|
+
id: string;
|
|
400
|
+
status: "active" | "completed" | "failed" | "queued" | "assigned" | "paused" | "delegated" | "cancelled";
|
|
401
|
+
createdAt: string | Date;
|
|
402
|
+
description: string;
|
|
403
|
+
agentId: string;
|
|
404
|
+
taskType: string;
|
|
405
|
+
context: Record<string, unknown>;
|
|
406
|
+
priority: "low" | "medium" | "high" | "critical";
|
|
407
|
+
source: "agent" | "system" | "user" | "collaboration" | "proactive" | "scheduled";
|
|
408
|
+
error?: string | undefined;
|
|
409
|
+
metadata?: Record<string, unknown> | undefined;
|
|
410
|
+
title?: string | undefined;
|
|
411
|
+
sourceId?: string | undefined;
|
|
412
|
+
assignedBy?: string | undefined;
|
|
413
|
+
delegatedTo?: string | undefined;
|
|
414
|
+
scheduledFor?: string | Date | undefined;
|
|
415
|
+
deadline?: string | Date | undefined;
|
|
416
|
+
startedAt?: string | Date | undefined;
|
|
417
|
+
completedAt?: string | Date | undefined;
|
|
418
|
+
input?: Record<string, unknown> | undefined;
|
|
419
|
+
output?: Record<string, unknown> | undefined;
|
|
420
|
+
}, {
|
|
421
|
+
id: string;
|
|
422
|
+
status: "active" | "completed" | "failed" | "queued" | "assigned" | "paused" | "delegated" | "cancelled";
|
|
423
|
+
createdAt: string | Date;
|
|
424
|
+
description: string;
|
|
425
|
+
agentId: string;
|
|
426
|
+
taskType: string;
|
|
427
|
+
context: Record<string, unknown>;
|
|
428
|
+
priority: "low" | "medium" | "high" | "critical";
|
|
429
|
+
source: "agent" | "system" | "user" | "collaboration" | "proactive" | "scheduled";
|
|
430
|
+
error?: string | undefined;
|
|
431
|
+
metadata?: Record<string, unknown> | undefined;
|
|
432
|
+
title?: string | undefined;
|
|
433
|
+
sourceId?: string | undefined;
|
|
434
|
+
assignedBy?: string | undefined;
|
|
435
|
+
delegatedTo?: string | undefined;
|
|
436
|
+
scheduledFor?: string | Date | undefined;
|
|
437
|
+
deadline?: string | Date | undefined;
|
|
438
|
+
startedAt?: string | Date | undefined;
|
|
439
|
+
completedAt?: string | Date | undefined;
|
|
440
|
+
input?: Record<string, unknown> | undefined;
|
|
441
|
+
output?: Record<string, unknown> | undefined;
|
|
442
|
+
}>;
|
|
443
|
+
/** Inferred type from schema */
|
|
444
|
+
export type AgentTaskInput = z.input<typeof agentTaskSchema>;
|
|
445
|
+
/**
|
|
446
|
+
* Agent persona/personality configuration.
|
|
447
|
+
*/
|
|
448
|
+
export interface AgentPersona {
|
|
449
|
+
/** Display name */
|
|
450
|
+
displayName: string;
|
|
451
|
+
/** Avatar URL */
|
|
452
|
+
avatar?: string;
|
|
453
|
+
/** Communication/voice style descriptor */
|
|
454
|
+
voiceStyle?: string;
|
|
455
|
+
/** Personality traits (e.g., 'professional', 'friendly') */
|
|
456
|
+
traits: string[];
|
|
457
|
+
/** Default greeting message */
|
|
458
|
+
greeting?: string;
|
|
459
|
+
/** Default farewell message */
|
|
460
|
+
farewell?: string;
|
|
461
|
+
/** Default error response */
|
|
462
|
+
errorResponse?: string;
|
|
463
|
+
}
|
|
464
|
+
/**
|
|
465
|
+
* Zod schema for AgentPersona validation.
|
|
466
|
+
*/
|
|
467
|
+
export declare const agentPersonaSchema: z.ZodObject<{
|
|
468
|
+
displayName: z.ZodString;
|
|
469
|
+
avatar: z.ZodOptional<z.ZodString>;
|
|
470
|
+
voiceStyle: z.ZodOptional<z.ZodString>;
|
|
471
|
+
traits: z.ZodArray<z.ZodString, "many">;
|
|
472
|
+
greeting: z.ZodOptional<z.ZodString>;
|
|
473
|
+
farewell: z.ZodOptional<z.ZodString>;
|
|
474
|
+
errorResponse: z.ZodOptional<z.ZodString>;
|
|
475
|
+
}, "strip", z.ZodTypeAny, {
|
|
476
|
+
displayName: string;
|
|
477
|
+
traits: string[];
|
|
478
|
+
avatar?: string | undefined;
|
|
479
|
+
voiceStyle?: string | undefined;
|
|
480
|
+
greeting?: string | undefined;
|
|
481
|
+
farewell?: string | undefined;
|
|
482
|
+
errorResponse?: string | undefined;
|
|
483
|
+
}, {
|
|
484
|
+
displayName: string;
|
|
485
|
+
traits: string[];
|
|
486
|
+
avatar?: string | undefined;
|
|
487
|
+
voiceStyle?: string | undefined;
|
|
488
|
+
greeting?: string | undefined;
|
|
489
|
+
farewell?: string | undefined;
|
|
490
|
+
errorResponse?: string | undefined;
|
|
491
|
+
}>;
|
|
492
|
+
/** Inferred type from schema */
|
|
493
|
+
export type AgentPersonaInput = z.input<typeof agentPersonaSchema>;
|
|
494
|
+
/**
|
|
495
|
+
* MCP (Model Context Protocol) server configuration.
|
|
496
|
+
*/
|
|
497
|
+
export interface MCPServerConfig {
|
|
498
|
+
/** Server name/identifier */
|
|
499
|
+
name: string;
|
|
500
|
+
/** Server URL */
|
|
501
|
+
url: string;
|
|
502
|
+
/** Whether the server is enabled */
|
|
503
|
+
enabled: boolean;
|
|
504
|
+
/** Minimum trust score required to use this server */
|
|
505
|
+
minTrustScore?: number;
|
|
506
|
+
/** Server capabilities/features */
|
|
507
|
+
capabilities?: string[];
|
|
508
|
+
/** Additional configuration */
|
|
509
|
+
config?: Record<string, unknown>;
|
|
510
|
+
}
|
|
511
|
+
/**
|
|
512
|
+
* Zod schema for MCPServerConfig validation.
|
|
513
|
+
*/
|
|
514
|
+
export declare const mcpServerConfigSchema: z.ZodObject<{
|
|
515
|
+
name: z.ZodString;
|
|
516
|
+
url: z.ZodString;
|
|
517
|
+
enabled: z.ZodBoolean;
|
|
518
|
+
minTrustScore: z.ZodOptional<z.ZodNumber>;
|
|
519
|
+
capabilities: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
520
|
+
config: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
521
|
+
}, "strip", z.ZodTypeAny, {
|
|
522
|
+
name: string;
|
|
523
|
+
url: string;
|
|
524
|
+
enabled: boolean;
|
|
525
|
+
minTrustScore?: number | undefined;
|
|
526
|
+
capabilities?: string[] | undefined;
|
|
527
|
+
config?: Record<string, unknown> | undefined;
|
|
528
|
+
}, {
|
|
529
|
+
name: string;
|
|
530
|
+
url: string;
|
|
531
|
+
enabled: boolean;
|
|
532
|
+
minTrustScore?: number | undefined;
|
|
533
|
+
capabilities?: string[] | undefined;
|
|
534
|
+
config?: Record<string, unknown> | undefined;
|
|
535
|
+
}>;
|
|
536
|
+
/** Inferred type from schema */
|
|
537
|
+
export type MCPServerConfigInput = z.input<typeof mcpServerConfigSchema>;
|
|
538
|
+
/**
|
|
539
|
+
* User role for permission context.
|
|
540
|
+
*/
|
|
541
|
+
export type UserRole = 'owner' | 'admin' | 'operator' | 'viewer' | 'both';
|
|
542
|
+
/**
|
|
543
|
+
* Zod schema for UserRole validation.
|
|
544
|
+
*/
|
|
545
|
+
export declare const userRoleSchema: z.ZodEnum<["owner", "admin", "operator", "viewer", "both"]>;
|
|
546
|
+
/**
|
|
547
|
+
* Comprehensive agent configuration for runtime.
|
|
548
|
+
*
|
|
549
|
+
* This is the main configuration structure used when initializing
|
|
550
|
+
* an agent for execution.
|
|
551
|
+
*/
|
|
552
|
+
export interface AgentConfig {
|
|
553
|
+
/** Unique agent identifier */
|
|
554
|
+
agentId: string;
|
|
555
|
+
/** Owner/user identifier */
|
|
556
|
+
userId: string;
|
|
557
|
+
/** User's role/permissions */
|
|
558
|
+
userRole: UserRole;
|
|
559
|
+
/** Agent lifecycle status */
|
|
560
|
+
status: AgentLifecycleStatus;
|
|
561
|
+
/** Current trust score (0-1000) */
|
|
562
|
+
trustScore: number;
|
|
563
|
+
/** Last activity timestamp */
|
|
564
|
+
lastActivity?: Date | string;
|
|
565
|
+
/** Agent name */
|
|
566
|
+
name: string;
|
|
567
|
+
/** Agent description */
|
|
568
|
+
description?: string;
|
|
569
|
+
/** Domain specialization */
|
|
570
|
+
specialization?: AgentSpecialization | string;
|
|
571
|
+
/** Personality traits */
|
|
572
|
+
personalityTraits?: string[];
|
|
573
|
+
/** Custom system prompt */
|
|
574
|
+
systemPrompt?: string;
|
|
575
|
+
/** Enabled capabilities/skills */
|
|
576
|
+
capabilities: string[];
|
|
577
|
+
/** Agent permissions */
|
|
578
|
+
permissions?: AgentPermission[];
|
|
579
|
+
/** AI model identifier */
|
|
580
|
+
model?: string;
|
|
581
|
+
/** Temperature for generation */
|
|
582
|
+
temperature?: number;
|
|
583
|
+
/** Maximum tokens for responses */
|
|
584
|
+
maxTokens?: number;
|
|
585
|
+
/** Configured MCP servers */
|
|
586
|
+
mcpServers?: MCPServerConfig[];
|
|
587
|
+
/** Environment variables */
|
|
588
|
+
environment?: Record<string, string>;
|
|
589
|
+
/** Current session identifier */
|
|
590
|
+
sessionId?: string;
|
|
591
|
+
/** Current conversation identifier */
|
|
592
|
+
conversationId?: string;
|
|
593
|
+
/** Message count in current session */
|
|
594
|
+
messageCount?: number;
|
|
595
|
+
}
|
|
596
|
+
/**
|
|
597
|
+
* Zod schema for AgentConfig validation.
|
|
598
|
+
*/
|
|
599
|
+
export declare const agentConfigSchema: z.ZodObject<{
|
|
600
|
+
agentId: z.ZodString;
|
|
601
|
+
userId: z.ZodString;
|
|
602
|
+
userRole: z.ZodEnum<["owner", "admin", "operator", "viewer", "both"]>;
|
|
603
|
+
status: z.ZodEnum<["draft", "training", "active", "suspended", "archived"]>;
|
|
604
|
+
trustScore: z.ZodNumber;
|
|
605
|
+
lastActivity: z.ZodOptional<z.ZodUnion<[z.ZodDate, z.ZodString]>>;
|
|
606
|
+
name: z.ZodString;
|
|
607
|
+
description: z.ZodOptional<z.ZodString>;
|
|
608
|
+
specialization: z.ZodOptional<z.ZodUnion<[z.ZodEnum<["core", "customer_service", "technical", "creative", "research", "education", "security", "data_analysis", "development", "operations"]>, z.ZodString]>>;
|
|
609
|
+
personalityTraits: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
610
|
+
systemPrompt: z.ZodOptional<z.ZodString>;
|
|
611
|
+
capabilities: z.ZodArray<z.ZodString, "many">;
|
|
612
|
+
permissions: z.ZodOptional<z.ZodArray<z.ZodEnum<["execute", "external", "delegate", "spawn", "admin"]>, "many">>;
|
|
613
|
+
model: z.ZodOptional<z.ZodString>;
|
|
614
|
+
temperature: z.ZodOptional<z.ZodNumber>;
|
|
615
|
+
maxTokens: z.ZodOptional<z.ZodNumber>;
|
|
616
|
+
mcpServers: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
617
|
+
name: z.ZodString;
|
|
618
|
+
url: z.ZodString;
|
|
619
|
+
enabled: z.ZodBoolean;
|
|
620
|
+
minTrustScore: z.ZodOptional<z.ZodNumber>;
|
|
621
|
+
capabilities: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
622
|
+
config: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
623
|
+
}, "strip", z.ZodTypeAny, {
|
|
624
|
+
name: string;
|
|
625
|
+
url: string;
|
|
626
|
+
enabled: boolean;
|
|
627
|
+
minTrustScore?: number | undefined;
|
|
628
|
+
capabilities?: string[] | undefined;
|
|
629
|
+
config?: Record<string, unknown> | undefined;
|
|
630
|
+
}, {
|
|
631
|
+
name: string;
|
|
632
|
+
url: string;
|
|
633
|
+
enabled: boolean;
|
|
634
|
+
minTrustScore?: number | undefined;
|
|
635
|
+
capabilities?: string[] | undefined;
|
|
636
|
+
config?: Record<string, unknown> | undefined;
|
|
637
|
+
}>, "many">>;
|
|
638
|
+
environment: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
639
|
+
sessionId: z.ZodOptional<z.ZodString>;
|
|
640
|
+
conversationId: z.ZodOptional<z.ZodString>;
|
|
641
|
+
messageCount: z.ZodOptional<z.ZodNumber>;
|
|
642
|
+
}, "strip", z.ZodTypeAny, {
|
|
643
|
+
name: string;
|
|
644
|
+
status: "active" | "draft" | "training" | "suspended" | "archived";
|
|
645
|
+
agentId: string;
|
|
646
|
+
capabilities: string[];
|
|
647
|
+
userId: string;
|
|
648
|
+
userRole: "admin" | "owner" | "operator" | "viewer" | "both";
|
|
649
|
+
trustScore: number;
|
|
650
|
+
description?: string | undefined;
|
|
651
|
+
lastActivity?: string | Date | undefined;
|
|
652
|
+
specialization?: string | undefined;
|
|
653
|
+
personalityTraits?: string[] | undefined;
|
|
654
|
+
systemPrompt?: string | undefined;
|
|
655
|
+
permissions?: ("execute" | "external" | "delegate" | "spawn" | "admin")[] | undefined;
|
|
656
|
+
model?: string | undefined;
|
|
657
|
+
temperature?: number | undefined;
|
|
658
|
+
maxTokens?: number | undefined;
|
|
659
|
+
mcpServers?: {
|
|
660
|
+
name: string;
|
|
661
|
+
url: string;
|
|
662
|
+
enabled: boolean;
|
|
663
|
+
minTrustScore?: number | undefined;
|
|
664
|
+
capabilities?: string[] | undefined;
|
|
665
|
+
config?: Record<string, unknown> | undefined;
|
|
666
|
+
}[] | undefined;
|
|
667
|
+
environment?: Record<string, string> | undefined;
|
|
668
|
+
sessionId?: string | undefined;
|
|
669
|
+
conversationId?: string | undefined;
|
|
670
|
+
messageCount?: number | undefined;
|
|
671
|
+
}, {
|
|
672
|
+
name: string;
|
|
673
|
+
status: "active" | "draft" | "training" | "suspended" | "archived";
|
|
674
|
+
agentId: string;
|
|
675
|
+
capabilities: string[];
|
|
676
|
+
userId: string;
|
|
677
|
+
userRole: "admin" | "owner" | "operator" | "viewer" | "both";
|
|
678
|
+
trustScore: number;
|
|
679
|
+
description?: string | undefined;
|
|
680
|
+
lastActivity?: string | Date | undefined;
|
|
681
|
+
specialization?: string | undefined;
|
|
682
|
+
personalityTraits?: string[] | undefined;
|
|
683
|
+
systemPrompt?: string | undefined;
|
|
684
|
+
permissions?: ("execute" | "external" | "delegate" | "spawn" | "admin")[] | undefined;
|
|
685
|
+
model?: string | undefined;
|
|
686
|
+
temperature?: number | undefined;
|
|
687
|
+
maxTokens?: number | undefined;
|
|
688
|
+
mcpServers?: {
|
|
689
|
+
name: string;
|
|
690
|
+
url: string;
|
|
691
|
+
enabled: boolean;
|
|
692
|
+
minTrustScore?: number | undefined;
|
|
693
|
+
capabilities?: string[] | undefined;
|
|
694
|
+
config?: Record<string, unknown> | undefined;
|
|
695
|
+
}[] | undefined;
|
|
696
|
+
environment?: Record<string, string> | undefined;
|
|
697
|
+
sessionId?: string | undefined;
|
|
698
|
+
conversationId?: string | undefined;
|
|
699
|
+
messageCount?: number | undefined;
|
|
700
|
+
}>;
|
|
701
|
+
/** Inferred type from schema */
|
|
702
|
+
export type AgentConfigInput = z.input<typeof agentConfigSchema>;
|
|
703
|
+
/**
|
|
704
|
+
* Type guard for AgentLifecycleStatus.
|
|
705
|
+
*/
|
|
706
|
+
export declare function isAgentLifecycleStatus(value: unknown): value is AgentLifecycleStatus;
|
|
707
|
+
/**
|
|
708
|
+
* Type guard for AgentRuntimeStatus.
|
|
709
|
+
*/
|
|
710
|
+
export declare function isAgentRuntimeStatus(value: unknown): value is AgentRuntimeStatus;
|
|
711
|
+
/**
|
|
712
|
+
* Type guard for AgentPermission.
|
|
713
|
+
*/
|
|
714
|
+
export declare function isAgentPermission(value: unknown): value is AgentPermission;
|
|
715
|
+
/**
|
|
716
|
+
* Type guard for AgentSpecialization.
|
|
717
|
+
*/
|
|
718
|
+
export declare function isAgentSpecialization(value: unknown): value is AgentSpecialization;
|
|
719
|
+
/**
|
|
720
|
+
* Type guard for TaskPriority.
|
|
721
|
+
*/
|
|
722
|
+
export declare function isTaskPriority(value: unknown): value is TaskPriority;
|
|
723
|
+
/**
|
|
724
|
+
* Type guard for TaskStatus.
|
|
725
|
+
*/
|
|
726
|
+
export declare function isTaskStatus(value: unknown): value is TaskStatus;
|
|
727
|
+
/**
|
|
728
|
+
* Type guard for TaskSource.
|
|
729
|
+
*/
|
|
730
|
+
export declare function isTaskSource(value: unknown): value is TaskSource;
|
|
731
|
+
/**
|
|
732
|
+
* Checks if an agent can transition to a new lifecycle status.
|
|
733
|
+
*
|
|
734
|
+
* Valid transitions:
|
|
735
|
+
* - draft -> training, active
|
|
736
|
+
* - training -> active, suspended, draft
|
|
737
|
+
* - active -> suspended, archived
|
|
738
|
+
* - suspended -> active, archived
|
|
739
|
+
* - archived -> (no transitions allowed)
|
|
740
|
+
*
|
|
741
|
+
* @param current - Current lifecycle status
|
|
742
|
+
* @param target - Target lifecycle status
|
|
743
|
+
* @returns True if transition is valid
|
|
744
|
+
*/
|
|
745
|
+
export declare function canTransitionLifecycleStatus(current: AgentLifecycleStatus, target: AgentLifecycleStatus): boolean;
|
|
746
|
+
/**
|
|
747
|
+
* Converts runtime status to lifecycle status where applicable.
|
|
748
|
+
*
|
|
749
|
+
* @param runtimeStatus - Agent runtime status
|
|
750
|
+
* @returns Corresponding lifecycle status or null if no direct mapping
|
|
751
|
+
*/
|
|
752
|
+
export declare function runtimeToLifecycleStatus(runtimeStatus: AgentRuntimeStatus): AgentLifecycleStatus | null;
|
|
753
|
+
/**
|
|
754
|
+
* Gets the numeric priority value for sorting.
|
|
755
|
+
*
|
|
756
|
+
* @param priority - Task priority
|
|
757
|
+
* @returns Numeric value (0-3, higher = more urgent)
|
|
758
|
+
*/
|
|
759
|
+
export declare function getTaskPriorityValue(priority: TaskPriority): number;
|
|
760
|
+
/**
|
|
761
|
+
* Compares two task priorities.
|
|
762
|
+
*
|
|
763
|
+
* @param a - First priority
|
|
764
|
+
* @param b - Second priority
|
|
765
|
+
* @returns -1 if a < b, 0 if equal, 1 if a > b
|
|
766
|
+
*/
|
|
767
|
+
export declare function compareTaskPriorities(a: TaskPriority, b: TaskPriority): -1 | 0 | 1;
|
|
768
|
+
/**
|
|
769
|
+
* Maps legacy status strings to canonical AgentLifecycleStatus.
|
|
770
|
+
*
|
|
771
|
+
* @deprecated Use AgentLifecycleStatus directly. This is for migration only.
|
|
772
|
+
*/
|
|
773
|
+
export declare const LEGACY_STATUS_MAP: Readonly<Record<string, AgentLifecycleStatus>>;
|
|
774
|
+
/**
|
|
775
|
+
* Converts a legacy status string to canonical AgentLifecycleStatus.
|
|
776
|
+
*
|
|
777
|
+
* @deprecated Use AgentLifecycleStatus directly. This is for migration only.
|
|
778
|
+
* @param legacyStatus - Legacy status string
|
|
779
|
+
* @returns Canonical status or 'draft' if not recognized
|
|
780
|
+
*/
|
|
781
|
+
export declare function legacyToLifecycleStatus(legacyStatus: string): AgentLifecycleStatus;
|
|
782
|
+
/**
|
|
783
|
+
* Maps legacy AgentStatus from SDK (uppercase) to canonical types.
|
|
784
|
+
*
|
|
785
|
+
* @deprecated Use AgentRuntimeStatus directly. This is for migration only.
|
|
786
|
+
*/
|
|
787
|
+
export declare const LEGACY_RUNTIME_STATUS_MAP: Readonly<Record<string, AgentRuntimeStatus>>;
|
|
788
|
+
/**
|
|
789
|
+
* Converts a legacy runtime status to canonical AgentRuntimeStatus.
|
|
790
|
+
*
|
|
791
|
+
* @deprecated Use AgentRuntimeStatus directly. This is for migration only.
|
|
792
|
+
* @param legacyStatus - Legacy status string
|
|
793
|
+
* @returns Canonical runtime status or 'OFFLINE' if not recognized
|
|
794
|
+
*/
|
|
795
|
+
export declare function legacyToRuntimeStatus(legacyStatus: string): AgentRuntimeStatus;
|
|
796
|
+
//# sourceMappingURL=agent.d.ts.map
|