/** * reticle_state output projection — pure, shared by the browser SDK (which applies them * BEFORE the transport so a scoped read of a huge store isn't truncated) and the server (back-compat * fallback when an older browser returns the whole store). `selectPath` walks a dot-path (with numeric * array indices) and, on a miss, returns the keys that WERE available at the last good level so a wrong * path is diagnosable rather than a bare null. `capDepth` prunes deeply-nested values to a budget. * `projectComponentState` strips React fiber plumbing (effect chains) from a component hook read. */ /** Result of walking a dot-path: the value, or a near-miss with the keys available where it stopped. */ export interface PathSelection { found: boolean; value: unknown; /** On a miss: the keys present at the deepest level reached (so the agent can correct the path). */ availableKeys?: string[]; /** * On a miss where `availableKeys` is a SAMPLE: how many keys were really there. * * Present only when the list was cut. `availableKeys` is capped, and without this a 10,000-key * store answered a wrong path with 50 names and no sign there were more — so an agent reading it * concludes the key it wants does not exist, when it is simply key 51. That reads as the strongest * possible negative signal and it is a false one, which is the precise failure this near-miss * payload was added to prevent. */ totalKeys?: number; } /** * Walk `path` (e.g. "captionCache.v3.0.text") into `root`. Empty path returns root unchanged. * Segments are own keys, canonical array indices, Map keys, or `length` on an array/string. */ export declare function selectPath(root: unknown, path: string): PathSelection; /** * Prune `value` to `maxDepth` levels: objects/arrays deeper than the budget collapse to a compact * placeholder string recording their size, so a huge store can be skimmed shape-first. A negative * budget means "no cap". */ export declare function capDepth(value: unknown, maxDepth: number): unknown; /** * Project a component-state read down to what an agent can act on: the hook VALUES. Effect entries * are dropped (see `EFFECT_HOOK_KEYS`); everything else — useState values, useRef, and the * `[value, deps]` tuple of useMemo/useCallback — is passed through untouched, because React exposes * no hook KINDS here and a two-element state value is indistinguishable from a memo tuple. * A non-conforming value (no `hooks` array) is returned unchanged. */ export declare function projectComponentState(result: unknown): unknown;