agent-afk 5.80.1 → 5.81.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.
@@ -8,7 +8,9 @@ export interface AfkModeGateOptions {
8
8
  route?: (request: ElicitationRequest, options: {
9
9
  signal: AbortSignal;
10
10
  onActive?: () => void;
11
+ sessionId?: string;
11
12
  }) => Promise<ElicitationResult>;
13
+ sessionId?: string;
12
14
  traceWriter?: TraceWriter;
13
15
  }
14
16
  export declare function createAfkModeGate(getMode: () => PermissionMode, cwd?: string, getCwd?: () => string | undefined, opts?: AfkModeGateOptions): HookHandler;
@@ -3,5 +3,5 @@ export { buildRuntimeSnapshot, parseView, formatEnvironmentFragment, } from './r
3
3
  export { buildRuntimeStateSource, type RuntimeSourceDeps, } from './runtime-source.js';
4
4
  export { getRuntimeStateTool, AWARENESS_TOOL_NAMES, createGetRuntimeStateHandler, wrapDispatcherWithRuntimeState, } from './tool.js';
5
5
  export { gatherWorkspace } from './workspace-source.js';
6
- export { writePresenceFile, removePresenceFile, removePresenceFileSync, readPresenceFiles, readLivePresenceFiles, touchPresenceHeartbeat, PRESENCE_SCHEMA_VERSION, type PresenceFileInfo, type PresenceRecord, type PresenceLiveness, type ReadLivePresenceOptions, } from './presence.js';
6
+ export { writePresenceFile, removePresenceFile, removePresenceFileSync, readPresenceFiles, readLivePresenceFiles, touchPresenceHeartbeat, setPresenceBlocked, PRESENCE_SCHEMA_VERSION, type PresenceFileInfo, type PresenceRecord, type PresenceLiveness, type ReadLivePresenceOptions, } from './presence.js';
7
7
  export { isProcessAlive, classifyPidLiveness, type ProcessLiveness, } from '../process-liveness.js';
@@ -17,6 +17,7 @@ export interface PresenceFileInfo {
17
17
  afk?: boolean;
18
18
  schemaVersion?: number;
19
19
  heartbeatAt?: string;
20
+ blockedSince?: string;
20
21
  }
21
22
  export type PresenceLiveness = ProcessLiveness;
22
23
  export interface PresenceRecord extends PresenceFileInfo {
@@ -27,6 +28,7 @@ export interface PresenceRecord extends PresenceFileInfo {
27
28
  export declare function writePresenceFile(info: PresenceFileInfo): Promise<void>;
28
29
  export declare function touchPresenceHeartbeat(sessionId: string): Promise<void>;
29
30
  export declare function setPresenceAfk(sessionId: string, afk: boolean): Promise<void>;
31
+ export declare function setPresenceBlocked(sessionId: string, blocked: boolean): Promise<void>;
30
32
  export declare function updatePresenceCwd(sessionId: string, cwd: string): Promise<void>;
31
33
  export declare function removePresenceFile(sessionId: string): Promise<void>;
32
34
  export declare function removePresenceFileSync(sessionId: string): void;
@@ -13,11 +13,13 @@ declare class ElicitationRouter {
13
13
  route(request: ElicitationRequest, options: {
14
14
  signal: AbortSignal;
15
15
  onActive?: () => void;
16
+ sessionId?: string;
16
17
  }): Promise<ElicitationResult>;
17
18
  }
18
19
  export declare const elicitationRouter: ElicitationRouter;
19
20
  export declare function routeElicitation(request: ElicitationRequest, options: {
20
21
  signal: AbortSignal;
21
22
  onActive?: () => void;
23
+ sessionId?: string;
22
24
  }): Promise<ElicitationResult>;
23
25
  export {};
@@ -12,6 +12,7 @@ export interface ToolHandlerContext {
12
12
  allowAll?: boolean;
13
13
  traceWriter?: TraceWriter;
14
14
  toolUseId?: string;
15
+ sessionId?: string;
15
16
  }
16
17
  export type ToolHandler = (input: unknown, signal: AbortSignal, context?: ToolHandlerContext) => Promise<ToolResult>;
17
18
  export type ConcurrencyClassifier = (toolName: string, input?: unknown) => boolean;