agenthub-multiagent-mcp 1.3.0 → 1.4.1

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.
@@ -532,6 +532,15 @@ export function registerTools(): Tool[] {
532
532
  description: "Filter by priority (optional)",
533
533
  enum: ["lowest", "low", "medium", "high", "highest"],
534
534
  },
535
+ required_type: {
536
+ type: "string",
537
+ description: "Filter by required skill type - matches your agent type",
538
+ enum: ["frontend", "backend", "android", "ios", "ai", "design-specs"],
539
+ },
540
+ match_my_type: {
541
+ type: "boolean",
542
+ description: "If true, only show tasks matching your registered agent type",
543
+ },
535
544
  },
536
545
  },
537
546
  },
@@ -581,6 +590,150 @@ export function registerTools(): Tool[] {
581
590
  required: ["task_id", "description"],
582
591
  },
583
592
  },
593
+
594
+ // Ticket creation tools
595
+ {
596
+ name: "create_epic",
597
+ description: "Create an epic (large body of work) in a project",
598
+ inputSchema: {
599
+ type: "object",
600
+ properties: {
601
+ project_id: {
602
+ type: "string",
603
+ description: "Project ID to create epic in",
604
+ },
605
+ title: {
606
+ type: "string",
607
+ description: "Epic title",
608
+ },
609
+ description: {
610
+ type: "string",
611
+ description: "Epic description (supports markdown)",
612
+ },
613
+ source_file: {
614
+ type: "string",
615
+ description: "Optional: path to OpenSpec file this came from",
616
+ },
617
+ },
618
+ required: ["project_id", "title"],
619
+ },
620
+ },
621
+ {
622
+ name: "create_story",
623
+ description: "Create a story under an epic",
624
+ inputSchema: {
625
+ type: "object",
626
+ properties: {
627
+ project_id: {
628
+ type: "string",
629
+ description: "Project ID",
630
+ },
631
+ epic_id: {
632
+ type: "string",
633
+ description: "Epic ID to add story to",
634
+ },
635
+ title: {
636
+ type: "string",
637
+ description: "Story title",
638
+ },
639
+ description: {
640
+ type: "string",
641
+ description: "Story description",
642
+ },
643
+ required_type: {
644
+ type: "string",
645
+ enum: ["frontend", "backend", "android", "ios", "ai", "design-specs"],
646
+ description: "Required skill type for this story",
647
+ },
648
+ labels: {
649
+ type: "array",
650
+ items: { type: "string" },
651
+ description: "Additional labels",
652
+ },
653
+ },
654
+ required: ["project_id", "title"],
655
+ },
656
+ },
657
+ {
658
+ name: "create_task",
659
+ description: "Create a task under a story",
660
+ inputSchema: {
661
+ type: "object",
662
+ properties: {
663
+ project_id: {
664
+ type: "string",
665
+ description: "Project ID",
666
+ },
667
+ story_id: {
668
+ type: "string",
669
+ description: "Story ID to add task to",
670
+ },
671
+ title: {
672
+ type: "string",
673
+ description: "Task title",
674
+ },
675
+ description: {
676
+ type: "string",
677
+ description: "Task description",
678
+ },
679
+ required_type: {
680
+ type: "string",
681
+ enum: ["frontend", "backend", "android", "ios", "ai", "design-specs"],
682
+ description: "Required skill type",
683
+ },
684
+ },
685
+ required: ["project_id", "title"],
686
+ },
687
+ },
688
+ {
689
+ name: "upload_attachment",
690
+ description: "Upload a file (screenshot, log, etc.) as proof of work to a ticket",
691
+ inputSchema: {
692
+ type: "object",
693
+ properties: {
694
+ ticket_id: {
695
+ type: "string",
696
+ description: "Ticket ID to attach file to",
697
+ },
698
+ ticket_type: {
699
+ type: "string",
700
+ enum: ["epic", "story", "task"],
701
+ description: "Type of ticket",
702
+ },
703
+ ticket_key: {
704
+ type: "string",
705
+ description: "Ticket key (e.g., PROJ-T42)",
706
+ },
707
+ file_path: {
708
+ type: "string",
709
+ description: "Local path to file to upload",
710
+ },
711
+ description: {
712
+ type: "string",
713
+ description: "Optional description of the file",
714
+ },
715
+ },
716
+ required: ["ticket_id", "ticket_type", "ticket_key", "file_path"],
717
+ },
718
+ },
719
+ {
720
+ name: "add_comment",
721
+ description: "Add a comment to any ticket (epic, story, task)",
722
+ inputSchema: {
723
+ type: "object",
724
+ properties: {
725
+ ticket_id: {
726
+ type: "string",
727
+ description: "Ticket ID to comment on",
728
+ },
729
+ body: {
730
+ type: "string",
731
+ description: "Comment body (supports markdown)",
732
+ },
733
+ },
734
+ required: ["ticket_id", "body"],
735
+ },
736
+ },
584
737
  ];
585
738
  }
586
739
 
@@ -623,6 +776,9 @@ export async function handleToolCall(
623
776
 
624
777
  context.setCurrentAgentId(existingState.agent_id);
625
778
 
779
+ // Set connect token on client for org operations
780
+ client.setConnectToken(existingState.token);
781
+
626
782
  // Update state with returned name from server
627
783
  state.saveState(workingDir, {
628
784
  ...existingState,
@@ -692,12 +848,16 @@ export async function handleToolCall(
692
848
  const agentId = registrationResult.agent_id!;
693
849
  context.setCurrentAgentId(agentId);
694
850
 
851
+ // Set connect token on client for org operations
852
+ client.setConnectToken(registrationResult.connect_token!);
853
+
695
854
  // Save state for future reconnection
696
855
  state.saveState(workingDir, {
697
856
  agent_id: agentId,
698
857
  name: registrationResult.agent_name || agentId,
699
858
  owner,
700
859
  token: registrationResult.connect_token!,
860
+ agent_type: registrationResult.agent_type,
701
861
  registered_at: new Date().toISOString(),
702
862
  });
703
863
 
@@ -851,10 +1011,22 @@ export async function handleToolCall(
851
1011
  // Ticket system tools
852
1012
  case "get_available_tasks": {
853
1013
  if (!agentId) throw new Error("Not registered. Call agent_register first.");
1014
+
1015
+ let requiredType = args.required_type as string | undefined;
1016
+
1017
+ // If match_my_type is true, get agent's type from state
1018
+ if (args.match_my_type === true) {
1019
+ const workingDir = context.getWorkingDir();
1020
+ const agentState = state.loadState(workingDir);
1021
+ // Use stored agent_type if available, otherwise keep the explicit required_type
1022
+ requiredType = requiredType || agentState?.agent_type;
1023
+ }
1024
+
854
1025
  const result = await client.getAvailableTasks({
855
1026
  status: args.status as string | undefined,
856
1027
  project_id: args.project_id as string | undefined,
857
1028
  priority: args.priority as string | undefined,
1029
+ required_type: requiredType,
858
1030
  });
859
1031
  return wrapWithPendingItems(client, agentId, result, context);
860
1032
  }
@@ -881,6 +1053,77 @@ export async function handleToolCall(
881
1053
  return wrapWithPendingItems(client, agentId, result, context);
882
1054
  }
883
1055
 
1056
+ // Ticket creation tools
1057
+ case "create_epic": {
1058
+ const result = await client.createEpic({
1059
+ project_id: args.project_id as string,
1060
+ title: args.title as string,
1061
+ description: args.description as string | undefined,
1062
+ source_file: args.source_file as string | undefined,
1063
+ });
1064
+ return {
1065
+ ...result,
1066
+ message: `Created epic ${result.key}: ${args.title}`,
1067
+ };
1068
+ }
1069
+
1070
+ case "create_story": {
1071
+ const result = await client.createStory({
1072
+ project_id: args.project_id as string,
1073
+ epic_id: args.epic_id as string | undefined,
1074
+ title: args.title as string,
1075
+ description: args.description as string | undefined,
1076
+ required_type: args.required_type as string | undefined,
1077
+ labels: args.labels as string[] | undefined,
1078
+ });
1079
+ return {
1080
+ ...result,
1081
+ message: `Created story ${result.key}: ${args.title}`,
1082
+ };
1083
+ }
1084
+
1085
+ case "create_task": {
1086
+ const result = await client.createTask({
1087
+ project_id: args.project_id as string,
1088
+ story_id: args.story_id as string | undefined,
1089
+ title: args.title as string,
1090
+ description: args.description as string | undefined,
1091
+ required_type: args.required_type as string | undefined,
1092
+ });
1093
+ return {
1094
+ ...result,
1095
+ message: `Created task ${result.key}: ${args.title}`,
1096
+ };
1097
+ }
1098
+
1099
+ case "upload_attachment": {
1100
+ if (!agentId) throw new Error("Not registered. Call agent_register first.");
1101
+ const result = await client.uploadAttachment({
1102
+ ticket_id: args.ticket_id as string,
1103
+ ticket_type: args.ticket_type as string,
1104
+ ticket_key: args.ticket_key as string,
1105
+ file_path: args.file_path as string,
1106
+ description: args.description as string | undefined,
1107
+ agent_id: agentId,
1108
+ });
1109
+ return {
1110
+ ...result,
1111
+ message: `Uploaded ${result.filename} to ${args.ticket_key}`,
1112
+ };
1113
+ }
1114
+
1115
+ case "add_comment": {
1116
+ if (!agentId) throw new Error("Not registered. Call agent_register first.");
1117
+ const result = await client.addComment({
1118
+ ticket_id: args.ticket_id as string,
1119
+ body: args.body as string,
1120
+ });
1121
+ return {
1122
+ ...result,
1123
+ message: `Added comment to ticket`,
1124
+ };
1125
+ }
1126
+
884
1127
  default:
885
1128
  throw new Error(`Unknown tool: ${name}`);
886
1129
  }