PhantomMcpTool.Executor field
Part of design: #1432 — per-component-executor-binding
Design document: https://github.com/JoshuaRowePhantom/Phantom.Workspaces/blob/design/docs/design/per-component-executor-binding.md
Scope
Add Executor (nullable string) to PhantomMcpTool using the established recipe: read in PhantomAgentSchema PostProcess (ReadExecutor), copy in From(), emit in Save(). Keep the source-scan guard intact.
Files
Phantom.Workspaces.Llm.Interfaces/PhantomMcpTool.cs; Phantom.Workspaces.Llm.Interfaces/PhantomAgentSchema.cs.
Detailed design
Modified files (applicable):
Phantom.Workspaces.Llm.Interfaces/PhantomMcpTool.cs — add Executor (nullable string) via the From/Save recipe.
Phantom.Workspaces.Llm.Interfaces/PhantomAgentSchema.cs — read executor in PostProcess (ReadExecutor) so it survives load.
Verified starting state (evidence):
PhantomMcpTool : McpTool adds Transport, recovered from dropped JSON props (Phantom.Workspaces.Llm.Interfaces/PhantomMcpTool.cs:34-77) via PhantomAgentSchema.CreateContext PostProcess → ReadTransport (Phantom.Workspaces.Llm.Interfaces/PhantomAgentSchema.cs:47-79), copied in From() and emitted in Save(). A source-scan guard test forbids direct AgentSchema FromJson (enforcing centralisation through PhantomAgentSchema, documented in that file's <remarks>).
Data flow (load / build, applicable part):
PhantomAgentSchema.AgentManifestFromJson loads the manifest; PostProcess upgrades each McpTool to PhantomMcpTool, now also recovering the dropped executor field (ReadExecutor).
Tests
PhantomMcpToolExecutorTests (Phantom.Workspaces.Llm.Interfaces.Tests)
Save_WithExecutor_EmitsExecutorField
From_CopiesExecutor
RoundTrip_ExecutorField_Preserved
- (guard)
PhantomAgentSchema_IsOnlyLoadEntryPoint_NoDirectFromJson — extend/confirm existing guard.
Testing strategy — PhantomMcpTool.Executor round-trip + guard. Save emits executor, From copies it, a ToJson() → load round-trip preserves it, and the guard test that forbids direct AgentSchema FromJson still passes. → PhantomMcpToolExecutorTests.
Dependencies
None.
PhantomMcpTool.ExecutorfieldPart of design: #1432 — per-component-executor-binding
Design document: https://github.com/JoshuaRowePhantom/Phantom.Workspaces/blob/design/docs/design/per-component-executor-binding.md
Scope
Add
Executor(nullable string) toPhantomMcpToolusing the established recipe: read inPhantomAgentSchemaPostProcess(ReadExecutor), copy inFrom(), emit inSave(). Keep the source-scan guard intact.Files
Phantom.Workspaces.Llm.Interfaces/PhantomMcpTool.cs;Phantom.Workspaces.Llm.Interfaces/PhantomAgentSchema.cs.Detailed design
Modified files (applicable):
Phantom.Workspaces.Llm.Interfaces/PhantomMcpTool.cs— addExecutor(nullable string) via theFrom/Saverecipe.Phantom.Workspaces.Llm.Interfaces/PhantomAgentSchema.cs— readexecutorinPostProcess(ReadExecutor) so it survives load.Verified starting state (evidence):
PhantomMcpTool : McpTooladdsTransport, recovered from dropped JSON props (Phantom.Workspaces.Llm.Interfaces/PhantomMcpTool.cs:34-77) viaPhantomAgentSchema.CreateContextPostProcess→ReadTransport(Phantom.Workspaces.Llm.Interfaces/PhantomAgentSchema.cs:47-79), copied inFrom()and emitted inSave(). A source-scan guard test forbids direct AgentSchemaFromJson(enforcing centralisation throughPhantomAgentSchema, documented in that file's<remarks>).Data flow (load / build, applicable part):
PhantomAgentSchema.AgentManifestFromJsonloads the manifest;PostProcessupgrades eachMcpTooltoPhantomMcpTool, now also recovering the droppedexecutorfield (ReadExecutor).Tests
PhantomMcpToolExecutorTests(Phantom.Workspaces.Llm.Interfaces.Tests)Save_WithExecutor_EmitsExecutorFieldFrom_CopiesExecutorRoundTrip_ExecutorField_PreservedPhantomAgentSchema_IsOnlyLoadEntryPoint_NoDirectFromJson— extend/confirm existing guard.Testing strategy —
PhantomMcpTool.Executorround-trip + guard.Saveemitsexecutor,Fromcopies it, aToJson()→ load round-trip preserves it, and the guard test that forbids direct AgentSchemaFromJsonstill passes. →PhantomMcpToolExecutorTests.Dependencies
None.