refactor: apply repository naming contract

Apply the accepted pre-release package, service, type, directory, and role renames as one repository-wide change.
This commit is contained in:
Tianyi Cui
2026-08-13 00:36:22 +08:00
parent 101df7cf58
commit a2d0f7f411
3281 changed files with 21730 additions and 21592 deletions

View File

@@ -1,5 +1,5 @@
/**
* Tool bridge: discovers MCP tools, registers them on the harness ToolRegistry
* Tool bridge: discovers MCP tools, registers them on the harness ToolRuntime
* under deterministic server-qualified public names, and handles re-sync when
* the server's tool list changes.
*
@@ -91,7 +91,7 @@ function callToolUncached(
*
* @param serverName - Stable local namespace from plugin config.
* @param rawName - The MCP server's own tool name.
* @returns The globally unique, model-facing ToolRegistry name.
* @returns The globally unique, model-facing ToolRuntime name.
*/
export function publicToolName(serverName: string, rawName: string): string {
const joined = `mcp__${serverName}__${rawName}`
@@ -102,7 +102,7 @@ export function publicToolName(serverName: string, rawName: string): string {
}
/**
* Sync the MCP server's tool list into the harness ToolRegistry.
* Sync the MCP server's tool list into the harness ToolRuntime.
*
* Two phases keep the swap safe:
*
@@ -223,7 +223,7 @@ function createOutput(rawName: string, structuredSchema: JsonSchemaNode | undefi
* per-page schema cache from pre-validating a different contract.
*
* When the MCP server returns `isError: true`, the executor throws so that
* the ToolRegistry's catch path produces an `isError` result for the model.
* the ToolRuntime's catch path produces an `isError` result for the model.
*/
function createExecutor(
client: Client,
@@ -263,7 +263,7 @@ function createExecutor(
const content = result.content as unknown as JsonValue[]
const text = extractText(content, rawName)
// MCP isError → throw so ToolRegistry produces an isError result for the model.
// MCP isError → throw so ToolRuntime produces an isError result for the model.
if (result.isError === true) {
throw new Error(text)
}