@mnemom/agent-alignment-protocol 0.1.8 → 0.2.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.
@@ -180,3 +180,97 @@ export interface CoherenceResult {
180
180
  /** Proposed conflict resolution (if conflicts exist) */
181
181
  proposed_resolution?: { type: string; reason: string } | null;
182
182
  }
183
+
184
+ // --- Fleet Coherence Types (E-05: N-Way Value Coherence) ---
185
+
186
+ /** A single pairwise coherence entry in the fleet matrix. */
187
+ export interface PairwiseEntry {
188
+ /** First agent ID */
189
+ agent_a: string;
190
+ /** Second agent ID */
191
+ agent_b: string;
192
+ /** Pairwise coherence result */
193
+ result: CoherenceResult;
194
+ }
195
+
196
+ /** An agent flagged as an outlier in fleet coherence. */
197
+ export interface FleetOutlier {
198
+ /** Agent ID */
199
+ agent_id: string;
200
+ /** Agent's mean pairwise score */
201
+ agent_mean_score: number;
202
+ /** Fleet-wide mean score */
203
+ fleet_mean_score: number;
204
+ /** Standard deviations below fleet mean */
205
+ deviation: number;
206
+ /** Values causing primary conflicts */
207
+ primary_conflicts: string[];
208
+ }
209
+
210
+ /** A cluster of compatible agents. */
211
+ export interface FleetCluster {
212
+ /** Cluster identifier */
213
+ cluster_id: number;
214
+ /** Agent IDs in this cluster */
215
+ agent_ids: string[];
216
+ /** Mean coherence score within the cluster */
217
+ internal_coherence: number;
218
+ /** Values shared by all agents in the cluster */
219
+ shared_values: string[];
220
+ /** Values that distinguish this cluster from others */
221
+ distinguishing_values: string[];
222
+ }
223
+
224
+ /** A value dimension where agents diverge. */
225
+ export interface ValueDivergence {
226
+ /** The value in question */
227
+ value: string;
228
+ /** Agent IDs that declare this value */
229
+ agents_declaring: string[];
230
+ /** Agent IDs missing this value */
231
+ agents_missing: string[];
232
+ /** Agent IDs whose conflicts_with includes this value */
233
+ agents_conflicting: string[];
234
+ /** Estimated impact on fleet score if resolved */
235
+ impact_on_fleet_score: number;
236
+ }
237
+
238
+ /** Summary of one agent's position in the fleet. */
239
+ export interface AgentCoherenceSummary {
240
+ /** Agent ID */
241
+ agent_id: string;
242
+ /** Mean pairwise score with all other agents */
243
+ mean_score: number;
244
+ /** Number of compatible pairs */
245
+ compatible_count: number;
246
+ /** Number of conflicting pairs */
247
+ conflict_count: number;
248
+ /** Cluster this agent belongs to */
249
+ cluster_id: number;
250
+ /** Whether this agent is flagged as an outlier */
251
+ is_outlier: boolean;
252
+ }
253
+
254
+ /** Result of N-way fleet coherence analysis. */
255
+ export interface FleetCoherenceResult {
256
+ /** Mean of all pairwise coherence scores */
257
+ fleet_score: number;
258
+ /** Minimum pairwise score (weakest link) */
259
+ min_pair_score: number;
260
+ /** Maximum pairwise score */
261
+ max_pair_score: number;
262
+ /** Number of agents analyzed */
263
+ agent_count: number;
264
+ /** Number of pairwise comparisons */
265
+ pair_count: number;
266
+ /** All pairwise coherence results */
267
+ pairwise_matrix: PairwiseEntry[];
268
+ /** Agents flagged as outliers */
269
+ outliers: FleetOutlier[];
270
+ /** Clusters of compatible agents */
271
+ clusters: FleetCluster[];
272
+ /** Value dimensions where agents diverge */
273
+ divergence_report: ValueDivergence[];
274
+ /** Per-agent coherence summaries */
275
+ agent_summaries: AgentCoherenceSummary[];
276
+ }