@elizaos/plugin-linear 1.2.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +303 -0
- package/dist/index.d.ts +88 -0
- package/dist/index.js +1333 -0
- package/dist/index.js.map +1 -0
- package/package.json +66 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/services/linear.ts","../src/types/index.ts","../src/actions/createIssue.ts","../src/actions/getIssue.ts","../src/actions/updateIssue.ts","../src/actions/searchIssues.ts","../src/actions/createComment.ts","../src/actions/listTeams.ts","../src/actions/listProjects.ts","../src/actions/getActivity.ts","../src/actions/clearActivity.ts","../src/providers/issues.ts","../src/providers/teams.ts","../src/providers/projects.ts","../src/providers/activity.ts","../src/index.ts"],"sourcesContent":["import { logger, Service, type IAgentRuntime } from '@elizaos/core';\nimport { LinearClient, Issue, Project, Team, User, WorkflowState, IssueLabel, Comment } from '@linear/sdk';\nimport type { \n LinearConfig, \n LinearActivityItem, \n LinearIssueInput, \n LinearCommentInput,\n LinearSearchFilters \n} from '../types';\nimport { LinearAPIError, LinearAuthenticationError } from '../types';\n\nexport class LinearService extends Service {\n static serviceType = 'linear';\n \n capabilityDescription = 'Linear API integration for issue tracking, project management, and team collaboration';\n \n private client: LinearClient;\n private activityLog: LinearActivityItem[] = [];\n private linearConfig: LinearConfig;\n private workspaceId?: string;\n \n constructor(runtime?: IAgentRuntime) {\n super(runtime);\n \n // Get config from runtime settings\n const apiKey = runtime?.getSetting('LINEAR_API_KEY') as string;\n const workspaceId = runtime?.getSetting('LINEAR_WORKSPACE_ID') as string;\n \n if (!apiKey) {\n throw new LinearAuthenticationError('Linear API key is required');\n }\n \n this.linearConfig = {\n LINEAR_API_KEY: apiKey,\n LINEAR_WORKSPACE_ID: workspaceId,\n };\n \n this.workspaceId = workspaceId;\n \n this.config = {\n LINEAR_API_KEY: apiKey,\n LINEAR_WORKSPACE_ID: workspaceId,\n };\n \n this.client = new LinearClient({\n apiKey: this.linearConfig.LINEAR_API_KEY,\n });\n }\n \n static async start(runtime: IAgentRuntime): Promise<LinearService> {\n const service = new LinearService(runtime);\n await service.validateConnection();\n logger.info('Linear service started successfully');\n return service;\n }\n \n async stop(): Promise<void> {\n this.activityLog = [];\n logger.info('Linear service stopped');\n }\n \n // Validate the API connection\n private async validateConnection(): Promise<void> {\n try {\n const viewer = await this.client.viewer;\n logger.info(`Linear connected as user: ${viewer.email}`);\n } catch (error) {\n throw new LinearAuthenticationError('Failed to authenticate with Linear API');\n }\n }\n \n // Log activity\n private logActivity(\n action: string,\n resourceType: LinearActivityItem['resource_type'],\n resourceId: string,\n details: Record<string, any>,\n success: boolean,\n error?: string\n ): void {\n const activity: LinearActivityItem = {\n id: `${Date.now()}-${Math.random().toString(36).substr(2, 9)}`,\n timestamp: new Date().toISOString(),\n action,\n resource_type: resourceType,\n resource_id: resourceId,\n details,\n success,\n error,\n };\n \n this.activityLog.push(activity);\n \n // Keep only last 1000 activities\n if (this.activityLog.length > 1000) {\n this.activityLog = this.activityLog.slice(-1000);\n }\n }\n \n // Get activity log\n getActivityLog(limit?: number, filter?: Partial<LinearActivityItem>): LinearActivityItem[] {\n let filtered = [...this.activityLog];\n \n if (filter) {\n filtered = filtered.filter(item => {\n return Object.entries(filter).every(([key, value]) => {\n return item[key as keyof LinearActivityItem] === value;\n });\n });\n }\n \n return filtered.slice(-(limit || 100));\n }\n \n // Clear activity log\n clearActivityLog(): void {\n this.activityLog = [];\n logger.info('Linear activity log cleared');\n }\n \n // Team operations\n async getTeams(): Promise<Team[]> {\n try {\n const teams = await this.client.teams();\n const teamList = await teams.nodes;\n \n this.logActivity('list_teams', 'team', 'all', { count: teamList.length }, true);\n return teamList;\n } catch (error) {\n const errorMessage = error instanceof Error ? error.message : 'Unknown error';\n this.logActivity('list_teams', 'team', 'all', {}, false, errorMessage);\n throw new LinearAPIError(`Failed to fetch teams: ${errorMessage}`);\n }\n }\n \n async getTeam(teamId: string): Promise<Team> {\n try {\n const team = await this.client.team(teamId);\n this.logActivity('get_team', 'team', teamId, { name: team.name }, true);\n return team;\n } catch (error) {\n const errorMessage = error instanceof Error ? error.message : 'Unknown error';\n this.logActivity('get_team', 'team', teamId, {}, false, errorMessage);\n throw new LinearAPIError(`Failed to fetch team: ${errorMessage}`);\n }\n }\n \n // Issue operations\n async createIssue(input: LinearIssueInput): Promise<Issue> {\n try {\n const issuePayload = await this.client.createIssue({\n title: input.title,\n description: input.description,\n teamId: input.teamId,\n priority: input.priority,\n assigneeId: input.assigneeId,\n labelIds: input.labelIds,\n projectId: input.projectId,\n stateId: input.stateId,\n estimate: input.estimate,\n dueDate: input.dueDate,\n });\n \n const issue = await issuePayload.issue;\n if (!issue) {\n throw new Error('Failed to create issue');\n }\n \n this.logActivity('create_issue', 'issue', issue.id, { \n title: input.title,\n teamId: input.teamId \n }, true);\n \n return issue;\n } catch (error) {\n const errorMessage = error instanceof Error ? error.message : 'Unknown error';\n this.logActivity('create_issue', 'issue', 'new', input, false, errorMessage);\n throw new LinearAPIError(`Failed to create issue: ${errorMessage}`);\n }\n }\n \n async getIssue(issueId: string): Promise<Issue> {\n try {\n const issue = await this.client.issue(issueId);\n this.logActivity('get_issue', 'issue', issueId, { \n title: issue.title,\n identifier: issue.identifier \n }, true);\n return issue;\n } catch (error) {\n const errorMessage = error instanceof Error ? error.message : 'Unknown error';\n this.logActivity('get_issue', 'issue', issueId, {}, false, errorMessage);\n throw new LinearAPIError(`Failed to fetch issue: ${errorMessage}`);\n }\n }\n \n async updateIssue(issueId: string, updates: Partial<LinearIssueInput>): Promise<Issue> {\n try {\n const updatePayload = await this.client.updateIssue(issueId, {\n title: updates.title,\n description: updates.description,\n priority: updates.priority,\n assigneeId: updates.assigneeId,\n labelIds: updates.labelIds,\n projectId: updates.projectId,\n stateId: updates.stateId,\n estimate: updates.estimate,\n dueDate: updates.dueDate,\n });\n \n const issue = await updatePayload.issue;\n if (!issue) {\n throw new Error('Failed to update issue');\n }\n \n this.logActivity('update_issue', 'issue', issueId, updates, true);\n return issue;\n } catch (error) {\n const errorMessage = error instanceof Error ? error.message : 'Unknown error';\n this.logActivity('update_issue', 'issue', issueId, updates, false, errorMessage);\n throw new LinearAPIError(`Failed to update issue: ${errorMessage}`);\n }\n }\n \n async searchIssues(filters: LinearSearchFilters): Promise<Issue[]> {\n try {\n const query = this.client.issues({\n first: filters.limit || 50,\n filter: filters.query ? {\n or: [\n { title: { containsIgnoreCase: filters.query } },\n { description: { containsIgnoreCase: filters.query } },\n ],\n } : undefined,\n });\n \n const issues = await query;\n const issueList = await issues.nodes;\n \n this.logActivity('search_issues', 'issue', 'search', { \n filters,\n count: issueList.length \n }, true);\n \n return issueList;\n } catch (error) {\n const errorMessage = error instanceof Error ? error.message : 'Unknown error';\n this.logActivity('search_issues', 'issue', 'search', filters, false, errorMessage);\n throw new LinearAPIError(`Failed to search issues: ${errorMessage}`);\n }\n }\n \n // Comment operations\n async createComment(input: LinearCommentInput): Promise<Comment> {\n try {\n const commentPayload = await this.client.createComment({\n body: input.body,\n issueId: input.issueId,\n });\n \n const comment = await commentPayload.comment;\n if (!comment) {\n throw new Error('Failed to create comment');\n }\n \n this.logActivity('create_comment', 'comment', comment.id, { \n issueId: input.issueId,\n bodyLength: input.body.length \n }, true);\n \n return comment;\n } catch (error) {\n const errorMessage = error instanceof Error ? error.message : 'Unknown error';\n this.logActivity('create_comment', 'comment', 'new', input, false, errorMessage);\n throw new LinearAPIError(`Failed to create comment: ${errorMessage}`);\n }\n }\n \n // Project operations\n async getProjects(teamId?: string): Promise<Project[]> {\n try {\n // Note: Linear SDK v51 may not support direct team filtering on projects\n // Get all projects and filter manually if needed\n const query = this.client.projects({\n first: 100,\n });\n \n const projects = await query;\n let projectList = await projects.nodes;\n \n // Manual filtering by team if teamId is provided\n if (teamId) {\n const filteredProjects = await Promise.all(\n projectList.map(async (project) => {\n const projectTeams = await project.teams();\n const teamsList = await projectTeams.nodes;\n const hasTeam = teamsList.some((team: any) => team.id === teamId);\n return hasTeam ? project : null;\n })\n );\n projectList = filteredProjects.filter(Boolean) as Project[];\n }\n \n this.logActivity('list_projects', 'project', 'all', { \n count: projectList.length,\n teamId \n }, true);\n \n return projectList;\n } catch (error) {\n const errorMessage = error instanceof Error ? error.message : 'Unknown error';\n this.logActivity('list_projects', 'project', 'all', { teamId }, false, errorMessage);\n throw new LinearAPIError(`Failed to fetch projects: ${errorMessage}`);\n }\n }\n \n async getProject(projectId: string): Promise<Project> {\n try {\n const project = await this.client.project(projectId);\n this.logActivity('get_project', 'project', projectId, { \n name: project.name \n }, true);\n return project;\n } catch (error) {\n const errorMessage = error instanceof Error ? error.message : 'Unknown error';\n this.logActivity('get_project', 'project', projectId, {}, false, errorMessage);\n throw new LinearAPIError(`Failed to fetch project: ${errorMessage}`);\n }\n }\n \n // User operations\n async getUsers(): Promise<User[]> {\n try {\n const users = await this.client.users();\n const userList = await users.nodes;\n \n this.logActivity('list_users', 'user', 'all', { \n count: userList.length \n }, true);\n \n return userList;\n } catch (error) {\n const errorMessage = error instanceof Error ? error.message : 'Unknown error';\n this.logActivity('list_users', 'user', 'all', {}, false, errorMessage);\n throw new LinearAPIError(`Failed to fetch users: ${errorMessage}`);\n }\n }\n \n async getCurrentUser(): Promise<User> {\n try {\n const user = await this.client.viewer;\n this.logActivity('get_current_user', 'user', user.id, { \n email: user.email,\n name: user.name \n }, true);\n return user;\n } catch (error) {\n const errorMessage = error instanceof Error ? error.message : 'Unknown error';\n this.logActivity('get_current_user', 'user', 'current', {}, false, errorMessage);\n throw new LinearAPIError(`Failed to fetch current user: ${errorMessage}`);\n }\n }\n \n // Label operations\n async getLabels(teamId?: string): Promise<IssueLabel[]> {\n try {\n const query = this.client.issueLabels({\n first: 100,\n filter: teamId ? {\n team: { id: { eq: teamId } },\n } : undefined,\n });\n \n const labels = await query;\n const labelList = await labels.nodes;\n \n this.logActivity('list_labels', 'label', 'all', { \n count: labelList.length,\n teamId \n }, true);\n \n return labelList;\n } catch (error) {\n const errorMessage = error instanceof Error ? error.message : 'Unknown error';\n this.logActivity('list_labels', 'label', 'all', { teamId }, false, errorMessage);\n throw new LinearAPIError(`Failed to fetch labels: ${errorMessage}`);\n }\n }\n \n // Workflow state operations\n async getWorkflowStates(teamId: string): Promise<WorkflowState[]> {\n try {\n const states = await this.client.workflowStates({\n filter: {\n team: { id: { eq: teamId } },\n },\n });\n \n const stateList = await states.nodes;\n \n this.logActivity('list_workflow_states', 'team', teamId, { \n count: stateList.length \n }, true);\n \n return stateList;\n } catch (error) {\n const errorMessage = error instanceof Error ? error.message : 'Unknown error';\n this.logActivity('list_workflow_states', 'team', teamId, {}, false, errorMessage);\n throw new LinearAPIError(`Failed to fetch workflow states: ${errorMessage}`);\n }\n }\n} ","export interface LinearConfig {\n LINEAR_API_KEY: string;\n LINEAR_WORKSPACE_ID?: string;\n}\n\nexport interface LinearActivityItem {\n id: string;\n timestamp: string;\n action: string;\n resource_type: 'issue' | 'project' | 'comment' | 'label' | 'user' | 'team';\n resource_id: string;\n details: Record<string, any>;\n success: boolean;\n error?: string;\n}\n\nexport interface LinearIssueInput {\n title: string;\n description?: string;\n teamId: string;\n priority?: number; // 0 = No priority, 1 = Urgent, 2 = High, 3 = Normal, 4 = Low\n assigneeId?: string;\n labelIds?: string[];\n projectId?: string;\n stateId?: string;\n estimate?: number;\n dueDate?: Date;\n}\n\nexport interface LinearCommentInput {\n body: string;\n issueId: string;\n}\n\nexport interface LinearSearchFilters {\n state?: string[];\n assignee?: string[];\n label?: string[];\n project?: string;\n team?: string;\n priority?: number[];\n query?: string;\n limit?: number;\n}\n\n// Error classes specific to Linear\nexport class LinearAPIError extends Error {\n constructor(\n message: string,\n public status?: number,\n public response?: any\n ) {\n super(message);\n this.name = 'LinearAPIError';\n }\n}\n\nexport class LinearAuthenticationError extends LinearAPIError {\n constructor(message: string) {\n super(message, 401);\n this.name = 'LinearAuthenticationError';\n }\n}\n\nexport class LinearRateLimitError extends LinearAPIError {\n constructor(\n message: string,\n public resetTime: number\n ) {\n super(message, 429);\n this.name = 'LinearRateLimitError';\n }\n} ","import {\n type Action,\n type ActionExample,\n type IAgentRuntime,\n type Memory,\n type State,\n type ActionResult,\n logger,\n validateEntityName,\n} from '@elizaos/core';\nimport { LinearService } from '../services/linear';\nimport type { LinearIssueInput } from '../types';\n\nconst createIssueTemplate = `Create a new Linear issue based on the user's request. Extract the necessary information from the conversation.\n\nRecent conversation:\n{{recentMessages}}\n\nWhen creating the issue:\n1. The title should be clear and concise\n2. The description should include all relevant details from the conversation\n3. Determine the appropriate team based on context\n4. Set priority if mentioned (1=Urgent, 2=High, 3=Normal, 4=Low)\n5. If no team is specified, use the default team\n\nResponse format should be a valid JSON block:\n\\`\\`\\`json\n{\n \"title\": \"Clear, actionable issue title\",\n \"description\": \"Detailed description with context from the conversation\",\n \"teamId\": \"team-id or null to use default\",\n \"priority\": 3,\n \"shouldCreate\": true\n}\n\\`\\`\\`\n`;\n\nexport const createLinearIssueAction: Action = {\n name: 'CREATE_LINEAR_ISSUE',\n description: 'Create a new issue in Linear',\n similes: ['create issue', 'new issue', 'file issue', 'report issue', 'create ticket', 'new ticket'],\n \n async validate(runtime: IAgentRuntime, _message: Memory, state: State): Promise<boolean> {\n try {\n const linearService = runtime.getService<LinearService>('linear');\n return !!linearService;\n } catch {\n return false;\n }\n },\n \n async handler(\n runtime: IAgentRuntime,\n message: Memory,\n state: State,\n options?: Record<string, unknown>\n ): Promise<ActionResult> {\n try {\n const linearService = runtime.getService<LinearService>('linear');\n if (!linearService) {\n throw new Error('Linear service not available');\n }\n \n // If we have explicit parameters, use them\n if (options?.title && options?.teamId) {\n const issueInput: LinearIssueInput = {\n title: String(options.title),\n description: options.description ? String(options.description) : undefined,\n teamId: String(options.teamId),\n priority: options.priority ? Number(options.priority) : 3,\n assigneeId: options.assigneeId ? String(options.assigneeId) : undefined,\n labelIds: options.labelIds ? (options.labelIds as string[]) : undefined,\n projectId: options.projectId ? String(options.projectId) : undefined,\n };\n \n const issue = await linearService.createIssue(issueInput);\n \n return {\n success: true,\n data: {\n issue: {\n id: issue.id,\n identifier: issue.identifier,\n title: issue.title,\n url: issue.url,\n },\n },\n metadata: {\n issueId: issue.id,\n identifier: issue.identifier,\n },\n };\n }\n \n // Otherwise, use LLM to extract information\n const response = await runtime.generateText({\n messages: state.messages || [],\n context: createIssueTemplate,\n });\n \n const parsed = JSON.parse(response.trim().replace(/```json\\n?|\\n?```/g, ''));\n \n if (!parsed.shouldCreate) {\n return {\n success: false,\n error: 'Not enough information to create an issue',\n };\n }\n \n // If no teamId specified, get the first available team\n let teamId = parsed.teamId;\n let teamName: string | undefined;\n \n if (!teamId) {\n const teams = await linearService.getTeams();\n if (teams.length === 0) {\n throw new Error('No teams available in Linear workspace');\n }\n teamId = teams[0].id;\n teamName = teams[0].name;\n } else {\n // Get team name if teamId was provided\n try {\n const team = await linearService.getTeam(teamId);\n teamName = team.name;\n } catch {\n // Team name is optional, continue without it\n }\n }\n \n const issueInput: LinearIssueInput = {\n title: parsed.title,\n description: parsed.description,\n teamId: teamId,\n priority: parsed.priority || 3,\n };\n \n const issue = await linearService.createIssue(issueInput);\n \n logger.info(`Created Linear issue: ${issue.identifier} - ${issue.title}`);\n \n return {\n success: true,\n data: {\n issue: {\n id: issue.id,\n identifier: issue.identifier,\n title: issue.title,\n url: issue.url,\n teamName: teamName,\n },\n },\n metadata: {\n issueId: issue.id,\n identifier: issue.identifier,\n },\n };\n \n } catch (error) {\n logger.error('Failed to create Linear issue:', error);\n return {\n success: false,\n error: error instanceof Error ? error.message : 'Failed to create issue',\n };\n }\n },\n \n examples: [\n {\n input: 'Create a new issue: Fix login button not working on mobile devices',\n output: 'Created issue ENG-123: Fix login button not working on mobile devices',\n explanation: 'Creates a new issue with the provided title',\n },\n {\n input: 'File a bug report: Users cannot upload images larger than 5MB, getting timeout errors',\n output: 'Created issue BUG-456: Image upload timeout for files > 5MB',\n explanation: 'Creates a bug report with extracted details',\n },\n {\n input: 'Create a high priority ticket for the payment processing error we discussed',\n output: 'Created high priority issue PAY-789: Payment processing error investigation',\n explanation: 'Creates an issue with priority based on conversation context',\n },\n ] as ActionExample[],\n}; ","import {\n type Action,\n type ActionExample,\n type IAgentRuntime,\n type Memory,\n type State,\n type ActionResult,\n logger,\n} from '@elizaos/core';\nimport { LinearService } from '../services/linear';\n\nexport const getLinearIssueAction: Action = {\n name: 'GET_LINEAR_ISSUE',\n description: 'Get details of a specific Linear issue by ID or identifier',\n similes: ['get issue', 'show issue', 'fetch issue', 'view issue', 'issue details', 'what is issue'],\n \n async validate(runtime: IAgentRuntime, _message: Memory, state: State): Promise<boolean> {\n try {\n const linearService = runtime.getService<LinearService>('linear');\n return !!linearService;\n } catch {\n return false;\n }\n },\n \n async handler(\n runtime: IAgentRuntime,\n message: Memory,\n state: State,\n options?: Record<string, unknown>\n ): Promise<ActionResult> {\n try {\n const linearService = runtime.getService<LinearService>('linear');\n if (!linearService) {\n throw new Error('Linear service not available');\n }\n \n // Extract issue ID or identifier from options or message\n let issueId: string | undefined;\n \n if (options?.issueId) {\n issueId = String(options.issueId);\n } else {\n // Try to extract issue identifier from the message (e.g., \"ENG-123\")\n const issuePattern = /\\b[A-Z]+-\\d+\\b/;\n const match = message.content.text?.match(issuePattern);\n if (match) {\n issueId = match[0];\n }\n }\n \n if (!issueId) {\n return {\n success: false,\n error: 'No issue ID or identifier provided',\n };\n }\n \n const issue = await linearService.getIssue(issueId);\n \n // Fetch additional related data\n const [assignee, state, team, labels] = await Promise.all([\n issue.assignee,\n issue.state,\n issue.team,\n issue.labels(),\n ]);\n \n const labelList = await labels.nodes;\n \n const issueData = {\n id: issue.id,\n identifier: issue.identifier,\n title: issue.title,\n description: issue.description,\n url: issue.url,\n priority: issue.priority,\n priorityLabel: issue.priorityLabel,\n estimate: issue.estimate,\n createdAt: issue.createdAt,\n updatedAt: issue.updatedAt,\n dueDate: issue.dueDate,\n assignee: assignee ? {\n id: assignee.id,\n name: assignee.name,\n email: assignee.email,\n } : null,\n state: {\n id: state.id,\n name: state.name,\n type: state.type,\n color: state.color,\n },\n team: {\n id: team.id,\n name: team.name,\n key: team.key,\n },\n labels: labelList.map((label: any) => ({\n id: label.id,\n name: label.name,\n color: label.color,\n })),\n };\n \n logger.info(`Retrieved Linear issue: ${issue.identifier}`);\n \n return {\n success: true,\n data: {\n issue: issueData,\n },\n metadata: {\n issueId: issue.id,\n identifier: issue.identifier,\n },\n };\n \n } catch (error) {\n logger.error('Failed to get Linear issue:', error);\n return {\n success: false,\n error: error instanceof Error ? error.message : 'Failed to get issue',\n };\n }\n },\n \n examples: [\n {\n input: 'Show me issue ENG-123',\n output: 'Issue ENG-123: Fix login button on mobile\\nStatus: In Progress\\nAssignee: John Doe\\nPriority: High',\n explanation: 'Retrieves issue details by identifier',\n },\n {\n input: 'Get details for BUG-456',\n output: 'Issue BUG-456: Image upload timeout\\nStatus: Todo\\nAssignee: Unassigned\\nPriority: Urgent\\nLabels: bug, performance',\n explanation: 'Fetches comprehensive issue information',\n },\n {\n input: 'What is the status of FEAT-789?',\n output: 'Issue FEAT-789: Add dark mode support\\nStatus: Done\\nAssignee: Jane Smith\\nCompleted: 2 days ago',\n explanation: 'Shows current status and details of an issue',\n },\n ] as ActionExample[],\n}; ","import {\n type Action,\n type ActionExample,\n type IAgentRuntime,\n type Memory,\n type State,\n type ActionResult,\n logger,\n} from '@elizaos/core';\nimport { LinearService } from '../services/linear';\nimport type { LinearIssueInput } from '../types';\n\nexport const updateLinearIssueAction: Action = {\n name: 'UPDATE_LINEAR_ISSUE',\n description: 'Update an existing Linear issue',\n similes: ['update issue', 'modify issue', 'change issue', 'edit issue'],\n \n async validate(runtime: IAgentRuntime, _message: Memory, state: State): Promise<boolean> {\n try {\n const linearService = runtime.getService<LinearService>('linear');\n return !!linearService;\n } catch {\n return false;\n }\n },\n \n async handler(\n runtime: IAgentRuntime,\n message: Memory,\n state: State,\n options?: Record<string, unknown>\n ): Promise<ActionResult> {\n try {\n const linearService = runtime.getService<LinearService>('linear');\n if (!linearService) {\n throw new Error('Linear service not available');\n }\n \n const issueId = options?.issueId ? String(options.issueId) : undefined;\n if (!issueId) {\n return {\n success: false,\n error: 'Issue ID is required',\n };\n }\n \n const updates: Partial<LinearIssueInput> = {};\n \n if (options?.title !== undefined) updates.title = String(options.title);\n if (options?.description !== undefined) updates.description = String(options.description);\n if (options?.priority !== undefined) updates.priority = Number(options.priority);\n if (options?.assigneeId !== undefined) updates.assigneeId = String(options.assigneeId);\n if (options?.stateId !== undefined) updates.stateId = String(options.stateId);\n if (options?.labelIds !== undefined) updates.labelIds = options.labelIds as string[];\n if (options?.projectId !== undefined) updates.projectId = String(options.projectId);\n if (options?.estimate !== undefined) updates.estimate = Number(options.estimate);\n if (options?.dueDate !== undefined) updates.dueDate = new Date(String(options.dueDate));\n \n const issue = await linearService.updateIssue(issueId, updates);\n \n logger.info(`Updated Linear issue: ${issue.identifier}`);\n \n return {\n success: true,\n data: {\n issue: {\n id: issue.id,\n identifier: issue.identifier,\n title: issue.title,\n url: issue.url,\n },\n },\n metadata: {\n issueId: issue.id,\n identifier: issue.identifier,\n updates: Object.keys(updates),\n },\n };\n \n } catch (error) {\n logger.error('Failed to update Linear issue:', error);\n return {\n success: false,\n error: error instanceof Error ? error.message : 'Failed to update issue',\n };\n }\n },\n \n examples: [\n {\n input: 'Update issue ENG-123 title to \"Fix login button on all devices\"',\n output: 'Updated issue ENG-123: Fix login button on all devices',\n explanation: 'Updates the title of an existing issue',\n },\n ] as ActionExample[],\n}; ","import {\n type Action,\n type ActionExample,\n type IAgentRuntime,\n type Memory,\n type State,\n type ActionResult,\n logger,\n} from '@elizaos/core';\nimport { LinearService } from '../services/linear';\nimport type { LinearSearchFilters } from '../types';\n\nconst searchIssuesTemplate = `Extract search criteria from the user's request to search Linear issues.\n\nRecent conversation:\n{{recentMessages}}\n\nExtract search filters like:\n- query: Text to search in title/description\n- state: Issue states (todo, in-progress, done, canceled)\n- assignee: Assignee names or IDs\n- label: Label names\n- priority: Priority levels (1=Urgent, 2=High, 3=Normal, 4=Low)\n- team: Team name or ID\n- project: Project name or ID\n\nResponse format should be a valid JSON block:\n\\`\\`\\`json\n{\n \"query\": \"search text or null\",\n \"state\": [\"state1\", \"state2\"] or null,\n \"assignee\": [\"assignee\"] or null,\n \"label\": [\"label1\", \"label2\"] or null,\n \"priority\": [1, 2] or null,\n \"team\": \"team-name\" or null,\n \"project\": \"project-name\" or null,\n \"limit\": 20\n}\n\\`\\`\\`\n`;\n\nexport const searchLinearIssuesAction: Action = {\n name: 'SEARCH_LINEAR_ISSUES',\n description: 'Search for issues in Linear based on various criteria',\n similes: ['search issues', 'find issues', 'list issues', 'show issues', 'query issues', 'filter issues'],\n \n async validate(runtime: IAgentRuntime, _message: Memory, state: State): Promise<boolean> {\n try {\n const linearService = runtime.getService<LinearService>('linear');\n return !!linearService;\n } catch {\n return false;\n }\n },\n \n async handler(\n runtime: IAgentRuntime,\n message: Memory,\n state: State,\n options?: Record<string, unknown>\n ): Promise<ActionResult> {\n try {\n const linearService = runtime.getService<LinearService>('linear');\n if (!linearService) {\n throw new Error('Linear service not available');\n }\n \n let filters: LinearSearchFilters;\n \n // If we have explicit parameters, use them\n if (options && Object.keys(options).length > 0) {\n filters = {\n query: options.query ? String(options.query) : undefined,\n state: options.state as string[] | undefined,\n assignee: options.assignee as string[] | undefined,\n label: options.label as string[] | undefined,\n priority: options.priority as number[] | undefined,\n team: options.team ? String(options.team) : undefined,\n project: options.project ? String(options.project) : undefined,\n limit: options.limit ? Number(options.limit) : 20,\n };\n } else {\n // Use LLM to extract search criteria\n const response = await runtime.generateText({\n messages: state.messages || [],\n context: searchIssuesTemplate,\n });\n \n filters = JSON.parse(response.trim().replace(/```json\\n?|\\n?```/g, ''));\n }\n \n // Set default limit if not provided\n if (!filters.limit) {\n filters.limit = 20;\n }\n \n const issues = await linearService.searchIssues(filters);\n \n // Fetch additional data for each issue\n const issuesWithDetails = await Promise.all(\n issues.map(async (issue: any) => {\n const [assignee, state, team] = await Promise.all([\n issue.assignee,\n issue.state,\n issue.team,\n ]);\n \n return {\n id: issue.id,\n identifier: issue.identifier,\n title: issue.title,\n url: issue.url,\n priority: issue.priority,\n priorityLabel: issue.priorityLabel,\n createdAt: issue.createdAt,\n updatedAt: issue.updatedAt,\n assignee: assignee ? assignee.name : 'Unassigned',\n state: state.name,\n team: team.name,\n };\n })\n );\n \n logger.info(`Found ${issues.length} Linear issues matching criteria`);\n \n return {\n success: true,\n data: {\n issues: issuesWithDetails,\n count: issues.length,\n filters: filters,\n },\n metadata: {\n searchFilters: filters,\n resultCount: issues.length,\n },\n };\n \n } catch (error) {\n logger.error('Failed to search Linear issues:', error);\n return {\n success: false,\n error: error instanceof Error ? error.message : 'Failed to search issues',\n };\n }\n },\n \n examples: [\n {\n input: 'Show me all open bugs',\n output: 'Found 5 open issues labeled as \"bug\":\\n1. BUG-123: Login timeout issue\\n2. BUG-124: Image upload fails\\n...',\n explanation: 'Searches for issues with bug label in open states',\n },\n {\n input: 'Find high priority issues assigned to me',\n output: 'Found 3 high priority issues assigned to you:\\n1. FEAT-456: Implement user dashboard\\n2. BUG-789: Fix payment processing\\n...',\n explanation: 'Searches for high priority issues assigned to the current user',\n },\n {\n input: 'Search for issues related to authentication',\n output: 'Found 4 issues matching \"authentication\":\\n1. SEC-001: Add 2FA support\\n2. BUG-234: Password reset not working\\n...',\n explanation: 'Performs text search across issue titles and descriptions',\n },\n ] as ActionExample[],\n}; ","import {\n type Action,\n type ActionExample,\n type IAgentRuntime,\n type Memory,\n type State,\n type ActionResult,\n logger,\n} from '@elizaos/core';\nimport { LinearService } from '../services/linear';\nimport type { LinearCommentInput } from '../types';\n\nexport const createLinearCommentAction: Action = {\n name: 'CREATE_LINEAR_COMMENT',\n description: 'Add a comment to a Linear issue',\n similes: ['comment on issue', 'add comment', 'reply to issue'],\n \n async validate(runtime: IAgentRuntime, _message: Memory, state: State): Promise<boolean> {\n try {\n const linearService = runtime.getService<LinearService>('linear');\n return !!linearService;\n } catch {\n return false;\n }\n },\n \n async handler(\n runtime: IAgentRuntime,\n message: Memory,\n state: State,\n options?: Record<string, unknown>\n ): Promise<ActionResult> {\n try {\n const linearService = runtime.getService<LinearService>('linear');\n if (!linearService) {\n throw new Error('Linear service not available');\n }\n \n const issueId = options?.issueId ? String(options.issueId) : undefined;\n const body = options?.body ? String(options.body) : message.content.text;\n \n if (!issueId || !body) {\n return {\n success: false,\n error: 'Issue ID and comment body are required',\n };\n }\n \n const commentInput: LinearCommentInput = {\n issueId,\n body,\n };\n \n const comment = await linearService.createComment(commentInput);\n \n logger.info(`Created comment on Linear issue: ${issueId}`);\n \n return {\n success: true,\n data: {\n comment: {\n id: comment.id,\n body: comment.body,\n createdAt: comment.createdAt,\n },\n },\n metadata: {\n commentId: comment.id,\n issueId: issueId,\n },\n };\n \n } catch (error) {\n logger.error('Failed to create Linear comment:', error);\n return {\n success: false,\n error: error instanceof Error ? error.message : 'Failed to create comment',\n };\n }\n },\n \n examples: [\n {\n input: 'Comment on ENG-123: This has been fixed in the latest release',\n output: 'Added comment to issue ENG-123',\n explanation: 'Adds a comment to an existing issue',\n },\n ] as ActionExample[],\n}; ","import {\n type Action,\n type ActionExample,\n type IAgentRuntime,\n type Memory,\n type State,\n type ActionResult,\n logger,\n} from '@elizaos/core';\nimport { LinearService } from '../services/linear';\n\nexport const listLinearTeamsAction: Action = {\n name: 'LIST_LINEAR_TEAMS',\n description: 'List all teams in the Linear workspace',\n similes: ['show teams', 'get teams', 'list teams', 'view teams'],\n \n async validate(runtime: IAgentRuntime, _message: Memory, state: State): Promise<boolean> {\n try {\n const linearService = runtime.getService<LinearService>('linear');\n return !!linearService;\n } catch {\n return false;\n }\n },\n \n async handler(\n runtime: IAgentRuntime,\n message: Memory,\n state: State,\n options?: Record<string, unknown>\n ): Promise<ActionResult> {\n try {\n const linearService = runtime.getService<LinearService>('linear');\n if (!linearService) {\n throw new Error('Linear service not available');\n }\n \n const teams = await linearService.getTeams();\n \n const teamsData = teams.map((team: any) => ({\n id: team.id,\n name: team.name,\n key: team.key,\n description: team.description,\n }));\n \n logger.info(`Retrieved ${teams.length} Linear teams`);\n \n return {\n success: true,\n data: {\n teams: teamsData,\n count: teams.length,\n },\n metadata: {\n teamCount: teams.length,\n },\n };\n \n } catch (error) {\n logger.error('Failed to list Linear teams:', error);\n return {\n success: false,\n error: error instanceof Error ? error.message : 'Failed to list teams',\n };\n }\n },\n \n examples: [\n {\n input: 'Show me all teams',\n output: 'Found 3 teams:\\n1. Engineering (ENG)\\n2. Design (DES)\\n3. Product (PROD)',\n explanation: 'Lists all teams in the workspace',\n },\n ] as ActionExample[],\n}; ","import {\n type Action,\n type ActionExample,\n type IAgentRuntime,\n type Memory,\n type State,\n type ActionResult,\n logger,\n} from '@elizaos/core';\nimport { LinearService } from '../services/linear';\n\nexport const listLinearProjectsAction: Action = {\n name: 'LIST_LINEAR_PROJECTS',\n description: 'List projects in Linear, optionally filtered by team',\n similes: ['show projects', 'get projects', 'list projects', 'view projects'],\n \n async validate(runtime: IAgentRuntime, _message: Memory, state: State): Promise<boolean> {\n try {\n const linearService = runtime.getService<LinearService>('linear');\n return !!linearService;\n } catch {\n return false;\n }\n },\n \n async handler(\n runtime: IAgentRuntime,\n message: Memory,\n state: State,\n options?: Record<string, unknown>\n ): Promise<ActionResult> {\n try {\n const linearService = runtime.getService<LinearService>('linear');\n if (!linearService) {\n throw new Error('Linear service not available');\n }\n \n const teamId = options?.teamId ? String(options.teamId) : undefined;\n const projects = await linearService.getProjects(teamId);\n \n const projectsData = await Promise.all(\n projects.map(async (project: any) => {\n const team = await project.team;\n return {\n id: project.id,\n name: project.name,\n description: project.description,\n state: project.state,\n teamName: team?.name,\n startDate: project.startDate,\n targetDate: project.targetDate,\n };\n })\n );\n \n logger.info(`Retrieved ${projects.length} Linear projects`);\n \n return {\n success: true,\n data: {\n projects: projectsData,\n count: projects.length,\n },\n metadata: {\n projectCount: projects.length,\n teamFilter: teamId,\n },\n };\n \n } catch (error) {\n logger.error('Failed to list Linear projects:', error);\n return {\n success: false,\n error: error instanceof Error ? error.message : 'Failed to list projects',\n };\n }\n },\n \n examples: [\n {\n input: 'Show me all projects',\n output: 'Found 5 projects:\\n1. Q1 2024 Roadmap\\n2. Mobile App Redesign\\n3. API v2 Migration...',\n explanation: 'Lists all projects in the workspace',\n },\n ] as ActionExample[],\n}; ","import {\n type Action,\n type ActionExample,\n type IAgentRuntime,\n type Memory,\n type State,\n type ActionResult,\n logger,\n} from '@elizaos/core';\nimport { LinearService } from '../services/linear';\n\nexport const getLinearActivityAction: Action = {\n name: 'GET_LINEAR_ACTIVITY',\n description: 'Get recent Linear activity log',\n similes: ['show activity', 'get activity', 'view activity', 'activity log'],\n \n async validate(runtime: IAgentRuntime, _message: Memory, state: State): Promise<boolean> {\n try {\n const linearService = runtime.getService<LinearService>('linear');\n return !!linearService;\n } catch {\n return false;\n }\n },\n \n async handler(\n runtime: IAgentRuntime,\n message: Memory,\n state: State,\n options?: Record<string, unknown>\n ): Promise<ActionResult> {\n try {\n const linearService = runtime.getService<LinearService>('linear');\n if (!linearService) {\n throw new Error('Linear service not available');\n }\n \n const limit = options?.limit ? Number(options.limit) : 50;\n const filter = options?.filter ? options.filter as any : undefined;\n \n const activity = linearService.getActivityLog(limit, filter);\n \n logger.info(`Retrieved ${activity.length} Linear activity items`);\n \n return {\n success: true,\n data: {\n activity,\n count: activity.length,\n },\n metadata: {\n activityCount: activity.length,\n },\n };\n \n } catch (error) {\n logger.error('Failed to get Linear activity:', error);\n return {\n success: false,\n error: error instanceof Error ? error.message : 'Failed to get activity',\n };\n }\n },\n \n examples: [\n {\n input: 'Show me recent Linear activity',\n output: 'Recent activity:\\n1. Created issue ENG-123\\n2. Updated issue BUG-456\\n3. Added comment to FEAT-789...',\n explanation: 'Shows recent Linear operations performed by the agent',\n },\n ] as ActionExample[],\n}; ","import {\n type Action,\n type ActionExample,\n type IAgentRuntime,\n type Memory,\n type State,\n type ActionResult,\n logger,\n} from '@elizaos/core';\nimport { LinearService } from '../services/linear';\n\nexport const clearLinearActivityAction: Action = {\n name: 'CLEAR_LINEAR_ACTIVITY',\n description: 'Clear the Linear activity log',\n similes: ['clear activity', 'reset activity', 'delete activity log'],\n \n async validate(runtime: IAgentRuntime, _message: Memory, state: State): Promise<boolean> {\n try {\n const linearService = runtime.getService<LinearService>('linear');\n return !!linearService;\n } catch {\n return false;\n }\n },\n \n async handler(\n runtime: IAgentRuntime,\n message: Memory,\n state: State,\n options?: Record<string, unknown>\n ): Promise<ActionResult> {\n try {\n const linearService = runtime.getService<LinearService>('linear');\n if (!linearService) {\n throw new Error('Linear service not available');\n }\n \n linearService.clearActivityLog();\n \n logger.info('Cleared Linear activity log');\n \n return {\n success: true,\n data: {\n message: 'Activity log cleared successfully',\n },\n };\n \n } catch (error) {\n logger.error('Failed to clear Linear activity:', error);\n return {\n success: false,\n error: error instanceof Error ? error.message : 'Failed to clear activity',\n };\n }\n },\n \n examples: [\n {\n input: 'Clear the Linear activity log',\n output: 'Linear activity log has been cleared',\n explanation: 'Clears all stored activity history',\n },\n ] as ActionExample[],\n}; ","import type { IAgentRuntime, Memory, Provider, State } from '@elizaos/core';\nimport { LinearService } from '../services/linear';\n\nexport const linearIssuesProvider: Provider = {\n name: 'LINEAR_ISSUES',\n description: 'Provides context about recent Linear issues',\n get: async (runtime: IAgentRuntime, _message: Memory, _state: State) => {\n try {\n const linearService = runtime.getService<LinearService>('linear');\n if (!linearService) {\n return {\n text: 'Linear service is not available',\n };\n }\n \n // Get recent issues\n const issues = await linearService.searchIssues({ limit: 10 });\n \n if (issues.length === 0) {\n return {\n text: 'No recent Linear issues found',\n };\n }\n \n // Format issues for context\n const issuesList = await Promise.all(\n issues.map(async (issue: any) => {\n const [assignee, state] = await Promise.all([\n issue.assignee,\n issue.state,\n ]);\n \n return `- ${issue.identifier}: ${issue.title} (${state?.name || 'Unknown'}, ${assignee?.name || 'Unassigned'})`;\n })\n );\n \n const text = `Recent Linear Issues:\\n${issuesList.join('\\n')}`;\n \n return {\n text,\n data: {\n issues: issues.map((issue: any) => ({\n id: issue.id,\n identifier: issue.identifier,\n title: issue.title,\n })),\n },\n };\n } catch (error) {\n return {\n text: 'Error retrieving Linear issues',\n };\n }\n },\n}; ","import type { IAgentRuntime, Memory, Provider, State } from '@elizaos/core';\nimport { LinearService } from '../services/linear';\n\nexport const linearTeamsProvider: Provider = {\n name: 'LINEAR_TEAMS',\n description: 'Provides context about Linear teams',\n get: async (runtime: IAgentRuntime, _message: Memory, _state: State) => {\n try {\n const linearService = runtime.getService<LinearService>('linear');\n if (!linearService) {\n return {\n text: 'Linear service is not available',\n };\n }\n \n const teams = await linearService.getTeams();\n \n if (teams.length === 0) {\n return {\n text: 'No Linear teams found',\n };\n }\n \n const teamsList = teams.map((team: any) => \n `- ${team.name} (${team.key}): ${team.description || 'No description'}`\n );\n \n const text = `Linear Teams:\\n${teamsList.join('\\n')}`;\n \n return {\n text,\n data: {\n teams: teams.map((team: any) => ({\n id: team.id,\n name: team.name,\n key: team.key,\n })),\n },\n };\n } catch (error) {\n return {\n text: 'Error retrieving Linear teams',\n };\n }\n },\n}; ","import type { IAgentRuntime, Memory, Provider, State } from '@elizaos/core';\nimport { LinearService } from '../services/linear';\n\nexport const linearProjectsProvider: Provider = {\n name: 'LINEAR_PROJECTS',\n description: 'Provides context about active Linear projects',\n get: async (runtime: IAgentRuntime, _message: Memory, _state: State) => {\n try {\n const linearService = runtime.getService<LinearService>('linear');\n if (!linearService) {\n return {\n text: 'Linear service is not available',\n };\n }\n \n const projects = await linearService.getProjects();\n \n if (projects.length === 0) {\n return {\n text: 'No Linear projects found',\n };\n }\n \n // Filter active projects\n const activeProjects = projects.filter((project: any) => \n project.state === 'started' || project.state === 'planned'\n );\n \n const projectsList = activeProjects.slice(0, 10).map((project: any) => \n `- ${project.name}: ${project.state} (${project.startDate || 'No start date'} - ${project.targetDate || 'No target date'})`\n );\n \n const text = `Active Linear Projects:\\n${projectsList.join('\\n')}`;\n \n return {\n text,\n data: {\n projects: activeProjects.slice(0, 10).map((project: any) => ({\n id: project.id,\n name: project.name,\n state: project.state,\n })),\n },\n };\n } catch (error) {\n return {\n text: 'Error retrieving Linear projects',\n };\n }\n },\n}; ","import type { IAgentRuntime, Memory, Provider, State } from '@elizaos/core';\nimport { LinearService } from '../services/linear';\nimport type { LinearActivityItem } from '../types';\n\nexport const linearActivityProvider: Provider = {\n name: 'LINEAR_ACTIVITY',\n description: 'Provides context about recent Linear activity',\n get: async (runtime: IAgentRuntime, _message: Memory, _state: State) => {\n try {\n const linearService = runtime.getService<LinearService>('linear');\n if (!linearService) {\n return {\n text: 'Linear service is not available',\n };\n }\n \n const activity = linearService.getActivityLog(10);\n \n if (activity.length === 0) {\n return {\n text: 'No recent Linear activity',\n };\n }\n \n const activityList = activity.map((item: LinearActivityItem) => {\n const status = item.success ? '✓' : '✗';\n const time = new Date(item.timestamp).toLocaleTimeString();\n return `${status} ${time}: ${item.action} ${item.resource_type} ${item.resource_id}`;\n });\n \n const text = `Recent Linear Activity:\\n${activityList.join('\\n')}`;\n \n return {\n text,\n data: {\n activity: activity.slice(0, 10),\n },\n };\n } catch (error) {\n return {\n text: 'Error retrieving Linear activity',\n };\n }\n },\n}; ","import type { Plugin } from '@elizaos/core';\nimport { LinearService } from './services/linear';\nimport * as actions from './actions';\nimport * as providers from './providers';\n\nexport const linearPlugin: Plugin = {\n name: 'linear',\n description: 'Linear integration plugin for issue tracking and project management',\n \n services: [LinearService],\n \n actions: [\n actions.createLinearIssueAction,\n actions.getLinearIssueAction,\n actions.updateLinearIssueAction,\n actions.searchLinearIssuesAction,\n actions.createLinearCommentAction,\n actions.listLinearTeamsAction,\n actions.listLinearProjectsAction,\n actions.getLinearActivityAction,\n actions.clearLinearActivityAction,\n ],\n \n providers: [\n providers.linearIssuesProvider,\n providers.linearTeamsProvider,\n providers.linearProjectsProvider,\n providers.linearActivityProvider,\n ],\n \n // No evaluators or events for this plugin\n evaluators: [],\n events: {},\n};\n\n// Re-export types and service for external use\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,QAAQ;AAChE,UAAI,CAAC,eAAe;AAClB,eAAO;AAAA,UACL,MAAM;AAAA,QACR;AAAA,MACF;AAEA,YAAM,WAAW,cAAc,eAAe,EAAE;AAEhD,UAAI,SAAS,WAAW,GAAG;AACzB,eAAO;AAAA,UACL,MAAM;AAAA,QACR;AAAA,MACF;AAEA,YAAM,eAAe,SAAS,IAAI,CAAC,SAA6B;AAC9D,cAAM,SAAS,KAAK,UAAU,WAAM;AACpC,cAAM,OAAO,IAAI,KAAK,KAAK,SAAS,EAAE,mBAAmB;AACzD,eAAO,GAAG,MAAM,IAAI,IAAI,KAAK,KAAK,MAAM,IAAI,KAAK,aAAa,IAAI,KAAK,WAAW;AAAA,MACpF,CAAC;AAED,YAAM,OAAO;AAAA,EAA4B,aAAa,KAAK,IAAI,CAAC;AAEhE,aAAO;AAAA,QACL;AAAA,QACA,MAAM;AAAA,UACJ,UAAU,SAAS,MAAM,GAAG,EAAE;AAAA,QAChC;AAAA,MACF;AAAA,IACF,SAAS,OAAO;AACd,aAAO;AAAA,QACL,MAAM;AAAA,MACR;AAAA,IACF;AAAA,EACF;AACF;;;ACvCO,IAAM,eAAuB;AAAA,EAClC,MAAM;AAAA,EACN,aAAa;AAAA,EAEb,UAAU,CAAC,aAAa;AAAA,EAExB,SAAS;AAAA,IACC;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACV;AAAA,EAEA,WAAW;AAAA,IACC;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACZ;AAAA;AAAA,EAGA,YAAY,CAAC;AAAA,EACb,QAAQ,CAAC;AACX;","names":["logger","issueInput","issue","logger","state","logger","logger","state","logger","logger","logger","logger","logger"]}
|
package/package.json
ADDED
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@elizaos/plugin-linear",
|
|
3
|
+
"version": "1.2.5",
|
|
4
|
+
"description": "Linear integration plugin for ElizaOS",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"module": "dist/index.js",
|
|
7
|
+
"types": "dist/index.d.ts",
|
|
8
|
+
"type": "module",
|
|
9
|
+
"exports": {
|
|
10
|
+
"./package.json": "./package.json",
|
|
11
|
+
".": {
|
|
12
|
+
"import": {
|
|
13
|
+
"types": "./dist/index.d.ts",
|
|
14
|
+
"default": "./dist/index.js"
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
"files": [
|
|
19
|
+
"dist"
|
|
20
|
+
],
|
|
21
|
+
"publishConfig": {
|
|
22
|
+
"access": "public"
|
|
23
|
+
},
|
|
24
|
+
"scripts": {
|
|
25
|
+
"build": "tsup",
|
|
26
|
+
"dev": "tsup --watch",
|
|
27
|
+
"test": "vitest",
|
|
28
|
+
"test:watch": "vitest --watch",
|
|
29
|
+
"test:e2e": "elizaos test e2e",
|
|
30
|
+
"lint": "eslint . --ext .ts",
|
|
31
|
+
"format": "prettier --write \"src/**/*.ts\"",
|
|
32
|
+
"format:check": "prettier --check \"src/**/*.ts\"",
|
|
33
|
+
"clean": "rm -rf dist .turbo node_modules .turbo-tsconfig.json tsconfig.tsbuildinfo"
|
|
34
|
+
},
|
|
35
|
+
"repository": {
|
|
36
|
+
"type": "git",
|
|
37
|
+
"url": "git+https://github.com/elizaos/eliza.git"
|
|
38
|
+
},
|
|
39
|
+
"keywords": [
|
|
40
|
+
"elizaos",
|
|
41
|
+
"plugin",
|
|
42
|
+
"linear",
|
|
43
|
+
"project management",
|
|
44
|
+
"issue tracking"
|
|
45
|
+
],
|
|
46
|
+
"author": "ElizaOS Contributors",
|
|
47
|
+
"license": "MIT",
|
|
48
|
+
"bugs": {
|
|
49
|
+
"url": "https://github.com/elizaos/eliza/issues"
|
|
50
|
+
},
|
|
51
|
+
"homepage": "https://github.com/elizaos/eliza#readme",
|
|
52
|
+
"dependencies": {
|
|
53
|
+
"@linear/sdk": "^51.0.0",
|
|
54
|
+
"@elizaos/core": "1.2.5"
|
|
55
|
+
},
|
|
56
|
+
"devDependencies": {
|
|
57
|
+
"@types/node": "^20.12.7",
|
|
58
|
+
"@typescript-eslint/eslint-plugin": "^7.7.1",
|
|
59
|
+
"@typescript-eslint/parser": "^7.7.1",
|
|
60
|
+
"eslint": "^8.57.0",
|
|
61
|
+
"prettier": "^3.2.5",
|
|
62
|
+
"tsup": "^8.0.2",
|
|
63
|
+
"typescript": "^5.4.5",
|
|
64
|
+
"vitest": "^1.5.0"
|
|
65
|
+
}
|
|
66
|
+
}
|