import { existsSync } from 'fs'; import type { Config } from './schema.js'; export { ENV_VARS, resolveHomeDir, resolveStateDir, resolveXopcDatabasePath, XOPC_DB_FILENAME } from './paths-state.js'; export { resolveDefaultAgentWorkspaceDir } from './workspace-defaults.js'; export { resolveAgentWorkspaceDir, resolveAgentDir as resolveAgentDirFromConfig, resolveAgentHomeDir as resolveAgentHomeDirFromConfig, } from '../agent/agent-scope.js'; export declare const FILENAMES: { readonly CONFIG: "xopc.json"; readonly MODELS_JSON: "models.json"; /** Primary SQLite state database (`~/.xopc/xopc.db`). */ readonly XOPC_DB: "xopc.db"; readonly EXTENSIONS_LOCK: "extensions-lock.json"; readonly CREDENTIALS_PROFILES: "auth-profiles.json"; readonly WORKSPACE_STATE: "workspace.json"; readonly SKILLS_CACHE: "skills-cache.json"; /** Hub / CLI install provenance for ~/.xopc/skills/. */ readonly SKILLS_LOCK: "skills-lock.json"; readonly PID: "pid"; readonly STATUS: "status.json"; readonly SOCKET: "agent.sock"; }; export declare const WORKSPACE_FILES: { readonly SOUL: "SOUL.md"; readonly IDENTITY: "IDENTITY.md"; readonly AGENTS: "AGENTS.md"; readonly TOOLS: "TOOLS.md"; readonly HEARTBEAT: "HEARTBEAT.md"; }; /** * Resolve the main config file path */ export declare function resolveConfigPath(): string; /** * Resolve the credentials directory */ export declare function resolveCredentialsDir(): string; /** * Resolve the global auth-profiles.json path */ export declare function resolveAuthProfilesPath(): string; /** * Resolve OAuth token file path for a provider */ export declare function resolveOAuthPath(provider: string): string; /** * Internal agent state dir: `stateDir/agents//agent/` * (credentials, inbox IPC, pid, agent.json — not the Markdown workspace). */ export declare function resolveAgentDir(config: Config, agentId: string): string; /** * Per-agent home: `stateDir/agents//` (sessions + `agent/`). */ export declare function resolveAgentHomeDir(config: Config, agentId: string): string; /** Agent profile Markdown root: `stateDir/agents//profile/`. */ export declare function resolveAgentProfileDir(config: Config, agentId: string): string; /** Single file under {@link resolveAgentProfileDir} (basename only). */ export declare function resolveAgentProfileMarkdownPath(config: Config, agentId: string, filename: string): string; /** * Resolve a profile system Markdown path (SOUL.md, …) under the agent `profile/` directory. */ export declare function resolveWorkspaceFile(config: Config, filename: string, agentId: string): string; /** * OpenClaw-aligned: per-agent auth-profiles.json directly under agent dir (no credentials subdirectory). */ export declare function resolveAgentAuthProfilesPath(config: Config, agentId: string): string; /** * Resolve the inbox directory for an agent */ export declare function resolveInboxDir(config: Config, agentId: string): string; /** * Resolve the pending inbox directory */ export declare function resolveInboxPendingDir(config: Config, agentId: string): string; /** * Resolve the processed inbox directory */ export declare function resolveInboxProcessedDir(config: Config, agentId: string): string; /** * Resolve a specific inbox message path */ export declare function resolveInboxMessagePath(config: Config, messageId: string, pending: boolean, agentId: string): string; /** * Resolve the pid file path */ export declare function resolvePidPath(config: Config, agentId: string): string; /** * Resolve the status.json path */ export declare function resolveStatusPath(config: Config, agentId: string): string; /** * Resolve the Unix socket path */ export declare function resolveSocketPath(config: Config, agentId: string): string; /** * Resolve the extensions directory (global) */ export declare function resolveExtensionsDir(): string; /** * Resolve the extensions lockfile path */ export declare function resolveExtensionsLockPath(): string; /** * Per-agent extensions directory (`…/agents//agent/extensions/`) — used for discovery of * legacy or manually placed copies. CLI, web store, and `extensions dev` symlink installs use * {@link resolveExtensionsDir} (`~/.xopc/extensions`) only. */ export declare function resolveWorkspaceExtensionsDir(config: Config, agentId: string): string; /** * Resolve the skills directory (global) */ export declare function resolveSkillsDir(): string; /** * Resolve a specific skill path */ export declare function resolveSkillPath(skillId: string): string; /** * Skills hub lock file (~/.xopc/skills-lock.json): install source + content hash per managed skill id. */ export declare function resolveSkillsLockPath(): string; /** * Resolve the logs directory */ export declare function resolveLogsDir(): string; /** * Resolve a specific log file path */ export declare function resolveLogPath(date: string): string; /** * Resolve the bin directory */ export declare function resolveBinDir(): string; /** * Resolve the xopc CLI path */ export declare function resolveXopcBinPath(): string; /** * Resolve the tools directory */ export declare function resolveToolsDir(): string; /** * Resolve the Node.js tools directory */ export declare function resolveNodeToolsDir(): string; /** * Resolve the current Node.js bin directory */ export declare function resolveNodeBinDir(): string; /** * Resolve the node binary path */ export declare function resolveNodeBinPath(): string; /** * Resolve the npm binary path */ export declare function resolveNpmBinPath(): string; /** * Resolve the models.json path */ export declare function resolveModelsJsonPath(): string; /** * OpenClaw-aligned: workspace setup state directory (`/.xopc/`). */ export declare function resolveWorkspaceStateDir(config: Config, agentId: string): string; /** * OpenClaw-aligned: workspace setup state file (`/.xopc/workspace.json`). */ export declare function resolveWorkspaceStatePath(config: Config, agentId: string): string; /** * Resolve the skills cache file path (internal agent state, under agent dir). */ export declare function resolveSkillsCachePath(config: Config, agentId: string): string; /** * Resolve the bundled extensions directory (shipped with xopc). * * Layout-dependent candidates (first existing wins): * - `XOPC_BUNDLED_EXTENSIONS_ROOT` (Electron packaged gateway override) * - `dist/src/config` → `dist/extensions` (npm / gateway) * - `src/config` → `dist/extensions` when built, else `extensions/` (dev, tsx) * - `out/server` → `dist/electron/extensions` (Electron extension bundles) */ export declare function hasBundledExtensionManifest(dir: string): boolean; export declare function resolveBundledExtensionsDir(): string | null; /** * Resolve the bundled skills directory (shipped with xopc) */ export declare function resolveBundledSkillsDir(): string | null; /** * Path to extension-sdk entry (for jiti / extension loader aliases). */ export declare function resolveExtensionSdkPath(): string; export { existsSync };