agent-afk 5.36.2 → 5.37.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.
@@ -4,6 +4,7 @@ export interface DetectorOptions {
4
4
  minRepeats?: number;
5
5
  closureAnomalyMinOccurrences?: number;
6
6
  subagentBlockMinOccurrences?: number;
7
+ subagentReadDenialMinOccurrences?: number;
7
8
  toolFailureMinFailures?: number;
8
9
  toolFailureMinRate?: number;
9
10
  }
@@ -0,0 +1,13 @@
1
+ import type { DetectorResult } from '../../schemas.js';
2
+ import type { SessionRead } from '../reader.js';
3
+ export declare const DEFAULT_SUBAGENT_READ_DENIAL_MIN_OCCURRENCES = 2;
4
+ export interface SubagentReadDenialOptions {
5
+ minOccurrences?: number;
6
+ }
7
+ export declare function normalizeReason(reason: string): string;
8
+ export declare function detectSubagentReadDenial(sessions: SessionRead[], options?: SubagentReadDenialOptions): DetectorResult[];
9
+ export declare function computeFingerprint(args: {
10
+ hookEvent: string;
11
+ normalizedReason: string;
12
+ }): string;
13
+ export declare function makeSlug(fingerprint: string): string;
@@ -4,6 +4,7 @@ export declare const FailurePatternSchema: z.ZodEnum<{
4
4
  "subagent-block": "subagent-block";
5
5
  "closure-anomaly": "closure-anomaly";
6
6
  "tool-failure-density": "tool-failure-density";
7
+ "subagent-read-denial": "subagent-read-denial";
7
8
  }>;
8
9
  export type FailurePattern = z.infer<typeof FailurePatternSchema>;
9
10
  export declare const SeveritySchema: z.ZodEnum<{
@@ -40,6 +41,7 @@ export declare const FailureCardSchema: z.ZodObject<{
40
41
  "subagent-block": "subagent-block";
41
42
  "closure-anomaly": "closure-anomaly";
42
43
  "tool-failure-density": "tool-failure-density";
44
+ "subagent-read-denial": "subagent-read-denial";
43
45
  }>;
44
46
  severity: z.ZodEnum<{
45
47
  medium: "medium";
@@ -76,6 +78,7 @@ export declare const DetectorResultSchema: z.ZodObject<{
76
78
  "subagent-block": "subagent-block";
77
79
  "closure-anomaly": "closure-anomaly";
78
80
  "tool-failure-density": "tool-failure-density";
81
+ "subagent-read-denial": "subagent-read-denial";
79
82
  }>;
80
83
  severity: z.ZodEnum<{
81
84
  medium: "medium";
@@ -106,6 +109,7 @@ export declare const CardIndexEventSchema: z.ZodObject<{
106
109
  "subagent-block": "subagent-block";
107
110
  "closure-anomaly": "closure-anomaly";
108
111
  "tool-failure-density": "tool-failure-density";
112
+ "subagent-read-denial": "subagent-read-denial";
109
113
  }>;
110
114
  occurrenceCount: z.ZodNumber;
111
115
  evidenceAdded: z.ZodNumber;
@@ -292,6 +296,7 @@ export declare const EvalAssertionSchema: z.ZodObject<{
292
296
  "subagent-block": "subagent-block";
293
297
  "closure-anomaly": "closure-anomaly";
294
298
  "tool-failure-density": "tool-failure-density";
299
+ "subagent-read-denial": "subagent-read-denial";
295
300
  }>;
296
301
  detectorVersion: z.ZodString;
297
302
  rationale: z.ZodString;
@@ -340,6 +345,7 @@ export declare const EvalCaseSchema: z.ZodObject<{
340
345
  "subagent-block": "subagent-block";
341
346
  "closure-anomaly": "closure-anomaly";
342
347
  "tool-failure-density": "tool-failure-density";
348
+ "subagent-read-denial": "subagent-read-denial";
343
349
  }>;
344
350
  detectorVersion: z.ZodString;
345
351
  rationale: z.ZodString;
@@ -429,6 +435,7 @@ export declare const EvalRunSchema: z.ZodObject<{
429
435
  "subagent-block": "subagent-block";
430
436
  "closure-anomaly": "closure-anomaly";
431
437
  "tool-failure-density": "tool-failure-density";
438
+ "subagent-read-denial": "subagent-read-denial";
432
439
  }>;
433
440
  contract: z.ZodNullable<z.ZodString>;
434
441
  status: z.ZodEnum<{
@@ -481,6 +488,7 @@ export declare const EvalRunIndexEventSchema: z.ZodObject<{
481
488
  "subagent-block": "subagent-block";
482
489
  "closure-anomaly": "closure-anomaly";
483
490
  "tool-failure-density": "tool-failure-density";
491
+ "subagent-read-denial": "subagent-read-denial";
484
492
  }>;
485
493
  contract: z.ZodNullable<z.ZodString>;
486
494
  status: z.ZodEnum<{