fix: 放开 transientEnv 数量限制

This commit is contained in:
Codex
2026-06-02 08:24:22 +08:00
parent c1f22210a4
commit 82e2349030
4 changed files with 12 additions and 4 deletions
-1
View File
@@ -159,7 +159,6 @@ export async function createKubernetesRunnerJob(options: { store: AgentRunStore;
function transientEnvField(value: unknown): RunnerTransientEnv[] {
if (value === undefined) return [];
if (!Array.isArray(value)) throw new AgentRunError("schema-invalid", "transientEnv must be an array", { httpStatus: 400 });
if (value.length > 8) throw new AgentRunError("schema-invalid", "transientEnv must contain at most 8 entries", { httpStatus: 400 });
const seen = new Set<string>();
return value.map((entry, index) => {
if (!entry || typeof entry !== "object" || Array.isArray(entry)) throw new AgentRunError("schema-invalid", `transientEnv[${index}] must be an object`, { httpStatus: 400 });