/** * Resolve a JSON-Pointer-shaped path against the current state and * return just that slice. Saves bandwidth on `observe` for complex * apps where the agent only needs to check a single field. * * Path syntax (RFC 6901): * `''` → the whole state (escape hatch; same as get_state) * `'/auth/user'` → state.auth.user * `'/items/0/id'` → state.items[0].id * `'/key~1with~1slash'` → state['key/with/slash'] * `'/key~0tilde'` → state['key~tilde'] * * Returns `{ value: unknown, found: true }` on hit, `{ found: false, * detail: string }` on miss. The miss is non-fatal: the agent might * be polling an optional field that isn't present yet, and a soft * miss lets it observe the absence directly rather than catching a * thrown error. */ export type QueryStateHost = { getState(): unknown; }; export type QueryStateResult = { found: true; value: unknown; } | { found: false; detail: string; }; export declare function handleQueryState(host: QueryStateHost, args: { path: string; }): QueryStateResult; /** * Walk the path from `root` segment by segment. Empty path returns * root unchanged (RFC 6901's "whole document" reference). Each * segment is unescaped before the lookup; the unescape order matters * (`~1` first, then `~0`) to avoid double-decoding. */ export declare function resolvePath(root: unknown, path: string): QueryStateResult; //# sourceMappingURL=query-state.d.ts.map