fix(contracts)!: require absolute local paths for session filesystem inputs (#948)

fix(contracts): require absolute local paths for session filesystem inputs

Snapshot, evidence-bundle export, and managed-target inputs accepted any non-empty string, so relative paths were resolved against the MCP server working directory instead of the caller's intent. Refine these contract fields to absolute host paths (Windows drive and forward-slash forms included), advertise the constraint on the property descriptions, and regenerate the derived catalog, product catalog, and skill catalog digest. Relative CLI options are unaffected because CLI flows do not parse these MCP contracts.

Co-authored-by: morluto <76467478+morluto@users.noreply.github.com>
This commit is contained in:
Dery Ferdika
2026-10-08 00:31:55 +08:00
committed by GitHub
co-authored by morluto
parent 06b047a092
commit 5b172b1042
9 changed files with 195 additions and 11 deletions
@@ -4,16 +4,21 @@ import type { ToolContract } from "../toolContracts.js";
import { managedOutputSchemas } from "../toolOutputSchemas.js";
import { toolContractMetadata } from "../toolEffects.js";
import { requireOutputSchema } from "../toolOutputSchemaPrimitives.js";
import { isAbsoluteLocalPath } from "../../domain/localPath.js";
/** Exact caller boundary for execution-free PE/CLI triage and identity. */
const managedTargetInputSchema = z.object({
path: z
.string()
.min(1)
.optional()
.refine(isAbsoluteLocalPath, {
message:
"path must be an absolute local filesystem path (for example /tmp/Example.dll or C:\\Example.dll)",
})
.describe(
"Explicit managed PE/CLI path; omit to reuse the previously selected managed target",
),
"Explicit absolute managed PE/CLI path; omit to reuse the previously selected managed target",
)
.optional(),
});
export const managedArtifactInputSchema = managedTargetInputSchema;