import type { RemoteClawConfig } from "../config/config.js"; import { resolveAgentIdFromSessionKey } from "../routing/session-key.js"; /** * Runtime attestation (ADR 0005 H9). Declares the implementation status * of each runtime export in this module. See CONTRIBUTING.md § Module * attestations for the category definitions and the convention for * updating these when sync or rebrand changes the surface. */ export declare const MODULE_ATTESTATIONS: { readonly listAgentEntries: "live"; readonly listAgentIds: "live"; readonly resolveDefaultAgentId: "live"; readonly resolveSessionAgentIds: "live"; readonly resolveSessionAgentId: "live"; readonly resolveAgentConfig: "live"; readonly resolveAgentSkillsFilter: "live"; readonly resolveAgentExplicitModelPrimary: "live"; readonly resolveAgentEffectiveModelPrimary: "live"; readonly resolveAgentModelPrimary: "live"; readonly resolveAgentModelFallbacksOverride: "live"; readonly resolveFallbackAgentId: "live"; readonly resolveRunModelFallbacksOverride: "live"; readonly hasConfiguredModelFallbacks: "live"; readonly resolveEffectiveModelFallbacks: "live"; readonly resolveAgentWorkspaceDir: "live"; readonly resolveAgentIdsByWorkspacePath: "live"; readonly resolveAgentIdByWorkspacePath: "live"; readonly resolveAgentDir: "live"; readonly resolveSessionKeyAgentId: "live"; readonly resolveSoleAgentId: "live"; readonly resolveFirstAgentWorkspace: "live"; readonly resolveAgentWorkspaceDirOrNull: "live"; readonly resolveAgentRuntime: "live"; readonly resolveAgentRuntimeArgs: "live"; readonly resolveAgentRuntimeEnv: "live"; readonly resolveAgentRuntimeOrThrow: "live"; readonly resolveAgentAuth: "live"; }; export { resolveAgentIdFromSessionKey }; type AgentEntry = NonNullable["list"]>[number]; type ResolvedAgentConfig = { name?: string; workspace?: string; agentDir?: string; model?: AgentEntry["model"]; skills?: AgentEntry["skills"]; humanDelay?: AgentEntry["humanDelay"]; heartbeat?: AgentEntry["heartbeat"]; identity?: AgentEntry["identity"]; groupChat?: AgentEntry["groupChat"]; subagents?: AgentEntry["subagents"]; sandbox?: AgentEntry["sandbox"]; tools?: AgentEntry["tools"]; }; export declare function listAgentEntries(cfg: RemoteClawConfig): AgentEntry[]; export declare function listAgentIds(cfg: RemoteClawConfig): string[]; /** * Resolve the default agent ID from config. * Returns the first agent with `default: true`, or the first agent in the list. */ export declare function resolveDefaultAgentId(cfg: RemoteClawConfig): string; export declare function resolveSessionAgentIds(params: { sessionKey?: string; config?: RemoteClawConfig; agentId?: string; }): { defaultAgentId: string; sessionAgentId: string; }; export declare function resolveSessionAgentId(params: { sessionKey?: string; config?: RemoteClawConfig; }): string; export declare function resolveAgentConfig(cfg: RemoteClawConfig, agentId: string): ResolvedAgentConfig | undefined; export declare function resolveAgentSkillsFilter(cfg: RemoteClawConfig, agentId: string): string[] | undefined; export declare function resolveAgentExplicitModelPrimary(cfg: RemoteClawConfig, agentId: string): string | undefined; export declare function resolveAgentEffectiveModelPrimary(cfg: RemoteClawConfig, agentId: string): string | undefined; export declare function resolveAgentModelPrimary(cfg: RemoteClawConfig, agentId: string): string | undefined; export declare function resolveAgentModelFallbacksOverride(cfg: RemoteClawConfig, agentId: string): string[] | undefined; export declare function resolveFallbackAgentId(params: { agentId?: string | null; sessionKey?: string | null; }): string; export declare function resolveRunModelFallbacksOverride(params: { cfg: RemoteClawConfig | undefined; agentId?: string | null; sessionKey?: string | null; }): string[] | undefined; export declare function hasConfiguredModelFallbacks(params: { cfg: RemoteClawConfig | undefined; agentId?: string | null; sessionKey?: string | null; }): boolean; export declare function resolveEffectiveModelFallbacks(params: { cfg: RemoteClawConfig; agentId: string; hasSessionModelOverride: boolean; }): string[] | undefined; export declare function resolveAgentWorkspaceDir(cfg: RemoteClawConfig, agentId: string): string; export declare function resolveAgentIdsByWorkspacePath(cfg: RemoteClawConfig, workspacePath: string): string[]; export declare function resolveAgentIdByWorkspacePath(cfg: RemoteClawConfig, workspacePath: string): string | undefined; export declare function resolveAgentDir(cfg: RemoteClawConfig, agentId: string): string; /** * Alias: upstream introduced resolveSessionKeyAgentId. * Callers use positional args: (sessionKey, cfg). */ export declare function resolveSessionKeyAgentId(sessionKey: string | null | undefined | { sessionKey?: string; config?: RemoteClawConfig; }, cfg?: RemoteClawConfig): string; /** * Alias: upstream introduced resolveSoleAgentId. * Returns the agent ID only when exactly ONE agent is configured. * Returns null for empty config or multi-agent config. */ export declare function resolveSoleAgentId(cfgOrParams: RemoteClawConfig | { sessionKey?: string; config?: RemoteClawConfig; }): string | null; /** * Alias: upstream introduced resolveFirstAgentWorkspace. * Returns null when no agents configured, when agents.list is empty, * or when no agent has a workspace. When agents have workspaces and * agents.defaults.workspace is set, returns defaults.workspace. * Otherwise returns the first agent's workspace from agents.list[0]. */ export declare function resolveFirstAgentWorkspace(cfg: RemoteClawConfig): string | null; /** Upstream-compat: resolveAgentWorkspaceDirOrNull returns null when workspace cannot be resolved. */ export declare function resolveAgentWorkspaceDirOrNull(cfg: RemoteClawConfig, agentId: string): string | null; /** Resolve per-agent runtime (fork-specific CLI runtime identifier). */ export declare function resolveAgentRuntime(cfg: RemoteClawConfig, agentId: string): string | undefined; /** Resolve per-agent runtime args (fork-specific CLI flags). */ export declare function resolveAgentRuntimeArgs(cfg: RemoteClawConfig, agentId: string): string[] | undefined; /** Resolve per-agent runtime env (fork-specific CLI env vars). */ export declare function resolveAgentRuntimeEnv(cfg: RemoteClawConfig, agentId: string): Record | undefined; /** * Resolve per-agent runtime (CLI identifier) — throws if neither per-agent * config nor defaults define a runtime. */ export declare function resolveAgentRuntimeOrThrow(cfg: RemoteClawConfig, agentId: string): string; /** Resolve per-agent auth profile (fork-specific auth profile reference). */ export declare function resolveAgentAuth(cfg: RemoteClawConfig, agentId: string): string | string[] | false | undefined;