/** Extract `data` from standard NG API responses: `{ status, data, ... }` */ export declare const ngExtract: (raw: unknown) => unknown; /** Extract paginated content from NG API responses: `{ data: { content, totalElements|totalItems } }` */ export declare const pageExtract: (raw: unknown) => { items: unknown[]; total: number; }; /** Extract `data` from NG API and wrap primitive values in an object for structuredContent compatibility. */ export declare const countExtract: (raw: unknown) => { count: number; _error?: string; }; /** Pass-through extractor — returns raw response unchanged. Used for APIs that don't wrap in `data`. */ export declare const passthrough: (raw: unknown) => unknown; /** Offset-paginated list (OffsetPaginatedResult): { entities, totalCount } */ export declare const offsetListExtract: (raw: unknown) => { items: unknown[]; total: number; }; /** * STO Global Exemptions extractor. * API response: `{ exemptions: [...], pagination: { page, pageSize, totalPages, totalItems }, counts: {...} }` * Projects each exemption to a clean, display-friendly shape (issue title, severity, requester name, * target name, etc.) so the LLM picks the right columns and skips the opaque IDs. Normalized to the * standard `{ items, total, page, pageSize, totalPages, counts }` shape used by all other paginated * resources, with an explicit `_nextPageHint` so pagination can't be misinterpreted. */ export declare const stoExemptionsExtract: (raw: unknown, input?: Record) => unknown; /** * STO SAST remediation DiffOccurrences * (`GET /sto/api/v2/sast-remediation/diff-occurrences`). * * API shape: * { validationScanId, existingOccurrences: [...], newOccurrences: [...], * existingCount, newCount, matchedCount } * * Flatten existing+new into `items[]` tagged with `_partition` so agents can * tell still-present vs newly introduced occurrences without two list calls. * Fingerprint is not on the wire (Diff matching is server-side only). */ export declare const stoSastRemediationDiffExtract: (raw: unknown) => unknown; /** * AI Evals control plane — paginated list: `{ data, page, limit, total_elements }`. */ export declare const aiEvalsListExtract: (raw: unknown) => { items: unknown[]; total: number; }; /** * AI Evals — bare array response (e.g. suite evaluations, metric set entries list). */ export declare const aiEvalsArrayExtract: (raw: unknown) => { items: unknown[]; total: number; }; /** * SCS-specific extractor — strips null, undefined, empty string, empty array, * and empty object fields recursively from API responses. SCS payloads contain * ~40% empty/null fields; removing them yields significant token savings. */ export declare const scsCleanExtract: (raw: unknown) => unknown; /** * Factory: SCS list extractor that strips empty fields AND selects only specified * fields from each item. Builds on scsCleanExtract to further reduce token usage * for list responses by keeping only actionable fields (IDs, names, counts, scores). * * @param fields - field names to retain from each list item */ export declare const scsListExtract: (fields: string[]) => (raw: unknown) => unknown; /** * Factory for HAR (Artifact Registry) list responses. * HAR wraps lists as `{ data: { : [...], itemCount, pageIndex, ... }, status }`. * Normalizes to `{ items, total, pageIndex, pageSize, pageCount }` so the deep link * code can find the list via `LIST_ARRAY_KEYS`. */ export declare const harListExtract: (arrayKey: string) => (raw: unknown) => unknown; /** * Factory for v1 list responses (bare arrays). * If `wrapperKey` is provided, each item is unwrapped: `{ project: {...} }` → `{...}`. * Total is derived from array length since response headers aren't accessible. */ export declare const v1ListExtract: (wrapperKey?: string) => (raw: unknown) => { items: unknown[]; total: number; }; /** Factory for v1 single-item responses that may be wrapped: `{ org: {...} }` → `{...}`. */ export declare const v1Unwrap: (wrapperKey: string) => (raw: unknown) => unknown; /** * Organization GET/POST/PUT responses: unwrap standard NG `{ status, data: { organization } }` * and prefer `organization` over legacy `org` when both could appear. */ export declare const unwrapOrgResponse: (raw: unknown) => unknown; /** * Project GET/POST/PUT responses: unwrap NG `{ status, data: { project } }` → project entity. */ export declare const unwrapProjectResponse: (raw: unknown) => unknown; /** * Project LIST responses: unwrap NG `{ data: { content: [{ project: {...} }, ...] } }`. * Each item in `content` is wrapped in a `{ project: {...} }` envelope — unwrap to * expose `identifier`, `name`, `orgIdentifier` directly on each item. */ export declare const projectListExtract: (raw: unknown) => { items: unknown[]; total: number; }; /** Factory for GraphQL field extraction (used by CCM). */ export declare const gqlExtract: (field: string) => (raw: unknown) => unknown; /** * Extracts the runtime input template from the Harness pipeline template endpoint. * Unwraps `data.inputSetTemplateYaml`, `data.hasInputSets`, `data.modules`, and adds * a `_hint` field describing whether inputs are required. */ export declare const runtimeInputExtract: (raw: unknown) => unknown; /** * Extracts the dynamic-execution response for * POST /v1/orgs/{org}/projects/{project}/pipelines/{pipeline}/execute/dynamic. * * The upstream returns `{ execution_details: { execution_id, status } }`. * Project to a flat, stable public shape — `{ execution_id, status }` — and * preserve any other top-level fields the API may add (without leaking the * original `execution_details` envelope). Returning a flat shape mirrors * how `pipeline.run` surfaces the planExecutionId so chained tools * (`harness_get(resource_type='execution', ...)`) work without re-mapping. */ export declare const dynamicExecutionExtract: (raw: unknown) => unknown; /** * Extracts merged input set data for a pipeline execution from * GET /pipeline/api/pipelines/execution/{planExecutionId}/inputsetV2. * * Projects to a stable shape: { inputSetYaml, inputSetTemplateYaml, resolvedYaml, * inputSetDetails, inputSetBranchName, executionId } so the public tool boundary * never leaks the NG response envelope or unrelated debug fields. `inputSetDetails` * is normalized to `[{identifier, name}]` even when the upstream returns a richer * object — agents only need those two fields per the spec. */ export declare const executionInputsExtract: (raw: unknown, input?: Record) => unknown; /** * Extracts CCM list responses with views/totalCount structure. * Maps `data.views` → `items` and `data.totalCount` → `total`. * Used by multiple CCM APIs that return this response pattern. */ export declare const ccmViewsExtract: (raw: unknown) => { items: unknown[]; total: number; }; /** Extract anomaly list: returns { items, total } so skipCompact marker survives normalization. */ export declare const anomalyListExtract: (raw: unknown) => { items: unknown[]; total: number; }; /** * Extracts CCM cost breakdown data from GraphQL perspectiveGrid response. * Maps `data.perspectiveGrid.data` → `items` and `data.perspectiveTotalCount` → `total`. */ export declare const ccmBreakdownExtract: (raw: unknown) => { items: unknown[]; total: number; }; /** * Extracts CCM cost time series stats from GraphQL perspectiveTimeSeriesStats response. * Returns the `stats` array from `data.perspectiveTimeSeriesStats.stats`. */ export declare const ccmTimeseriesExtract: (raw: unknown) => unknown; /** * Extracts CCM cost summary from a dual-mode GraphQL response. * When `data.ccmMetaData` is present (metadata query), returns it directly. * Otherwise returns `{ trendStats, forecastCost }` for a perspective summary query. */ export declare const ccmSummaryExtract: (raw: unknown) => unknown; /** * Extracts CCM perspective-scoped recommendations from GraphQL response. * Returns `{ items, stats }` from `data.recommendationsV2` and `data.recommendationStatsV2`. */ export declare const ccmRecommendationsExtract: (raw: unknown) => { items: unknown[]; stats: unknown; }; /** Extract dashboard list response: `{ items, pages, resource }` */ export declare const dashboardListExtract: (raw: unknown) => { items: unknown[]; total: number; }; /** * Extracts dashboard data from a ZIP ArrayBuffer containing CSVs. * Matches v1 `get_dashboard_data` behavior: ZIP → CSV → structured JSON tables. */ export declare const dashboardDataExtract: (raw: unknown) => unknown; /** * Extract chaos paginated list response: { data: [...], pagination: { totalItems } } * Used by chaos experiments and templates. */ export declare const chaosPageExtract: (raw: unknown) => { items: unknown[]; total: number; }; /** * Chaos v2 experiment list items expose their id as `experimentID` (capital ID), * but the deep-link resolver and the get-op path param use `experimentId`. Mirror * the value so per-item `openInHarness` links use the UUID instead of falling back * to the experiment name. Wraps chaosPageExtract; all other fields are preserved. */ export declare const chaosExperimentListExtract: (raw: unknown) => { items: unknown[]; total: number; }; /** * The create-action handler echoes back the request `actions.Action` (clean, * no backend envelope). Project a stable, documented shape so no raw * passthrough crosses the tool boundary and future server-added fields stay * out of the public contract. */ export declare const chaosActionExtract: (raw: unknown) => unknown; /** * Input-set list items belong to a single parent experiment (the required * experiment_id filter), but don't carry it in the row. Inject experimentId from * the request input so each item's deep link resolves to the parent experiment's * inputsets page instead of the per-item resolver clobbering it with the row's name. */ export declare const chaosInputSetListExtract: (raw: unknown, input?: Record) => { items: unknown[]; total: number; }; /** * Normalize chaos experiment variables response (RunTimeInputs shape): * { experiment: [...] | null, tasks: { taskName: [...] } | null } * → { items: [{ task, variables }], total } * Groups variables by task name. Handles null/undefined gracefully. */ export declare const chaosRunTimeInputsExtract: (raw: unknown) => { items: unknown[]; total: number; }; /** * Extract chaos application-map (a.k.a. network map) list response: * { data: [...], page: { index, limit, totalPages, totalItems } } * * Note: the JSON key is "page" (not "pagination" like other chaos * resources), per ListTargetNetworkMapResponse in hce-saas * pkg/networkmap/types.go. We don't widen chaosPageExtract because * "page" also means a query param, and silently accepting both shapes * could mask bugs in unrelated endpoints. */ export declare const chaosAppMapPageExtract: (raw: unknown) => { items: unknown[]; total: number; }; /** * Extract chaos probe list response: { totalNoOfProbes, data: [...] } */ export declare const chaosProbeListExtract: (raw: unknown) => { items: unknown[]; total: number; }; /** * Extract chaos infrastructure list response: { totalNoOfInfras, infras: [...] } */ export declare const chaosInfraListExtract: (raw: unknown) => { items: unknown[]; total: number; }; /** * Extract chaos K8s infrastructure list response: * { infras: [...], totalNoOfInfrastructures, pagination } */ export declare const chaosK8sInfraListExtract: (raw: unknown) => { items: unknown[]; total: number; }; /** * Project a single load test (InternalApiLoadTestResponse) to a stable shape. * * The new wire format carries every recognised tunable inside `inputs[]` * (TemplateInput) and user-defined non-secrets inside `variables[]` * (TemplateVariable). We pass both arrays through as-is for fidelity AND * surface derived convenience scalars (target_url / users / duration_sec / ...) * that mirror the create-side LLM surface so round-trips are intuitive. * * Drops the large base64 scriptContent and backend user-detail envelopes. * Mirrors `identity` into `loadtestId` so the deep-link resolver fills * {loadtestId} instead of falling back to the name. */ export declare const chaosLoadTestExtract: (raw: unknown) => unknown; /** * Load test list response: { items, pagination: { totalItems } }. * Projects each item via chaosLoadTestExtract → { items, total }. */ export declare const chaosLoadTestListExtract: (raw: unknown) => { items: unknown[]; total: number; }; /** * Extract chaos hub list response: { items: [...], pagination: { totalItems } } */ export declare const chaosHubListExtract: (raw: unknown) => { items: unknown[]; total: number; }; /** Extract chaos DR test list response: { items: [...], pagination: { totalItems } } */ export declare const chaosDRTestListExtract: (raw: unknown) => { items: unknown[]; total: number; }; /** * Extract Service Discovery paginated list response — common envelope shape: * { correlationID, page: { totalItems, ... }, items: [...] } * Used by namespaces, discoveredservices, workloads, connections, agents. * * Two server-side quirks are smoothed over here: * 1. When the request uses `all=true` or `limit=0`, the SD server returns * `page: { all: true }` with no `totalItems` field — Go zero-values it * to 0. We compensate with `Math.max(reportedTotal, items.length)` so * `total` always reflects what was actually returned. * 2. When `items` is empty, we attach a `_hint` covering the four most * common failure modes (wrong agent_identity, no sync yet, case- * sensitive exact `name` match, K8s-only `namespace` filter) so the * LLM can guide the user without an extra round trip. */ export declare const sdPageExtract: (raw: unknown) => { items: unknown[]; total: number; _hint?: string; }; /** * Flattens `trafficType.id` → `trafficTypeId` at the top level of an FME item. * Enables deep link templates to reference `trafficTypeId` directly. */ export declare function flattenTrafficType(item: Record): void; /** Extract FME feature flag list — passthrough with trafficType.id flattened on each item. */ export declare const fmeListExtract: (raw: unknown) => unknown; /** Extract FME feature flag single item — passthrough with trafficType.id flattened. */ export declare const fmeGetExtract: (raw: unknown) => unknown; //# sourceMappingURL=extractors.d.ts.map