agent-afk 5.112.6 → 5.114.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.
@@ -0,0 +1,3 @@
1
+ import type { ToolHandler } from '../types.js';
2
+ export declare const readWitnessHandler: ToolHandler;
3
+ export declare const searchWitnessHandler: ToolHandler;
@@ -0,0 +1,39 @@
1
+ import type { TraceEvent } from '../../trace/index.js';
2
+ export declare const MAX_LIMIT = 200;
3
+ export declare const MAX_SEARCH_MATCHES = 200;
4
+ export declare function clampLimit(raw: unknown): number;
5
+ export declare function clampSessions(raw: unknown): number;
6
+ export interface ReadWitnessParams {
7
+ session?: string;
8
+ kinds?: string[];
9
+ toolName?: string;
10
+ errorsOnly?: boolean;
11
+ limit?: number;
12
+ }
13
+ export interface ReadWitnessResult {
14
+ sessionId: string;
15
+ events: TraceEvent[];
16
+ totalInTrace: number;
17
+ filtered: number;
18
+ note?: string;
19
+ }
20
+ export declare function readSessionTrace(params: ReadWitnessParams): Promise<ReadWitnessResult>;
21
+ export interface SearchWitnessParams {
22
+ query: string;
23
+ sessions?: number;
24
+ kinds?: string[];
25
+ since?: string;
26
+ }
27
+ export interface SearchMatch {
28
+ sessionId: string;
29
+ event: TraceEvent;
30
+ matchLine: string;
31
+ }
32
+ export interface SearchWitnessResult {
33
+ query: string;
34
+ sessionsAvailable: number;
35
+ sessionsSearched: number;
36
+ matches: SearchMatch[];
37
+ truncatedSessions?: string[];
38
+ }
39
+ export declare function searchAcrossSessions(params: SearchWitnessParams): Promise<SearchWitnessResult>;
@@ -0,0 +1,6 @@
1
+ export declare const MAX_READ_BYTES = 2097152;
2
+ export interface ReadTraceSafeResult {
3
+ content: string;
4
+ truncated: boolean;
5
+ }
6
+ export declare function readTraceSafe(tracePath: string): Promise<ReadTraceSafeResult>;
@@ -0,0 +1,3 @@
1
+ import type { AnthropicToolDef } from './types.js';
2
+ export declare const readWitnessTool: AnthropicToolDef;
3
+ export declare const searchWitnessTool: AnthropicToolDef;
@@ -0,0 +1,8 @@
1
+ export interface TraceDirEntry {
2
+ sessionId: string;
3
+ tracePath: string;
4
+ mtimeMs: number;
5
+ exists: boolean;
6
+ }
7
+ export declare function listTraces(): Promise<TraceDirEntry[]>;
8
+ export declare function resolveLatestSession(): Promise<string | null>;
@@ -1,13 +1,8 @@
1
1
  import { Command } from 'commander';
2
2
  import type { TraceEvent } from '../../agent/trace/index.js';
3
- export interface TraceDirEntry {
4
- sessionId: string;
5
- tracePath: string;
6
- mtimeMs: number;
7
- exists: boolean;
8
- }
9
- export declare function listTraces(): Promise<TraceDirEntry[]>;
10
- export declare function resolveLatestSession(): Promise<string | null>;
3
+ import { listTraces, resolveLatestSession } from '../../agent/trace/listing.js';
4
+ export type { TraceDirEntry } from '../../agent/trace/listing.js';
5
+ export { listTraces, resolveLatestSession };
11
6
  export interface ParsedTrace {
12
7
  events: TraceEvent[];
13
8
  malformed: number;
@@ -0,0 +1,2 @@
1
+ import { Command } from 'commander';
2
+ export declare function registerWitnessCommand(program: Command): void;