import type { BaseToolStorageRecordInput, BaseToolStoredRecord } from "../../../storagePool/baseToolStorage/baseToolStorageRecords.js";
export type { BaseToolStorageRecordInput, BaseToolStorageRecordKind, BaseToolStoredRecord, } from "../../../storagePool/baseToolStorage/baseToolStorageRecords.js";
export type BasicToolStorageOperation = "put" | "read" | "reuse" | "expire";
export type BasicToolStorageBoundary = "input" | "contract" | "scope" | "resource";
export type BaseToolStorageBoundary = "input" | "contract" | "governance" | "scope" | "storage";
export type BaseToolStorageGate = {
    accepted: boolean;
    reason?: string;
};
export type BasicToolStorageScope = {
    runtimeId?: string;
    sessionId?: string;
    tenantId?: string;
};
export type BasicToolStorageRecord = {
    key: string;
    material: unknown;
    scope: Required<Pick<BasicToolStorageScope, "runtimeId" | "sessionId">> & Pick<BasicToolStorageScope, "tenantId">;
    createdAtMs: number;
    expiresAtMs?: number;
    reusable: boolean;
    metadata: Readonly<Record<string, unknown>>;
};
export type BasicToolStorageRequest = {
    operation?: BasicToolStorageOperation;
    scope?: BasicToolStorageScope;
    key?: string;
    material?: unknown;
    existingRecord?: BasicToolStorageRecord;
    nowMs?: number;
    ttlMs?: number;
    reusable?: boolean;
    dryRun?: boolean;
    allowCrossSessionReuse?: boolean;
    metadata?: Readonly<Record<string, unknown>>;
};
export type BaseToolStorageWriteRequest = {
    runtimeId?: string;
    sessionId?: string;
    invocationId?: string;
    records?: readonly BaseToolStorageRecordInput[];
    requestedScopes?: readonly string[];
    allowedScopes?: readonly string[];
    dryRun?: boolean;
    contract?: BaseToolStorageGate;
    governance?: BaseToolStorageGate;
};
export type BasicToolStorageErrorCode = "MISSING_RUNTIME_ID" | "MISSING_SESSION_ID" | "MISSING_STORAGE_KEY" | "MISSING_MATERIAL" | "MATERIAL_NOT_FOUND" | "MATERIAL_EXPIRED" | "ISOLATION_VIOLATION" | "INVALID_TTL" | "REAL_STORAGE_MUTATION_BLOCKED";
export type BaseToolStorageErrorCode = "MISSING_RUNTIME_ID" | "MISSING_SESSION_ID" | "MISSING_RECORDS" | "MISSING_RECORD_ID" | "MISSING_RECORD_KIND" | "MISSING_TOOL_NAME" | "INVALID_RECORD_PAYLOAD" | "CONTRACT_REJECTED" | "GOVERNANCE_REJECTED" | "SCOPE_DENIED" | "REAL_STORAGE_NOT_ALLOWED";
export type BasicToolStorageError = {
    code: BasicToolStorageErrorCode;
    message: string;
    boundary: BasicToolStorageBoundary;
    publicSafe: true;
};
export type BaseToolStorageError = {
    code: BaseToolStorageErrorCode;
    message: string;
    boundary: BaseToolStorageBoundary;
    safeForRuntimeInspection: true;
    internalDetailExposed: false;
};
export type BasicToolStoragePlan = {
    kind: "agentCore.basicTool.storagePlan";
    operation: BasicToolStorageOperation;
    key: string;
    scope: Required<Pick<BasicToolStorageScope, "runtimeId" | "sessionId">> & Pick<BasicToolStorageScope, "tenantId">;
    record?: BasicToolStorageRecord;
    existingRecord?: BasicToolStorageRecord;
    expired: boolean;
    reusable: boolean;
    wouldMutateStorage: boolean;
    dryRun: true;
    unsafeSideEffects: false;
    audit: {
        event: "agentCore.basicTool.storageLogic.planned";
        metadata: Readonly<Record<string, unknown>>;
    };
};
export type BaseToolStoragePlan = {
    kind: "agentCore.basicTool.storageLogic.writePlan";
    pool: "storagePool.baseToolStorage";
    runtimeId: string;
    sessionId: string;
    invocationId: string;
    records: readonly BaseToolStoredRecord[];
    reuseIndex: Readonly<Record<string, readonly string[]>>;
    acceptedScopes: readonly string[];
    logic: {
        operation: "write-records";
        dryRun: true;
        wouldMutateStorage: true;
        persisted: false;
        isolation: "runtime-session";
    };
    audit: {
        event: "agentCore.basicTool.storageLogic.writePlanned";
        metadata: Readonly<Record<string, unknown>>;
    };
    unsafeSideEffects: false;
};
export type BasicToolStorageResult = {
    ok: true;
    plan: BasicToolStoragePlan;
    events: readonly string[];
} | {
    ok: false;
    error: BasicToolStorageError;
    events: readonly string[];
};
export type BaseToolStorageWriteResult = {
    ok: true;
    plan: BaseToolStoragePlan;
    events: readonly string[];
} | {
    ok: false;
    error: BaseToolStorageError;
    events: readonly string[];
};
export declare const basicToolStorageLogicDescriptor: {
    readonly capability: "manage-basic-tool-material-storage";
    readonly layer: "agent_executionEngine.basic_toolLayer.storageLogic";
    readonly defaultOperation: "put";
    readonly defaultDryRun: true;
    readonly unsafeSideEffects: false;
    readonly storagePool: "storagePool.baseToolStorage";
};
export declare function planBasicToolStorageOperation(request?: BasicToolStorageRequest): BasicToolStorageResult;
export declare function planBaseToolStorageWrite(request?: BaseToolStorageWriteRequest): BaseToolStorageWriteResult;
