agent-afk 5.82.0 → 5.82.2

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.
@@ -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, setPresenceBlocked, PRESENCE_SCHEMA_VERSION, type PresenceFileInfo, type PresenceRecord, type PresenceLiveness, type ReadLivePresenceOptions, } from './presence.js';
6
+ export { writePresenceFile, writePresenceFileSync, 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';
@@ -26,6 +26,7 @@ export interface PresenceRecord extends PresenceFileInfo {
26
26
  heartbeatAgeMs: number | null;
27
27
  }
28
28
  export declare function writePresenceFile(info: PresenceFileInfo): Promise<void>;
29
+ export declare function writePresenceFileSync(info: PresenceFileInfo): void;
29
30
  export declare function touchPresenceHeartbeat(sessionId: string): Promise<void>;
30
31
  export declare function setPresenceAfk(sessionId: string, afk: boolean): Promise<void>;
31
32
  export declare function setPresenceBlocked(sessionId: string, blocked: boolean): Promise<void>;
@@ -59,6 +59,7 @@ export declare class AnthropicDirectProvider implements ModelProvider {
59
59
  private _mcpToolsCache;
60
60
  private _mcpHandlersCache;
61
61
  private _presenceSessionId;
62
+ private _mintedSessionId;
62
63
  constructor(opts?: AnthropicDirectProviderOptions);
63
64
  private buildDispatcher;
64
65
  close(): void;
@@ -1,13 +1 @@
1
- import { type RuntimeStateSource } from '../../../awareness/index.js';
2
- export interface PresenceLifecycleArgs {
3
- depth: number | undefined;
4
- parentSessionId: string | undefined;
5
- sessionId: string | undefined;
6
- currentPresenceSessionId: string | null;
7
- runtimeStateSource: RuntimeStateSource;
8
- surface: string;
9
- cwd: string | undefined;
10
- providerName: string;
11
- model: string;
12
- }
13
- export declare function registerPresenceLifecycle(args: PresenceLifecycleArgs): string | null;
1
+ export { isTopLevelSession, registerPresenceLifecycle, resolveTopLevelSessionId, type PresenceLifecycleArgs, type SessionIdResolution, type SessionIdResolutionArgs, } from '../../shared/presence-lifecycle.js';
@@ -33,6 +33,7 @@ export declare class OpenAICompatibleProvider implements ModelProvider {
33
33
  private _currentPermissionMode;
34
34
  private _initialResolveBase;
35
35
  private _presenceSessionId;
36
+ private _mintedSessionId;
36
37
  constructor(opts?: OpenAICompatibleProviderOptions);
37
38
  query(args: ProviderQueryArgs): ProviderQuery;
38
39
  private buildDispatcher;
@@ -73,4 +73,5 @@ export declare function buildQueryFromConfig(config: AgentConfig, promptStream:
73
73
  mcpManager?: import('../../mcp/index.js').McpManager;
74
74
  useResponsesApi?: boolean;
75
75
  authDeps?: AuthResolverDeps;
76
+ sessionIdOverride?: string;
76
77
  }): OpenAICompatibleQuery;
@@ -0,0 +1,28 @@
1
+ import { type RuntimeStateSource } from '../../awareness/index.js';
2
+ export interface PresenceLifecycleArgs {
3
+ depth: number | undefined;
4
+ parentSessionId: string | undefined;
5
+ sessionId: string | undefined;
6
+ currentPresenceSessionId: string | null;
7
+ runtimeStateSource: RuntimeStateSource;
8
+ surface: string;
9
+ cwd: string | undefined;
10
+ providerName: string;
11
+ model: string;
12
+ }
13
+ export declare function isTopLevelSession(depth: number | undefined, parentSessionId: string | undefined): boolean;
14
+ export interface SessionIdResolutionArgs {
15
+ sessionId: string | undefined;
16
+ resume: string | undefined;
17
+ depth: number | undefined;
18
+ parentSessionId: string | undefined;
19
+ surface: string | undefined;
20
+ memoized: string | null;
21
+ }
22
+ export declare const PRESENCE_MINT_SURFACES: ReadonlySet<string>;
23
+ export interface SessionIdResolution {
24
+ id: string | undefined;
25
+ memoized: string | null;
26
+ }
27
+ export declare function resolveTopLevelSessionId(args: SessionIdResolutionArgs): SessionIdResolution;
28
+ export declare function registerPresenceLifecycle(args: PresenceLifecycleArgs): string | null;
@@ -0,0 +1,3 @@
1
+ export declare function registerPresenceCleanup(sessionId: string): void;
2
+ export declare function unregisterPresenceCleanup(sessionId: string): void;
3
+ export declare function _resetPresenceSignalsForTest(): void;
@@ -4,6 +4,7 @@ export declare const BUILTIN_READ_ALLOWLIST: readonly string[];
4
4
  export declare function resolveExceptionEntry(entry: string): string;
5
5
  export declare function parseReadDenylistEntries(raw: string | undefined): string[];
6
6
  export declare function getReadDenylist(): readonly string[];
7
+ export declare function getReadDenylistDescendants(root: string): string[];
7
8
  export declare function _resetReadDenylistCacheForTests(): void;
8
9
  export declare function isReadDenied(filePath: string): {
9
10
  denied: boolean;
@@ -0,0 +1,6 @@
1
+ import type { BlockedByPolicy, BrowserConfig } from '../types.js';
2
+ export interface RecheckablePage {
3
+ url(): string;
4
+ goBack(): Promise<unknown>;
5
+ }
6
+ export declare function recheckLandedUrl(page: RecheckablePage, config: BrowserConfig, clearedUrl: string, invalidateSession: () => Promise<void>): Promise<BlockedByPolicy | null>;
@@ -5,8 +5,11 @@ export declare class BrowserLauncher {
5
5
  private browser;
6
6
  private readonly sessions;
7
7
  private launchPromise;
8
+ private launchFailure;
8
9
  private shutdownComplete;
9
10
  constructor(config: BrowserConfig);
11
+ private clearLaunchFailure;
12
+ private latchLaunchFailure;
10
13
  ensureBrowser(): Promise<Browser>;
11
14
  isBrowserActive(): boolean;
12
15
  ensureContext(sessionId: string): Promise<BrowserContext>;
@@ -5,6 +5,7 @@ export declare function resetPlaywrightInstallCommandCache(): void;
5
5
  export declare function hasPlaywrightInstallHint(text: string): boolean;
6
6
  export interface PlaywrightHintOptions {
7
7
  headless?: boolean;
8
+ latched?: boolean;
8
9
  }
9
10
  export declare function playwrightMissingHint(err: unknown, opts?: PlaywrightHintOptions): string;
10
- export declare function decoratePlaywrightLaunchError(err: unknown, headless: boolean): unknown;
11
+ export declare function decoratePlaywrightLaunchError(err: unknown, headless: boolean, latched?: boolean): unknown;