/**
 * @license
 * Copyright 2022-2025 Matter.js Authors
 * SPDX-License-Identifier: Apache-2.0
 */
import { ValueSupervisor } from "#behavior/supervision/ValueSupervisor.js";
import { MaybePromise, Transaction } from "#general";
import type { NodeActivity } from "../NodeActivity.js";
export declare let nextInternalId: number;
export interface LocalActorContext extends ValueSupervisor.LocalActorSession {
    /**
     * @deprecated use `context.fabric === undefined` or `hasLocalActor(context)` to detect a local actor
     */
    offline: true;
}
/**
 * The context for operations triggered locally, either for in-process node implementations or remote nodes that are
 * peers of a local node.
 *
 * You can also use {@link LocalActorContext.ReadOnly} for read-only {@link Agent} access.
 */
export declare const LocalActorContext: {
    /**
     * Operate on behalf of a local actor.  This is the context for operations on nodes initiated locally, without
     * authentication.
     *
     * {@link act} provides an {@link ActionContext} you can use to access agents for a {@link Endpoint}.
     * State changes and change events occur once {@link actor} returns.
     * It can return a promise even if the actor method does not return a promise, so manual checks are needed.
     *
     * The {@link Transaction} is destroyed with {@link act} exits so you should not keep a reference to any agents
     * beyond the lifespan of {@link actor}.
     *
     * Offline context is very permissive.  You should use carefully.
     */
    act<T>(purpose: string, actor: (context: LocalActorContext) => MaybePromise<T>, options?: LocalActorContext.Options): MaybePromise<T>;
    /**
     * Create an offline context.
     *
     * This context operates with a {@link Transaction} created via {@link Transaction.open} and the same rules
     * apply for lifecycle management using {@link Transaction.Finalization}.
     */
    open(purpose: string, options?: LocalActorContext.Options): LocalActorContext & Transaction.Finalization;
    /**
     * Normally you need to use {@link LocalActorContext.act} to work with behaviors, and you can only interact with the
     * behaviors in the actor function.  This {@link ActionContext} allows you to create offline agents that remain
     * functional for the lifespan of the node.
     *
     * Write operations will throw an error with this context.
     */
    readonly ReadOnly: LocalActorContext;
    [Symbol.toStringTag]: string;
};
export declare namespace LocalActorContext {
    /**
     * {@link LocalActorContext} configuration options.
     */
    interface Options {
        command?: boolean;
        activity?: NodeActivity;
        isolation?: Transaction.IsolationLevel;
    }
}
//# sourceMappingURL=LocalActorContext.d.ts.map