import { type SampleRecord } from "../sampleRecord.js"; /** * Linear samples. Linear signs webhooks with a custom `Linear-Signature` HMAC-SHA256 scheme (not one * of our presets), so no `presetId` is set on any sample here. `eventType` joins the body's top-level * `type` and `action` fields (e.g. "Issue.create") since `type` alone ("Issue") doesn't distinguish * create/update/remove. */ export const samples: SampleRecord[] = [ { provider: "linear", providerLabel: "Linear", eventType: "Issue.create", name: "Issue created", description: "A new issue was created on a team.", body: { action: "create", type: "Issue", createdAt: "2026-07-01T14:32:18.084Z", webhookTimestamp: 1751380338084, webhookId: "3e9c1b2a-8f47-4c6d-9a1e-7b5d2c4f8e91", organizationId: "b6a1d4e2-9c3f-4a7b-8e2d-1f6c9a4b7d3e", actor: { id: "d4f8a2c1-6e9b-4d3a-8f1c-2b7e5a9d4c6f", type: "user", name: "Priya Nair", email: "priya@acme.dev", }, data: { id: "7c2e4f1a-9b3d-4a6e-8c5f-1d7b3e9a2c4f", identifier: "ENG-483", number: 483, title: "Webhook signature verification fails for rotated secrets", description: "When a signing secret is rotated mid-flight, in-progress deliveries fail verification.", priority: 2, priorityLabel: "High", estimate: 3, stateId: "1a9d3f7c-5b2e-4d8a-9c6f-3e7b1a4d9c2f", assigneeId: "d4f8a2c1-6e9b-4d3a-8f1c-2b7e5a9d4c6f", teamId: "5e8b2d4a-7c1f-4a9e-8d3b-6f2c9a5e7d1b", projectId: "9f3a7c5e-1d8b-4f6a-9c2e-7b5d3a8f1c6e", labelIds: ["2c6e9b4d-8a1f-4c7e-9d3b-5a8f2c6e9b4d"], subscriberIds: ["d4f8a2c1-6e9b-4d3a-8f1c-2b7e5a9d4c6f"], createdAt: "2026-07-01T14:32:18.076Z", updatedAt: "2026-07-01T14:32:18.076Z", archivedAt: null, }, url: "https://linear.app/acme/issue/ENG-483/webhook-signature-verification-fails-for-rotated-secrets", }, docsUrl: "https://linear.app/developers/webhooks", provenance: { kind: "handauthored", snapshotDate: "2026-07" }, }, { provider: "linear", providerLabel: "Linear", eventType: "Issue.update", name: "Issue updated", description: "An issue moved state and was reassigned; `updatedFrom` carries the prior values.", body: { action: "update", type: "Issue", createdAt: "2026-07-01T16:45:22.391Z", webhookTimestamp: 1751388322391, webhookId: "3e9c1b2a-8f47-4c6d-9a1e-7b5d2c4f8e91", organizationId: "b6a1d4e2-9c3f-4a7b-8e2d-1f6c9a4b7d3e", actor: { id: "6b1e9d3a-4c7f-4b2e-8a9d-1c6f3b8e5a2d", type: "user", name: "Marcus Webb", email: "marcus@acme.dev", }, data: { id: "7c2e4f1a-9b3d-4a6e-8c5f-1d7b3e9a2c4f", identifier: "ENG-483", number: 483, stateId: "4d8a2f6c-9b1e-4d7a-8c3f-6e2b9d4a7c1f", assigneeId: "6b1e9d3a-4c7f-4b2e-8a9d-1c6f3b8e5a2d", startedAt: "2026-07-01T16:45:22.384Z", completedAt: null, updatedAt: "2026-07-01T16:45:22.391Z", }, updatedFrom: { stateId: "1a9d3f7c-5b2e-4d8a-9c6f-3e7b1a4d9c2f", assigneeId: "d4f8a2c1-6e9b-4d3a-8f1c-2b7e5a9d4c6f", startedAt: null, updatedAt: "2026-07-01T14:32:18.076Z", }, url: "https://linear.app/acme/issue/ENG-483/webhook-signature-verification-fails-for-rotated-secrets", }, docsUrl: "https://linear.app/developers/webhooks", provenance: { kind: "handauthored", snapshotDate: "2026-07" }, }, { provider: "linear", providerLabel: "Linear", eventType: "Comment.create", name: "Comment created", description: "A new comment was posted on an issue.", body: { action: "create", type: "Comment", actor: { id: "6b1e9d3a-4c7f-4b2e-8a9d-1c6f3b8e5a2d", type: "user", name: "Marcus Webb", email: "marcus@acme.dev", url: "https://linear.app/acme/profiles/marcus", }, data: { id: "8d4f2a6c-1b9e-4d7a-8c3f-6e2b9d4a7c1f", createdAt: "2026-07-01T17:02:09.514Z", updatedAt: "2026-07-01T17:02:09.514Z", archivedAt: null, body: "I've reproduced this against the staging secret rotation, fix incoming.", edited: false, issueId: "7c2e4f1a-9b3d-4a6e-8c5f-1d7b3e9a2c4f", userId: "6b1e9d3a-4c7f-4b2e-8a9d-1c6f3b8e5a2d", }, url: "https://linear.app/acme/issue/ENG-483/webhook-signature-verification-fails-for-rotated-secrets#comment-8d4f2a6c-1b9e-4d7a-8c3f-6e2b9d4a7c1f", createdAt: "2026-07-01T17:02:09.514Z", organizationId: "b6a1d4e2-9c3f-4a7b-8e2d-1f6c9a4b7d3e", webhookTimestamp: 1751389329514, webhookId: "3e9c1b2a-8f47-4c6d-9a1e-7b5d2c4f8e91", }, docsUrl: "https://linear.app/developers/webhooks", provenance: { kind: "handauthored", snapshotDate: "2026-07" }, }, { provider: "linear", providerLabel: "Linear", eventType: "IssueLabel.create", name: "Issue label created", description: "A new team label was created.", body: { action: "create", type: "IssueLabel", createdAt: "2026-07-01T09:15:44.201Z", webhookTimestamp: 1751361344201, webhookId: "3e9c1b2a-8f47-4c6d-9a1e-7b5d2c4f8e91", organizationId: "b6a1d4e2-9c3f-4a7b-8e2d-1f6c9a4b7d3e", actor: { id: "d4f8a2c1-6e9b-4d3a-8f1c-2b7e5a9d4c6f", type: "user", name: "Priya Nair", email: "priya@acme.dev", }, data: { id: "2c6e9b4d-8a1f-4c7e-9d3b-5a8f2c6e9b4d", name: "webhooks", color: "#26b5ce", description: "Work related to inbound/outbound webhook delivery.", teamId: "5e8b2d4a-7c1f-4a9e-8d3b-6f2c9a5e7d1b", creatorId: "d4f8a2c1-6e9b-4d3a-8f1c-2b7e5a9d4c6f", createdAt: "2026-07-01T09:15:44.192Z", updatedAt: "2026-07-01T09:15:44.192Z", archivedAt: null, }, url: "https://linear.app/acme/team/ENG/labels", }, docsUrl: "https://linear.app/developers/webhooks", provenance: { kind: "handauthored", snapshotDate: "2026-07" }, }, { provider: "linear", providerLabel: "Linear", eventType: "Reaction.create", name: "Reaction created", description: "An emoji reaction was added to a comment.", body: { action: "create", type: "Reaction", createdAt: "2026-07-01T17:05:33.802Z", webhookTimestamp: 1751389533802, webhookId: "3e9c1b2a-8f47-4c6d-9a1e-7b5d2c4f8e91", organizationId: "b6a1d4e2-9c3f-4a7b-8e2d-1f6c9a4b7d3e", actor: { id: "d4f8a2c1-6e9b-4d3a-8f1c-2b7e5a9d4c6f", type: "user", name: "Priya Nair", email: "priya@acme.dev", }, data: { id: "9e1c4f7a-2b8d-4e6c-9a3f-7d5b2e8c1a4f", emoji: "🚀", commentId: "8d4f2a6c-1b9e-4d7a-8c3f-6e2b9d4a7c1f", userId: "d4f8a2c1-6e9b-4d3a-8f1c-2b7e5a9d4c6f", createdAt: "2026-07-01T17:05:33.792Z", updatedAt: "2026-07-01T17:05:33.792Z", archivedAt: null, }, url: "https://linear.app/acme/issue/ENG-483/webhook-signature-verification-fails-for-rotated-secrets#comment-8d4f2a6c-1b9e-4d7a-8c3f-6e2b9d4a7c1f", }, docsUrl: "https://linear.app/developers/webhooks", provenance: { kind: "handauthored", snapshotDate: "2026-07" }, }, { provider: "linear", providerLabel: "Linear", eventType: "AgentSessionEvent.created", name: "Agent session created (mention)", description: "A user @mentioned the agent app in an issue comment; Linear opened an agent session and sent the issue context, prior comments and workspace guidance.", docsUrl: "https://linear.app/developers/agent-interaction", body: { type: "AgentSessionEvent", action: "created", createdAt: "2026-09-13T10:12:44.318Z", webhookTimestamp: 1789294364318, webhookId: "3e9c1b2a-8f47-4c6d-9a1e-7b5d2c4f8e91", organizationId: "b6a1d4e2-9c3f-4a7b-8e2d-1f6c9a4b7d3e", oauthClientId: "0c1d2e3f-4a5b-4c6d-8e9f-0a1b2c3d4e5f", appUserId: "5f6e7d8c-9b0a-4b1c-8d2e-3f4a5b6c7d8e", agentSession: { id: "9a8b7c6d-5e4f-4a3b-9c2d-1e0f9a8b7c6d", status: "pending", appUserId: "5f6e7d8c-9b0a-4b1c-8d2e-3f4a5b6c7d8e", creatorId: "d4f8a2c1-6e9b-4d3a-8f1c-2b7e5a9d4c6f", creator: { id: "d4f8a2c1-6e9b-4d3a-8f1c-2b7e5a9d4c6f", name: "Priya Nair", displayName: "priya", }, issueId: "7c2e4f1a-9b3d-4a6e-8c5f-1d7b3e9a2c4f", issue: { id: "7c2e4f1a-9b3d-4a6e-8c5f-1d7b3e9a2c4f", identifier: "ENG-483", title: "Webhook signature verification fails for rotated secrets", url: "https://linear.app/acme/issue/ENG-483/webhook-signature-verification-fails-for-rotated-secrets", }, commentId: "4b3a2c1d-0e9f-4a8b-9c7d-6e5f4a3b2c1d", sourceCommentId: "4b3a2c1d-0e9f-4a8b-9c7d-6e5f4a3b2c1d", comment: { id: "4b3a2c1d-0e9f-4a8b-9c7d-6e5f4a3b2c1d", body: "@triage can you find the root cause and break this into sub-issues?", userId: "d4f8a2c1-6e9b-4d3a-8f1c-2b7e5a9d4c6f", }, startedAt: null, endedAt: null, }, agentActivity: null, promptContext: '\nWebhook signature verification fails for rotated secrets\nWhen a signing secret is rotated mid-flight, in-progress deliveries fail verification.\nEngineering\nbug, webhooks\nHigh\n', previousComments: [ { id: "1a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d", body: "Seeing this since the rotation on Tuesday.", userId: "e5f6a7b8-c9d0-4e1f-8a2b-3c4d5e6f7a8b", createdAt: "2026-09-13T09:58:02.114Z", }, ], guidance: [{ body: "Always link the pull request in your response." }], }, provenance: { kind: "handauthored", snapshotDate: "2026-09" }, }, { provider: "linear", providerLabel: "Linear", eventType: "AgentSessionEvent.created", name: "Agent session created (delegation)", description: "An issue was assigned to the agent app. No sourceCommentId; Linear attaches a placeholder comment for the session thread.", docsUrl: "https://linear.app/developers/agent-interaction", body: { type: "AgentSessionEvent", action: "created", createdAt: "2026-09-13T10:20:07.902Z", webhookTimestamp: 1789294807902, webhookId: "3e9c1b2a-8f47-4c6d-9a1e-7b5d2c4f8e91", organizationId: "b6a1d4e2-9c3f-4a7b-8e2d-1f6c9a4b7d3e", appUserId: "5f6e7d8c-9b0a-4b1c-8d2e-3f4a5b6c7d8e", agentSession: { id: "0b1c2d3e-4f5a-4b6c-8d7e-9f0a1b2c3d4e", status: "pending", appUserId: "5f6e7d8c-9b0a-4b1c-8d2e-3f4a5b6c7d8e", creatorId: "d4f8a2c1-6e9b-4d3a-8f1c-2b7e5a9d4c6f", issueId: "8d3f5a2b-0c4e-4b7f-9d6a-2e8c4f0b6d1a", issue: { id: "8d3f5a2b-0c4e-4b7f-9d6a-2e8c4f0b6d1a", identifier: "ENG-484", title: "Add replay protection to Linear webhook verification", url: "https://linear.app/acme/issue/ENG-484/add-replay-protection-to-linear-webhook-verification", }, commentId: "2c3d4e5f-6a7b-4c8d-9e0f-1a2b3c4d5e6f", sourceCommentId: null, comment: { id: "2c3d4e5f-6a7b-4c8d-9e0f-1a2b3c4d5e6f", body: "This thread is for an agent session with triage.", issueId: "8d3f5a2b-0c4e-4b7f-9d6a-2e8c4f0b6d1a", }, startedAt: null, endedAt: null, }, agentActivity: null, promptContext: '\nAdd replay protection to Linear webhook verification\nVerify webhookTimestamp is within one minute of receipt.\nEngineering\n', previousComments: [], guidance: [], }, provenance: { kind: "handauthored", snapshotDate: "2026-09" }, }, { provider: "linear", providerLabel: "Linear", eventType: "AgentSessionEvent.prompted", name: "Agent session prompted", description: "A user sent a follow-up message into an existing agent session.", docsUrl: "https://linear.app/developers/agent-interaction", body: { type: "AgentSessionEvent", action: "prompted", createdAt: "2026-09-13T10:31:55.407Z", webhookTimestamp: 1789295515407, webhookId: "3e9c1b2a-8f47-4c6d-9a1e-7b5d2c4f8e91", organizationId: "b6a1d4e2-9c3f-4a7b-8e2d-1f6c9a4b7d3e", appUserId: "5f6e7d8c-9b0a-4b1c-8d2e-3f4a5b6c7d8e", agentSession: { id: "9a8b7c6d-5e4f-4a3b-9c2d-1e0f9a8b7c6d", status: "complete", appUserId: "5f6e7d8c-9b0a-4b1c-8d2e-3f4a5b6c7d8e", creatorId: "d4f8a2c1-6e9b-4d3a-8f1c-2b7e5a9d4c6f", issueId: "7c2e4f1a-9b3d-4a6e-8c5f-1d7b3e9a2c4f", commentId: "4b3a2c1d-0e9f-4a8b-9c7d-6e5f4a3b2c1d", startedAt: "2026-09-13T10:12:47.001Z", endedAt: "2026-09-13T10:14:12.555Z", }, agentActivity: { id: "6c5d4e3f-2a1b-4c0d-9e8f-7a6b5c4d3e2f", agentSessionId: "9a8b7c6d-5e4f-4a3b-9c2d-1e0f9a8b7c6d", content: { type: "prompt", body: "Can you also check whether the staging environment is affected?", }, signal: null, signalMetadata: null, sourceCommentId: null, userId: "d4f8a2c1-6e9b-4d3a-8f1c-2b7e5a9d4c6f", createdAt: "2026-09-13T10:31:55.201Z", }, promptContext: null, previousComments: null, guidance: null, }, provenance: { kind: "handauthored", snapshotDate: "2026-09" }, }, { provider: "linear", providerLabel: "Linear", eventType: "AgentSessionEvent.prompted", name: "Agent session stop signal", description: "The user asked the agent to stop; the prompt carries the `stop` signal.", docsUrl: "https://linear.app/developers/agent-signals", body: { type: "AgentSessionEvent", action: "prompted", createdAt: "2026-09-13T10:33:10.110Z", webhookTimestamp: 1789295590110, webhookId: "3e9c1b2a-8f47-4c6d-9a1e-7b5d2c4f8e91", organizationId: "b6a1d4e2-9c3f-4a7b-8e2d-1f6c9a4b7d3e", appUserId: "5f6e7d8c-9b0a-4b1c-8d2e-3f4a5b6c7d8e", agentSession: { id: "9a8b7c6d-5e4f-4a3b-9c2d-1e0f9a8b7c6d", status: "active", appUserId: "5f6e7d8c-9b0a-4b1c-8d2e-3f4a5b6c7d8e", creatorId: "d4f8a2c1-6e9b-4d3a-8f1c-2b7e5a9d4c6f", issueId: "7c2e4f1a-9b3d-4a6e-8c5f-1d7b3e9a2c4f", commentId: "4b3a2c1d-0e9f-4a8b-9c7d-6e5f4a3b2c1d", }, agentActivity: { id: "7d6e5f4a-3b2c-4d1e-8f0a-9b8c7d6e5f4a", agentSessionId: "9a8b7c6d-5e4f-4a3b-9c2d-1e0f9a8b7c6d", content: { type: "prompt", body: "Stop" }, signal: "stop", signalMetadata: null, userId: "d4f8a2c1-6e9b-4d3a-8f1c-2b7e5a9d4c6f", createdAt: "2026-09-13T10:33:09.980Z", }, }, provenance: { kind: "handauthored", snapshotDate: "2026-09" }, }, { provider: "linear", providerLabel: "Linear", eventType: "AgentSessionEvent.prompted", name: "Agent session select answer", description: "The user picked an option from a select elicitation; the chosen value arrives as a regular prompt body.", docsUrl: "https://linear.app/developers/agent-signals", body: { type: "AgentSessionEvent", action: "prompted", createdAt: "2026-09-13T10:35:42.660Z", webhookTimestamp: 1789295742660, webhookId: "3e9c1b2a-8f47-4c6d-9a1e-7b5d2c4f8e91", organizationId: "b6a1d4e2-9c3f-4a7b-8e2d-1f6c9a4b7d3e", appUserId: "5f6e7d8c-9b0a-4b1c-8d2e-3f4a5b6c7d8e", agentSession: { id: "9a8b7c6d-5e4f-4a3b-9c2d-1e0f9a8b7c6d", status: "awaitingInput", appUserId: "5f6e7d8c-9b0a-4b1c-8d2e-3f4a5b6c7d8e", creatorId: "d4f8a2c1-6e9b-4d3a-8f1c-2b7e5a9d4c6f", issueId: "7c2e4f1a-9b3d-4a6e-8c5f-1d7b3e9a2c4f", commentId: "4b3a2c1d-0e9f-4a8b-9c7d-6e5f4a3b2c1d", }, agentActivity: { id: "8e7f6a5b-4c3d-4e2f-9a1b-0c9d8e7f6a5b", agentSessionId: "9a8b7c6d-5e4f-4a3b-9c2d-1e0f9a8b7c6d", content: { type: "prompt", body: "Approve createSubIssues" }, signal: null, signalMetadata: null, userId: "d4f8a2c1-6e9b-4d3a-8f1c-2b7e5a9d4c6f", createdAt: "2026-09-13T10:35:42.501Z", }, }, provenance: { kind: "handauthored", snapshotDate: "2026-09" }, }, ];