/** * Linear integration — low-level API-wrapper skill. * * Linear exposes a single GraphQL endpoint (https://api.linear.app/graphql). * Auth is a static API key (or an OAuth bearer). Unlike Jira/GitHub — whose * OAuth tokens are minted by the Zibby backend and fetched via * resolveIntegrationToken() — Linear has no backend integration handler yet, * so this skill reads the key straight from the environment (LINEAR_API_KEY). * That matches the task spec ("Auth/config via env, same pattern as jira.js's * envKeys"). When a backend Linear OAuth handler + an INTEGRATIONS.LINEAR * constant land, swap linearFetch's auth header to resolveIntegrationToken * ('linear') and add `requiresIntegration: INTEGRATIONS.LINEAR` below — the * tool surface does not need to change. * * Linear auth header semantics (https://developers.linear.app/docs): * - Personal API key: Authorization: (NO "Bearer " prefix) * - OAuth access token: Authorization: Bearer * We pass the key verbatim. Power users who paste an OAuth token should * include the "Bearer " prefix themselves, or set LINEAR_OAUTH_TOKEN. * * Tracker quirks the neutral adapter must know (Linear-specific): * - Workflow STATES are per-team, not global. A "state" is a WorkflowState * node {id,name,type} scoped to a team. There is no Jira-style * "transition" object — you update issue.stateId directly to ANY state * in the same team. So "transition" == resolve target state-name -> the * team's matching WorkflowState id -> issueUpdate(stateId). We do that * resolution here with the same fuzzy matching jira.js uses. * - state.type is one of: backlog | unstarted | started | completed | * canceled | triage. Useful for mapping neutral statuses. * - Linear has native ATTACHMENTS (attachmentLinkURL / attachmentCreate) * which is the first-class way to link a PR to an issue. See * linear_link_attachment below. The adapter's linkPullRequest should * prefer it and fall back to linear_add_comment. */ /** * Low-level Linear GraphQL helper. POSTs { query, variables }, throws on * transport or GraphQL errors, returns the `data` object. * * Exported so a future linearAdapter (neutral tracker layer) can issue * queries this skill's tools don't cover without re-implementing auth. * Keep this the single auth chokepoint. * * @param {string} query GraphQL document * @param {object} [variables] * @returns {Promise} the GraphQL `data` payload */ export declare function linearFetch(query: any, variables?: any): Promise; export declare const linearSkill: any;