export type GitManageSubmoduleAction = "status" | "add" | "update" | "sync" | "deinit";
export type GitManageSubmodulePermission = "git:read" | "git:write" | "filesystem:read" | "filesystem:write" | "network:egress";
export type GitManageSubmoduleRiskCategory = "read-only-inspection" | "workspace-mutation" | "remote-network" | "destructive";
export type GitManageSubmoduleGuard = {
    allowed?: boolean;
    accepted?: boolean;
    reason?: string;
};
export type GitManageSubmoduleContext = {
    runtimeId?: string;
    sessionId?: string;
    invocationId?: string;
    dryRun?: boolean;
    guard?: GitManageSubmoduleGuard;
    allowedRepositoryRoots?: readonly string[];
    grantedPermissions?: readonly GitManageSubmodulePermission[];
    auditMetadata?: Readonly<Record<string, unknown>>;
};
export type GitManageSubmoduleTarget = {
    repositoryPath: string;
    action: GitManageSubmoduleAction;
    submodulePath?: string;
    remoteUrl?: string;
    branch?: string;
    recursive: boolean;
};
export type GitManageSubmoduleRequest = {
    target?: Partial<GitManageSubmoduleTarget>;
    context?: GitManageSubmoduleContext;
    provider?: GitManageSubmoduleProvider;
    timeoutMs?: number;
    metadata?: Readonly<Record<string, unknown>>;
    runtimeId?: string;
    invocationId?: string;
    repositoryPath?: string;
    cwd?: string;
    action?: GitManageSubmoduleAction;
    submodulePath?: string;
    path?: string;
    remoteUrl?: string;
    url?: string;
    branch?: string;
    recursive?: boolean;
    dryRun?: boolean;
};
export type GitManageSubmoduleRuntimeEntry = {
    owner: "runtime";
    port: "BaseToolExecutorPort.git.runGit";
    method: "runGit";
    binary: "git";
    argvMode: "fixed-manage-submodule";
    allowedSubcommand: "submodule";
};
export type GitManageSubmoduleRisk = {
    category: GitManageSubmoduleRiskCategory;
    riskLevel: "normal" | "risky" | "destructive";
    mutatesRepository: boolean;
    mutatesWorkingTree: boolean;
    mutatesFilesystem: boolean;
    mutatesGitMetadata: boolean;
    mayUseNetwork: boolean;
    spawnsProcess: true;
    requiresTapApproval: boolean;
    runtimeOwnsExecution: true;
};
export type GitSubmoduleStatusEntry = {
    raw: string;
    status?: "initialized" | "uninitialized" | "modified" | "unknown";
    commit?: string;
    path?: string;
    ref?: string;
};
export type GitManageSubmoduleEnvelope = {
    parser: "git-submodule-output-v1";
    action: GitManageSubmoduleAction;
    submodulePath?: string;
    remoteUrl?: string;
    branch?: string;
    recursive: boolean;
    exitCode?: number;
    stdoutLineCount: number;
    stderrLineCount: number;
    operationHint?: string;
    entries: readonly GitSubmoduleStatusEntry[];
    submoduleChanged: boolean;
};
export type GitManageSubmoduleOutput = {
    kind: "agentCore.basicTool.git.manageSubmodule";
    target: GitManageSubmoduleTarget;
    runtimeEntry: GitManageSubmoduleRuntimeEntry;
    risk: GitManageSubmoduleRisk;
    gitArgs: readonly string[];
    commandPreview: readonly string[];
    timeoutMs: number;
    dryRun: boolean;
    executionBlocked: boolean;
    providerCalled: boolean;
    exitCode?: number;
    stdout?: string;
    stderr?: string;
    permissionsRequired: readonly GitManageSubmodulePermission[];
    unsafeSideEffects: boolean;
    mayUseNetwork: boolean;
    resultEnvelope: GitManageSubmoduleEnvelope;
};
export type GitManageSubmodulePlan = {
    toolId: "git.manageSubmodule";
    toolKind: "git.manageSubmodule";
    capability: "manage-git-submodule";
    runtimeId: string;
    invocationId: string;
    repositoryPath: string;
    action: GitManageSubmoduleAction;
    gitArgs: readonly string[];
    commandPreview: readonly string[];
    requiredPermissions: readonly GitManageSubmodulePermission[];
    runtimeEntry: GitManageSubmoduleRuntimeEntry;
    risk: GitManageSubmoduleRisk;
    dispatch: "dry-run" | "runtime-git-executor";
    dryRun: boolean;
    wouldModifyGitMetadata: boolean;
    wouldUseNetwork: boolean;
    unsafeSideEffects: boolean;
    outputEnvelope: {
        stdoutPreview: "";
        stderrPreview: "";
        parsed: false;
    };
    audit: {
        guard: "git-submodule-runtime-guard";
        event: "basicTool.git.manageSubmodule.planned";
        governanceRequired: boolean;
        tapCanWrap: true;
        metadata: Readonly<Record<string, unknown>>;
    };
};
export type GitManageSubmoduleErrorBoundary = "input" | "scope" | "permission" | "governance" | "provider";
export type GitManageSubmoduleErrorCode = "MISSING_REPOSITORY_PATH" | "MISSING_SUBMODULE_PATH" | "MISSING_REMOTE_URL" | "INVALID_ACTION" | "INVALID_ARGUMENT" | "INVALID_CONTEXT" | "INVALID_TIMEOUT" | "SCOPE_REJECTED" | "PERMISSION_DENIED" | "GOVERNANCE_REJECTED" | "PROVIDER_UNAVAILABLE" | "PROVIDER_REJECTED";
export type GitManageSubmoduleError = {
    code: GitManageSubmoduleErrorCode;
    message: string;
    boundary: GitManageSubmoduleErrorBoundary;
    publicSafe: true;
    safeForRuntimeInspection: true;
    internalDetailExposed: false;
};
export type GitManageSubmoduleAuditEvent = {
    type: string;
    toolId: "git.manageSubmodule";
    invocationId: string;
    dryRun: boolean;
    repositoryPath?: string;
    metadata: Readonly<Record<string, unknown>>;
};
export type GitManageSubmoduleResult = {
    ok: true;
    toolId: "git.manageSubmodule";
    output: GitManageSubmoduleOutput;
    plan: GitManageSubmodulePlan;
    audit: readonly GitManageSubmoduleAuditEvent[];
    events: readonly string[];
} | {
    ok: false;
    toolId: "git.manageSubmodule";
    error: GitManageSubmoduleError;
    audit: readonly GitManageSubmoduleAuditEvent[];
    events: readonly string[];
};
export type GitManageSubmoduleProviderRequest = {
    repositoryPath: string;
    args: readonly string[];
    timeoutMs?: number;
};
export type GitManageSubmoduleProviderResult = {
    exitCode: number;
    stdout: string;
    stderr: string;
};
export type GitManageSubmoduleProvider = (request: GitManageSubmoduleProviderRequest, context: GitManageSubmoduleContext) => GitManageSubmoduleProviderResult | Promise<GitManageSubmoduleProviderResult>;
export declare const gitManageSubmoduleDescriptor: {
    readonly toolId: "git.manageSubmodule";
    readonly toolKind: "git.manageSubmodule";
    readonly capability: "manage-git-submodule";
    readonly route: "agent_executionEngine.basic_toolLayer.baseTools.gitBase.advanced";
    readonly defaultDryRun: true;
    readonly defaultDispatch: "dry-run";
    readonly tapOwnsApproval: true;
    readonly requiresTapApproval: true;
    readonly runtimeEntryPort: "BaseToolExecutorPort.git.runGit";
    readonly operationRisk: "submodule-management";
    readonly permissionsRequired: readonly ["git:read", "filesystem:read"];
    readonly defaultTimeoutMs: 120000;
    readonly maxTimeoutMs: 900000;
};
export declare function parseGitManageSubmoduleResult(providerResult: GitManageSubmoduleProviderResult | undefined, target: GitManageSubmoduleTarget): GitManageSubmoduleEnvelope;
export declare function planManageSubmodule(request?: GitManageSubmoduleRequest): GitManageSubmoduleResult;
export declare const planGitSubmoduleManagement: typeof planManageSubmodule;
export declare const planGitManageSubmodule: typeof planManageSubmodule;
export declare function executeGitManageSubmodule(request?: GitManageSubmoduleRequest): Promise<GitManageSubmoduleResult>;
