/** * Project identity resolution. * * Priority order: * 1. agentId (always available from OpenClaw, stable per session) * 2. Git remote origin URL + relative path (cross-platform, cross-OS-path stable) * 3. Absolute workspace path hash (fallback for non-git directories) * * The agentId is the PRIMARY scope for OpenClaw — every agent session has a unique * stable identifier. Git-based ID is computed when workspaceDir is available so that * observations can be shared across agents working in the same repository. */ export interface ProjectIdentity { /** Primary project identifier used for engram scoping. */ projectId: string; /** The agentId from OpenClaw (always set). */ agentId: string; /** Git remote URL if the workspace is a git repo with a remote. */ gitRemote?: string; /** Relative path within the git repo, if applicable. */ relativePath?: string; } /** * Compute the canonical project ID for the given working directory. * Prefers git-remote-based ID; falls back to path-based ID. */ export declare function projectIDFromWorkspace(workspaceDir: string): string; /** * Resolve the full project identity for an agent session. * * @param agentId - The unique agent session ID from OpenClaw (primary scope). * @param workspaceDir - Optional workspace directory for git-based ID resolution. * @returns A ProjectIdentity with the resolved projectId. */ export declare function resolveIdentity(agentId: string, workspaceDir?: string): ProjectIdentity; //# sourceMappingURL=identity.d.ts.map