Forge
csharp3407750f
1using AgentForge.Abstractions;
2
3namespace AgentForge.Plugin.Issue;
4
5[ForgeMcpPrimary]
6internal static class ForgeIssueCommandRegistration
7{
8 internal static void Register(ForgeCommandRegistry registry)
9 {
10 registry.Add(new ForgeCommandDescriptor
11 {
12 Domain = "forge",
13 Object = "issue",
14 Intent = "open",
15 CommandId = "forge.issue.open",
16 Path = "/issue open",
17 PathAliases = ["/forge issue open"],
18 Help = "Open issue by number.",
19 Category = "Issue",
20 ArgTail = "required",
21 Surfaces = ["command-bar", "global", "mr-comment"],
22 RequiredCapabilities = ["read"],
23 Bindings = new ForgeCommandBindings
24 {
25 View = "/view/repos/{repo}/issues/{number}",
26 Mcp = ForgeMcpToolNames.IssueOpen,
27 },
28 });
29
30 registry.Add(new ForgeCommandDescriptor
31 {
32 Domain = "forge",
33 Object = "issue",
34 Intent = "list",
35 CommandId = "forge.issue.list",
36 Path = "/issue list",
37 PathAliases = ["/forge issue list"],
38 Help = "List issues for the repository.",
39 Category = "Issue",
40 ArgTail = "optional",
41 Surfaces = ["command-bar", "global"],
42 RequiredCapabilities = ["read"],
43 Bindings = new ForgeCommandBindings
44 {
45 View = "/view/repos/{repo}?tab=issues",
46 Mcp = ForgeMcpToolNames.IssueList,
47 },
48 });
49
50 registry.Add(new ForgeCommandDescriptor
51 {
52 Domain = "forge",
53 Object = "issue",
54 Intent = "search",
55 CommandId = "forge.issue.search",
56 Path = "/issue search",
57 PathAliases = ["/forge issue search"],
58 Help = "Search issues by title/body (query in tail).",
59 Category = "Issue",
60 ArgTail = "required",
61 Surfaces = ["command-bar", "global"],
62 RequiredCapabilities = ["read"],
63 Bindings = new ForgeCommandBindings
64 {
65 Mcp = ForgeMcpToolNames.IssueSearch,
66 },
67 });
68
69 registry.Add(new ForgeCommandDescriptor
70 {
71 Domain = "forge",
72 Object = "issue",
73 Intent = "create",
74 CommandId = "forge.issue.create",
75 Path = "/issue create",
76 PathAliases = ["/forge issue create"],
77 Help = "Create issue with title from tail text.",
78 Category = "Issue",
79 ArgTail = "required",
80 Surfaces = ["command-bar", "global", "mr-comment"],
81 RequiredCapabilities = ["write"],
82 Bindings = new ForgeCommandBindings
83 {
84 Mcp = ForgeMcpToolNames.IssueCreate,
85 },
86 });
87
88 registry.Add(new ForgeCommandDescriptor
89 {
90 Domain = "forge",
91 Object = "issue",
92 Intent = "comment",
93 CommandId = "forge.issue.comment",
94 Path = "/issue comment",
95 PathAliases = ["/forge issue comment"],
96 Help = "Add comment to issue (body in tail; issue number from context).",
97 Category = "Issue",
98 ArgTail = "required",
99 Surfaces = ["issue-comment", "mr-comment"],
100 RequiredCapabilities = ["write"],
101 Bindings = new ForgeCommandBindings
102 {
103 Mcp = ForgeMcpToolNames.IssueComment,
104 },
105 });
106 }
107}
108
View only · write via MCP/CIDE