Forge
csharpdeeb25a2
1using CascadeIDE.Contracts;
2using CascadeIDE.Services;
3
4namespace CascadeIDE.Features.IdeMcp.Application;
5
6/// <summary>Тонкий фасад MCP agent-notes: workspace к заметкам через <see cref="McpAgentNotesService.ResolveNotesWorkspacePath"/>.</summary>
7[ApplicationOrchestrator]
8public static class IdeMcpAgentNotesOrchestrator
9{
10 public static string WriteAgentNotes(McpAgentNotesService svc, string? solutionPath, string content) =>
11 svc.WriteAgentNotes(McpAgentNotesService.ResolveNotesWorkspacePath(solutionPath), content);
12
13 public static string ReadAgentNotes(McpAgentNotesService svc, string? solutionPath) =>
14 svc.ReadAgentNotes(McpAgentNotesService.ResolveNotesWorkspacePath(solutionPath));
15
16 public static string AppendAgentNotes(McpAgentNotesService svc, string? solutionPath, string content) =>
17 svc.AppendAgentNotes(McpAgentNotesService.ResolveNotesWorkspacePath(solutionPath), content);
18
19 public static string ListAgentNotesRevisions(McpAgentNotesService svc, string? solutionPath, int? limit) =>
20 svc.ListAgentNotesRevisions(McpAgentNotesService.ResolveNotesWorkspacePath(solutionPath), limit);
21
22 public static string RollbackAgentNotes(McpAgentNotesService svc, string? solutionPath, string? revisionFile) =>
23 svc.RollbackAgentNotes(McpAgentNotesService.ResolveNotesWorkspacePath(solutionPath), revisionFile);
24
25 public static string ReadHotContext(McpAgentNotesService svc, string? solutionPath, string? activeScope) =>
26 svc.ReadHotContext(McpAgentNotesService.ResolveNotesWorkspacePath(solutionPath), activeScope);
27
28 public static string RouteContext(
29 McpAgentNotesService svc,
30 string? solutionPath,
31 string query,
32 string? activeScope,
33 int? maxSections,
34 int? maxChars) =>
35 svc.RouteContext(McpAgentNotesService.ResolveNotesWorkspacePath(solutionPath), query, activeScope, maxSections, maxChars);
36
37 public static string MemoryHealth(McpAgentNotesService svc, string? solutionPath, string? activeScope) =>
38 svc.MemoryHealth(McpAgentNotesService.ResolveNotesWorkspacePath(solutionPath), activeScope);
39
40 public static string CompactHotContext(McpAgentNotesService svc, string? solutionPath, bool apply) =>
41 svc.CompactHotContext(McpAgentNotesService.ResolveNotesWorkspacePath(solutionPath), apply);
42
43 public static string ExtractFromArchive(
44 McpAgentNotesService svc,
45 string? solutionPath,
46 string query,
47 string? revisionFile,
48 int? headLimit,
49 int? contextLines) =>
50 svc.ExtractFromArchive(
51 McpAgentNotesService.ResolveNotesWorkspacePath(solutionPath),
52 query,
53 revisionFile,
54 headLimit,
55 contextLines);
56
57 public static string UpsertAgentNotesSection(McpAgentNotesService svc, string? solutionPath, string sectionId, string content) =>
58 svc.UpsertAgentNotesSection(McpAgentNotesService.ResolveNotesWorkspacePath(solutionPath), sectionId, content);
59
60 public static string SearchAgentNotes(McpAgentNotesService svc, string? solutionPath, string query, int? headLimit) =>
61 svc.SearchAgentNotes(McpAgentNotesService.ResolveNotesWorkspacePath(solutionPath), query, headLimit);
62}
63
View only · write via MCP/CIDE