/** * Managed-tools REST wire types — the shapes `client.managedTools` consumes. * * Backed by the codegen output under `./generated/` (regenerated from * `schemas/qar/qar-tools-catalog.json` + `qar-tools-invoke.json` via * `npm run codegen:qar`): * * - `qar-tools-catalog.ts` — `GET /v1/tools` → `ToolCatalog` + * `ToolCatalogEntry`. * - `qar-tools-invoke.ts` — the `POST /v1/tools/{name}:invoke` / * operation-poll / error wire set, emitted as individual interfaces from * the umbrella schema's `$defs`. * * `ToolApiErrorCode` and `OperationStatus` are *derived* from the generated * interfaces (indexed access into `ToolErrorDetail['code']` / * `OperationStatusResponse['status']`) rather than hand-restated. The schema * already constrains both fields to a closed string union, so codegen carries * the single source of truth — this overlay only gives the union a name to * import. Re-run codegen and the names track the schema automatically. */ export type { ToolCatalog, ToolCatalogEntry, } from './generated/qar-tools-catalog.js'; export type { ToolInvokeRequest, ToolInvokeResult, OperationAccepted, OperationStatusResponse, ToolErrorEnvelope, ToolErrorDetail, } from './generated/qar-tools-invoke.js'; import type { ToolErrorDetail } from './generated/qar-tools-invoke.js'; import type { OperationStatusResponse } from './generated/qar-tools-invoke.js'; /** * The closed error-code union carried on a typed `{ ok: false, error }` * response — the tool `MT-*` family, `TOOL-PREVIEW-GATED`, and the two * endpoint-protocol codes (`IDEMPOTENCY_KEY_CONFLICT`, `OPERATION_OUTCOME_UNKNOWN`). Derived * from the generated `ToolErrorDetail.code` so the SDK never hand-maintains a * parallel copy of the enum. Surfaced on `QodoToolError.code`. */ export type ToolApiErrorCode = ToolErrorDetail['code']; /** * Operation lifecycle status from `GET /v1/tools/operations/{id}`. Terminal * states are `completed | failed | cancelled`; `working` / `input_required` * are non-terminal. Derived from the generated `OperationStatusResponse`. */ export type OperationStatus = OperationStatusResponse['status']; //# sourceMappingURL=tools.d.ts.map