import type { NodeMeta } from '../../../core/canvas/types.js'; import type { AttachSession } from './context.js'; export type NodeIdentity = Pick | undefined; export interface IdentityHooks { /** Drop a late refresh that lands after the viewer is gone. */ isTornDown: () => boolean; /** Repaint the badge/chip the identity feeds. */ onChanged: () => void; } export interface NodeIdentityOwner { current: () => NodeIdentity; /** Re-read from the canvas source. Fire-and-forget; failures are ignored * (the badge simply keeps its last known value). */ refresh: () => void; } export declare function createNodeIdentity(ctx: Pick, initial: NodeIdentity, hooks: IdentityHooks): NodeIdentityOwner;