import { MountAgentDevtoolsOptions, AgentDevtoolsHandle, BuildSelectorOptions, PickedEvidence } from '@agent-devtools/widget-core'; export { createAgentCommandsFetcher, createAgentInfoFetcher, createDefaultTransport, createHandoffRequester, createPageContextEnricher, createRelatedImportsFetcher, createSettingsStore, createSourceSliceFetcher } from '@agent-devtools/widget-core'; interface MountAgentDevtoolsAngularOptions extends Omit { describePicked?: MountAgentDevtoolsOptions['describePicked']; } declare function mountAgentDevtoolsAngular(options?: MountAgentDevtoolsAngularOptions): AgentDevtoolsHandle; interface DescribePickedAngularOptions { selector?: BuildSelectorOptions; textLimit?: number; outerHTMLLimit?: number; componentChainDepth?: number; } /** * Build a `PickedEvidence` for a DOM element rendered by Angular Ivy. * * The shape mirrors what the React and Vue adapters produce — the widget * UI and server prompt formatter consume any adapter's evidence * unchanged. Source location is intentionally omitted for now (see * `resolveInstanceSource`), but componentName + componentChain + selector * are enough for the agent to grep for the right `.ts` / `.html` file. */ declare function describePickedAngular(element: Element, options?: DescribePickedAngularOptions): PickedEvidence; interface AngularComponentInstance { constructor: { name?: string; (...args: unknown[]): unknown; }; [key: string]: unknown; } interface AngularSourceLocation { fileName: string; lineNumber: number; columnNumber?: number; } interface AngularComponentRef { instance: AngularComponentInstance | null; componentName: string; source?: AngularSourceLocation; } /** * Walk DOM ancestors yielding the Angular component instance owning each * level. Angular's runtime does not expose a `parent` pointer on the * component instance itself — instead the `ng.getOwningComponent` debug * API tells us which component owns a given DOM element, and we hop up * the host element chain to gather ancestors. Visited instances are * deduplicated so a component that owns multiple sibling nodes only * yields once. */ declare function walkComponentAncestors(element: Element | null | undefined, options?: { readonly maxDepth?: number; }): Generator; /** * Resolve a human-readable component name for an Angular component instance. * * Priority order: * 1. `instance.constructor.name` (TypeScript class name from the @Component * decorated class). Survives most build pipelines because Angular's * compiler keeps the class identifier; minified production builds may * mangle this but the dev-only guard means we never run there. * 2. The constructor's `name` static property (rare but defensive). * 3. Falls back to `'Unknown'` so callers can pass the value through * without null-checking — mirrors the convention used by the React * and Vue 2 adapters. */ declare function resolveComponentName(instance: AngularComponentInstance | null): string; /** * Resolve a workspace-relative source location for an Angular component * instance. Angular's template compiler does not emit `__source` style * props the way React's JSX dev transform does, and the runtime exposes * no file-level metadata for component classes. Production-quality * location resolution requires an AOT build step that records template * positions, which Phase 0 does not ship. * * Until a dedicated source-extraction transform lands, this resolver * returns `undefined` so picker evidence simply omits the `source` field. * The component class name plus selector still gives the agent enough to * locate the file via grep — see `picker-coverage.md` for the policy. */ declare function resolveInstanceSource(_instance: AngularComponentInstance | null): AngularSourceLocation | undefined; declare function getComponentInstanceForElement(element: Element | null): AngularComponentInstance | null; export { type AngularComponentInstance, type AngularComponentRef, type AngularSourceLocation, type DescribePickedAngularOptions, type MountAgentDevtoolsAngularOptions, describePickedAngular, getComponentInstanceForElement, mountAgentDevtoolsAngular as mountAgentDevtools, mountAgentDevtoolsAngular, resolveComponentName, resolveInstanceSource, walkComponentAncestors };