/** * Worker API Proxy Helpers — promise wrappers, introspection attachers, * and hallucination interceptors for `mj.*` API proxies. */ /** * Wraps a tool call Promise with a Proxy that gives actionable Autonomous Healing * errors when an agent forgets `await` and accesses properties or iterates directly. */ export declare function wrapPromise(promise: Promise, methodName: string): Promise; /** * Attaches `.schema()`, `.help()`, and `.describe()` introspection methods to a tool function. */ export declare function attachMethodIntrospection(targetFn: (...args: unknown[]) => unknown, group: string, methodName: string, getSchema: () => string, customDescription?: string): void; /** * Interceptor for `getConfig()` hallucination. */ export declare function createGetConfigInterceptor(): () => Promise; /** * Interceptor for `getBriefing()` hallucination. */ export declare function createGetBriefingInterceptor(): () => Promise; /** * Interceptor for `readResource()` hallucination with URI-aware suggestions. */ export declare function createReadResourceInterceptor(): (uri?: string) => Promise; /** * Creates a factory function proxy (e.g. `mj.getInstance()`, `new mj.getClient()`) that returns `api`. */ export declare function createFactoryFnProxy(api: Record): object; /** * Creates a rejection proxy when an unknown top-level group or property is accessed on `mj`. */ export declare function createUnknownGroupRejectionProxy(prop: string, reason: string): object; //# sourceMappingURL=proxy-helpers.d.ts.map