Add the Flutter video editing application with project management, media import, timeline editing, preview, AI assistance, diagnostics and settings. Include shared UI and native host packages, platform runners, application tests and release tooling. Provide usage and contribution guides, the MIT license and third-party notices. Exclude local credentials, build outputs and validation data.
46 lines
1.4 KiB
Dart
46 lines
1.4 KiB
Dart
import 'package:cutdex_agent/cutdex_agent.dart';
|
|
import 'package:cutdex_sdk/editor.dart';
|
|
import 'package:cutdex_sdk/mcp.dart';
|
|
import 'package:cutdex_sdk/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),
|
|
],
|
|
);
|
|
}
|