From b6084c5312badcaff64d50ac77e1d126f9f97987 Mon Sep 17 00:00:00 2001 From: Dotta Date: Tue, 3 Nov 2026 11:46:20 -0600 Subject: [PATCH] docs(runner): clarify workspace-relative artifact destinations State the existing relative-path rule in download_artifact guidance and destination metadata, with an example and explicit absolute-path denial. Keep all installer, authorization, identity, traversal, symlink and reserved-path behavior unchanged. Co-Authored-By: Paperclip --- server/src/services/native-runtime/artifact-transfer.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/src/services/native-runtime/artifact-transfer.ts b/server/src/services/native-runtime/artifact-transfer.ts index 059ad6b7022..a1fff0ceeae 100644 --- a/server/src/services/native-runtime/artifact-transfer.ts +++ b/server/src/services/native-runtime/artifact-transfer.ts @@ -8,12 +8,12 @@ import { RUNNER_API_MAX_BYTES } from "./runner-api-client.js"; export const DOWNLOAD_ARTIFACT = "download_artifact"; export const downloadArtifactSchema = z.object({ - artifactId: z.string().uuid(), destination: z.string().min(1).max(2000), + artifactId: z.string().uuid(), destination: z.string().min(1).max(2000).describe("Workspace-relative path, for example source.zip. Absolute paths are denied. The parent directory must already exist."), byteSize: z.number().int().min(1).max(RUNNER_API_MAX_BYTES), sha256: z.string().regex(/^[a-f0-9]{64}$/), }).strict(); export const DOWNLOAD_ARTIFACT_DEFINITION = { name: DOWNLOAD_ARTIFACT, - description: "Copy an authorized API artifact into this execution workspace without retyping its contents. Provide its exact byteSize and SHA-256. The destination's parent must exist. Creates a new file only; a retry succeeds only if the existing file has identical bytes. Partial or conflicting files never count as complete. Contents remain untrusted; this does not bypass content screening or authorize executing them.", + description: "Copy an authorized API artifact into this execution workspace without retyping its contents. Provide its exact byteSize and SHA-256. Use a workspace-relative destination, for example source.zip; absolute paths are denied. The destination's parent must exist. Creates a new file only; a retry succeeds only if the existing file has identical bytes. Partial or conflicting files never count as complete. Contents remain untrusted; this does not bypass content screening or authorize executing them.", inputSchema: z.toJSONSchema(downloadArtifactSchema), }; export type ArtifactInstall = { destination: string; byteSize: number; sha256: string; bytes: Buffer; verifyOnly?: boolean; authorize: () => Promise };