import type { Policy } from './base.ts'; import type { PolicyHook } from './types.ts'; /** * The nominal session-scoped brand (python's SessionScopedMixin * inheritance). Detection is by this marker, never by probing for a * `wantsFor` method. `Symbol.for` keeps the brand stable even when two * copies of the package are loaded. */ export declare const SESSION_SCOPED: unique symbol; /** * A policy whose hooks speak for some sessions and not others. A Policy * that also implements this defines a hook on behalf of the sessions * that carry a rule for it (a profile's policy program speaks only for * the sessions under that profile), and says so through `wantsFor`. * `Policies.wants` is the static answer, true as soon as any policy * defines the hook, and every door keeps gating on it; a seam that pays * ahead for a hook (the secret fill drops its masks under a * session-write gate) asks `Policies.wantsFor` instead, which consults * this brand so one profile's door does not charge every session. */ export interface SessionScoped { readonly [SESSION_SCOPED]: true; /** Whether this policy's `hook` will speak for one session. */ wantsFor(hook: PolicyHook, sessionId: string): Promise; } /** Whether this policy speaks per session. */ export declare function isSessionScoped(policy: Policy): policy is Policy & SessionScoped; //# sourceMappingURL=mixin.d.ts.map