iTool.MyScriptRuntimes.AgentSurface 4.0.0

dotnet add package iTool.MyScriptRuntimes.AgentSurface --version 4.0.0
                    
NuGet\Install-Package iTool.MyScriptRuntimes.AgentSurface -Version 4.0.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="iTool.MyScriptRuntimes.AgentSurface" Version="4.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="iTool.MyScriptRuntimes.AgentSurface" Version="4.0.0" />
                    
Directory.Packages.props
<PackageReference Include="iTool.MyScriptRuntimes.AgentSurface" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add iTool.MyScriptRuntimes.AgentSurface --version 4.0.0
                    
#r "nuget: iTool.MyScriptRuntimes.AgentSurface, 4.0.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package iTool.MyScriptRuntimes.AgentSurface@4.0.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=iTool.MyScriptRuntimes.AgentSurface&version=4.0.0
                    
Install as a Cake Addin
#tool nuget:?package=iTool.MyScriptRuntimes.AgentSurface&version=4.0.0
                    
Install as a Cake Tool

iTool.MyScriptRuntimes.AgentSurface

The agent-facing surface of the neutral iTool Runtime. It is not an agent: it holds no loop, no session, no model call and no persistence. Its job is to answer three questions for whatever agent runs on top, and to stay out of the Runtime SDK's way while doing it.

What it provides

Part Type Question it answers
Tool catalog IAgentToolCatalog What may an agent do against the Runtime, under which effect, scope, preflight, claim and obligation? 9 tools / 53 operations.
Join keys AgentToolOperationManifest.OperationIds Which openapi.json operationId serves this operation? An empty list is a real answer: the operation has no Runtime route and the caller must compose it.
Routes IAgentToolRouteSource Which method and path does that operation id address? Published data, so a transport need not re-derive it from the document.
Invoker IRuntimeAgentToolInvoker Run it: resolve the operation, apply the declared deadline and response ceiling, and wrap the answer in AgentToolEnvelope<T>.
Knowledge IRuntimeScriptKnowledge (+ MapRuntimeScriptKnowledge) What is inside the pinned activation? Exports, keywords, triggers, routes, MCP tools/resources, file protocols, modules and AOP bindings, at K0-K4 disclosure.
Job map IRuntimeScriptJobMapSource Which steps does a delivery job consist of, and which claims and obligations connect them?

The transport is the host's, not ours

StandardRuntimeAgentToolInvoker does the neutral work and stops at one seam:

public interface IAgentToolTransport
{
    ValueTask<AgentToolTransportResponse> SendAsync(
        AgentToolTransportRequest request,
        CancellationToken cancellationToken = default);
}

This package deliberately contains no HttpClient, no base address, no token, no proxy policy and no retry. Those are environment decisions, and a foundation that guesses them is wrong in the first deployment that differs. The Runtime's surface happens to be HTTP, so a host that talks to it writes roughly this much and nothing more:

sealed class HttpTransport(HttpClient client, Uri baseAddress) : IAgentToolTransport
{
    public async ValueTask<AgentToolTransportResponse> SendAsync(
        AgentToolTransportRequest request, CancellationToken cancellationToken = default)
    {
        var route = request.Route!;
        var path = route.Path;
        foreach (var parameter in route.Parameters)
        {
            // The transport decides where a value comes from: this surface names repositories with
            // the `.git` suffix, which is surface knowledge and therefore not ours to assume.
            var value = request.PathParameters.TryGetValue(parameter, out var supplied)
                ? supplied
                : parameter == "application" ? request.Application
                : throw new InvalidOperationException($"No value for '{parameter}'.");
            path = path.Replace("{" + parameter + "}", Uri.EscapeDataString(value), StringComparison.Ordinal);
        }

        using var message = new HttpRequestMessage(
            new HttpMethod(route.Method), new Uri(baseAddress, path.TrimStart('/')));
        if (request.IdempotencyKey is not null)
            message.Headers.TryAddWithoutValidation("Idempotency-Key", request.IdempotencyKey);
        if (request.Arguments is not null && route.Method is "POST" or "PUT" or "PATCH")
            message.Content = new StringContent(request.Arguments.ToJsonString(), Encoding.UTF8, "application/json");

        using var response = await client.SendAsync(message, cancellationToken);
        return new AgentToolTransportResponse(
            (int)response.StatusCode,
            await response.Content.ReadAsStringAsync(cancellationToken));
    }
}

Register it and the agent has a working tool surface. Assemble the catalog into an agent kernel the same way — take IAgentToolCatalog.Manifest.Tools, project each tool onto the kernel's function shape, and hand IRuntimeAgentToolInvoker to the executor. Business-specific tools belong in a contribution of your own, not in a fork of this module.

Contracts it publishes

Generated, not hand-maintained: acceptance/scripts/generate-contracts.sh emits them and the acceptance gate compares them byte for byte, so a stale copy cannot ship.

  • agent-tools.manifest.json
  • runtime-script-job-map.json
  • runtime-script-knowledge.schema.json

Wiring

services.AddIToolDevelopmentFoundation();
services.AddMyScriptRuntime(builder =>
{
    builder.AddJavaScriptRuntime();
    builder.AddStandardVGitAgentTools();                       // catalog + job map + route source + invoker
});
services.AddSingleton<IAgentToolTransport, HttpTransport>();    // the host's half
services.AddRuntimeScriptAgentWithNeutralIdentity();           // knowledge queries behind a validated identity
endpoints.MapRuntimeScriptKnowledge();                         // POST /agent/runtime-script-knowledge

Everything is registered with TryAdd..., so a host that replaces any part registers its own first and keeps it.

Boundaries, and the checks that hold them

  • The Runtime SDK does not depend on this module; a test asserts it.
  • StandardAgentToolJoinKeys refuses an operation it has no row for; a test asserts every join key in the catalog resolves to a route; and the contract generator refuses a route that does not match openapi.json. All three fail loudly instead of shipping a link that resolves to nothing.
  • With no transport registered the invoker reports agent_tool_transport_unavailable instead of appearing to work and failing obscurely later.
Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
4.0.0 47 10/14/2026