export type GitTraceLineOwnershipPermission = "git:read" | "filesystem:read";
export type GitTraceLineOwnershipGuard = {
    allowed?: boolean;
    accepted?: boolean;
    reason?: string;
};
export type GitTraceLineOwnershipRange = {
    startLine: number;
    endLine: number;
};
export type GitTraceLineOwnershipContext = {
    runtimeId?: string;
    sessionId?: string;
    invocationId?: string;
    dryRun?: boolean;
    guard?: GitTraceLineOwnershipGuard;
    allowedRepositoryRoots?: readonly string[];
    grantedPermissions?: readonly GitTraceLineOwnershipPermission[];
    auditMetadata?: Readonly<Record<string, unknown>>;
};
export type GitTraceLineOwnershipTarget = {
    repositoryPath: string;
    filePath: string;
    range: GitTraceLineOwnershipRange;
    revision?: string;
};
export type GitTraceLineOwnershipRequest = {
    target?: Partial<GitTraceLineOwnershipTarget>;
    context?: GitTraceLineOwnershipContext;
    provider?: GitTraceLineOwnershipProvider;
    timeoutMs?: number;
    metadata?: Readonly<Record<string, unknown>>;
    runtimeId?: string;
    invocationId?: string;
    repositoryPath?: string;
    filePath?: string;
    range?: GitTraceLineOwnershipRange;
    startLine?: number;
    endLine?: number;
    revision?: string;
    requestedScopes?: readonly string[];
    allowedScopes?: readonly string[];
    dryRun?: boolean;
};
export type GitTraceLineOwnershipRuntimeEntry = {
    owner: "runtime";
    port: "BaseToolExecutorPort.git.runGit";
    method: "runGit";
    binary: "git";
    argvMode: "fixed-blame-read";
    allowedSubcommand: "blame";
};
export type GitTraceLineOwnershipRisk = {
    category: "read-only-inspection";
    riskLevel: "normal";
    mutatesRepository: false;
    mutatesWorkingTree: false;
    spawnsProcess: true;
    requiresTapApproval: true;
    runtimeOwnsExecution: true;
};
export type GitTraceLineOwnershipEntryEnvelope = {
    commit: string;
    originalLine?: number;
    finalLine?: number;
    author?: string;
    authorMail?: string;
    authorTime?: number;
    summary?: string;
    sourceLine?: string;
    path?: string;
};
export type GitTraceLineOwnershipEnvelope = {
    parser: "git-blame-line-porcelain-v1";
    entries: readonly GitTraceLineOwnershipEntryEnvelope[];
    rawLineCount: number;
    unparsedLineCount: number;
};
export type GitTraceLineOwnershipOutput = {
    kind: "agentCore.basicTool.git.traceLineOwnership";
    target: GitTraceLineOwnershipTarget;
    runtimeEntry: GitTraceLineOwnershipRuntimeEntry;
    risk: GitTraceLineOwnershipRisk;
    gitArgs: readonly string[];
    commandPreview: readonly string[];
    timeoutMs: number;
    dryRun: boolean;
    executionBlocked: boolean;
    providerCalled: boolean;
    exitCode?: number;
    stdout?: string;
    stderr?: string;
    permissionsRequired: readonly GitTraceLineOwnershipPermission[];
    unsafeSideEffects: false;
    resultEnvelope: GitTraceLineOwnershipEnvelope;
};
export type GitTraceLineOwnershipPlan = {
    toolId: "git.traceLineOwnership";
    toolKind: "git.traceLineOwnership";
    capability: "trace-line-ownership";
    runtimeId: string;
    invocationId: string;
    repositoryPath: string;
    filePath: string;
    range: GitTraceLineOwnershipRange;
    revision?: string;
    gitArgs: readonly string[];
    commandPreview: readonly string[];
    requiredPermissions: readonly GitTraceLineOwnershipPermission[];
    runtimeEntry: GitTraceLineOwnershipRuntimeEntry;
    risk: GitTraceLineOwnershipRisk;
    dispatch: "dry-run" | "runtime-git-executor";
    dryRun: boolean;
    wouldReadBlameMetadata: true;
    unsafeSideEffects: false;
    outputEnvelope: {
        stdoutPreview: "";
        stderrPreview: "";
        parsed: false;
    };
    audit: {
        guard: "git-blame-runtime-guard";
        event: "basicTool.git.traceLineOwnership.planned";
        governanceRequired: true;
        tapCanWrap: true;
        metadata: Readonly<Record<string, unknown>>;
    };
};
export type GitTraceLineOwnershipErrorBoundary = "input" | "scope" | "permission" | "governance" | "provider";
export type GitTraceLineOwnershipErrorCode = "MISSING_REPOSITORY_PATH" | "MISSING_FILE_PATH" | "INVALID_ARGUMENT" | "INVALID_CONTEXT" | "INVALID_FILE_PATH" | "INVALID_LINE_RANGE" | "INVALID_REVISION" | "INVALID_TIMEOUT" | "SCOPE_REJECTED" | "PERMISSION_DENIED" | "GOVERNANCE_REJECTED" | "PROVIDER_UNAVAILABLE" | "PROVIDER_REJECTED";
export type GitTraceLineOwnershipError = {
    code: GitTraceLineOwnershipErrorCode;
    message: string;
    boundary: GitTraceLineOwnershipErrorBoundary;
    publicSafe: true;
    safeForRuntimeInspection: true;
    internalDetailExposed: false;
};
export type GitTraceLineOwnershipAuditEvent = {
    type: string;
    toolId: "git.traceLineOwnership";
    invocationId: string;
    dryRun: boolean;
    repositoryPath?: string;
    metadata: Readonly<Record<string, unknown>>;
};
export type GitTraceLineOwnershipResult = {
    ok: true;
    toolId: "git.traceLineOwnership";
    output: GitTraceLineOwnershipOutput;
    plan: GitTraceLineOwnershipPlan;
    audit: readonly GitTraceLineOwnershipAuditEvent[];
    events: readonly string[];
} | {
    ok: false;
    toolId: "git.traceLineOwnership";
    error: GitTraceLineOwnershipError;
    audit: readonly GitTraceLineOwnershipAuditEvent[];
    events: readonly string[];
};
export type GitTraceLineOwnershipProviderRequest = {
    repositoryPath: string;
    args: readonly string[];
    timeoutMs?: number;
};
export type GitTraceLineOwnershipProviderResult = {
    exitCode: number;
    stdout: string;
    stderr: string;
};
export type GitTraceLineOwnershipProvider = (request: GitTraceLineOwnershipProviderRequest, context: GitTraceLineOwnershipContext) => GitTraceLineOwnershipProviderResult | Promise<GitTraceLineOwnershipProviderResult>;
export declare const gitTraceLineOwnershipDescriptor: {
    readonly toolId: "git.traceLineOwnership";
    readonly toolKind: "git.traceLineOwnership";
    readonly capability: "trace-line-ownership";
    readonly route: "agent_executionEngine.basic_toolLayer.baseTools.gitBase.inspection";
    readonly defaultDryRun: true;
    readonly defaultDispatch: "dry-run";
    readonly tapOwnsApproval: true;
    readonly requiresTapApproval: true;
    readonly runtimeEntryPort: "BaseToolExecutorPort.git.runGit";
    readonly operationRisk: "read-only-inspection";
    readonly permissionsRequired: readonly ["git:read", "filesystem:read"];
    readonly defaultTimeoutMs: 30000;
    readonly maxTimeoutMs: 600000;
    readonly unsafeSideEffects: false;
};
export declare const traceLineOwnershipDescriptor: {
    readonly toolId: "git.traceLineOwnership";
    readonly toolKind: "git.traceLineOwnership";
    readonly capability: "trace-line-ownership";
    readonly route: "agent_executionEngine.basic_toolLayer.baseTools.gitBase.inspection";
    readonly defaultDryRun: true;
    readonly defaultDispatch: "dry-run";
    readonly tapOwnsApproval: true;
    readonly requiresTapApproval: true;
    readonly runtimeEntryPort: "BaseToolExecutorPort.git.runGit";
    readonly operationRisk: "read-only-inspection";
    readonly permissionsRequired: readonly ["git:read", "filesystem:read"];
    readonly defaultTimeoutMs: 30000;
    readonly maxTimeoutMs: 600000;
    readonly unsafeSideEffects: false;
};
export declare function parseGitTraceLineOwnership(stdout: string): GitTraceLineOwnershipEnvelope;
export declare function planTraceLineOwnership(request?: GitTraceLineOwnershipRequest): GitTraceLineOwnershipResult;
export declare function executeGitTraceLineOwnership(request?: GitTraceLineOwnershipRequest): Promise<GitTraceLineOwnershipResult>;
