/** * Shared helpers – path resolution, file I/O, artifact discovery, bootstrap. */ export { isInside, isReadError, normalizeRelPath, looksLikeSwarmHandoffPath } from "./shared.js"; export declare const SERVER_ROOT: string; export declare const PACKAGE_ROOT: string; export declare function resolveWorkspaceRoot(): string; export declare const WORKSPACE_ROOT: string; export declare const DEFAULTS_ROOT: string; export declare const ALL_MCP_CLIENTS: readonly ["codex", "vscode", "claude", "cursor", "antigravity"]; export type McpClient = (typeof ALL_MCP_CLIENTS)[number]; export declare const ALL_LLM_PROVIDERS: readonly ["ollama"]; export type LlmProvider = (typeof ALL_LLM_PROVIDERS)[number]; export declare const ALL_AGENTS: readonly ["orchestrator", "vos", "ui", "coders", "astgrep", "skeptic", "ops", "research", "spec", "builder", "qa", "docs", "memory", "security", "observability", "eval", "release"]; export type AgentRole = (typeof ALL_AGENTS)[number]; export declare const SWARM_AGENTS: readonly ["orchestrator", "vos", "ui", "coders"]; export type SwarmAgentRole = (typeof SWARM_AGENTS)[number]; export declare const COMPOSABLE_AGENTS: readonly ["astgrep", "skeptic", "ops", "research", "spec", "builder", "qa", "docs", "memory", "security", "observability", "eval", "release"]; export type ComposableAgentRole = (typeof COMPOSABLE_AGENTS)[number]; export declare const SWARM_SUBAGENT_MAP: Record; export type TaskKey = "todo" | "role_tasks" | "cli_work_split" | "lessons" | "readme" | "handoff_template" | "handoff_example" | "handoff_example_vos_ui" | "handoff_example_ui_coders"; export type KernelKey = "directive_kernel" | "agent_registry"; export declare const AGENT_FILES: Record; export declare const AGENT_MANIFEST_FILES: Record; export declare const TASK_FILES: Record; export declare const KERNEL_FILES: Record; export type ArtifactSource = "workspace" | "package-defaults" | "missing"; export interface SkillReference { name: string; path: string; source: "workspace" | "package-defaults"; } export interface BootstrapOptions { projectName?: string; force?: boolean; includeMcpConfig?: boolean; includeClientConfigBundle?: boolean; llmProvider?: LlmProvider; ollamaModel?: string; ollamaBaseUrl?: string; } export interface BootstrapResult { created: string[]; updated: string[]; skipped: string[]; } export declare function wsPath(...segments: string[]): string; /** Normalize a path for validation: workspace-relative, forward slashes. */ export declare function normalizePathForValidation(path: string): string; /** Check if a role is a swarm agent (vs composable). */ export declare function isSwarmRole(role: string): role is (typeof SWARM_AGENTS)[number]; /** Atomically write a file via tmp + rename to prevent partial writes. */ export declare function atomicWrite(filePath: string, content: string): string; /** Check if a file exists. Relative paths are workspace-relative. */ export declare function fileExists(filePath: string): boolean; export declare function classifyPathSource(path?: string): ArtifactSource; /** Safely read a workspace file, returning either text or a not-found/access message. */ export declare function safeRead(filePath: string): string; /** Safely write a workspace file atomically (tmp + rename), creating directories if needed. */ export declare function safeWrite(filePath: string, content: string): string; /** * Execute `fn` while holding a per-path serialization lock. * Prevents concurrent read-modify-write cycles on the same file * within a single process. Cross-process safety relies on atomic rename. */ export declare function withFileLock(path: string, fn: () => T | Promise): Promise; export declare function getAgentInstructionPath(role: AgentRole): string | undefined; export declare function getAgentManifestPath(role: AgentRole): string | undefined; export declare function readAgentInstructions(role: AgentRole): string; export declare function readAgentManifest(role: AgentRole): string; export declare function getTaskArtifactPath(key: TaskKey): string | undefined; export declare function readTaskArtifact(key: TaskKey): string; export declare function getKernelArtifactPath(key: KernelKey): string | undefined; export declare function readKernelArtifact(key: KernelKey): string; export declare function resolveWritableTaskPath(key: TaskKey): string; export declare function listAvailableSkills(): SkillReference[]; export declare function getSkillPath(name: string): string | undefined; export declare function readSkillInstructions(name: string): string; export declare function getMcpClientBundlePath(client: McpClient): string; export declare function getMcpClientInstallHint(client: McpClient): string; export declare function getMcpServerConfigSnippet(client?: McpClient): string; export declare function getAllMcpServerConfigSnippets(): Record; export declare function bootstrapAceWorkspace(options?: BootstrapOptions): BootstrapResult; export interface DriftEntry { asset_path: string; runtime_path: string; status: "match" | "drift" | "missing-runtime" | "missing-asset"; } export interface DriftReport { checked: number; drifted: number; missing_runtime: number; entries: DriftEntry[]; } /** * Compare packaged assets against runtime workspace copies. * Detects silent divergence between authoritative defaults and live state. */ export declare function detectAssetDrift(): DriftReport; //# sourceMappingURL=helpers.d.ts.map