refactor: remove forwarding exports and redundant aliases

This commit is contained in:
morluto
2026-10-09 22:46:09 +08:00
parent 69c3b32a21
commit ad59531a96
416 changed files with 855 additions and 1208 deletions
+6 -14
View File
@@ -1,7 +1,7 @@
import { z } from "zod";
import type { ToolContract } from "../toolContracts.js";
import { managedOutputSchemas } from "../toolOutputSchemas.js";
import type { ToolContract } from "../toolContractTypes.js";
import { managedOutputSchemas } from "../toolOutputSchemaGroups.js";
import { toolContractMetadata } from "../toolEffects.js";
import { requireOutputSchema } from "../toolOutputSchemaPrimitives.js";
import {
@@ -10,7 +10,7 @@ import {
} from "../../domain/localPath.js";
/** Exact caller boundary for execution-free PE/CLI triage and identity. */
const managedTargetInputSchema = z.strictObject({
export const managedTargetInputSchema = z.strictObject({
path: localPathStringSchema
.refine(isAbsoluteLocalPath, {
message:
@@ -22,14 +22,6 @@ const managedTargetInputSchema = z.strictObject({
.optional(),
});
export const managedArtifactInputSchema = managedTargetInputSchema;
/** Exact caller boundary for execution-free metadata/signature/IL inspection. */
export const managedMemberInputSchema = managedTargetInputSchema;
/** Exact caller boundary for execution-free managed/native boundary inspection. */
export const managedNativeBoundaryInputSchema = managedTargetInputSchema;
const outputSchema = requireOutputSchema(
managedOutputSchemas,
"inspect_managed_artifact",
@@ -51,7 +43,7 @@ export const MANAGED_TOOL_CONTRACTS = [
description:
"Open and classify an explicit managed PE/CLI path, or inspect the active managed target, then inventory exact assembly/module identity, target framework evidence, references, resources, and custom attributes without loading or executing target code. Returns complete inline inventories when metadata is admitted and explicit partial or malformed coverage otherwise.",
kind: "managed-provider",
inputSchema: managedArtifactInputSchema,
inputSchema: managedTargetInputSchema,
outputSchema,
examples: [
{
@@ -66,7 +58,7 @@ export const MANAGED_TOOL_CONTRACTS = [
description:
"Inspect PE/CLI metadata members, signatures, raw CIL hashes, decoded-instruction-tuple hashes, separately reported exception regions, call edges, and field-access anchors without loading or executing target code. Metadata tokens are reported as build-local coordinates bound to the artifact SHA-256 and MVID; the tuple hash does not resolve them or fully commit control flow.",
kind: "managed-provider",
inputSchema: managedMemberInputSchema,
inputSchema: managedTargetInputSchema,
outputSchema: memberOutputSchema,
examples: [
{
@@ -81,7 +73,7 @@ export const MANAGED_TOOL_CONTRACTS = [
description:
"Inspect PE/CLI ModuleRef, ImplMap/PInvoke declarations, CLI native-header indicators, and non-IL method implementation flags without loading or executing target code. Results are managed declarations and degraded native-boundary observations, not verified native exports or addresses.",
kind: "managed-provider",
inputSchema: managedNativeBoundaryInputSchema,
inputSchema: managedTargetInputSchema,
outputSchema: nativeBoundaryOutputSchema,
examples: [
{
@@ -2,8 +2,8 @@ import { z } from "zod";
import { evidenceSchema } from "../../domain/evidence.js";
import { managedReconstructionImportInputSchema } from "../../domain/managed/managedReconstruction.js";
import type { ToolContract } from "../toolContracts.js";
import { managedWorkflowOutputSchemas } from "../toolOutputSchemas.js";
import type { ToolContract } from "../toolContractTypes.js";
import { managedWorkflowOutputSchemas } from "../toolOutputSchemaGroups.js";
import {
MANAGED_MEMBER_COMPARISON_EXAMPLE,
MANAGED_NATIVE_VERIFICATION_EXAMPLE,