@elizaos/plugin-linear 1.2.10 → 1.2.11

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 CHANGED
@@ -47,6 +47,7 @@ LINEAR_API_KEY=your_linear_api_key_here
47
47
 
48
48
  # Optional
49
49
  LINEAR_WORKSPACE_ID=your_workspace_id_here
50
+ LINEAR_DEFAULT_TEAM_KEY=your_default_team_key_here # e.g., ENG, ELIZA, COM2
50
51
  ```
51
52
 
52
53
  ## Usage
@@ -113,14 +114,24 @@ agent.registerPlugin(linearPlugin);
113
114
 
114
115
  #### Update Issue
115
116
  ```typescript
117
+ // Natural language examples
118
+ "Update issue ENG-123 title to 'Fix login button on all devices'"
119
+ "Move issue COM2-7 to the ELIZA team"
120
+ "Change the priority of BUG-456 to high and assign to john@example.com"
121
+ "Update issue PROD-789 status to in-progress"
122
+
116
123
  // With options
117
124
  {
118
125
  action: "UPDATE_LINEAR_ISSUE",
119
126
  options: {
120
127
  issueId: "issue-id",
121
128
  title: "Updated title",
122
- priority: 1,
123
- stateId: "state-id"
129
+ description: "Updated description",
130
+ priority: 1, // 1=urgent, 2=high, 3=normal, 4=low
131
+ teamId: "team-id", // Move to different team
132
+ assigneeId: "user-id",
133
+ stateId: "state-id",
134
+ labelIds: ["label-id-1", "label-id-2"]
124
135
  }
125
136
  }
126
137
  ```
package/dist/index.js CHANGED
@@ -494,10 +494,25 @@ var createIssueAction = {
494
494
  }
495
495
  }
496
496
  if (!issueData.teamId) {
497
- const teams = await linearService.getTeams();
498
- if (teams.length > 0) {
499
- issueData.teamId = teams[0].id;
500
- logger2.warn(`No team specified, using default team: ${teams[0].name}`);
497
+ const defaultTeamKey = runtime.getSetting("LINEAR_DEFAULT_TEAM_KEY");
498
+ if (defaultTeamKey) {
499
+ const teams = await linearService.getTeams();
500
+ const defaultTeam = teams.find(
501
+ (t) => t.key.toLowerCase() === defaultTeamKey.toLowerCase()
502
+ );
503
+ if (defaultTeam) {
504
+ issueData.teamId = defaultTeam.id;
505
+ logger2.info(`Using configured default team: ${defaultTeam.name} (${defaultTeam.key})`);
506
+ } else {
507
+ logger2.warn(`Default team key ${defaultTeamKey} not found`);
508
+ }
509
+ }
510
+ if (!issueData.teamId) {
511
+ const teams = await linearService.getTeams();
512
+ if (teams.length > 0) {
513
+ issueData.teamId = teams[0].id;
514
+ logger2.warn(`No team specified, using first available team: ${teams[0].name}`);
515
+ }
501
516
  }
502
517
  }
503
518
  } catch (parseError) {
@@ -506,10 +521,20 @@ var createIssueAction = {
506
521
  title: content.length > 100 ? content.substring(0, 100) + "..." : content,
507
522
  description: content
508
523
  };
524
+ const defaultTeamKey = runtime.getSetting("LINEAR_DEFAULT_TEAM_KEY");
509
525
  const teams = await linearService.getTeams();
510
- if (teams.length > 0) {
526
+ if (defaultTeamKey) {
527
+ const defaultTeam = teams.find(
528
+ (t) => t.key.toLowerCase() === defaultTeamKey.toLowerCase()
529
+ );
530
+ if (defaultTeam) {
531
+ issueData.teamId = defaultTeam.id;
532
+ logger2.info(`Using configured default team for fallback: ${defaultTeam.name} (${defaultTeam.key})`);
533
+ }
534
+ }
535
+ if (!issueData.teamId && teams.length > 0) {
511
536
  issueData.teamId = teams[0].id;
512
- logger2.warn(`Using default team for fallback: ${teams[0].name}`);
537
+ logger2.warn(`Using first available team for fallback: ${teams[0].name}`);
513
538
  }
514
539
  }
515
540
  }
@@ -731,11 +756,30 @@ View in Linear: ${issue.url}`;
731
756
  };
732
757
 
733
758
  // src/actions/updateIssue.ts
734
- import { logger as logger4 } from "@elizaos/core";
759
+ import { logger as logger4, ModelType as ModelType2 } from "@elizaos/core";
760
+ var updateIssueTemplate = `Given the user's request to update a Linear issue, extract the information needed.
761
+
762
+ User request: "{{userMessage}}"
763
+
764
+ Extract and return ONLY a JSON object (no markdown formatting, no code blocks) with the following structure:
765
+ {
766
+ "issueId": "The issue identifier (e.g., ENG-123, COM2-7)",
767
+ "updates": {
768
+ "title": "New title if changing the title",
769
+ "description": "New description if changing the description",
770
+ "priority": "Priority level if changing (1=urgent, 2=high, 3=normal, 4=low)",
771
+ "teamKey": "New team key if moving to another team (e.g., ENG, ELIZA, COM2)",
772
+ "assignee": "New assignee username or email if changing",
773
+ "status": "New status if changing (e.g., todo, in-progress, done, canceled)",
774
+ "labels": ["label1", "label2"] (if changing labels, empty array to clear)
775
+ }
776
+ }
777
+
778
+ Only include fields that are being updated. Return only the JSON object, no other text.`;
735
779
  var updateIssueAction = {
736
780
  name: "UPDATE_LINEAR_ISSUE",
737
781
  description: "Update an existing Linear issue",
738
- similes: ["update-linear-issue", "edit-linear-issue", "modify-linear-issue"],
782
+ similes: ["update-linear-issue", "edit-linear-issue", "modify-linear-issue", "move-linear-issue", "change-linear-issue"],
739
783
  examples: [[
740
784
  {
741
785
  name: "User",
@@ -754,13 +798,27 @@ var updateIssueAction = {
754
798
  {
755
799
  name: "User",
756
800
  content: {
757
- text: "Change the priority of BUG-456 to high"
801
+ text: "Move issue COM2-7 to the ELIZA team"
758
802
  }
759
803
  },
760
804
  {
761
805
  name: "Assistant",
762
806
  content: {
763
- text: "I'll change the priority of BUG-456 to high.",
807
+ text: "I'll move issue COM2-7 to the ELIZA team.",
808
+ actions: ["UPDATE_LINEAR_ISSUE"]
809
+ }
810
+ }
811
+ ], [
812
+ {
813
+ name: "User",
814
+ content: {
815
+ text: "Change the priority of BUG-456 to high and assign to john@example.com"
816
+ }
817
+ },
818
+ {
819
+ name: "Assistant",
820
+ content: {
821
+ text: "I'll change the priority of BUG-456 to high and assign it to john@example.com.",
764
822
  actions: ["UPDATE_LINEAR_ISSUE"]
765
823
  }
766
824
  }
@@ -791,45 +849,123 @@ var updateIssueAction = {
791
849
  success: false
792
850
  };
793
851
  }
794
- const issueMatch = content.match(/(\w+-\d+)/);
795
- if (!issueMatch) {
796
- const errorMessage = "Please specify an issue ID (e.g., ENG-123) to update.";
797
- await callback?.({
798
- text: errorMessage,
799
- source: message.content.source
800
- });
801
- return {
802
- text: errorMessage,
803
- success: false
804
- };
805
- }
806
- const issueId = issueMatch[1];
807
- const updates = {};
808
- const titleMatch = content.match(/title to ["'](.+?)["']/i);
809
- if (titleMatch) {
810
- updates.title = titleMatch[1];
811
- }
812
- const priorityMatch = content.match(/priority (?:to |as )?(\w+)/i);
813
- if (priorityMatch) {
814
- const priorityMap = {
815
- "urgent": 1,
816
- "high": 2,
817
- "normal": 3,
818
- "medium": 3,
819
- "low": 4
820
- };
821
- const priority = priorityMap[priorityMatch[1].toLowerCase()];
822
- if (priority) {
823
- updates.priority = priority;
852
+ const prompt = updateIssueTemplate.replace("{{userMessage}}", content);
853
+ const response = await runtime.useModel(ModelType2.TEXT_LARGE, {
854
+ prompt
855
+ });
856
+ if (!response) {
857
+ throw new Error("Failed to extract update information");
858
+ }
859
+ let issueId;
860
+ let updates = {};
861
+ try {
862
+ const cleanedResponse = response.replace(/^```(?:json)?\n?/, "").replace(/\n?```$/, "").trim();
863
+ const parsed = JSON.parse(cleanedResponse);
864
+ issueId = parsed.issueId;
865
+ if (!issueId) {
866
+ throw new Error("Issue ID not found in parsed response");
867
+ }
868
+ if (parsed.updates?.title) {
869
+ updates.title = parsed.updates.title;
870
+ }
871
+ if (parsed.updates?.description) {
872
+ updates.description = parsed.updates.description;
873
+ }
874
+ if (parsed.updates?.priority) {
875
+ updates.priority = Number(parsed.updates.priority);
876
+ }
877
+ if (parsed.updates?.teamKey) {
878
+ const teams = await linearService.getTeams();
879
+ const team = teams.find(
880
+ (t) => t.key.toLowerCase() === parsed.updates.teamKey.toLowerCase()
881
+ );
882
+ if (team) {
883
+ updates.teamId = team.id;
884
+ logger4.info(`Moving issue to team: ${team.name} (${team.key})`);
885
+ } else {
886
+ logger4.warn(`Team with key ${parsed.updates.teamKey} not found`);
887
+ }
888
+ }
889
+ if (parsed.updates?.assignee) {
890
+ const cleanAssignee = parsed.updates.assignee.replace(/^@/, "");
891
+ const users = await linearService.getUsers();
892
+ const user = users.find(
893
+ (u) => u.email === cleanAssignee || u.name.toLowerCase().includes(cleanAssignee.toLowerCase())
894
+ );
895
+ if (user) {
896
+ updates.assigneeId = user.id;
897
+ } else {
898
+ logger4.warn(`User ${cleanAssignee} not found`);
899
+ }
900
+ }
901
+ if (parsed.updates?.status) {
902
+ const issue = await linearService.getIssue(issueId);
903
+ const issueTeam = await issue.team;
904
+ const teamId = updates.teamId || issueTeam?.id;
905
+ if (!teamId) {
906
+ logger4.warn("Could not determine team for status update");
907
+ } else {
908
+ const states = await linearService.getWorkflowStates(teamId);
909
+ const state = states.find(
910
+ (s) => s.name.toLowerCase() === parsed.updates.status.toLowerCase() || s.type.toLowerCase() === parsed.updates.status.toLowerCase()
911
+ );
912
+ if (state) {
913
+ updates.stateId = state.id;
914
+ logger4.info(`Changing status to: ${state.name}`);
915
+ } else {
916
+ logger4.warn(`Status ${parsed.updates.status} not found for team`);
917
+ }
918
+ }
919
+ }
920
+ if (parsed.updates?.labels && Array.isArray(parsed.updates.labels)) {
921
+ const teamId = updates.teamId;
922
+ const labels = await linearService.getLabels(teamId);
923
+ const labelIds = [];
924
+ for (const labelName of parsed.updates.labels) {
925
+ if (labelName) {
926
+ const label = labels.find(
927
+ (l) => l.name.toLowerCase() === labelName.toLowerCase()
928
+ );
929
+ if (label) {
930
+ labelIds.push(label.id);
931
+ }
932
+ }
933
+ }
934
+ updates.labelIds = labelIds;
935
+ }
936
+ } catch (parseError) {
937
+ logger4.warn("Failed to parse LLM response, falling back to regex parsing:", parseError);
938
+ const issueMatch = content.match(/(\w+-\d+)/);
939
+ if (!issueMatch) {
940
+ const errorMessage = "Please specify an issue ID (e.g., ENG-123) to update.";
941
+ await callback?.({
942
+ text: errorMessage,
943
+ source: message.content.source
944
+ });
945
+ return {
946
+ text: errorMessage,
947
+ success: false
948
+ };
949
+ }
950
+ issueId = issueMatch[1];
951
+ const titleMatch = content.match(/title to ["'](.+?)["']/i);
952
+ if (titleMatch) {
953
+ updates.title = titleMatch[1];
954
+ }
955
+ const priorityMatch = content.match(/priority (?:to |as )?(\w+)/i);
956
+ if (priorityMatch) {
957
+ const priorityMap = {
958
+ "urgent": 1,
959
+ "high": 2,
960
+ "normal": 3,
961
+ "medium": 3,
962
+ "low": 4
963
+ };
964
+ const priority = priorityMap[priorityMatch[1].toLowerCase()];
965
+ if (priority) {
966
+ updates.priority = priority;
967
+ }
824
968
  }
825
- }
826
- const descMatch = content.match(/description to ["'](.+?)["']/i);
827
- if (descMatch) {
828
- updates.description = descMatch[1];
829
- }
830
- const statusMatch = content.match(/status to (\w+)/i);
831
- if (statusMatch) {
832
- logger4.warn("Status updates not yet implemented");
833
969
  }
834
970
  if (Object.keys(updates).length === 0) {
835
971
  const errorMessage = `No valid updates found. Please specify what to update (e.g., "Update issue ENG-123 title to 'New Title'")`;
@@ -843,8 +979,14 @@ var updateIssueAction = {
843
979
  };
844
980
  }
845
981
  const updatedIssue = await linearService.updateIssue(issueId, updates);
846
- const updateSummary = Object.entries(updates).map(([key, value]) => `${key}: ${value}`).join(", ");
847
- const successMessage = `\u2705 Updated issue ${updatedIssue.identifier}: ${updateSummary}
982
+ const updateSummary = [];
983
+ if (updates.title) updateSummary.push(`title: "${updates.title}"`);
984
+ if (updates.priority) updateSummary.push(`priority: ${["", "urgent", "high", "normal", "low"][updates.priority]}`);
985
+ if (updates.teamId) updateSummary.push(`moved to team`);
986
+ if (updates.assigneeId) updateSummary.push(`assigned to user`);
987
+ if (updates.stateId) updateSummary.push(`status changed`);
988
+ if (updates.labelIds) updateSummary.push(`labels updated`);
989
+ const successMessage = `\u2705 Updated issue ${updatedIssue.identifier}: ${updateSummary.join(", ")}
848
990
 
849
991
  View it at: ${updatedIssue.url}`;
850
992
  await callback?.({
@@ -852,7 +994,7 @@ View it at: ${updatedIssue.url}`;
852
994
  source: message.content.source
853
995
  });
854
996
  return {
855
- text: `Updated issue ${updatedIssue.identifier}: ${updateSummary}`,
997
+ text: `Updated issue ${updatedIssue.identifier}: ${updateSummary.join(", ")}`,
856
998
  success: true,
857
999
  data: {
858
1000
  issueId: updatedIssue.id,
@@ -878,7 +1020,7 @@ View it at: ${updatedIssue.url}`;
878
1020
 
879
1021
  // src/actions/searchIssues.ts
880
1022
  import {
881
- ModelType as ModelType2,
1023
+ ModelType as ModelType3,
882
1024
  logger as logger5
883
1025
  } from "@elizaos/core";
884
1026
  var searchTemplate = `Extract search criteria from the user's request for Linear issues.
@@ -962,7 +1104,7 @@ var searchIssuesAction = {
962
1104
  filters = _options.filters;
963
1105
  } else {
964
1106
  const prompt = searchTemplate.replace("{{userMessage}}", content);
965
- const response = await runtime.useModel(ModelType2.TEXT_LARGE, {
1107
+ const response = await runtime.useModel(ModelType3.TEXT_LARGE, {
966
1108
  prompt
967
1109
  });
968
1110
  if (!response) {
package/dist/index.js.map CHANGED
@@ -1 +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/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 Action,\n ActionResult,\n IAgentRuntime,\n Memory,\n State,\n ModelType,\n logger,\n HandlerCallback,\n} from '@elizaos/core';\nimport { LinearService } from '../services/linear';\nimport type { LinearIssueInput } from '../types';\n\nconst createIssueTemplate = `Given the user's request, extract the information needed to create a Linear issue.\n\nUser request: \"{{userMessage}}\"\n\nExtract and return ONLY a JSON object (no markdown formatting, no code blocks) with the following structure:\n{\n \"title\": \"Brief, clear issue title\",\n \"description\": \"Detailed description of the issue (optional, omit or use null if not provided)\",\n \"teamKey\": \"Team key if mentioned (e.g., ENG, PROD) - omit or use null if not mentioned\",\n \"priority\": \"Priority level if mentioned (1=urgent, 2=high, 3=normal, 4=low) - omit or use null if not mentioned\",\n \"labels\": [\"label1\", \"label2\"] (if any labels are mentioned, empty array if none),\n \"assignee\": \"Assignee username or email if mentioned - omit or use null if not mentioned\"\n}\n\nReturn only the JSON object, no other text.`;\n\nexport const createIssueAction: Action = {\n name: 'CREATE_LINEAR_ISSUE',\n description: 'Create a new issue in Linear',\n similes: ['create-linear-issue', 'new-linear-issue', 'add-linear-issue'],\n \n examples: [[\n {\n name: 'User',\n content: {\n text: 'Create a new issue: Fix login button not working on mobile devices'\n }\n },\n {\n name: 'Assistant',\n content: {\n text: 'I\\'ll create that issue for you in Linear.',\n actions: ['CREATE_LINEAR_ISSUE']\n }\n }\n ], [\n {\n name: 'User',\n content: {\n text: 'Create a bug report for the ENG team: API returns 500 error when updating user profile'\n }\n },\n {\n name: 'Assistant',\n content: {\n text: 'I\\'ll create a bug report for the engineering team right away.',\n actions: ['CREATE_LINEAR_ISSUE']\n }\n }\n ]],\n \n async validate(runtime: IAgentRuntime, _message: Memory, _state?: State): Promise<boolean> {\n try {\n const apiKey = runtime.getSetting('LINEAR_API_KEY');\n return !!apiKey;\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 callback?: HandlerCallback\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 content = message.content.text;\n if (!content) {\n const errorMessage = 'Please provide a description for the issue.';\n await callback?.({\n text: errorMessage,\n source: message.content.source\n });\n return {\n text: errorMessage,\n success: false\n };\n }\n \n // Check if the message already has structured data\n const structuredData = _options?.issueData as Partial<LinearIssueInput> | undefined;\n \n let issueData: Partial<LinearIssueInput>;\n \n if (structuredData) {\n issueData = structuredData;\n } else {\n // Use LLM to extract issue information\n const prompt = createIssueTemplate.replace('{{userMessage}}', content);\n \n const response = await runtime.useModel(ModelType.TEXT_LARGE, {\n prompt: prompt\n });\n \n if (!response) {\n throw new Error('Failed to extract issue information');\n }\n \n try {\n // Strip markdown code blocks if present\n const cleanedResponse = response.replace(/^```(?:json)?\\n?/,'').replace(/\\n?```$/,'').trim();\n const parsed = JSON.parse(cleanedResponse);\n \n // Clean up parsed data - convert empty strings to undefined for fields that need it\n issueData = {\n title: parsed.title || undefined,\n description: parsed.description || undefined,\n priority: parsed.priority ? Number(parsed.priority) : undefined,\n };\n \n // Handle team assignment\n if (parsed.teamKey) {\n const teams = await linearService.getTeams();\n const team = teams.find(t => \n t.key.toLowerCase() === parsed.teamKey.toLowerCase()\n );\n if (team) {\n issueData.teamId = team.id;\n }\n }\n \n // Handle assignee\n if (parsed.assignee && parsed.assignee !== '') {\n // Clean up assignee - remove @ symbol if present\n const cleanAssignee = parsed.assignee.replace(/^@/, '');\n \n const users = await linearService.getUsers();\n const user = users.find(u => \n u.email === cleanAssignee || \n u.name.toLowerCase().includes(cleanAssignee.toLowerCase())\n );\n if (user) {\n issueData.assigneeId = user.id;\n }\n }\n \n // Handle labels\n if (parsed.labels && Array.isArray(parsed.labels) && parsed.labels.length > 0) {\n const labels = await linearService.getLabels(issueData.teamId);\n const labelIds: string[] = [];\n \n for (const labelName of parsed.labels) {\n if (labelName && labelName !== '') {\n const label = labels.find(l => \n l.name.toLowerCase() === labelName.toLowerCase()\n );\n if (label) {\n labelIds.push(label.id);\n }\n }\n }\n \n if (labelIds.length > 0) {\n issueData.labelIds = labelIds;\n }\n }\n \n // If no team was specified, use the first available team as default\n if (!issueData.teamId) {\n const teams = await linearService.getTeams();\n if (teams.length > 0) {\n issueData.teamId = teams[0].id;\n logger.warn(`No team specified, using default team: ${teams[0].name}`);\n }\n }\n } catch (parseError) {\n logger.error('Failed to parse LLM response:', parseError);\n // Fallback to simple title extraction\n issueData = {\n title: content.length > 100 ? content.substring(0, 100) + '...' : content,\n description: content\n };\n \n // Ensure we have a teamId even in fallback case\n const teams = await linearService.getTeams();\n if (teams.length > 0) {\n issueData.teamId = teams[0].id;\n logger.warn(`Using default team for fallback: ${teams[0].name}`);\n }\n }\n }\n \n if (!issueData.title) {\n const errorMessage = 'Could not determine issue title. Please provide more details.';\n await callback?.({\n text: errorMessage,\n source: message.content.source\n });\n return {\n text: errorMessage,\n success: false\n };\n }\n \n // Final check for required teamId\n if (!issueData.teamId) {\n const errorMessage = 'No Linear teams found. Please ensure at least one team exists in your Linear workspace.';\n await callback?.({\n text: errorMessage,\n source: message.content.source\n });\n return {\n text: errorMessage,\n success: false\n };\n }\n \n const issue = await linearService.createIssue(issueData as LinearIssueInput);\n \n // Send success message to channel\n const successMessage = `✅ Created Linear issue: ${issue.title} (${issue.identifier})\\n\\nView it at: ${issue.url}`;\n await callback?.({\n text: successMessage,\n source: message.content.source\n });\n \n return {\n text: `Created issue: ${issue.title} (${issue.identifier})`,\n success: true,\n data: {\n issueId: issue.id,\n identifier: issue.identifier,\n url: issue.url\n }\n };\n } catch (error) {\n logger.error('Failed to create issue:', error);\n const errorMessage = `❌ Failed to create issue: ${error instanceof Error ? error.message : 'Unknown error'}`;\n await callback?.({\n text: errorMessage,\n source: message.content.source\n });\n return {\n text: errorMessage,\n success: false\n };\n }\n }\n}; ","import { Action, ActionResult, IAgentRuntime, Memory, State, logger, HandlerCallback } from '@elizaos/core';\nimport { LinearService } from '../services/linear';\n\nexport const getIssueAction: Action = {\n name: 'GET_LINEAR_ISSUE',\n description: 'Get details of a specific Linear issue',\n similes: ['get-linear-issue', 'show-linear-issue', 'view-linear-issue'],\n \n examples: [[\n {\n name: 'User',\n content: {\n text: 'Show me issue ENG-123'\n }\n },\n {\n name: 'Assistant',\n content: {\n text: 'I\\'ll get the details for issue ENG-123.',\n actions: ['GET_LINEAR_ISSUE']\n }\n }\n ], [\n {\n name: 'User',\n content: {\n text: 'What\\'s the status of BUG-456?'\n }\n },\n {\n name: 'Assistant',\n content: {\n text: 'Let me check the status of BUG-456 for you.',\n actions: ['GET_LINEAR_ISSUE']\n }\n }\n ]],\n \n async validate(runtime: IAgentRuntime, _message: Memory, _state?: State): Promise<boolean> {\n try {\n const apiKey = runtime.getSetting('LINEAR_API_KEY');\n return !!apiKey;\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 callback?: HandlerCallback\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 content = message.content.text;\n if (!content) {\n const errorMessage = 'Please specify an issue ID.';\n await callback?.({\n text: errorMessage,\n source: message.content.source\n });\n return {\n text: errorMessage,\n success: false\n };\n }\n \n // Extract issue ID from the message\n const issueMatch = content.match(/(\\w+-\\d+)/);\n if (!issueMatch) {\n const errorMessage = 'Please provide a valid issue ID (e.g., ENG-123).';\n await callback?.({\n text: errorMessage,\n source: message.content.source\n });\n return {\n text: errorMessage,\n success: false\n };\n }\n \n const issueId = issueMatch[1];\n const issue = await linearService.getIssue(issueId);\n \n const assignee = await issue.assignee;\n const state = await issue.state;\n const team = await issue.team;\n const labels = await issue.labels();\n const project = await issue.project;\n \n const issueDetails = {\n id: issue.id,\n identifier: issue.identifier,\n title: issue.title,\n description: issue.description,\n priority: issue.priority,\n priorityLabel: issue.priorityLabel,\n url: issue.url,\n createdAt: issue.createdAt,\n updatedAt: issue.updatedAt,\n dueDate: issue.dueDate,\n estimate: issue.estimate,\n assignee: assignee ? {\n id: assignee.id,\n name: assignee.name,\n email: assignee.email,\n } : null,\n state: state ? {\n id: state.id,\n name: state.name,\n type: state.type,\n color: state.color,\n } : null,\n team: team ? {\n id: team.id,\n name: team.name,\n key: team.key,\n } : null,\n labels: labels.nodes.map(label => ({\n id: label.id,\n name: label.name,\n color: label.color,\n })),\n project: project ? {\n id: project.id,\n name: project.name,\n } : null,\n };\n \n // Format the response text\n let responseText = `📋 Issue ${issue.identifier}: ${issue.title}\\n`;\n responseText += `Status: ${state?.name || 'Unknown'}\\n`;\n responseText += `Priority: ${issue.priorityLabel}\\n`;\n if (assignee) {\n responseText += `Assignee: ${assignee.name}\\n`;\n }\n if (issue.dueDate) {\n responseText += `Due: ${new Date(issue.dueDate).toLocaleDateString()}\\n`;\n }\n if (issue.description) {\n responseText += `\\nDescription: ${issue.description}\\n`;\n }\n responseText += `\\nView in Linear: ${issue.url}`;\n \n // Send the formatted issue details to the channel\n await callback?.({\n text: responseText,\n source: message.content.source\n });\n \n return {\n text: responseText,\n success: true,\n data: issueDetails\n };\n } catch (error) {\n logger.error('Failed to get issue:', error);\n const errorMessage = `❌ Failed to get issue: ${error instanceof Error ? error.message : 'Unknown error'}`;\n await callback?.({\n text: errorMessage,\n source: message.content.source\n });\n return {\n text: errorMessage,\n success: false\n };\n }\n }\n}; ","import { Action, ActionResult, IAgentRuntime, Memory, State, logger, HandlerCallback } from '@elizaos/core';\nimport { LinearService } from '../services/linear';\nimport type { LinearIssueInput } from '../types';\n\nexport const updateIssueAction: Action = {\n name: 'UPDATE_LINEAR_ISSUE',\n description: 'Update an existing Linear issue',\n similes: ['update-linear-issue', 'edit-linear-issue', 'modify-linear-issue'],\n \n examples: [[\n {\n name: 'User',\n content: {\n text: 'Update issue ENG-123 title to \"Fix login button on all devices\"'\n }\n },\n {\n name: 'Assistant',\n content: {\n text: 'I\\'ll update the title of issue ENG-123 for you.',\n actions: ['UPDATE_LINEAR_ISSUE']\n }\n }\n ], [\n {\n name: 'User',\n content: {\n text: 'Change the priority of BUG-456 to high'\n }\n },\n {\n name: 'Assistant',\n content: {\n text: 'I\\'ll change the priority of BUG-456 to high.',\n actions: ['UPDATE_LINEAR_ISSUE']\n }\n }\n ]],\n \n async validate(runtime: IAgentRuntime, _message: Memory, _state?: State): Promise<boolean> {\n try {\n const apiKey = runtime.getSetting('LINEAR_API_KEY');\n return !!apiKey;\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 callback?: HandlerCallback\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 content = message.content.text;\n if (!content) {\n const errorMessage = 'Please provide update instructions for the issue.';\n await callback?.({\n text: errorMessage,\n source: message.content.source\n });\n return {\n text: errorMessage,\n success: false\n };\n }\n \n // Extract issue ID from the message\n const issueMatch = content.match(/(\\w+-\\d+)/);\n if (!issueMatch) {\n const errorMessage = 'Please specify an issue ID (e.g., ENG-123) to update.';\n await callback?.({\n text: errorMessage,\n source: message.content.source\n });\n return {\n text: errorMessage,\n success: false\n };\n }\n \n const issueId = issueMatch[1];\n \n // Parse update instructions\n const updates: Partial<LinearIssueInput> = {};\n \n // Title update\n const titleMatch = content.match(/title to [\"'](.+?)[\"']/i);\n if (titleMatch) {\n updates.title = titleMatch[1];\n }\n \n // Priority update\n const priorityMatch = content.match(/priority (?:to |as )?(\\w+)/i);\n if (priorityMatch) {\n const priorityMap: Record<string, number> = {\n 'urgent': 1,\n 'high': 2,\n 'normal': 3,\n 'medium': 3,\n 'low': 4,\n };\n const priority = priorityMap[priorityMatch[1].toLowerCase()];\n if (priority) {\n updates.priority = priority;\n }\n }\n \n // Description update\n const descMatch = content.match(/description to [\"'](.+?)[\"']/i);\n if (descMatch) {\n updates.description = descMatch[1];\n }\n \n // Status update\n const statusMatch = content.match(/status to (\\w+)/i);\n if (statusMatch) {\n // This would need to look up the state ID - simplified for now\n logger.warn('Status updates not yet implemented');\n }\n \n if (Object.keys(updates).length === 0) {\n const errorMessage = 'No valid updates found. Please specify what to update (e.g., \"Update issue ENG-123 title to \\'New Title\\'\")';\n await callback?.({\n text: errorMessage,\n source: message.content.source\n });\n return {\n text: errorMessage,\n success: false\n };\n }\n \n const updatedIssue = await linearService.updateIssue(issueId, updates);\n \n const updateSummary = Object.entries(updates)\n .map(([key, value]) => `${key}: ${value}`)\n .join(', ');\n \n const successMessage = `✅ Updated issue ${updatedIssue.identifier}: ${updateSummary}\\n\\nView it at: ${updatedIssue.url}`;\n await callback?.({\n text: successMessage,\n source: message.content.source\n });\n \n return {\n text: `Updated issue ${updatedIssue.identifier}: ${updateSummary}`,\n success: true,\n data: {\n issueId: updatedIssue.id,\n identifier: updatedIssue.identifier,\n updates,\n url: updatedIssue.url\n }\n };\n } catch (error) {\n logger.error('Failed to update issue:', error);\n const errorMessage = `❌ Failed to update issue: ${error instanceof Error ? error.message : 'Unknown error'}`;\n await callback?.({\n text: errorMessage,\n source: message.content.source\n });\n return {\n text: errorMessage,\n success: false\n };\n }\n }\n}; ","import {\n Action,\n ActionResult,\n IAgentRuntime,\n Memory,\n State,\n ModelType,\n logger,\n HandlerCallback,\n} from '@elizaos/core';\nimport { LinearService } from '../services/linear';\nimport type { LinearSearchFilters } from '../types';\n\nconst searchTemplate = `Extract search criteria from the user's request for Linear issues.\n\nUser request: \"{{userMessage}}\"\n\nExtract and return ONLY a JSON object (no markdown formatting, no code blocks) with these possible filters:\n{\n \"query\": \"general search text\",\n \"state\": \"filter by state name (e.g., 'In Progress', 'Done', 'Todo')\",\n \"assignee\": \"filter by assignee name or email\",\n \"priority\": \"filter by priority (1=urgent, 2=high, 3=normal, 4=low)\",\n \"team\": \"filter by team name or key\",\n \"label\": \"filter by label name\",\n \"hasAssignee\": true/false - whether issue should have an assignee,\n \"limit\": number of results to return (default 10)\n}\n\nOnly include fields that are mentioned. Return only the JSON object.`;\n\nexport const searchIssuesAction: Action = {\n name: 'SEARCH_LINEAR_ISSUES',\n description: 'Search for issues in Linear with various filters',\n similes: ['search-linear-issues', 'find-linear-issues', 'query-linear-issues'],\n \n examples: [[\n {\n name: 'User',\n content: {\n text: 'Show me all open bugs'\n }\n },\n {\n name: 'Assistant',\n content: {\n text: 'I\\'ll search for all open bug issues in Linear.',\n actions: ['SEARCH_LINEAR_ISSUES']\n }\n }\n ], [\n {\n name: 'User',\n content: {\n text: 'Find high priority issues assigned to me'\n }\n },\n {\n name: 'Assistant',\n content: {\n text: 'I\\'ll search for high priority issues assigned to you.',\n actions: ['SEARCH_LINEAR_ISSUES']\n }\n }\n ]],\n \n async validate(runtime: IAgentRuntime, _message: Memory, _state?: State): Promise<boolean> {\n try {\n const apiKey = runtime.getSetting('LINEAR_API_KEY');\n return !!apiKey;\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 callback?: HandlerCallback\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 content = message.content.text;\n if (!content) {\n const errorMessage = 'Please provide search criteria for issues.';\n await callback?.({\n text: errorMessage,\n source: message.content.source\n });\n return {\n text: errorMessage,\n success: false\n };\n }\n \n let filters: LinearSearchFilters = {};\n \n // Check if we have explicit filters in options\n if (_options?.filters) {\n filters = _options.filters as LinearSearchFilters;\n } else {\n // Use LLM to extract search filters\n const prompt = searchTemplate.replace('{{userMessage}}', content);\n \n const response = await runtime.useModel(ModelType.TEXT_LARGE, {\n prompt: prompt\n });\n \n if (!response) {\n // Fallback to simple keyword search\n filters = { query: content };\n } else {\n try {\n // Strip markdown code blocks if present\n const cleanedResponse = response.replace(/^```(?:json)?\\n?/,'').replace(/\\n?```$/,'').trim();\n const parsed = JSON.parse(cleanedResponse);\n filters = {\n query: parsed.query,\n state: parsed.state ? [parsed.state] : undefined,\n assignee: parsed.assignee ? [parsed.assignee] : undefined,\n priority: parsed.priority ? [parsed.priority] : undefined,\n team: parsed.team,\n label: parsed.label ? [parsed.label] : undefined,\n limit: parsed.limit\n };\n \n // Clean up undefined values\n Object.keys(filters).forEach(key => {\n if (filters[key as keyof LinearSearchFilters] === undefined) {\n delete filters[key as keyof LinearSearchFilters];\n }\n });\n } catch (parseError) {\n logger.error('Failed to parse search filters:', parseError);\n // Fallback to simple search\n filters = { query: content };\n }\n }\n }\n \n filters.limit = (_options?.limit as number) || 10;\n const issues = await linearService.searchIssues(filters);\n \n if (issues.length === 0) {\n const noResultsMessage = 'No issues found matching your search criteria.';\n await callback?.({\n text: noResultsMessage,\n source: message.content.source\n });\n return {\n text: noResultsMessage,\n success: true,\n data: {\n issues: [],\n filters,\n count: 0\n }\n };\n }\n \n const issueList = await Promise.all(issues.map(async (issue, index) => {\n const state = await issue.state;\n return `${index + 1}. ${issue.identifier}: ${issue.title} (${state?.name || 'No state'})`;\n }));\n const issueText = issueList.join('\\n');\n \n const resultMessage = `📋 Found ${issues.length} issue${issues.length === 1 ? '' : 's'}:\\n${issueText}`;\n await callback?.({\n text: resultMessage,\n source: message.content.source\n });\n \n return {\n text: `Found ${issues.length} issue${issues.length === 1 ? '' : 's'}:\\n${issueText}`,\n success: true,\n data: {\n issues: issues.map(i => ({\n id: i.id,\n identifier: i.identifier,\n title: i.title,\n description: i.description,\n url: i.url,\n state: i.state,\n priority: i.priority,\n priorityLabel: i.priorityLabel,\n assignee: i.assignee\n })),\n filters,\n count: issues.length\n }\n };\n } catch (error) {\n logger.error('Failed to search issues:', error);\n const errorMessage = `❌ Failed to search issues: ${error instanceof Error ? error.message : 'Unknown error'}`;\n await callback?.({\n text: errorMessage,\n source: message.content.source\n });\n return {\n text: errorMessage,\n success: false\n };\n }\n }\n}; ","import { Action, ActionResult, IAgentRuntime, Memory, State, ActionExample, logger, HandlerCallback } from '@elizaos/core';\nimport { LinearService } from '../services/linear';\n\nexport const createCommentAction: Action = {\n name: 'CREATE_LINEAR_COMMENT',\n description: 'Create a comment on a Linear issue',\n similes: ['create-linear-comment', 'add-linear-comment', 'comment-on-linear-issue'],\n \n examples: [[\n {\n name: 'User',\n content: {\n text: 'Comment on ENG-123: This has been fixed in the latest release'\n }\n },\n {\n name: 'Assistant',\n content: {\n text: 'I\\'ll add that comment to issue ENG-123.',\n actions: ['CREATE_LINEAR_COMMENT']\n }\n }\n ], [\n {\n name: 'User',\n content: {\n text: 'Add a comment to BUG-456: Need more information from the reporter'\n }\n },\n {\n name: 'Assistant', \n content: {\n text: 'I\\'ll post that comment on BUG-456 right away.',\n actions: ['CREATE_LINEAR_COMMENT']\n }\n }\n ]],\n \n async validate(runtime: IAgentRuntime, _message: Memory, _state?: State): Promise<boolean> {\n try {\n const apiKey = runtime.getSetting('LINEAR_API_KEY');\n return !!apiKey;\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 callback?: HandlerCallback\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 content = message.content.text;\n if (!content) {\n const errorMessage = 'Please provide a message with the issue ID and comment content.';\n await callback?.({\n text: errorMessage,\n source: message.content.source\n });\n return {\n text: errorMessage,\n success: false\n };\n }\n \n const issueMatch = content.match(/(?:comment on|add.*comment.*to)\\s+(\\w+-\\d+):?\\s*(.*)/i);\n \n if (!issueMatch) {\n const errorMessage = 'Please specify the issue ID and comment content. Example: \"Comment on ENG-123: This looks good\"';\n await callback?.({\n text: errorMessage,\n source: message.content.source\n });\n return {\n text: errorMessage,\n success: false\n };\n }\n \n const [, issueIdentifier, commentBody] = issueMatch;\n \n // Find the issue first to get its ID\n const issue = await linearService.getIssue(issueIdentifier);\n \n const comment = await linearService.createComment({\n issueId: issue.id,\n body: commentBody.trim()\n });\n \n const successMessage = `✅ Comment added to issue ${issueIdentifier}: \"${commentBody.trim()}\"`;\n await callback?.({\n text: successMessage,\n source: message.content.source\n });\n \n return {\n text: `Comment added to issue ${issueIdentifier}: \"${commentBody.trim()}\"`,\n success: true,\n data: {\n commentId: comment.id,\n issueId: issue.id\n }\n };\n } catch (error) {\n logger.error('Failed to create comment:', error);\n const errorMessage = `❌ Failed to create comment: ${error instanceof Error ? error.message : 'Unknown error'}`;\n await callback?.({\n text: errorMessage,\n source: message.content.source\n });\n return {\n text: errorMessage,\n success: false\n };\n }\n }\n}; ","import { Action, ActionResult, IAgentRuntime, Memory, State, logger, HandlerCallback } from '@elizaos/core';\nimport { LinearService } from '../services/linear';\n\nexport const listTeamsAction: Action = {\n name: 'LIST_LINEAR_TEAMS',\n description: 'List all teams in Linear',\n similes: ['list-linear-teams', 'show-linear-teams', 'get-linear-teams'],\n \n examples: [[\n {\n name: 'User',\n content: {\n text: 'Show me all teams'\n }\n },\n {\n name: 'Assistant',\n content: {\n text: 'I\\'ll list all the teams in Linear for you.',\n actions: ['LIST_LINEAR_TEAMS']\n }\n }\n ], [\n {\n name: 'User',\n content: {\n text: 'What teams are available?'\n }\n },\n {\n name: 'Assistant',\n content: {\n text: 'Let me show you all the available teams.',\n actions: ['LIST_LINEAR_TEAMS']\n }\n }\n ]],\n \n async validate(runtime: IAgentRuntime, _message: Memory, _state?: State): Promise<boolean> {\n try {\n const apiKey = runtime.getSetting('LINEAR_API_KEY');\n return !!apiKey;\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 callback?: HandlerCallback\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 if (teams.length === 0) {\n const noTeamsMessage = 'No teams found in Linear.';\n await callback?.({\n text: noTeamsMessage,\n source: message.content.source\n });\n return {\n text: noTeamsMessage,\n success: true,\n data: {\n teams: []\n }\n };\n }\n \n const teamList = teams.map((team, index) => \n `${index + 1}. ${team.name} (${team.key})${team.description ? ` - ${team.description}` : ''}`\n ).join('\\n');\n \n const resultMessage = `👥 Found ${teams.length} team${teams.length === 1 ? '' : 's'}:\\n${teamList}`;\n await callback?.({\n text: resultMessage,\n source: message.content.source\n });\n \n return {\n text: `Found ${teams.length} team${teams.length === 1 ? '' : 's'}:\\n${teamList}`,\n success: true,\n data: {\n teams: teams.map(t => ({\n id: t.id,\n name: t.name,\n key: t.key,\n description: t.description\n })),\n count: teams.length\n }\n };\n } catch (error) {\n logger.error('Failed to list teams:', error);\n const errorMessage = `❌ Failed to list teams: ${error instanceof Error ? error.message : 'Unknown error'}`;\n await callback?.({\n text: errorMessage,\n source: message.content.source\n });\n return {\n text: errorMessage,\n success: false\n };\n }\n }\n}; ","import { Action, ActionResult, IAgentRuntime, Memory, State, logger, HandlerCallback } from '@elizaos/core';\nimport { LinearService } from '../services/linear';\n\nexport const listProjectsAction: Action = {\n name: 'LIST_LINEAR_PROJECTS',\n description: 'List all projects in Linear',\n similes: ['list-linear-projects', 'show-linear-projects', 'get-linear-projects'],\n \n examples: [[\n {\n name: 'User',\n content: {\n text: 'Show me all projects'\n }\n },\n {\n name: 'Assistant',\n content: {\n text: 'I\\'ll list all the projects in Linear for you.',\n actions: ['LIST_LINEAR_PROJECTS']\n }\n }\n ], [\n {\n name: 'User',\n content: {\n text: 'What projects do we have?'\n }\n },\n {\n name: 'Assistant',\n content: {\n text: 'Let me show you all the available projects.',\n actions: ['LIST_LINEAR_PROJECTS']\n }\n }\n ]],\n \n async validate(runtime: IAgentRuntime, _message: Memory, _state?: State): Promise<boolean> {\n try {\n const apiKey = runtime.getSetting('LINEAR_API_KEY');\n return !!apiKey;\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 callback?: HandlerCallback\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 projects = await linearService.getProjects();\n \n if (projects.length === 0) {\n const noProjectsMessage = 'No projects found in Linear.';\n await callback?.({\n text: noProjectsMessage,\n source: message.content.source\n });\n return {\n text: noProjectsMessage,\n success: true,\n data: {\n projects: []\n }\n };\n }\n \n // Get teams for each project\n const projectsWithDetails = await Promise.all(\n projects.map(async (project) => {\n const teamsQuery = await project.teams();\n const teams = await teamsQuery.nodes;\n return {\n ...project,\n teamsList: teams\n };\n })\n );\n \n const projectList = projectsWithDetails.map((project, index) => {\n const teamNames = project.teamsList.map((t: any) => t.name).join(', ') || 'No teams';\n return `${index + 1}. ${project.name}${project.description ? ` - ${project.description}` : ''} (Teams: ${teamNames})`;\n }).join('\\n');\n \n const resultMessage = `📁 Found ${projects.length} project${projects.length === 1 ? '' : 's'}:\\n${projectList}`;\n await callback?.({\n text: resultMessage,\n source: message.content.source\n });\n \n return {\n text: `Found ${projects.length} project${projects.length === 1 ? '' : 's'}:\\n${projectList}`,\n success: true,\n data: {\n projects: projectsWithDetails.map(p => ({\n id: p.id,\n name: p.name,\n description: p.description,\n url: p.url,\n teams: p.teamsList.map((t: any) => ({\n id: t.id,\n name: t.name,\n key: t.key\n })),\n state: p.state,\n progress: p.progress,\n startDate: p.startDate,\n targetDate: p.targetDate\n })),\n count: projects.length\n }\n };\n } catch (error) {\n logger.error('Failed to list projects:', error);\n const errorMessage = `❌ Failed to list projects: ${error instanceof Error ? error.message : 'Unknown error'}`;\n await callback?.({\n text: errorMessage,\n source: message.content.source\n });\n return {\n text: errorMessage,\n success: false\n };\n }\n }\n}; ","import { Action, ActionResult, IAgentRuntime, Memory, State, logger, HandlerCallback } from '@elizaos/core';\nimport { LinearService } from '../services/linear';\n\nexport const getActivityAction: Action = {\n name: 'GET_LINEAR_ACTIVITY',\n description: 'Get recent Linear activity',\n similes: ['get-linear-activity', 'show-linear-activity', 'view-linear-activity'],\n \n examples: [[\n {\n name: 'User',\n content: {\n text: 'Show me recent Linear activity'\n }\n },\n {\n name: 'Assistant',\n content: {\n text: 'I\\'ll check the recent Linear activity for you.',\n actions: ['GET_LINEAR_ACTIVITY']\n }\n }\n ], [\n {\n name: 'User',\n content: {\n text: 'What\\'s been happening in Linear?'\n }\n },\n {\n name: 'Assistant',\n content: {\n text: 'Let me show you the recent Linear activity.',\n actions: ['GET_LINEAR_ACTIVITY']\n }\n }\n ]],\n \n async validate(runtime: IAgentRuntime, _message: Memory, _state?: State): Promise<boolean> {\n try {\n const apiKey = runtime.getSetting('LINEAR_API_KEY');\n return !!apiKey;\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 callback?: HandlerCallback\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 activity = linearService.getActivityLog();\n \n if (activity.length === 0) {\n const noActivityMessage = 'No recent Linear activity found.';\n await callback?.({\n text: noActivityMessage,\n source: message.content.source\n });\n return {\n text: noActivityMessage,\n success: true,\n data: {\n activity: []\n }\n };\n }\n \n const activityText = activity\n .slice(0, 10) // Show last 10 activities\n .map((item, index) => {\n const description = `${item.action} ${item.resource_type} ${item.resource_id}${item.error ? ` (failed: ${item.error})` : ''}`;\n return `${index + 1}. ${description}`;\n })\n .join('\\n');\n \n const resultMessage = `📊 Recent Linear activity:\\n${activityText}`;\n await callback?.({\n text: resultMessage,\n source: message.content.source\n });\n \n return {\n text: `Recent Linear activity:\\n${activityText}`,\n success: true,\n data: {\n activity: activity.slice(0, 10),\n count: activity.length\n }\n };\n } catch (error) {\n logger.error('Failed to get Linear activity:', error);\n const errorMessage = `❌ Failed to get Linear activity: ${error instanceof Error ? error.message : 'Unknown error'}`;\n await callback?.({\n text: errorMessage,\n source: message.content.source\n });\n return {\n text: errorMessage,\n success: false\n };\n }\n }\n}; ","import { Action, ActionResult, IAgentRuntime, Memory, State, ActionExample, logger, HandlerCallback } from '@elizaos/core';\nimport { LinearService } from '../services/linear';\n\nexport const clearActivityAction: Action = {\n name: 'CLEAR_LINEAR_ACTIVITY',\n description: 'Clear the Linear activity log',\n similes: ['clear-linear-activity', 'reset-linear-activity', 'delete-linear-activity'],\n \n examples: [[\n {\n name: 'User',\n content: {\n text: 'Clear the Linear activity log'\n }\n },\n {\n name: 'Assistant',\n content: {\n text: 'I\\'ll clear the Linear activity log for you.',\n actions: ['CLEAR_LINEAR_ACTIVITY']\n }\n }\n ], [\n {\n name: 'User',\n content: {\n text: 'Reset Linear activity'\n }\n },\n {\n name: 'Assistant',\n content: {\n text: 'I\\'ll reset the Linear activity log now.',\n actions: ['CLEAR_LINEAR_ACTIVITY']\n }\n }\n ]],\n \n async validate(runtime: IAgentRuntime, _message: Memory, _state?: State): Promise<boolean> {\n try {\n const apiKey = runtime.getSetting('LINEAR_API_KEY');\n return !!apiKey;\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 callback?: HandlerCallback\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 await linearService.clearActivityLog();\n \n const successMessage = '✅ Linear activity log has been cleared.';\n await callback?.({\n text: successMessage,\n source: message.content.source\n });\n \n return {\n text: successMessage,\n success: true\n };\n } catch (error) {\n logger.error('Failed to clear Linear activity:', error);\n const errorMessage = `❌ Failed to clear Linear activity: ${error instanceof Error ? error.message : 'Unknown error'}`;\n await callback?.({\n text: errorMessage,\n source: message.content.source\n });\n return {\n text: errorMessage,\n success: false\n };\n }\n }\n}; ","import { Plugin } from '@elizaos/core';\nimport { LinearService } from './services/linear';\n\n// Import all actions\nimport { createIssueAction } from './actions/createIssue';\nimport { getIssueAction } from './actions/getIssue';\nimport { updateIssueAction } from './actions/updateIssue';\nimport { searchIssuesAction } from './actions/searchIssues';\nimport { createCommentAction } from './actions/createComment';\nimport { listTeamsAction } from './actions/listTeams';\nimport { listProjectsAction } from './actions/listProjects';\nimport { getActivityAction } from './actions/getActivity';\nimport { clearActivityAction } from './actions/clearActivity';\n\n// Import all providers\n// import { linearIssuesProvider } from './providers/issues';\n// import { linearTeamsProvider } from './providers/teams';\n// import { linearProjectsProvider } from './providers/projects';\n// import { linearActivityProvider } from './providers/activity';\n\nexport const linearPlugin: Plugin = {\n name: '@elizaos/plugin-linear',\n description: 'Plugin for integrating with Linear issue tracking system',\n services: [LinearService],\n actions: [\n createIssueAction,\n getIssueAction,\n updateIssueAction,\n searchIssuesAction,\n createCommentAction,\n listTeamsAction,\n listProjectsAction,\n getActivityAction,\n clearActivityAction,\n ],\n providers: [\n // linearIssuesProvider,\n // linearTeamsProvider,\n // linearProjectsProvider,\n // linearActivityProvider,\n ],\n};\n\n// Re-export types and service for external use\nexport * from './types';\nexport { LinearService } from './services/linear'; "],"mappings":";AAAA,SAAS,QAAQ,eAAmC;AACpD,SAAS,oBAAoF;;;AC6CtF,IAAM,iBAAN,cAA6B,MAAM;AAAA,EACxC,YACE,SACO,QACA,UACP;AACA,UAAM,OAAO;AAHN;AACA;AAGP,SAAK,OAAO;AAAA,EACd;AACF;AAEO,IAAM,4BAAN,cAAwC,eAAe;AAAA,EAC5D,YAAY,SAAiB;AAC3B,UAAM,SAAS,GAAG;AAClB,SAAK,OAAO;AAAA,EACd;AACF;AAEO,IAAM,uBAAN,cAAmC,eAAe;AAAA,EACvD,YACE,SACO,WACP;AACA,UAAM,SAAS,GAAG;AAFX;AAGP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AAA,QACN,QAAQ,QAAQ,QAAQ;AAAA,MAC1B,CAAC;AACD,aAAO;AAAA,QACL,MAAM;AAAA,QACN,SAAS;AAAA,MACX;AAAA,IACF;AAAA,EACF;AACF;;;ACjEO,IAAM,eAAuB;AAAA,EAClC,MAAM;AAAA,EACN,aAAa;AAAA,EACb,UAAU,CAAC,aAAa;AAAA,EACxB,SAAS;AAAA,IACP;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AAAA,EACA,WAAW;AAAA;AAAA;AAAA;AAAA;AAAA,EAKX;AACF;","names":["logger","logger","logger","ModelType","logger","logger","logger","logger","logger","logger"]}
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/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 Action,\n ActionResult,\n IAgentRuntime,\n Memory,\n State,\n ModelType,\n logger,\n HandlerCallback,\n} from '@elizaos/core';\nimport { LinearService } from '../services/linear';\nimport type { LinearIssueInput } from '../types';\n\nconst createIssueTemplate = `Given the user's request, extract the information needed to create a Linear issue.\n\nUser request: \"{{userMessage}}\"\n\nExtract and return ONLY a JSON object (no markdown formatting, no code blocks) with the following structure:\n{\n \"title\": \"Brief, clear issue title\",\n \"description\": \"Detailed description of the issue (optional, omit or use null if not provided)\",\n \"teamKey\": \"Team key if mentioned (e.g., ENG, PROD) - omit or use null if not mentioned\",\n \"priority\": \"Priority level if mentioned (1=urgent, 2=high, 3=normal, 4=low) - omit or use null if not mentioned\",\n \"labels\": [\"label1\", \"label2\"] (if any labels are mentioned, empty array if none),\n \"assignee\": \"Assignee username or email if mentioned - omit or use null if not mentioned\"\n}\n\nReturn only the JSON object, no other text.`;\n\nexport const createIssueAction: Action = {\n name: 'CREATE_LINEAR_ISSUE',\n description: 'Create a new issue in Linear',\n similes: ['create-linear-issue', 'new-linear-issue', 'add-linear-issue'],\n \n examples: [[\n {\n name: 'User',\n content: {\n text: 'Create a new issue: Fix login button not working on mobile devices'\n }\n },\n {\n name: 'Assistant',\n content: {\n text: 'I\\'ll create that issue for you in Linear.',\n actions: ['CREATE_LINEAR_ISSUE']\n }\n }\n ], [\n {\n name: 'User',\n content: {\n text: 'Create a bug report for the ENG team: API returns 500 error when updating user profile'\n }\n },\n {\n name: 'Assistant',\n content: {\n text: 'I\\'ll create a bug report for the engineering team right away.',\n actions: ['CREATE_LINEAR_ISSUE']\n }\n }\n ]],\n \n async validate(runtime: IAgentRuntime, _message: Memory, _state?: State): Promise<boolean> {\n try {\n const apiKey = runtime.getSetting('LINEAR_API_KEY');\n return !!apiKey;\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 callback?: HandlerCallback\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 content = message.content.text;\n if (!content) {\n const errorMessage = 'Please provide a description for the issue.';\n await callback?.({\n text: errorMessage,\n source: message.content.source\n });\n return {\n text: errorMessage,\n success: false\n };\n }\n \n // Check if the message already has structured data\n const structuredData = _options?.issueData as Partial<LinearIssueInput> | undefined;\n \n let issueData: Partial<LinearIssueInput>;\n \n if (structuredData) {\n issueData = structuredData;\n } else {\n // Use LLM to extract issue information\n const prompt = createIssueTemplate.replace('{{userMessage}}', content);\n \n const response = await runtime.useModel(ModelType.TEXT_LARGE, {\n prompt: prompt\n });\n \n if (!response) {\n throw new Error('Failed to extract issue information');\n }\n \n try {\n // Strip markdown code blocks if present\n const cleanedResponse = response.replace(/^```(?:json)?\\n?/,'').replace(/\\n?```$/,'').trim();\n const parsed = JSON.parse(cleanedResponse);\n \n // Clean up parsed data - convert empty strings to undefined for fields that need it\n issueData = {\n title: parsed.title || undefined,\n description: parsed.description || undefined,\n priority: parsed.priority ? Number(parsed.priority) : undefined,\n };\n \n // Handle team assignment\n if (parsed.teamKey) {\n const teams = await linearService.getTeams();\n const team = teams.find(t => \n t.key.toLowerCase() === parsed.teamKey.toLowerCase()\n );\n if (team) {\n issueData.teamId = team.id;\n }\n }\n \n // Handle assignee\n if (parsed.assignee && parsed.assignee !== '') {\n // Clean up assignee - remove @ symbol if present\n const cleanAssignee = parsed.assignee.replace(/^@/, '');\n \n const users = await linearService.getUsers();\n const user = users.find(u => \n u.email === cleanAssignee || \n u.name.toLowerCase().includes(cleanAssignee.toLowerCase())\n );\n if (user) {\n issueData.assigneeId = user.id;\n }\n }\n \n // Handle labels\n if (parsed.labels && Array.isArray(parsed.labels) && parsed.labels.length > 0) {\n const labels = await linearService.getLabels(issueData.teamId);\n const labelIds: string[] = [];\n \n for (const labelName of parsed.labels) {\n if (labelName && labelName !== '') {\n const label = labels.find(l => \n l.name.toLowerCase() === labelName.toLowerCase()\n );\n if (label) {\n labelIds.push(label.id);\n }\n }\n }\n \n if (labelIds.length > 0) {\n issueData.labelIds = labelIds;\n }\n }\n \n // If no team was specified, use the first available team as default\n if (!issueData.teamId) {\n // Check for default team key from environment\n const defaultTeamKey = runtime.getSetting('LINEAR_DEFAULT_TEAM_KEY') as string;\n \n if (defaultTeamKey) {\n const teams = await linearService.getTeams();\n const defaultTeam = teams.find(t => \n t.key.toLowerCase() === defaultTeamKey.toLowerCase()\n );\n if (defaultTeam) {\n issueData.teamId = defaultTeam.id;\n logger.info(`Using configured default team: ${defaultTeam.name} (${defaultTeam.key})`);\n } else {\n logger.warn(`Default team key ${defaultTeamKey} not found`);\n }\n }\n \n // If still no team, fall back to first available\n if (!issueData.teamId) {\n const teams = await linearService.getTeams();\n if (teams.length > 0) {\n issueData.teamId = teams[0].id;\n logger.warn(`No team specified, using first available team: ${teams[0].name}`);\n }\n }\n }\n } catch (parseError) {\n logger.error('Failed to parse LLM response:', parseError);\n // Fallback to simple title extraction\n issueData = {\n title: content.length > 100 ? content.substring(0, 100) + '...' : content,\n description: content\n };\n \n // Ensure we have a teamId even in fallback case\n const defaultTeamKey = runtime.getSetting('LINEAR_DEFAULT_TEAM_KEY') as string;\n const teams = await linearService.getTeams();\n \n if (defaultTeamKey) {\n const defaultTeam = teams.find(t => \n t.key.toLowerCase() === defaultTeamKey.toLowerCase()\n );\n if (defaultTeam) {\n issueData.teamId = defaultTeam.id;\n logger.info(`Using configured default team for fallback: ${defaultTeam.name} (${defaultTeam.key})`);\n }\n }\n \n if (!issueData.teamId && teams.length > 0) {\n issueData.teamId = teams[0].id;\n logger.warn(`Using first available team for fallback: ${teams[0].name}`);\n }\n }\n }\n \n if (!issueData.title) {\n const errorMessage = 'Could not determine issue title. Please provide more details.';\n await callback?.({\n text: errorMessage,\n source: message.content.source\n });\n return {\n text: errorMessage,\n success: false\n };\n }\n \n // Final check for required teamId\n if (!issueData.teamId) {\n const errorMessage = 'No Linear teams found. Please ensure at least one team exists in your Linear workspace.';\n await callback?.({\n text: errorMessage,\n source: message.content.source\n });\n return {\n text: errorMessage,\n success: false\n };\n }\n \n const issue = await linearService.createIssue(issueData as LinearIssueInput);\n \n // Send success message to channel\n const successMessage = `✅ Created Linear issue: ${issue.title} (${issue.identifier})\\n\\nView it at: ${issue.url}`;\n await callback?.({\n text: successMessage,\n source: message.content.source\n });\n \n return {\n text: `Created issue: ${issue.title} (${issue.identifier})`,\n success: true,\n data: {\n issueId: issue.id,\n identifier: issue.identifier,\n url: issue.url\n }\n };\n } catch (error) {\n logger.error('Failed to create issue:', error);\n const errorMessage = `❌ Failed to create issue: ${error instanceof Error ? error.message : 'Unknown error'}`;\n await callback?.({\n text: errorMessage,\n source: message.content.source\n });\n return {\n text: errorMessage,\n success: false\n };\n }\n }\n}; ","import { Action, ActionResult, IAgentRuntime, Memory, State, logger, HandlerCallback } from '@elizaos/core';\nimport { LinearService } from '../services/linear';\n\nexport const getIssueAction: Action = {\n name: 'GET_LINEAR_ISSUE',\n description: 'Get details of a specific Linear issue',\n similes: ['get-linear-issue', 'show-linear-issue', 'view-linear-issue'],\n \n examples: [[\n {\n name: 'User',\n content: {\n text: 'Show me issue ENG-123'\n }\n },\n {\n name: 'Assistant',\n content: {\n text: 'I\\'ll get the details for issue ENG-123.',\n actions: ['GET_LINEAR_ISSUE']\n }\n }\n ], [\n {\n name: 'User',\n content: {\n text: 'What\\'s the status of BUG-456?'\n }\n },\n {\n name: 'Assistant',\n content: {\n text: 'Let me check the status of BUG-456 for you.',\n actions: ['GET_LINEAR_ISSUE']\n }\n }\n ]],\n \n async validate(runtime: IAgentRuntime, _message: Memory, _state?: State): Promise<boolean> {\n try {\n const apiKey = runtime.getSetting('LINEAR_API_KEY');\n return !!apiKey;\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 callback?: HandlerCallback\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 content = message.content.text;\n if (!content) {\n const errorMessage = 'Please specify an issue ID.';\n await callback?.({\n text: errorMessage,\n source: message.content.source\n });\n return {\n text: errorMessage,\n success: false\n };\n }\n \n // Extract issue ID from the message\n const issueMatch = content.match(/(\\w+-\\d+)/);\n if (!issueMatch) {\n const errorMessage = 'Please provide a valid issue ID (e.g., ENG-123).';\n await callback?.({\n text: errorMessage,\n source: message.content.source\n });\n return {\n text: errorMessage,\n success: false\n };\n }\n \n const issueId = issueMatch[1];\n const issue = await linearService.getIssue(issueId);\n \n const assignee = await issue.assignee;\n const state = await issue.state;\n const team = await issue.team;\n const labels = await issue.labels();\n const project = await issue.project;\n \n const issueDetails = {\n id: issue.id,\n identifier: issue.identifier,\n title: issue.title,\n description: issue.description,\n priority: issue.priority,\n priorityLabel: issue.priorityLabel,\n url: issue.url,\n createdAt: issue.createdAt,\n updatedAt: issue.updatedAt,\n dueDate: issue.dueDate,\n estimate: issue.estimate,\n assignee: assignee ? {\n id: assignee.id,\n name: assignee.name,\n email: assignee.email,\n } : null,\n state: state ? {\n id: state.id,\n name: state.name,\n type: state.type,\n color: state.color,\n } : null,\n team: team ? {\n id: team.id,\n name: team.name,\n key: team.key,\n } : null,\n labels: labels.nodes.map(label => ({\n id: label.id,\n name: label.name,\n color: label.color,\n })),\n project: project ? {\n id: project.id,\n name: project.name,\n } : null,\n };\n \n // Format the response text\n let responseText = `📋 Issue ${issue.identifier}: ${issue.title}\\n`;\n responseText += `Status: ${state?.name || 'Unknown'}\\n`;\n responseText += `Priority: ${issue.priorityLabel}\\n`;\n if (assignee) {\n responseText += `Assignee: ${assignee.name}\\n`;\n }\n if (issue.dueDate) {\n responseText += `Due: ${new Date(issue.dueDate).toLocaleDateString()}\\n`;\n }\n if (issue.description) {\n responseText += `\\nDescription: ${issue.description}\\n`;\n }\n responseText += `\\nView in Linear: ${issue.url}`;\n \n // Send the formatted issue details to the channel\n await callback?.({\n text: responseText,\n source: message.content.source\n });\n \n return {\n text: responseText,\n success: true,\n data: issueDetails\n };\n } catch (error) {\n logger.error('Failed to get issue:', error);\n const errorMessage = `❌ Failed to get issue: ${error instanceof Error ? error.message : 'Unknown error'}`;\n await callback?.({\n text: errorMessage,\n source: message.content.source\n });\n return {\n text: errorMessage,\n success: false\n };\n }\n }\n}; ","import { Action, ActionResult, IAgentRuntime, Memory, State, logger, HandlerCallback, ModelType } from '@elizaos/core';\nimport { LinearService } from '../services/linear';\nimport type { LinearIssueInput } from '../types';\n\nconst updateIssueTemplate = `Given the user's request to update a Linear issue, extract the information needed.\n\nUser request: \"{{userMessage}}\"\n\nExtract and return ONLY a JSON object (no markdown formatting, no code blocks) with the following structure:\n{\n \"issueId\": \"The issue identifier (e.g., ENG-123, COM2-7)\",\n \"updates\": {\n \"title\": \"New title if changing the title\",\n \"description\": \"New description if changing the description\",\n \"priority\": \"Priority level if changing (1=urgent, 2=high, 3=normal, 4=low)\",\n \"teamKey\": \"New team key if moving to another team (e.g., ENG, ELIZA, COM2)\",\n \"assignee\": \"New assignee username or email if changing\",\n \"status\": \"New status if changing (e.g., todo, in-progress, done, canceled)\",\n \"labels\": [\"label1\", \"label2\"] (if changing labels, empty array to clear)\n }\n}\n\nOnly include fields that are being updated. Return only the JSON object, no other text.`;\n\nexport const updateIssueAction: Action = {\n name: 'UPDATE_LINEAR_ISSUE',\n description: 'Update an existing Linear issue',\n similes: ['update-linear-issue', 'edit-linear-issue', 'modify-linear-issue', 'move-linear-issue', 'change-linear-issue'],\n \n examples: [[\n {\n name: 'User',\n content: {\n text: 'Update issue ENG-123 title to \"Fix login button on all devices\"'\n }\n },\n {\n name: 'Assistant',\n content: {\n text: 'I\\'ll update the title of issue ENG-123 for you.',\n actions: ['UPDATE_LINEAR_ISSUE']\n }\n }\n ], [\n {\n name: 'User',\n content: {\n text: 'Move issue COM2-7 to the ELIZA team'\n }\n },\n {\n name: 'Assistant',\n content: {\n text: 'I\\'ll move issue COM2-7 to the ELIZA team.',\n actions: ['UPDATE_LINEAR_ISSUE']\n }\n }\n ], [\n {\n name: 'User',\n content: {\n text: 'Change the priority of BUG-456 to high and assign to john@example.com'\n }\n },\n {\n name: 'Assistant',\n content: {\n text: 'I\\'ll change the priority of BUG-456 to high and assign it to john@example.com.',\n actions: ['UPDATE_LINEAR_ISSUE']\n }\n }\n ]],\n \n async validate(runtime: IAgentRuntime, _message: Memory, _state?: State): Promise<boolean> {\n try {\n const apiKey = runtime.getSetting('LINEAR_API_KEY');\n return !!apiKey;\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 callback?: HandlerCallback\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 content = message.content.text;\n if (!content) {\n const errorMessage = 'Please provide update instructions for the issue.';\n await callback?.({\n text: errorMessage,\n source: message.content.source\n });\n return {\n text: errorMessage,\n success: false\n };\n }\n \n // Use LLM to extract update information\n const prompt = updateIssueTemplate.replace('{{userMessage}}', content);\n \n const response = await runtime.useModel(ModelType.TEXT_LARGE, {\n prompt: prompt\n });\n \n if (!response) {\n throw new Error('Failed to extract update information');\n }\n \n let issueId: string;\n let updates: Partial<LinearIssueInput> = {};\n \n try {\n // Strip markdown code blocks if present\n const cleanedResponse = response.replace(/^```(?:json)?\\n?/,'').replace(/\\n?```$/,'').trim();\n const parsed = JSON.parse(cleanedResponse);\n \n issueId = parsed.issueId;\n if (!issueId) {\n throw new Error('Issue ID not found in parsed response');\n }\n \n // Handle title update\n if (parsed.updates?.title) {\n updates.title = parsed.updates.title;\n }\n \n // Handle description update\n if (parsed.updates?.description) {\n updates.description = parsed.updates.description;\n }\n \n // Handle priority update\n if (parsed.updates?.priority) {\n updates.priority = Number(parsed.updates.priority);\n }\n \n // Handle team change\n if (parsed.updates?.teamKey) {\n const teams = await linearService.getTeams();\n const team = teams.find(t => \n t.key.toLowerCase() === parsed.updates.teamKey.toLowerCase()\n );\n if (team) {\n updates.teamId = team.id;\n logger.info(`Moving issue to team: ${team.name} (${team.key})`);\n } else {\n logger.warn(`Team with key ${parsed.updates.teamKey} not found`);\n }\n }\n \n // Handle assignee update\n if (parsed.updates?.assignee) {\n const cleanAssignee = parsed.updates.assignee.replace(/^@/, '');\n const users = await linearService.getUsers();\n const user = users.find(u => \n u.email === cleanAssignee || \n u.name.toLowerCase().includes(cleanAssignee.toLowerCase())\n );\n if (user) {\n updates.assigneeId = user.id;\n } else {\n logger.warn(`User ${cleanAssignee} not found`);\n }\n }\n \n // Handle status update\n if (parsed.updates?.status) {\n // Get the workflow states for the target team (or current team if not changing)\n const issue = await linearService.getIssue(issueId);\n const issueTeam = await issue.team;\n const teamId = updates.teamId || issueTeam?.id;\n if (!teamId) {\n logger.warn('Could not determine team for status update');\n } else {\n const states = await linearService.getWorkflowStates(teamId);\n \n const state = states.find(s => \n s.name.toLowerCase() === parsed.updates.status.toLowerCase() ||\n s.type.toLowerCase() === parsed.updates.status.toLowerCase()\n );\n \n if (state) {\n updates.stateId = state.id;\n logger.info(`Changing status to: ${state.name}`);\n } else {\n logger.warn(`Status ${parsed.updates.status} not found for team`);\n }\n }\n }\n \n // Handle labels update\n if (parsed.updates?.labels && Array.isArray(parsed.updates.labels)) {\n const teamId = updates.teamId;\n const labels = await linearService.getLabels(teamId);\n const labelIds: string[] = [];\n \n for (const labelName of parsed.updates.labels) {\n if (labelName) {\n const label = labels.find(l => \n l.name.toLowerCase() === labelName.toLowerCase()\n );\n if (label) {\n labelIds.push(label.id);\n }\n }\n }\n \n updates.labelIds = labelIds;\n }\n \n } catch (parseError) {\n // Fallback to regex parsing for simple cases\n logger.warn('Failed to parse LLM response, falling back to regex parsing:', parseError);\n \n const issueMatch = content.match(/(\\w+-\\d+)/);\n if (!issueMatch) {\n const errorMessage = 'Please specify an issue ID (e.g., ENG-123) to update.';\n await callback?.({\n text: errorMessage,\n source: message.content.source\n });\n return {\n text: errorMessage,\n success: false\n };\n }\n \n issueId = issueMatch[1];\n \n // Simple regex patterns for common updates\n const titleMatch = content.match(/title to [\"'](.+?)[\"']/i);\n if (titleMatch) {\n updates.title = titleMatch[1];\n }\n \n const priorityMatch = content.match(/priority (?:to |as )?(\\w+)/i);\n if (priorityMatch) {\n const priorityMap: Record<string, number> = {\n 'urgent': 1,\n 'high': 2,\n 'normal': 3,\n 'medium': 3,\n 'low': 4,\n };\n const priority = priorityMap[priorityMatch[1].toLowerCase()];\n if (priority) {\n updates.priority = priority;\n }\n }\n }\n \n if (Object.keys(updates).length === 0) {\n const errorMessage = 'No valid updates found. Please specify what to update (e.g., \"Update issue ENG-123 title to \\'New Title\\'\")';\n await callback?.({\n text: errorMessage,\n source: message.content.source\n });\n return {\n text: errorMessage,\n success: false\n };\n }\n \n const updatedIssue = await linearService.updateIssue(issueId, updates);\n \n const updateSummary = [];\n if (updates.title) updateSummary.push(`title: \"${updates.title}\"`);\n if (updates.priority) updateSummary.push(`priority: ${['', 'urgent', 'high', 'normal', 'low'][updates.priority]}`);\n if (updates.teamId) updateSummary.push(`moved to team`);\n if (updates.assigneeId) updateSummary.push(`assigned to user`);\n if (updates.stateId) updateSummary.push(`status changed`);\n if (updates.labelIds) updateSummary.push(`labels updated`);\n \n const successMessage = `✅ Updated issue ${updatedIssue.identifier}: ${updateSummary.join(', ')}\\n\\nView it at: ${updatedIssue.url}`;\n await callback?.({\n text: successMessage,\n source: message.content.source\n });\n \n return {\n text: `Updated issue ${updatedIssue.identifier}: ${updateSummary.join(', ')}`,\n success: true,\n data: {\n issueId: updatedIssue.id,\n identifier: updatedIssue.identifier,\n updates,\n url: updatedIssue.url\n }\n };\n } catch (error) {\n logger.error('Failed to update issue:', error);\n const errorMessage = `❌ Failed to update issue: ${error instanceof Error ? error.message : 'Unknown error'}`;\n await callback?.({\n text: errorMessage,\n source: message.content.source\n });\n return {\n text: errorMessage,\n success: false\n };\n }\n }\n}; ","import {\n Action,\n ActionResult,\n IAgentRuntime,\n Memory,\n State,\n ModelType,\n logger,\n HandlerCallback,\n} from '@elizaos/core';\nimport { LinearService } from '../services/linear';\nimport type { LinearSearchFilters } from '../types';\n\nconst searchTemplate = `Extract search criteria from the user's request for Linear issues.\n\nUser request: \"{{userMessage}}\"\n\nExtract and return ONLY a JSON object (no markdown formatting, no code blocks) with these possible filters:\n{\n \"query\": \"general search text\",\n \"state\": \"filter by state name (e.g., 'In Progress', 'Done', 'Todo')\",\n \"assignee\": \"filter by assignee name or email\",\n \"priority\": \"filter by priority (1=urgent, 2=high, 3=normal, 4=low)\",\n \"team\": \"filter by team name or key\",\n \"label\": \"filter by label name\",\n \"hasAssignee\": true/false - whether issue should have an assignee,\n \"limit\": number of results to return (default 10)\n}\n\nOnly include fields that are mentioned. Return only the JSON object.`;\n\nexport const searchIssuesAction: Action = {\n name: 'SEARCH_LINEAR_ISSUES',\n description: 'Search for issues in Linear with various filters',\n similes: ['search-linear-issues', 'find-linear-issues', 'query-linear-issues'],\n \n examples: [[\n {\n name: 'User',\n content: {\n text: 'Show me all open bugs'\n }\n },\n {\n name: 'Assistant',\n content: {\n text: 'I\\'ll search for all open bug issues in Linear.',\n actions: ['SEARCH_LINEAR_ISSUES']\n }\n }\n ], [\n {\n name: 'User',\n content: {\n text: 'Find high priority issues assigned to me'\n }\n },\n {\n name: 'Assistant',\n content: {\n text: 'I\\'ll search for high priority issues assigned to you.',\n actions: ['SEARCH_LINEAR_ISSUES']\n }\n }\n ]],\n \n async validate(runtime: IAgentRuntime, _message: Memory, _state?: State): Promise<boolean> {\n try {\n const apiKey = runtime.getSetting('LINEAR_API_KEY');\n return !!apiKey;\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 callback?: HandlerCallback\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 content = message.content.text;\n if (!content) {\n const errorMessage = 'Please provide search criteria for issues.';\n await callback?.({\n text: errorMessage,\n source: message.content.source\n });\n return {\n text: errorMessage,\n success: false\n };\n }\n \n let filters: LinearSearchFilters = {};\n \n // Check if we have explicit filters in options\n if (_options?.filters) {\n filters = _options.filters as LinearSearchFilters;\n } else {\n // Use LLM to extract search filters\n const prompt = searchTemplate.replace('{{userMessage}}', content);\n \n const response = await runtime.useModel(ModelType.TEXT_LARGE, {\n prompt: prompt\n });\n \n if (!response) {\n // Fallback to simple keyword search\n filters = { query: content };\n } else {\n try {\n // Strip markdown code blocks if present\n const cleanedResponse = response.replace(/^```(?:json)?\\n?/,'').replace(/\\n?```$/,'').trim();\n const parsed = JSON.parse(cleanedResponse);\n filters = {\n query: parsed.query,\n state: parsed.state ? [parsed.state] : undefined,\n assignee: parsed.assignee ? [parsed.assignee] : undefined,\n priority: parsed.priority ? [parsed.priority] : undefined,\n team: parsed.team,\n label: parsed.label ? [parsed.label] : undefined,\n limit: parsed.limit\n };\n \n // Clean up undefined values\n Object.keys(filters).forEach(key => {\n if (filters[key as keyof LinearSearchFilters] === undefined) {\n delete filters[key as keyof LinearSearchFilters];\n }\n });\n } catch (parseError) {\n logger.error('Failed to parse search filters:', parseError);\n // Fallback to simple search\n filters = { query: content };\n }\n }\n }\n \n filters.limit = (_options?.limit as number) || 10;\n const issues = await linearService.searchIssues(filters);\n \n if (issues.length === 0) {\n const noResultsMessage = 'No issues found matching your search criteria.';\n await callback?.({\n text: noResultsMessage,\n source: message.content.source\n });\n return {\n text: noResultsMessage,\n success: true,\n data: {\n issues: [],\n filters,\n count: 0\n }\n };\n }\n \n const issueList = await Promise.all(issues.map(async (issue, index) => {\n const state = await issue.state;\n return `${index + 1}. ${issue.identifier}: ${issue.title} (${state?.name || 'No state'})`;\n }));\n const issueText = issueList.join('\\n');\n \n const resultMessage = `📋 Found ${issues.length} issue${issues.length === 1 ? '' : 's'}:\\n${issueText}`;\n await callback?.({\n text: resultMessage,\n source: message.content.source\n });\n \n return {\n text: `Found ${issues.length} issue${issues.length === 1 ? '' : 's'}:\\n${issueText}`,\n success: true,\n data: {\n issues: issues.map(i => ({\n id: i.id,\n identifier: i.identifier,\n title: i.title,\n description: i.description,\n url: i.url,\n state: i.state,\n priority: i.priority,\n priorityLabel: i.priorityLabel,\n assignee: i.assignee\n })),\n filters,\n count: issues.length\n }\n };\n } catch (error) {\n logger.error('Failed to search issues:', error);\n const errorMessage = `❌ Failed to search issues: ${error instanceof Error ? error.message : 'Unknown error'}`;\n await callback?.({\n text: errorMessage,\n source: message.content.source\n });\n return {\n text: errorMessage,\n success: false\n };\n }\n }\n}; ","import { Action, ActionResult, IAgentRuntime, Memory, State, ActionExample, logger, HandlerCallback } from '@elizaos/core';\nimport { LinearService } from '../services/linear';\n\nexport const createCommentAction: Action = {\n name: 'CREATE_LINEAR_COMMENT',\n description: 'Create a comment on a Linear issue',\n similes: ['create-linear-comment', 'add-linear-comment', 'comment-on-linear-issue'],\n \n examples: [[\n {\n name: 'User',\n content: {\n text: 'Comment on ENG-123: This has been fixed in the latest release'\n }\n },\n {\n name: 'Assistant',\n content: {\n text: 'I\\'ll add that comment to issue ENG-123.',\n actions: ['CREATE_LINEAR_COMMENT']\n }\n }\n ], [\n {\n name: 'User',\n content: {\n text: 'Add a comment to BUG-456: Need more information from the reporter'\n }\n },\n {\n name: 'Assistant', \n content: {\n text: 'I\\'ll post that comment on BUG-456 right away.',\n actions: ['CREATE_LINEAR_COMMENT']\n }\n }\n ]],\n \n async validate(runtime: IAgentRuntime, _message: Memory, _state?: State): Promise<boolean> {\n try {\n const apiKey = runtime.getSetting('LINEAR_API_KEY');\n return !!apiKey;\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 callback?: HandlerCallback\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 content = message.content.text;\n if (!content) {\n const errorMessage = 'Please provide a message with the issue ID and comment content.';\n await callback?.({\n text: errorMessage,\n source: message.content.source\n });\n return {\n text: errorMessage,\n success: false\n };\n }\n \n const issueMatch = content.match(/(?:comment on|add.*comment.*to)\\s+(\\w+-\\d+):?\\s*(.*)/i);\n \n if (!issueMatch) {\n const errorMessage = 'Please specify the issue ID and comment content. Example: \"Comment on ENG-123: This looks good\"';\n await callback?.({\n text: errorMessage,\n source: message.content.source\n });\n return {\n text: errorMessage,\n success: false\n };\n }\n \n const [, issueIdentifier, commentBody] = issueMatch;\n \n // Find the issue first to get its ID\n const issue = await linearService.getIssue(issueIdentifier);\n \n const comment = await linearService.createComment({\n issueId: issue.id,\n body: commentBody.trim()\n });\n \n const successMessage = `✅ Comment added to issue ${issueIdentifier}: \"${commentBody.trim()}\"`;\n await callback?.({\n text: successMessage,\n source: message.content.source\n });\n \n return {\n text: `Comment added to issue ${issueIdentifier}: \"${commentBody.trim()}\"`,\n success: true,\n data: {\n commentId: comment.id,\n issueId: issue.id\n }\n };\n } catch (error) {\n logger.error('Failed to create comment:', error);\n const errorMessage = `❌ Failed to create comment: ${error instanceof Error ? error.message : 'Unknown error'}`;\n await callback?.({\n text: errorMessage,\n source: message.content.source\n });\n return {\n text: errorMessage,\n success: false\n };\n }\n }\n}; ","import { Action, ActionResult, IAgentRuntime, Memory, State, logger, HandlerCallback } from '@elizaos/core';\nimport { LinearService } from '../services/linear';\n\nexport const listTeamsAction: Action = {\n name: 'LIST_LINEAR_TEAMS',\n description: 'List all teams in Linear',\n similes: ['list-linear-teams', 'show-linear-teams', 'get-linear-teams'],\n \n examples: [[\n {\n name: 'User',\n content: {\n text: 'Show me all teams'\n }\n },\n {\n name: 'Assistant',\n content: {\n text: 'I\\'ll list all the teams in Linear for you.',\n actions: ['LIST_LINEAR_TEAMS']\n }\n }\n ], [\n {\n name: 'User',\n content: {\n text: 'What teams are available?'\n }\n },\n {\n name: 'Assistant',\n content: {\n text: 'Let me show you all the available teams.',\n actions: ['LIST_LINEAR_TEAMS']\n }\n }\n ]],\n \n async validate(runtime: IAgentRuntime, _message: Memory, _state?: State): Promise<boolean> {\n try {\n const apiKey = runtime.getSetting('LINEAR_API_KEY');\n return !!apiKey;\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 callback?: HandlerCallback\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 if (teams.length === 0) {\n const noTeamsMessage = 'No teams found in Linear.';\n await callback?.({\n text: noTeamsMessage,\n source: message.content.source\n });\n return {\n text: noTeamsMessage,\n success: true,\n data: {\n teams: []\n }\n };\n }\n \n const teamList = teams.map((team, index) => \n `${index + 1}. ${team.name} (${team.key})${team.description ? ` - ${team.description}` : ''}`\n ).join('\\n');\n \n const resultMessage = `👥 Found ${teams.length} team${teams.length === 1 ? '' : 's'}:\\n${teamList}`;\n await callback?.({\n text: resultMessage,\n source: message.content.source\n });\n \n return {\n text: `Found ${teams.length} team${teams.length === 1 ? '' : 's'}:\\n${teamList}`,\n success: true,\n data: {\n teams: teams.map(t => ({\n id: t.id,\n name: t.name,\n key: t.key,\n description: t.description\n })),\n count: teams.length\n }\n };\n } catch (error) {\n logger.error('Failed to list teams:', error);\n const errorMessage = `❌ Failed to list teams: ${error instanceof Error ? error.message : 'Unknown error'}`;\n await callback?.({\n text: errorMessage,\n source: message.content.source\n });\n return {\n text: errorMessage,\n success: false\n };\n }\n }\n}; ","import { Action, ActionResult, IAgentRuntime, Memory, State, logger, HandlerCallback } from '@elizaos/core';\nimport { LinearService } from '../services/linear';\n\nexport const listProjectsAction: Action = {\n name: 'LIST_LINEAR_PROJECTS',\n description: 'List all projects in Linear',\n similes: ['list-linear-projects', 'show-linear-projects', 'get-linear-projects'],\n \n examples: [[\n {\n name: 'User',\n content: {\n text: 'Show me all projects'\n }\n },\n {\n name: 'Assistant',\n content: {\n text: 'I\\'ll list all the projects in Linear for you.',\n actions: ['LIST_LINEAR_PROJECTS']\n }\n }\n ], [\n {\n name: 'User',\n content: {\n text: 'What projects do we have?'\n }\n },\n {\n name: 'Assistant',\n content: {\n text: 'Let me show you all the available projects.',\n actions: ['LIST_LINEAR_PROJECTS']\n }\n }\n ]],\n \n async validate(runtime: IAgentRuntime, _message: Memory, _state?: State): Promise<boolean> {\n try {\n const apiKey = runtime.getSetting('LINEAR_API_KEY');\n return !!apiKey;\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 callback?: HandlerCallback\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 projects = await linearService.getProjects();\n \n if (projects.length === 0) {\n const noProjectsMessage = 'No projects found in Linear.';\n await callback?.({\n text: noProjectsMessage,\n source: message.content.source\n });\n return {\n text: noProjectsMessage,\n success: true,\n data: {\n projects: []\n }\n };\n }\n \n // Get teams for each project\n const projectsWithDetails = await Promise.all(\n projects.map(async (project) => {\n const teamsQuery = await project.teams();\n const teams = await teamsQuery.nodes;\n return {\n ...project,\n teamsList: teams\n };\n })\n );\n \n const projectList = projectsWithDetails.map((project, index) => {\n const teamNames = project.teamsList.map((t: any) => t.name).join(', ') || 'No teams';\n return `${index + 1}. ${project.name}${project.description ? ` - ${project.description}` : ''} (Teams: ${teamNames})`;\n }).join('\\n');\n \n const resultMessage = `📁 Found ${projects.length} project${projects.length === 1 ? '' : 's'}:\\n${projectList}`;\n await callback?.({\n text: resultMessage,\n source: message.content.source\n });\n \n return {\n text: `Found ${projects.length} project${projects.length === 1 ? '' : 's'}:\\n${projectList}`,\n success: true,\n data: {\n projects: projectsWithDetails.map(p => ({\n id: p.id,\n name: p.name,\n description: p.description,\n url: p.url,\n teams: p.teamsList.map((t: any) => ({\n id: t.id,\n name: t.name,\n key: t.key\n })),\n state: p.state,\n progress: p.progress,\n startDate: p.startDate,\n targetDate: p.targetDate\n })),\n count: projects.length\n }\n };\n } catch (error) {\n logger.error('Failed to list projects:', error);\n const errorMessage = `❌ Failed to list projects: ${error instanceof Error ? error.message : 'Unknown error'}`;\n await callback?.({\n text: errorMessage,\n source: message.content.source\n });\n return {\n text: errorMessage,\n success: false\n };\n }\n }\n}; ","import { Action, ActionResult, IAgentRuntime, Memory, State, logger, HandlerCallback } from '@elizaos/core';\nimport { LinearService } from '../services/linear';\n\nexport const getActivityAction: Action = {\n name: 'GET_LINEAR_ACTIVITY',\n description: 'Get recent Linear activity',\n similes: ['get-linear-activity', 'show-linear-activity', 'view-linear-activity'],\n \n examples: [[\n {\n name: 'User',\n content: {\n text: 'Show me recent Linear activity'\n }\n },\n {\n name: 'Assistant',\n content: {\n text: 'I\\'ll check the recent Linear activity for you.',\n actions: ['GET_LINEAR_ACTIVITY']\n }\n }\n ], [\n {\n name: 'User',\n content: {\n text: 'What\\'s been happening in Linear?'\n }\n },\n {\n name: 'Assistant',\n content: {\n text: 'Let me show you the recent Linear activity.',\n actions: ['GET_LINEAR_ACTIVITY']\n }\n }\n ]],\n \n async validate(runtime: IAgentRuntime, _message: Memory, _state?: State): Promise<boolean> {\n try {\n const apiKey = runtime.getSetting('LINEAR_API_KEY');\n return !!apiKey;\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 callback?: HandlerCallback\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 activity = linearService.getActivityLog();\n \n if (activity.length === 0) {\n const noActivityMessage = 'No recent Linear activity found.';\n await callback?.({\n text: noActivityMessage,\n source: message.content.source\n });\n return {\n text: noActivityMessage,\n success: true,\n data: {\n activity: []\n }\n };\n }\n \n const activityText = activity\n .slice(0, 10) // Show last 10 activities\n .map((item, index) => {\n const description = `${item.action} ${item.resource_type} ${item.resource_id}${item.error ? ` (failed: ${item.error})` : ''}`;\n return `${index + 1}. ${description}`;\n })\n .join('\\n');\n \n const resultMessage = `📊 Recent Linear activity:\\n${activityText}`;\n await callback?.({\n text: resultMessage,\n source: message.content.source\n });\n \n return {\n text: `Recent Linear activity:\\n${activityText}`,\n success: true,\n data: {\n activity: activity.slice(0, 10),\n count: activity.length\n }\n };\n } catch (error) {\n logger.error('Failed to get Linear activity:', error);\n const errorMessage = `❌ Failed to get Linear activity: ${error instanceof Error ? error.message : 'Unknown error'}`;\n await callback?.({\n text: errorMessage,\n source: message.content.source\n });\n return {\n text: errorMessage,\n success: false\n };\n }\n }\n}; ","import { Action, ActionResult, IAgentRuntime, Memory, State, ActionExample, logger, HandlerCallback } from '@elizaos/core';\nimport { LinearService } from '../services/linear';\n\nexport const clearActivityAction: Action = {\n name: 'CLEAR_LINEAR_ACTIVITY',\n description: 'Clear the Linear activity log',\n similes: ['clear-linear-activity', 'reset-linear-activity', 'delete-linear-activity'],\n \n examples: [[\n {\n name: 'User',\n content: {\n text: 'Clear the Linear activity log'\n }\n },\n {\n name: 'Assistant',\n content: {\n text: 'I\\'ll clear the Linear activity log for you.',\n actions: ['CLEAR_LINEAR_ACTIVITY']\n }\n }\n ], [\n {\n name: 'User',\n content: {\n text: 'Reset Linear activity'\n }\n },\n {\n name: 'Assistant',\n content: {\n text: 'I\\'ll reset the Linear activity log now.',\n actions: ['CLEAR_LINEAR_ACTIVITY']\n }\n }\n ]],\n \n async validate(runtime: IAgentRuntime, _message: Memory, _state?: State): Promise<boolean> {\n try {\n const apiKey = runtime.getSetting('LINEAR_API_KEY');\n return !!apiKey;\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 callback?: HandlerCallback\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 await linearService.clearActivityLog();\n \n const successMessage = '✅ Linear activity log has been cleared.';\n await callback?.({\n text: successMessage,\n source: message.content.source\n });\n \n return {\n text: successMessage,\n success: true\n };\n } catch (error) {\n logger.error('Failed to clear Linear activity:', error);\n const errorMessage = `❌ Failed to clear Linear activity: ${error instanceof Error ? error.message : 'Unknown error'}`;\n await callback?.({\n text: errorMessage,\n source: message.content.source\n });\n return {\n text: errorMessage,\n success: false\n };\n }\n }\n}; ","import { Plugin } from '@elizaos/core';\nimport { LinearService } from './services/linear';\n\n// Import all actions\nimport { createIssueAction } from './actions/createIssue';\nimport { getIssueAction } from './actions/getIssue';\nimport { updateIssueAction } from './actions/updateIssue';\nimport { searchIssuesAction } from './actions/searchIssues';\nimport { createCommentAction } from './actions/createComment';\nimport { listTeamsAction } from './actions/listTeams';\nimport { listProjectsAction } from './actions/listProjects';\nimport { getActivityAction } from './actions/getActivity';\nimport { clearActivityAction } from './actions/clearActivity';\n\n// Import all providers\n// import { linearIssuesProvider } from './providers/issues';\n// import { linearTeamsProvider } from './providers/teams';\n// import { linearProjectsProvider } from './providers/projects';\n// import { linearActivityProvider } from './providers/activity';\n\nexport const linearPlugin: Plugin = {\n name: '@elizaos/plugin-linear',\n description: 'Plugin for integrating with Linear issue tracking system',\n services: [LinearService],\n actions: [\n createIssueAction,\n getIssueAction,\n updateIssueAction,\n searchIssuesAction,\n createCommentAction,\n listTeamsAction,\n listProjectsAction,\n getActivityAction,\n clearActivityAction,\n ],\n providers: [\n // linearIssuesProvider,\n // linearTeamsProvider,\n // linearProjectsProvider,\n // linearActivityProvider,\n ],\n};\n\n// Re-export types and service for external use\nexport * from './types';\nexport { LinearService } from './services/linear'; "],"mappings":";AAAA,SAAS,QAAQ,eAAmC;AACpD,SAAS,oBAAoF;;;AC6CtF,IAAM,iBAAN,cAA6B,MAAM;AAAA,EACxC,YACE,SACO,QACA,UACP;AACA,UAAM,OAAO;AAHN;AACA;AAGP,SAAK,OAAO;AAAA,EACd;AACF;AAEO,IAAM,4BAAN,cAAwC,eAAe;AAAA,EAC5D,YAAY,SAAiB;AAC3B,UAAM,SAAS,GAAG;AAClB,SAAK,OAAO;AAAA,EACd;AACF;AAEO,IAAM,uBAAN,cAAmC,eAAe;AAAA,EACvD,YACE,SACO,WACP;AACA,UAAM,SAAS,GAAG;AAFX;AAGP,SAAK,OAAO;AAAA,EACd;AACF;;;AD7DO,IAAM,iBAAN,MAAM,uBAAsB,QAAQ;AAAA,EAUzC,YAAY,SAAyB;AACnC,UAAM,OAAO;AARf,iCAAwB;AAGxB,SAAQ,cAAoC,CAAC;AAQ3C,UAAM,SAAS,SAAS,WAAW,gBAAgB;AACnD,UAAM,cAAc,SAAS,WAAW,qBAAqB;AAE7D,QAAI,CAAC,QAAQ;AACX,YAAM,IAAI,0BAA0B,4BAA4B;AAAA,IAClE;AAEA,SAAK,eAAe;AAAA,MAClB,gBAAgB;AAAA,MAChB,qBAAqB;AAAA,IACvB;AAEA,SAAK,cAAc;AAEnB,SAAK,SAAS;AAAA,MACZ,gBAAgB;AAAA,MAChB,qBAAqB;AAAA,IACvB;AAEA,SAAK,SAAS,IAAI,aAAa;AAAA,MAC7B,QAAQ,KAAK,aAAa;AAAA,IAC5B,CAAC;AAAA,EACH;AAAA,EAEA,aAAa,MAAM,SAAgD;AACjE,UAAM,UAAU,IAAI,eAAc,OAAO;AACzC,UAAM,QAAQ,mBAAmB;AACjC,WAAO,KAAK,qCAAqC;AACjD,WAAO;AAAA,EACT;AAAA,EAEA,MAAM,OAAsB;AAC1B,SAAK,cAAc,CAAC;AACpB,WAAO,KAAK,wBAAwB;A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,CAAC;AAAA,IACX,QAAQ;AACN,aAAO;AAAA,IACT;AAAA,EACF;AAAA,EAEA,MAAM,QACJ,SACA,SACA,QACA,UACA,UACuB;AACvB,QAAI;AACF,YAAM,gBAAgB,QAAQ,WAA0B,QAAQ;AAChE,UAAI,CAAC,eAAe;AAClB,cAAM,IAAI,MAAM,8BAA8B;AAAA,MAChD;AAEA,YAAM,cAAc,iBAAiB;AAErC,YAAM,iBAAiB;AACvB,YAAM,WAAW;AAAA,QACf,MAAM;AAAA,QACN,QAAQ,QAAQ,QAAQ;AAAA,MAC1B,CAAC;AAED,aAAO;AAAA,QACL,MAAM;AAAA,QACN,SAAS;AAAA,MACX;AAAA,IACF,SAAS,OAAO;AACd,MAAAA,SAAO,MAAM,oCAAoC,KAAK;AACtD,YAAM,eAAe,2CAAsC,iBAAiB,QAAQ,MAAM,UAAU,eAAe;AACnH,YAAM,WAAW;AAAA,QACf,MAAM;AAAA,QACN,QAAQ,QAAQ,QAAQ;AAAA,MAC1B,CAAC;AACD,aAAO;AAAA,QACL,MAAM;AAAA,QACN,SAAS;AAAA,MACX;AAAA,IACF;AAAA,EACF;AACF;;;ACjEO,IAAM,eAAuB;AAAA,EAClC,MAAM;AAAA,EACN,aAAa;AAAA,EACb,UAAU,CAAC,aAAa;AAAA,EACxB,SAAS;AAAA,IACP;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AAAA,EACA,WAAW;AAAA;AAAA;AAAA;AAAA;AAAA,EAKX;AACF;","names":["logger","logger","logger","ModelType","ModelType","logger","logger","logger","logger","logger","logger"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elizaos/plugin-linear",
3
- "version": "1.2.10",
3
+ "version": "1.2.11",
4
4
  "description": "Linear integration plugin for ElizaOS",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.js",