Skip to content

[per-component-executor] - PhantomMcpTool.Executor field #1435

Description

@JoshuaRowePhantom

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 PostProcessReadTransport (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):

  1. 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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions