agent-afk 5.276.21 → 5.276.23

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.
@@ -2,6 +2,7 @@ import { type ProviderRouteHints } from '../providers/index.js';
2
2
  export declare function loadAnthropicCredential(): string | undefined;
3
3
  export declare function preloadClaudeKeychainOAuth(provider: string): Promise<string | undefined>;
4
4
  export declare function _resetRefreshedClaudeCodeOauthToken(): void;
5
+ export declare function setRefreshedClaudeCodeOauthToken(token: string): void;
5
6
  export declare function hasProcessLocalRefreshedToken(): boolean;
6
7
  export declare function loadOpenAICredential(): string | undefined;
7
8
  export declare function loadXaiApiKey(): string | undefined;
@@ -0,0 +1,23 @@
1
+ import type { AgentConfig } from '../../types/config-types.js';
2
+ import type { RuntimeStateSource } from '../../awareness/index.js';
3
+ import { type SessionIdResolution } from '../shared/presence-lifecycle.js';
4
+ export interface ResolveSessionArgs {
5
+ config: AgentConfig;
6
+ surface: string;
7
+ mintedSessionId: string | null;
8
+ }
9
+ export interface ResolveSessionResult {
10
+ resolved: SessionIdResolution;
11
+ nextMintedSessionId: string | null;
12
+ }
13
+ export declare function resolveSessionId(args: ResolveSessionArgs): ResolveSessionResult;
14
+ export interface RegisterPresenceArgs {
15
+ resolved: SessionIdResolution;
16
+ config: AgentConfig;
17
+ surface: string;
18
+ runtimeStateSource: RuntimeStateSource;
19
+ providerName: string;
20
+ modelName: string;
21
+ currentPresenceSessionId: string | null;
22
+ }
23
+ export declare function registerSessionPresence(args: RegisterPresenceArgs): string | null;
@@ -19,10 +19,11 @@ export interface SessionIdResolutionArgs {
19
19
  surface: string | undefined;
20
20
  memoized: string | null;
21
21
  }
22
- export declare const PRESENCE_MINT_SURFACES: ReadonlySet<string>;
22
+ export declare const PRESENCE_ADVERTISE_SURFACES: ReadonlySet<string>;
23
23
  export interface SessionIdResolution {
24
24
  id: string | undefined;
25
25
  memoized: string | null;
26
+ shouldAdvertise: boolean;
26
27
  }
27
28
  export declare function resolveTopLevelSessionId(args: SessionIdResolutionArgs): SessionIdResolution;
28
29
  export declare function registerPresenceLifecycle(args: PresenceLifecycleArgs): string | null;
@@ -18,7 +18,7 @@ export interface AssembleChildConfigArgs<T> {
18
18
  childController: AbortController;
19
19
  workspaceStore?: WorkspaceStore;
20
20
  parentCwd: string | undefined;
21
- parentApiKey: string | undefined;
21
+ parentApiKey: (() => string | undefined) | undefined;
22
22
  parentBaseUrl: string | undefined;
23
23
  parentProvider: BundledProviderName | undefined;
24
24
  parentTraceWriter: TraceSink | undefined;
@@ -34,7 +34,7 @@ export interface SubagentManagerOptions {
34
34
  parentAbortSignal?: AbortSignal;
35
35
  hookRegistry?: HookRegistry;
36
36
  progressSink?: SubagentProgressSink;
37
- apiKey?: string;
37
+ apiKey?: string | (() => string | undefined);
38
38
  baseUrl?: string;
39
39
  parentModel?: string;
40
40
  cwd?: string;
@@ -33,6 +33,7 @@ export declare class BrowserLauncher {
33
33
  shutdown(): Promise<void>;
34
34
  activeSessions(): number;
35
35
  private contextOptions;
36
+ private closeContextSafe;
36
37
  private loadStorageState;
37
38
  private saveStorageState;
38
39
  }