import type { OpenClawPluginApi } from '../openclaw-sdk.js'; export interface PathResolverOptions { workspaceDir?: string; normalizeWorkspace?: boolean; logger?: { debug?: (_msg: string) => void; info?: (_msg: string) => void; warn?: (_msg: string) => void; error?: (_msg: string) => void; }; } export declare const PD_ENV_VARS: { readonly WORKSPACE_DIR: 'PD_WORKSPACE_DIR'; readonly STATE_DIR: 'PD_STATE_DIR'; readonly DEBUG: 'DEBUG'; }; export declare const PD_ENV_DESCRIPTIONS: Record; export declare function printEnvVarHelp(): void; export interface PDConfig { workspace?: string; state?: string; debug?: boolean; } export declare class PathResolver { private static extensionRoot; private workspaceDir; private stateDir; private readonly logger?; private readonly normalizeWorkspace; private initialized; static setExtensionRoot(extensionRootPath: string): void; static getExtensionRoot(): string | null; constructor(options?: PathResolverOptions); private log; private detectWorkspaceDir; private normalizePath; normalizeWorkspacePath(inputPath: string): string; getWorkspaceDir(): string; getStateDir(): string; resolve(key: string): string; ensureStateDir(): void; static createFromHookContext(ctx: Record): PathResolver; } export declare function createDefaultConfig(targetPath?: string): string; /** * Resolve workspace directory via OpenClaw's official API. * * Replaces the removed `api.workspaceDir` field. * * Priority: api.runtime.agent.resolveAgentWorkspaceDir(agentId) * → PathResolver.getWorkspaceDir() (PD env vars, config file, default) * * @param api - Plugin API instance * @param agentId - Agent ID (defaults to 'main' if not provided) * @returns Resolved workspace directory, or `undefined` if all resolution paths fail */ export declare function resolveWorkspaceDirFromApi(api: OpenClawPluginApi | undefined, agentId?: string): string | undefined;