@dual-os/linear-api
v6.0.6
Published
`@dual-os/linear-api` includes the Linear API Actions, event Trigger and Agent Channel.
Readme
Linear Agent Channel
@dual-os/linear-api includes the Linear API Actions, event Trigger and Agent Channel.
Linear Agent Channel linear-api/agent-session. It serves the
Agent Sessions of the customer's own Linear app, installed with actor=app: one Agent Session is
one conversation thread (conversationKey is the issue, threadKey the session). Session starts
and prompts arrive as messages with respond: true, a stop prompt as a stop event, and the
app's own activities are ignored. Deployment settings choose the teams (teamIds, empty for all;
a session outside an issue has no team) and who (access, allowedSenderKeys) can start a
session; Linear has no respondTo, and its events carry no project. The same plugin retains
its existing API Actions and Workflow Triggers.
Output operations: present_outcome (activity response, error when failed, elicitation
with Linear's select signal when awaiting input), create_message (a lasting thought),
set_activity (an ephemeral thought; idle ends the activity with a response), render_plan (the session's Agent
Plan, a Linear technology preview) and set_reaction on the comment that started the turn, else
the issue. Activities cannot be edited or deleted. read_context returns the issue's latest user
comments from at most 500 recent comments. Activity UUIDs derive from their Delivery; reaction
UUIDs derive from the app, target and emoji, so retries are idempotent.
Allowed session starts receive an ephemeral acknowledgement thought during webhook handling, with a stable per-session ID and a 3-second API timeout. Failure fails ingress for Linear to retry. Run scheduling is not the acknowledgement path and cannot guarantee Linear's 10-second activity deadline. Network and host latency can still miss that deadline or the 5-second webhook deadline. Denied senders receive no acknowledgement.
Connection: app with accessToken, signingSecret, organizationId and appUserId. Activation checks
that the token acts as that app user in that workspace. Webhooks must carry a valid
Linear-Signature HMAC-SHA256 and a webhookTimestamp within a minute of now.
Import linearApiPluginBase from @dual-os/linear-api/definition and linearApiPlugin from
@dual-os/linear-api/executable. Existing API Connections remain valid for Actions and Triggers;
only the app method can activate this Channel. Old linear-app Channel pins are not rewritten:
reselect this Channel and create a Connection under linear-api before redeploying.
Ported in part from HumanLayer effect-channels (MIT License, Copyright (c) 2026 HumanLayer).
