载入中...
搜索中...
未找到
EditorHost.cpp
浏览该文件的文档.
44 const std::vector<std::string>& owners, const std::unordered_map<std::string, EditorHostMountOverride>& overrides) {
47 return eve::editing::failed<EditorHostMountReport>(EditorStatus::NotFound, RuleId("editor.host.no-providers"),
50 eve::cap::forEach<editing::IEditorPackageProvider>([&](editing::IEditorPackageProvider* provider) {
99bool EditorHost::isMounted(std::string_view ownerModule) const { return mounted_.contains(std::string(ownerModule)); }
112 for (const editing::EditorTargetTypeSpec& target : mounted.package.targetTypes) types.push_back(target.type);
124Result<void> EditorHost::exportMcp(EditorMcpExportMode mode) { return editorMcpProjector().attach(this, mode); }
126Result<EditorValue> EditorHost::auditPackages() const { return editorMcpProjector().auditCompleteness(); }
134 return eve::editing::failed<EditorHostMountEntry>(EditorStatus::Conflict, RuleId("editor.host.already-mounted"),
168Result<void> EditorHost::installPanels(const editing::EditorPackage& package, std::vector<std::string>& panelIds) {
188 return eve::editing::failed<EditorValue>(EditorStatus::Failed, RuleId("editor.host.no-commands"),
194 if (filter && std::find(owners.begin(), owners.end(), command.ownerModule) == owners.end()) continue;
212 return eve::editing::applied<EditorValue>(EditorValue::Object{{"commands", std::move(commands)}});
225 eve::cap::forEach<IEditorAutomationTargetFactory>([&](IEditorAutomationTargetFactory* factory) {
250 return eve::editing::applied<EditorValue>(EditorValue::Object{{"supportedTypes", std::move(types)}});
void ignore(std::string_view reason={}) const noexcept
Explicitly discard this result after documenting the reason.
Definition Result.h:571
static Result failure(Status status)
Construct a failed result from a structured status.
Definition Result.h:196
Capability-discovered package advertisement from a domain editor module.
Definition EditorPackage.h:64
Deterministic owning value tree shared by authoring hosts.
Definition EditingValue.h:23
std::vector< CommandDescriptor > commands(const HostProfile &profile) const
Return descriptors visible to a host profile.
Definition EditorAssetDatabase.cpp:333
Result< EditorValue > exportCommandCatalog() const
Export mounted command catalog (id + inputSchema) for tests/MCP.
Definition EditorHost.cpp:186
editing::EditorUndoPolicy mountedUndoPolicy(std::string_view ownerModule) const
Undo policy recorded for a mounted owner (Share when unknown).
Definition EditorHost.cpp:118
EditorHost(Editor &editor, Options options)
Create a host bound to an Editor module's command service.
Definition EditorHost.cpp:23
std::vector< std::string > mountedOwnerNames() const
Mounted package owner names. @cost Linear in mounted package count; returns an owning vector copy.
Definition EditorHost.cpp:101
std::vector< std::string > mountedTargetTypeNames() const
Target types contributed by mounted packages. @cost Linear in mounted target types; returns a sorted ...
Definition EditorHost.cpp:109
bool isMounted(std::string_view ownerModule) const
True when owner is currently mounted.
Definition EditorHost.cpp:99
Result< EditorValue > exportTargetCatalog() const
Export discovered target types with createSchema when known.
Definition EditorHost.cpp:215
Result< EditorHostMountReport > autoMount()
Discover every IEditorPackageProvider and mount complete packages.
Definition EditorHost.cpp:41
Result< EditorHostMountReport > mount(const std::vector< std::string > &owners={}, const std::unordered_map< std::string, EditorHostMountOverride > &overrides={})
Mount an explicit owner allowlist.
Definition EditorHost.cpp:43
Result< void > exportMcp(EditorMcpExportMode mode=EditorMcpExportMode::Commands)
Attach this host as the active Mode A MCP projection scope.
Definition EditorHost.cpp:124
~EditorHost()
Destroy host, detach MCP projection if attached, and unmount packages.
Definition EditorHost.cpp:36
Result< EditorValue > auditPackages() const
Completeness audit (incomplete packages + orphan factory types).
Definition EditorHost.cpp:126
Result< void > unmount(std::string_view ownerModule)
Unmount one owner and remove its workspace panels.
Definition EditorHost.cpp:76
Result< EditorValue > auditCompleteness() const
Audit incomplete packages and orphan automation factories.
Definition EditorMcpProjector.cpp:43
Result< void > attach(EditorHost *host, EditorMcpExportMode mode=EditorMcpExportMode::Commands)
Attach a borrowed host as the active MCP projection scope.
Definition EditorMcpProjector.cpp:18
Default selection → inspector panel activation for a mounted host.
Definition EditorSelectionRouter.h:21
Tracks the focused package undo stack (Share vs Private).
Definition EditorUndoCoordinator.h:21
Result< WorkspacePanelDescriptor > removePanel(const StableId &id)
Remove a panel and return its final owning descriptor.
Definition EditorVolumeTarget.cpp:147
Result< WorkspacePanelDescriptor > registerPanel(WorkspacePanelDescriptor descriptor)
Register a checked owning panel descriptor.
Definition EditorVolumeTarget.cpp:118
Editor building blocks — not a shipped 3D/map editor app. Script: editor <- eve.Editor();
Definition Editor.h:47
static HostProfile developer()
Unrestricted developer profile used by legacy sessions.
Definition EditorHostProfile.cpp:17
Multi-provider extension point for domain-specific automation target creation.
Definition EditorAutomationTargetFactory.h:22
virtual std::vector< std::string_view > types() const =0
Stable target type names this factory accepts.
Result< Value > propertySchemaToJsonSchema(const PropertySchema &schema, std::string_view schemaId)
Project a PropertySchema into a JSON Schema object tree (pointer-free Value).
Definition PropertySchemaJson.cpp:65
Result< void > validateEditorPackage(const EditorPackage &package, bool allowIncomplete)
Validate package completeness for Host mount.
Definition EditorPackage.cpp:5
Result< void > noOp(std::vector< Diagnostic > diagnostics={})
Construct a successful void result for an operation that made no change.
Definition EditingResult.h:62
Definition ActionPreviewController.cpp:6
EditorMcpProjector & editorMcpProjector()
Process-wide projector used by EditorAutomationProvider and eve.mcp.attachEditor.
Definition EditorMcpProjector.cpp:13
Definition Container.h:602
Single domain-editor deliverable for Host discover/autoMount.
Definition EditorPackage.h:46
std::vector< EditorTargetTypeSpec > targetTypes
Definition EditorPackage.h:50
std::vector< EditingCommandDescriptor > commands
Definition EditorPackage.h:49
std::vector< EditorPanelSpec > panels
Definition EditorPackage.h:48
UI-neutral panel descriptor contributed by a domain editor package.
Definition EditorPackage.h:15
Target type advertised for automation create, with optional createSchema.
Definition EditorPackage.h:26
Presentation and execution metadata for a registered command.
Definition EditorCommandService.h:30
Summary of one successful or skipped package mount.
Definition EditorHost.h:32
Aggregate mount report returned by autoMount/mount.
Definition EditorHost.h:42
std::vector< EditorHostMountEntry > entries
Definition EditorHost.h:43
std::size_t mountedPackages
Definition EditorHost.h:44