Files
[email protected]andClaude Opus 4.6 ae0cae3a22 feat(engine): non-blocking auth signal, NeedAuthentication flow, timeout safety
When the HTTP tool detects a missing credential for a registered host:
1. EffectBridgeAdapter emits SSE AuthRequired event (best-effort, for
   connected frontends — silently dropped for missions/background threads)
2. Error flows back to LLM as normal ActionResult (non-blocking)
3. LLM tells the user to authenticate

This avoids the blocking interruption approach which would hang mission
threads and sub-threads that have no channel context.

Engine additions:
- EngineError::NeedAuthentication variant for structured auth failures
- ThreadOutcome::NeedAuthentication for batch interruption when needed
- structured.rs handles NeedAuthentication by interrupting the batch
  (stops subsequent calls, returns outcome to orchestrator)
- Auth callback on EffectBridgeAdapter (optional, set by router for SSE)
- extract_credential_name parser for HTTP tool error messages
- routine_* tools added to is_v1_only_tool blocklist

Safety: added 5-minute timeout to await_thread_outcome to prevent
infinite hangs (e.g. after denied tool approval where thread fails
to resume).

Tests: 3 structured executor tests (NeedAuthentication interrupts batch,
stops subsequent calls, regular errors don't interrupt) + 7 effect
adapter tests (credential extraction, callback firing, v1-only tools).

Also adds Linear API skill (skills/linear/SKILL.md).

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
2026-03-27 22:39:59 -07:00

3.4 KiB

name, version, description, activation, credentials
name version description activation credentials
linear 1.0.0 Linear issue tracker API integration
keywords exclude_keywords patterns tags max_context_tokens
linear
ticket
sprint
backlog
roadmap
jira
asana
(?i)(create|list|show|assign|close|update)\s.*(issue|ticket|task|bug)
(?i)linear.app
project-management
issue-tracking
2000
name provider location hosts setup_instructions
linear_api_key linear
type
bearer
api.linear.app
Create an API key at https://linear.app/settings/api

Linear API Skill

You have access to the Linear GraphQL API via the http tool. Credentials are automatically injected — never construct Authorization headers manually. When the URL host is api.linear.app, the system injects Authorization: Bearer {linear_api_key} transparently.

API Patterns

Linear uses a single GraphQL endpoint: https://api.linear.app/graphql

All requests are POST with a JSON body containing query and optional variables.

List Issues

http(method="POST", url="https://api.linear.app/graphql", body={"query": "{ issues(first: 20, orderBy: updatedAt) { nodes { id identifier title state { name } assignee { name } priority priorityLabel createdAt } } }"})

Get Issue by Identifier

http(method="POST", url="https://api.linear.app/graphql", body={"query": "query($id: String!) { issue(id: $id) { id identifier title description state { name } assignee { name } labels { nodes { name } } comments { nodes { body user { name } createdAt } } } }", "variables": {"id": "ISSUE_ID"}})

Search Issues

http(method="POST", url="https://api.linear.app/graphql", body={"query": "query($term: String!) { issueSearch(query: $term, first: 10) { nodes { id identifier title state { name } priorityLabel } } }", "variables": {"term": "SEARCH_TERM"}})

Create Issue

http(method="POST", url="https://api.linear.app/graphql", body={"query": "mutation($input: IssueCreateInput!) { issueCreate(input: $input) { success issue { id identifier title url } } }", "variables": {"input": {"title": "...", "description": "...", "teamId": "TEAM_ID", "priority": 2}}})

List Teams (to get teamId for issue creation)

http(method="POST", url="https://api.linear.app/graphql", body={"query": "{ teams { nodes { id name key } } }"})

Update Issue State

http(method="POST", url="https://api.linear.app/graphql", body={"query": "mutation($id: String!, $stateId: String!) { issueUpdate(id: $id, input: { stateId: $stateId }) { success issue { id identifier title state { name } } } }", "variables": {"id": "ISSUE_UUID", "stateId": "STATE_UUID"}})

Response Handling

  • Linear returns {"data": {...}} on success, {"errors": [...]} on failure.
  • Issue identifiers look like ENG-123 (team key + number).
  • Always check for errors in the response before processing data.
  • GraphQL errors include a message and optional extensions with error codes.

Common Mistakes

  • Do NOT add an Authorization header — it is injected automatically.
  • Always use POST method — Linear's API is GraphQL only.
  • The id field is a UUID, the identifier field is human-readable (e.g., ENG-42).
  • Use issueSearch for text search, not issues with a filter (text search is separate).
  • When creating issues, you MUST provide teamId. List teams first if unknown.