New:Introducing Socket Scanning for VS Code Marketplace Extensions.Learn more →
Get Started

openclaw-linear

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

openclaw-linear

Linear integration for OpenClaw — webhook routing, issue management, and project tools via the Linear GraphQL API

Source
npmnpm
Version
0.5.4
Version published
Weekly downloads
0
-100%
Maintainers
1
Weekly downloads
 
Created
Source

openclaw-linear

Linear integration for OpenClaw. Receives Linear webhook events, routes them to agents, and provides tools for managing issues, comments, projects, teams, and relations via the Linear GraphQL API.

Features

  • Webhook handler — receives Linear webhook events with HMAC signature verification (timing-safe), duplicate delivery detection, and body size limits
  • Event router — filters by team and event type, routes issue assignments and comment mentions to the configured agent
  • Debounced dispatch — batches events within a configurable window before dispatching
  • Work queue — deterministic queue writes structured items with priority sorting, deduplication, and 24h auto-cleanup — no LLM tokens spent on triage
  • Crash recovery — resets stale in_progress queue items to pending on startup
  • Direct API integration — all tools call the Linear GraphQL API directly, no external CLI binary required

Install

openclaw plugins install openclaw-linear

Configuration

Add the plugin to your OpenClaw config. Each OpenClaw instance runs one agent — configure a separate instance per agent.

plugins:
  linear:
    apiKey: "lin_api_..."                # Linear API key (required)
    webhookSecret: "your-signing-secret" # Webhook secret (required)
    agentMapping:                        # Filter: only handle events for these Linear users
      "linear-user-uuid": "titus"
    teamIds: ["ENG", "OPS"]             # Optional: filter to specific teams (empty = all)
    eventFilter: ["Issue", "Comment"]    # Optional: filter event types (empty = all)
    debounceMs: 30000                    # Optional: batch window in ms (default: 30000)
    stateActions:                        # Optional: map state types/names to queue actions
      backlog: "add"
      unstarted: "add"
      started: "ignore"
      "In Review": "remove"             # State names override type matches (case-insensitive)
      completed: "remove"
      canceled: "remove"

Config Fields

FieldTypeRequiredDescription
apiKeystringYesLinear API key for authentication. Create one at linear.app/settings/account/security.
webhookSecretstringYesShared secret for HMAC webhook signature verification.
agentMappingobjectNoMaps Linear user UUIDs to agent IDs. Acts as a filter — events for unmapped users are ignored. Since each instance runs one agent, this typically has one entry.
teamIdsstring[]NoTeam keys to scope webhook processing. Empty = all teams.
eventFilterstring[]NoEvent types to handle (Issue, Comment). Empty = all.
debounceMsintegerNoDebounce window in milliseconds. Events arriving within this window are batched into a single dispatch. Default: 30000 (30s).
stateActionsobjectNoMaps Linear state types or names to queue actions ("add", "remove", "ignore"). See State Actions.

Tools

The plugin provides six tools that agents can use to interact with Linear. All tools use an action parameter to select the operation.

linear_queue — notification inbox

Manage the queue of webhook-driven notifications.

ActionDescription
peekView all pending items sorted by priority
popClaim the highest-priority pending item
drainClaim all pending items
completeFinish work on a claimed item (requires issueId)

linear_issue — issue management

View, search, create, update, and delete Linear issues.

ActionRequiredOptional
viewissueId—
list—state, assignee, team, project, limit
createtitledescription, assignee, state, priority, team, project, parent, labels
updateissueIdtitle, description, assignee, state, priority, labels, project
deleteissueId—

Issues are referenced by human-readable identifiers (e.g. ENG-123). Names are resolved automatically — assignee accepts display names or emails, state accepts workflow state names, team accepts team keys, and labels accepts label names.

linear_comment — comments

Read, create, and update comments on issues.

ActionRequiredOptional
listissueId—
addissueId, bodyparentCommentId
updatecommentId, body—

linear_team — teams and members

ActionRequired
list—
membersteam (key, e.g. ENG)

linear_project — projects

ActionRequiredOptional
list—team, status
viewprojectId—
createnameteam, description

linear_relation — issue relations

ActionRequired
listissueId
addissueId, type, relatedIssueId
deleterelationId

Relation types: blocks, blocked-by, related, duplicate.

Webhook Setup

  • Make your endpoint publicly accessible. The plugin registers at /hooks/linear:

    # Example with Tailscale Funnel
    tailscale funnel --bg 3000
    
  • Register the webhook in Linear:

    • Go to Settings > API > Webhooks
    • Set the URL to https://your-host/hooks/linear
    • Set the secret to match your webhookSecret
    • Select event types: Issues, Comments
    • Save
  • Verify: Assign a Linear issue to a mapped user — the agent should receive a notification.

Routed Events

Linear EventRouter ActionAgent Event
Issue assigned to mapped userwakeissue.assigned
Issue unassigned from mapped usernotifyissue.unassigned
Issue reassigned away from mapped usernotifyissue.reassigned
Issue state change → add actionwakeissue.state_readded
Issue state change → remove actionnotifyissue.state_removed
@mention in comment (mapped user)wakecomment.mention

wake events are enqueued into the debouncer and dispatched to the agent. notify events write to the queue without waking.

State Actions

When an issue's state changes, the plugin resolves what to do based on the stateActions config. This lets you control which state transitions re-add issues to the queue (e.g. bounced back from testing) vs. remove them (e.g. done/canceled) vs. are ignored (e.g. in progress).

Resolution order: state name match → state type match → built-in default.

Linear has 6 fixed state types. Custom state names (e.g. "In Review", "QA") are team-specific but always belong to one of these types.

Built-in defaults (used when stateActions is not configured or a state isn't mapped):

State TypeDefault Action
triageignore
backlogadd
unstartedadd
startedignore
completedremove
canceledremove

Actions:

  • "add" — re-add the issue to the queue as a ticket and wake the agent
  • "remove" — remove the issue's ticket from the queue
  • "ignore" — do nothing (default for unmapped states)

How Dispatch Works

Linear webhook POST
  → HMAC signature verified (timing-safe)
  → Duplicate delivery check (10-min TTL, 10k cap)
  → Event router filters by team/type, matches user via agentMapping
  → wake actions enqueued into debouncer (keyed by agent ID)
  → After debounce window expires:
      → Notifications written to queue (deterministic, no LLM)
      → Deduped against existing non-done items — skips dispatch if nothing new
      → Agent receives: "3 new Linear notification(s) queued."
      → After agent completes an item, auto-wake continues if items remain

Architecture

src/
├── index.ts                 # Plugin entry point, activation, dispatch logic
├── webhook-handler.ts       # HMAC verification, body parsing, dedup
├── event-router.ts          # Event filtering, routing, state action resolution
├── linear-api.ts            # GraphQL client, name/ID resolution helpers
├── work-queue.ts            # Persistent JSONL queue with priority sorting
└── tools/
    ├── queue-tool.ts        # linear_queue — notification inbox management
    ├── linear-issue-tool.ts # linear_issue — CRUD for issues
    ├── linear-comment-tool.ts # linear_comment — issue comments
    ├── linear-team-tool.ts  # linear_team — teams and members
    ├── linear-project-tool.ts # linear_project — project management
    └── linear-relation-tool.ts # linear_relation — issue relations

Development

npm install
npm run build
npm test

Keywords

openclaw

FAQs

Package last updated on 16 Feb 2026

Related posts