Gitea CI / Assemble and validate CI artifacts (push) Successful in 1m47s
Gitea CI / Check code and tests (push) Successful in 7m15s
Gitea CI / Build Android APK (push) Successful in 4m6s
Gitea CI / Build Windows x64 app (push) Successful in 3m34s
Gitea CI / Audit and package Windows x64 (push) Successful in 1m29s
Gitea CI / Gitea CI passed (push) Successful in 1s
Gitea Release / Prepare draft Release (push) Failing after 8s
Gitea Release / Upload Android to draft Release (push) Skipped
Gitea Release / Upload Windows to draft Release (push) Skipped
Gitea Release / Verify and publish Release (push) Skipped
46 lines
1.4 KiB
Dart
46 lines
1.4 KiB
Dart
import 'package:cutdex_agent/cutdex_agent.dart';
|
|
import 'package:cutdex_core/editor.dart';
|
|
import 'package:cutdex_core/mcp.dart';
|
|
import 'package:cutdex_core/tools.dart';
|
|
|
|
import 'agent/editor_agent_tools.dart';
|
|
import 'tool_workspace_registry.dart';
|
|
|
|
/// Immutable composition result exposing protocol projections of one registry.
|
|
class EditorToolAccess {
|
|
EditorToolAccess(EditorSession session) : this._(EditorToolRegistry(session));
|
|
|
|
EditorToolAccess.application(EditorCommandHost host)
|
|
: this._(EditorToolRegistry.application(host));
|
|
|
|
EditorToolAccess._(this.registry);
|
|
|
|
final EditorToolRegistry registry;
|
|
|
|
Object get owner => registry.owner;
|
|
Map<String, EditorToolDispatcher> get workspaces => registry.workspaces;
|
|
|
|
void attach(EditorSession? session, {String? projectId}) =>
|
|
registry.attach(session, projectId: projectId);
|
|
|
|
Future<void> dispose() => registry.dispose();
|
|
|
|
late final List<AgentTool> agentTools = editorAgentTools(
|
|
registry.workspaces,
|
|
dynamicWorkspaces: registry.dynamicWorkspaces,
|
|
);
|
|
|
|
late final server = CutdexMcpServer(
|
|
resolveWorkspaces: registry.dynamicWorkspaces
|
|
? () => [
|
|
for (final entry in registry.workspaces.entries)
|
|
McpWorkspace(id: entry.key, title: entry.key, tools: entry.value),
|
|
]
|
|
: null,
|
|
workspaces: [
|
|
for (final entry in registry.workspaces.entries)
|
|
McpWorkspace(id: entry.key, title: entry.key, tools: entry.value),
|
|
],
|
|
);
|
|
}
|