c.l.cladDocs

AI agents & escalation

Every investigation, draft, tracker-filing, and helpdesk-connection query and mutation.

Run investigations, work AI-suggested reply drafts (with grounding sources), file engineering-tracker tickets, and read the helpdesk connection.

Queries

helpdeskConnections

helpdeskConnections: [HelpdeskConnection!]

Connected external helpdesks (Pylon/Zendesk) with status and operating mode. Empty when none.

investigation

investigation(id: ID!): Investigation

One investigation run by id (null when unknown).

ArgumentTypeDescription
idID!Required.

investigations

investigations(issueId: ID!): [Investigation!]

Investigation runs for an issue, newest first (latest 20).

ArgumentTypeDescription
issueIdID!Required.

latestDraft

latestDraft(issueId: ID!): Draft

The most recent AI draft attempt for an issue, any status — lets a caller distinguish generating / pending / discarded / approved in one read.

ArgumentTypeDescription
issueIdID!Required.

linkedTickets

linkedTickets(issueId: ID!): [TrackerTicket!]

Engineering-tracker tickets linked to an issue, with live state and comments.

ArgumentTypeDescription
issueIdID!Required.

Mutations

approveDraft

approveDraft(input: ApproveDraftInput!): DraftResult

Approve a pending draft and deliver it to the customer. Requires a human-authorized credential (OAuth) — the send is attributed to the approving person. v1 delivers on helpdesk-mirrored issues (Pylon/Zendesk); the helpdesk operating mode is enforced (FORBIDDEN in Observe).

ArgumentTypeDescription
inputApproveDraftInput!Required.

commentOnLinkedTicket

commentOnLinkedTicket(input: CommentOnLinkedTicketInput!): TrackerTicketCommentResult

Post a comment on a tracker ticket linked to an issue. Only tickets linked to the issue are reachable.

ArgumentTypeDescription
inputCommentOnLinkedTicketInput!Required.

denyDraft

denyDraft(input: DenyDraftInput!): DraftResult

Reject a pending draft with an optional reason.

ArgumentTypeDescription
inputDenyDraftInput!Required.

fileTrackerTicket

fileTrackerTicket(input: FileTrackerTicketInput!): TrackerTicketResult

File an engineering-tracker ticket (Linear) from an issue and link it. The Clad issue moves to On hold; a back-link comment is posted on the tracker ticket. Check linkedTickets first to avoid duplicates.

ArgumentTypeDescription
inputFileTrackerTicketInput!Required.

generateDraft

generateDraft(input: GenerateDraftInput!): GenerateDraftResult

Generate a KB-grounded suggested reply through the same gated pipeline as automatic drafts. A declined gate returns withheld=true, not an error. CONFLICT when a pending draft already exists.

ArgumentTypeDescription
inputGenerateDraftInput!Required.

generateDraftFromInvestigation

generateDraftFromInvestigation(investigationId: ID!): DraftResult

Turn a completed investigation's findings into a pending customer-reply draft. CONFLICT when the run is incomplete or reported no deliverable answer.

ArgumentTypeDescription
investigationIdID!Required.

startInvestigation

startInvestigation(input: StartInvestigationInput!): InvestigationResult

Start an asynchronous code or billing investigation for an issue. Per-org in-flight and daily caps apply (RATE_LIMITED when hit). Poll the investigation query for completion.

ArgumentTypeDescription
inputStartInvestigationInput!Required.