agent-afk 5.292.1 → 5.292.3

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,2 @@
1
+ import { AjvJsonSchemaValidator } from '@modelcontextprotocol/sdk/validation/ajv';
2
+ export declare function buildMcpSchemaValidator(): AjvJsonSchemaValidator;
@@ -0,0 +1,27 @@
1
+ import type { AgentConfig } from '../types.js';
2
+ type Env = Record<string, string>;
3
+ export declare const TMP_ENV_KEYS: readonly ["TMPDIR", "TMP", "TEMP"];
4
+ export declare function setSessionTmpdirRootForTests(root: string | undefined): void;
5
+ export declare function sessionTmpdirRoot(): string;
6
+ export declare class SessionTmpdir {
7
+ readonly dir: string;
8
+ readonly root: string;
9
+ private readonly parent;
10
+ private owned;
11
+ constructor(dir: string, root: string, parent: SessionTmpdir | undefined);
12
+ get isOwned(): boolean;
13
+ ensure(): boolean;
14
+ cleanup(): Promise<void>;
15
+ }
16
+ export declare function isSessionTmpdirDisabled(): boolean;
17
+ export declare function withTmpEnv(base: Env | undefined, dir: string): Env;
18
+ export declare function lookupSessionTmpdir(e: Env | undefined): SessionTmpdir | undefined;
19
+ export declare function withSessionTmpdir(config: AgentConfig): AgentConfig;
20
+ export declare function childTmpEnvPatch(base: Env | undefined, subagentId: string): {
21
+ env?: Env;
22
+ };
23
+ export declare function ensureSessionTmpdir(e: Env | undefined): boolean;
24
+ export declare function resolveSpawnTmpEnv(e: Env | undefined): Env | undefined;
25
+ export declare function runInTmpdirScope<R>(dir: string | undefined, fn: () => R): R;
26
+ export declare function cleanupSessionTmpdir(e: Env | undefined): Promise<void>;
27
+ export {};
@@ -1,4 +1,5 @@
1
1
  import type { DetachableToolRegistry, DetachToken, DetachedToolResult } from './detach-registry.js';
2
+ export declare const SETTLE_AFTER_KILL_MS = 5000;
2
3
  export declare function bashDetachLabel(command: string): string;
3
4
  export declare function buildBashDelivery(toolUseId: string, label: string, output: string, closeCode: number | null, closeSignal: string | null, startedAt: number): DetachedToolResult;
4
5
  export declare function applyBashDetach(registry: DetachableToolRegistry, toolUseId: string, command: string, onDetach: (token: DetachToken, label: string) => void): DetachToken;
@@ -22,6 +22,7 @@ export interface CoreExecDeps {
22
22
  callHandlerContext: (call: ToolCall) => ToolHandlerContext;
23
23
  gateDeps: () => PreDispatchGateDeps;
24
24
  toolDefs: readonly AnthropicToolDef[];
25
+ tmpdirScope?: string | undefined;
25
26
  }
26
27
  export declare function isRegisteredTool(toolName: string, deps: CoreExecDeps): boolean;
27
28
  export declare function unknownToolMessage(toolName: string, deps: CoreExecDeps): string;
@@ -1 +1,2 @@
1
1
  export declare function scrubBashEnv(env: Record<string, string | undefined> | undefined): Record<string, string | undefined>;
2
+ export declare function buildChildEnv(contextEnv: Record<string, string> | undefined): Record<string, string | undefined>;
@@ -8,7 +8,11 @@ export interface Check {
8
8
  export declare function checkAnthropicKey(): Promise<Check>;
9
9
  export declare function checkCodexKey(): Promise<Check>;
10
10
  export declare function checkXaiAuth(): Promise<Check>;
11
- export declare function checkNpmBinOnPath(): Promise<Check>;
11
+ export interface NpmBinOnPathDeps {
12
+ platform?: NodeJS.Platform;
13
+ pathDelimiter?: string;
14
+ }
15
+ export declare function checkNpmBinOnPath(deps?: NpmBinOnPathDeps): Promise<Check>;
12
16
  export declare function checkDirWritable(name: string, getDir: () => string): Promise<Check>;
13
17
  export declare function checkConfigFile(): Promise<Check>;
14
18
  export declare function checkRequiredEnvVars(): Promise<Check | null>;