Skip to content

feat(linear): Agent Interaction essentials for SDK-compatible sessions - #196

Draft
liam-germain wants to merge 1 commit into
vercel-labs:mainfrom
liam-germain:feat/linear-agent-interaction-parity
Draft

feat(linear): Agent Interaction essentials for SDK-compatible sessions#196
liam-germain wants to merge 1 commit into
vercel-labs:mainfrom
liam-germain:feat/linear-agent-interaction-parity

Conversation

@liam-germain

@liam-germain liam-germain commented Aug 3, 2026

Copy link
Copy Markdown

Summary

  • Align @emulators/linear with the current production Linear Agent Interaction contract and @linear/sdk v89.
  • Model agent activity content as the production GraphQL union, accept the production nested input shape, and validate type-specific content, signals, IDs, context metadata, plans, and unique external URLs.
  • Implement the activity lifecycle: newer ephemeral thoughts and actions archive the previous active ephemeral activity, while activity connections support production-style filters, archive visibility, ordering, and Relay pagination.
  • Keep the actor boundary explicit: the seeded lin_test_agent OAuth app token owns agent sessions and activities, while human prompts use the separate internal-style agentActivityCreatePrompt mutation with lin_test_admin.
  • Queue prompts while an agent turn is active, deliver the oldest prompt after a terminal response, and reopen the session for the next turn without emitting premature webhook events.
  • Emit production-shaped AgentSessionEvent payloads for created and prompted, including OAuth client identity, structured child objects, exact optional fields, and Linear-Timestamp.
  • Build escaped prompt context from the issue, team, labels, project, directive comment, and prior comments instead of interpolating raw user content.
  • Remove the legacy flat activity input, legacy session aliases, and other compatibility-only fields.
  • Update the README, package docs, docs site, Linear skill, and CLI help surface.

The emulator remains a focused Linear subset. Rich guidance storage, repository suggestions, and the rest of Linear's unrelated product schema remain outside this PR.

Test plan

  • pnpm --filter @emulators/linear test (37 tests, including end-to-end @linear/sdk v89 coverage)
  • pnpm --filter @emulators/linear type-check
  • pnpm --filter @emulators/linear lint
  • pnpm --filter @emulators/linear build
  • pnpm type-check
  • pnpm lint
  • pnpm format:check
  • Hosted CI green on this PR

The full monorepo test aggregate was also attempted locally. It is blocked in this sandbox by an unrelated Vercel Blob test trying to listen on 0.0.0.0 and receiving EPERM; the Linear suite passes independently.

@vercel

vercel Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

@liam-germain is attempting to deploy a commit to the Vercel Labs Team on Vercel.

A member of the Team first needs to authorize it.

@liam-germain
liam-germain force-pushed the feat/linear-agent-interaction-parity branch from 8949af5 to d73a568 Compare August 3, 2026 13:25
Align the Linear emulator with production Agent Interaction shapes so local agent clients can create nested activities, update plans and external URLs, and receive activity-driven session status plus basic AgentSessionEvent webhooks.
@liam-germain
liam-germain force-pushed the feat/linear-agent-interaction-parity branch from d73a568 to e5e0de0 Compare August 4, 2026 04:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant