@workbench-ai/workbench-core 0.0.67 → 0.0.69

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (51) hide show
  1. package/dist/coded-errors.d.ts +27 -0
  2. package/dist/coded-errors.d.ts.map +1 -0
  3. package/dist/coded-errors.js +52 -0
  4. package/dist/execution-events.d.ts +5 -1
  5. package/dist/execution-events.d.ts.map +1 -1
  6. package/dist/execution-events.js +13 -3
  7. package/dist/execution-graph.d.ts +4 -3
  8. package/dist/execution-graph.d.ts.map +1 -1
  9. package/dist/execution-graph.js +15 -14
  10. package/dist/execution-jobs.d.ts +5 -20
  11. package/dist/execution-jobs.d.ts.map +1 -1
  12. package/dist/execution-jobs.js +7 -91
  13. package/dist/execution-outputs.d.ts +2 -2
  14. package/dist/execution-outputs.d.ts.map +1 -1
  15. package/dist/execution-outputs.js +10 -10
  16. package/dist/execution-runtime-types.d.ts +1 -1
  17. package/dist/execution-runtime-types.d.ts.map +1 -1
  18. package/dist/execution-scheduler.d.ts +5 -3
  19. package/dist/execution-scheduler.d.ts.map +1 -1
  20. package/dist/execution-scheduler.js +33 -9
  21. package/dist/execution-traces.js +1 -1
  22. package/dist/generic-spec.d.ts +7 -61
  23. package/dist/generic-spec.d.ts.map +1 -1
  24. package/dist/generic-spec.js +0 -679
  25. package/dist/index.d.ts +377 -220
  26. package/dist/index.d.ts.map +1 -1
  27. package/dist/index.js +7887 -3881
  28. package/dist/remote-model.d.ts +17 -0
  29. package/dist/remote-model.d.ts.map +1 -0
  30. package/dist/remote-model.js +86 -0
  31. package/dist/runtime-dockerfile.d.ts +1 -1
  32. package/dist/runtime-dockerfile.d.ts.map +1 -1
  33. package/dist/runtime-dockerfile.js +4 -4
  34. package/dist/sandbox-backends/docker.d.ts.map +1 -1
  35. package/dist/sandbox-backends/docker.js +34 -16
  36. package/dist/sandbox-inputs.js +3 -3
  37. package/dist/sandbox-plane.d.ts.map +1 -1
  38. package/dist/sandbox-plane.js +13 -9
  39. package/dist/skill-patch.d.ts +8 -0
  40. package/dist/skill-patch.d.ts.map +1 -0
  41. package/dist/{candidate-patch.js → skill-patch.js} +5 -5
  42. package/package.json +3 -3
  43. package/worker/sandbox-adapter-runner.cjs +2 -2
  44. package/dist/candidate-patch.d.ts +0 -8
  45. package/dist/candidate-patch.d.ts.map +0 -1
  46. package/dist/execution-evidence.d.ts +0 -22
  47. package/dist/execution-evidence.d.ts.map +0 -1
  48. package/dist/execution-evidence.js +0 -302
  49. package/dist/inspection.d.ts +0 -117
  50. package/dist/inspection.d.ts.map +0 -1
  51. package/dist/inspection.js +0 -224
@@ -0,0 +1,17 @@
1
+ import { type WorkbenchRemoteKind } from "@workbench-ai/workbench-contract";
2
+ export type { WorkbenchRemoteKind };
3
+ export interface ParsedWorkbenchCloudRemoteUrl {
4
+ kind: "workbench-cloud";
5
+ url: string;
6
+ baseUrl: string;
7
+ owner: string;
8
+ skill: string;
9
+ }
10
+ export interface ParsedWorkbenchFileRemoteUrl {
11
+ kind: "file";
12
+ url: string;
13
+ path: string;
14
+ }
15
+ export type ParsedWorkbenchRemoteUrl = ParsedWorkbenchCloudRemoteUrl | ParsedWorkbenchFileRemoteUrl;
16
+ export declare function parseWorkbenchRemoteUrl(rawUrl: string): ParsedWorkbenchRemoteUrl;
17
+ //# sourceMappingURL=remote-model.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"remote-model.d.ts","sourceRoot":"","sources":["../src/remote-model.ts"],"names":[],"mappings":"AAEA,OAAO,EAA+B,KAAK,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AAIzG,YAAY,EAAE,mBAAmB,EAAE,CAAC;AAEpC,MAAM,WAAW,6BAA6B;IAC5C,IAAI,EAAE,iBAAiB,CAAC;IACxB,GAAG,EAAE,MAAM,CAAC;IACZ,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,4BAA4B;IAC3C,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,MAAM,wBAAwB,GAAG,6BAA6B,GAAG,4BAA4B,CAAC;AAEpG,wBAAgB,uBAAuB,CAAC,MAAM,EAAE,MAAM,GAAG,wBAAwB,CAoEhF"}
@@ -0,0 +1,86 @@
1
+ import { fileURLToPath } from "node:url";
2
+ import { normalizeWorkbenchSkillName } from "@workbench-ai/workbench-contract";
3
+ import { WorkbenchCodedError } from "./coded-errors.js";
4
+ export function parseWorkbenchRemoteUrl(rawUrl) {
5
+ const trimmed = rawUrl.trim();
6
+ if (!trimmed) {
7
+ throw new WorkbenchCodedError("remote_invalid_url", "Workbench remote URL must be non-empty.", {
8
+ remediation: "Run workbench remote add --name NAME --url file:///absolute/path or workbench remote add --name NAME --url https://HOST/skills/OWNER/SKILL.",
9
+ exitCode: 2,
10
+ });
11
+ }
12
+ let url;
13
+ try {
14
+ url = new URL(trimmed);
15
+ }
16
+ catch {
17
+ throw new WorkbenchCodedError("remote_invalid_url", `Invalid Workbench remote URL: ${trimmed}`, {
18
+ remediation: "Use file:///absolute/path for local remotes or https://HOST/skills/OWNER/SKILL for Workbench Cloud remotes.",
19
+ subject: { url: trimmed },
20
+ exitCode: 2,
21
+ });
22
+ }
23
+ if (url.protocol === "file:") {
24
+ let filePath;
25
+ try {
26
+ filePath = fileURLToPath(url);
27
+ }
28
+ catch {
29
+ throw new WorkbenchCodedError("remote_invalid_url", `Invalid file Workbench remote URL: ${trimmed}`, {
30
+ remediation: "Use an absolute file URL such as file:///tmp/workbench-remote.",
31
+ subject: { url: trimmed },
32
+ exitCode: 2,
33
+ });
34
+ }
35
+ if (!filePath.startsWith("/")) {
36
+ throw new WorkbenchCodedError("remote_invalid_url", `File Workbench remote must use an absolute path: ${trimmed}`, {
37
+ remediation: "Use file:///absolute/path for local Workbench remotes.",
38
+ subject: { url: trimmed },
39
+ exitCode: 2,
40
+ });
41
+ }
42
+ return { kind: "file", url: url.toString(), path: filePath };
43
+ }
44
+ if (url.protocol !== "https:" && !(url.protocol === "http:" && isLoopbackHost(url.hostname))) {
45
+ throw new WorkbenchCodedError("remote_unsupported_scheme", `Unsupported Workbench remote scheme: ${url.protocol.replace(/:$/u, "")}`, {
46
+ remediation: "Use file:///absolute/path for local remotes or https://HOST/skills/OWNER/SKILL for Workbench Cloud remotes.",
47
+ subject: { url: trimmed, scheme: url.protocol.replace(/:$/u, "") },
48
+ exitCode: 2,
49
+ });
50
+ }
51
+ const segments = url.pathname.split("/").filter(Boolean).map((segment) => decodeURIComponent(segment));
52
+ if (segments.length !== 3 || segments[0] !== "skills") {
53
+ throw new WorkbenchCodedError("remote_invalid_skill_slug", `Workbench Cloud remote must use /skills/OWNER/SKILL: ${trimmed}`, {
54
+ remediation: "Run workbench remote add --name NAME --url https://HOST/skills/OWNER/SKILL.",
55
+ subject: { url: trimmed },
56
+ exitCode: 2,
57
+ });
58
+ }
59
+ const owner = validateRemoteSlug(segments[1], "owner", trimmed);
60
+ const skill = validateRemoteSlug(segments[2], "skill", trimmed);
61
+ url.hash = "";
62
+ url.search = "";
63
+ url.pathname = `/skills/${encodeURIComponent(owner)}/${encodeURIComponent(skill)}`;
64
+ return {
65
+ kind: "workbench-cloud",
66
+ url: url.toString().replace(/\/$/u, ""),
67
+ baseUrl: url.origin,
68
+ owner,
69
+ skill,
70
+ };
71
+ }
72
+ function validateRemoteSlug(value, label, displayUrl) {
73
+ const normalized = normalizeWorkbenchSkillName(value);
74
+ if (!normalized || normalized !== value) {
75
+ throw new WorkbenchCodedError("remote_invalid_skill_slug", `Workbench Cloud remote ${label} must be a URL-safe slug: ${value}`, {
76
+ remediation: "Use lowercase letters, numbers, and single hyphens in Workbench Cloud remote URLs.",
77
+ subject: { url: displayUrl, segment: label, value },
78
+ exitCode: 2,
79
+ });
80
+ }
81
+ return normalized;
82
+ }
83
+ function isLoopbackHost(hostname) {
84
+ const normalized = hostname.toLowerCase().replace(/^\[(.*)\]$/u, "$1");
85
+ return normalized === "localhost" || normalized === "127.0.0.1" || normalized === "::1";
86
+ }
@@ -7,7 +7,7 @@ export interface WorkbenchRuntimeAdapterInstallerFile {
7
7
  export interface WorkbenchRuntimeAdapterInstaller {
8
8
  id: string;
9
9
  source: string;
10
- setup: readonly string[];
10
+ install: readonly string[];
11
11
  files?: readonly WorkbenchRuntimeAdapterInstallerFile[];
12
12
  }
13
13
  export declare function composeRuntimeDockerfileWithAdapterInstallers(dockerfile: string, adapters: readonly WorkbenchRuntimeAdapterInstaller[]): string;
@@ -1 +1 @@
1
- {"version":3,"file":"runtime-dockerfile.d.ts","sourceRoot":"","sources":["../src/runtime-dockerfile.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,oCAAoC;IACnD,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,GAAG,QAAQ,CAAC;IAC7B,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED,MAAM,WAAW,gCAAgC;IAC/C,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,SAAS,MAAM,EAAE,CAAC;IACzB,KAAK,CAAC,EAAE,SAAS,oCAAoC,EAAE,CAAC;CACzD;AAED,wBAAgB,6CAA6C,CAC3D,UAAU,EAAE,MAAM,EAClB,QAAQ,EAAE,SAAS,gCAAgC,EAAE,GACpD,MAAM,CAiCR"}
1
+ {"version":3,"file":"runtime-dockerfile.d.ts","sourceRoot":"","sources":["../src/runtime-dockerfile.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,oCAAoC;IACnD,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,GAAG,QAAQ,CAAC;IAC7B,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED,MAAM,WAAW,gCAAgC;IAC/C,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,SAAS,MAAM,EAAE,CAAC;IAC3B,KAAK,CAAC,EAAE,SAAS,oCAAoC,EAAE,CAAC;CACzD;AAED,wBAAgB,6CAA6C,CAC3D,UAAU,EAAE,MAAM,EAClB,QAAQ,EAAE,SAAS,gCAAgC,EAAE,GACpD,MAAM,CAiCR"}
@@ -1,6 +1,6 @@
1
1
  import path from "node:path";
2
2
  export function composeRuntimeDockerfileWithAdapterInstallers(dockerfile, adapters) {
3
- const installAdapters = adapters.filter((adapter) => adapter.setup.length > 0 || (adapter.files?.length ?? 0) > 0);
3
+ const installAdapters = adapters.filter((adapter) => adapter.install.length > 0 || (adapter.files?.length ?? 0) > 0);
4
4
  if (installAdapters.length === 0) {
5
5
  return dockerfile;
6
6
  }
@@ -8,7 +8,7 @@ export function composeRuntimeDockerfileWithAdapterInstallers(dockerfile, adapte
8
8
  const lines = [
9
9
  dockerfile.trimEnd(),
10
10
  "",
11
- "# Workbench adapter setup. The benchmark Dockerfile owns task dependencies;",
11
+ "# Workbench adapter install commands. The eval Dockerfile owns case dependencies;",
12
12
  "# adapter manifests own adapter runtime dependencies.",
13
13
  "USER root",
14
14
  ];
@@ -19,13 +19,13 @@ export function composeRuntimeDockerfileWithAdapterInstallers(dockerfile, adapte
19
19
  lines.push(...adapterSourceDockerfileLines(adapter));
20
20
  lines.push(`WORKDIR /opt/workbench-adapters/${adapter.id}`);
21
21
  }
22
- for (const command of adapter.setup) {
22
+ for (const command of adapter.install) {
23
23
  lines.push(`RUN ${command}`);
24
24
  }
25
25
  }
26
26
  if (finalUser) {
27
27
  lines.push("");
28
- lines.push(`# Restore benchmark runtime user.`);
28
+ lines.push(`# Restore eval runtime user.`);
29
29
  lines.push(`USER ${finalUser}`);
30
30
  }
31
31
  lines.push("WORKDIR /workspace", "");
@@ -1 +1 @@
1
- {"version":3,"file":"docker.d.ts","sourceRoot":"","sources":["../../src/sandbox-backends/docker.ts"],"names":[],"mappings":"AAyBA,OAAO,KAAK,EACV,8BAA8B,EAC/B,MAAM,+BAA+B,CAAC;AACvC,OAAO,EACL,KAAK,wBAAwB,EAE7B,KAAK,yBAAyB,EAE9B,KAAK,YAAY,EAClB,MAAM,qBAAqB,CAAC;AA6C7B,wBAAgB,oCAAoC,IACjD,wBAAwB,CAY1B;AAED,wBAAgB,wBAAwB,CACtC,IAAI,EAAE,8BAA8B,EACpC,SAAS,EAAE,MAAM,EACjB,SAAS,EAAE,yBAAyB,GACnC,YAAY,CAmDd"}
1
+ {"version":3,"file":"docker.d.ts","sourceRoot":"","sources":["../../src/sandbox-backends/docker.ts"],"names":[],"mappings":"AAyBA,OAAO,KAAK,EACV,8BAA8B,EAC/B,MAAM,+BAA+B,CAAC;AACvC,OAAO,EACL,KAAK,wBAAwB,EAE7B,KAAK,yBAAyB,EAE9B,KAAK,YAAY,EAClB,MAAM,qBAAqB,CAAC;AA8C7B,wBAAgB,oCAAoC,IACjD,wBAAwB,CAY1B;AAED,wBAAgB,wBAAwB,CACtC,IAAI,EAAE,8BAA8B,EACpC,SAAS,EAAE,MAAM,EACjB,SAAS,EAAE,yBAAyB,GACnC,YAAY,CAmDd"}
@@ -17,6 +17,7 @@ const BUILT_IN_ENVIRONMENT_IMAGES = {
17
17
  };
18
18
  const DOCKER_RUNTIME_MOUNT = "/workbench-runtime";
19
19
  const DOCKER_DEFAULT_WORKSPACE = "/workspace";
20
+ const mutableDockerTemplateImageBuilds = new Map();
20
21
  export function createDockerSandboxBackendDescriptor() {
21
22
  return {
22
23
  name: DOCKER_SANDBOX_BACKEND,
@@ -98,18 +99,33 @@ async function prepareDockerTemplateImage(execution, args, execFileAsync) {
98
99
  ]);
99
100
  const sourceHash = args.environmentVersion?.sourceHash?.trim() || createHash("sha256").update(dockerfile).digest("hex");
100
101
  const image = `workbench/sandbox-${safeDockerImageSegment(args.environmentVersion?.id ?? "env")}:${sourceHash.slice(0, 16)}`;
101
- const imageExists = await execFileAsync("docker", ["image", "inspect", image], { maxBuffer: 1024 * 1024 })
102
- .then(() => true, () => false);
103
- if (imageExists) {
102
+ const pending = mutableDockerTemplateImageBuilds.get(image);
103
+ if (pending) {
104
+ return await pending;
105
+ }
106
+ const build = (async () => {
107
+ const imageExists = await execFileAsync("docker", ["image", "inspect", image], { maxBuffer: 1024 * 1024 })
108
+ .then(() => true, () => false);
109
+ if (imageExists) {
110
+ return image;
111
+ }
112
+ const contextRoot = path.join(args.workdir ?? os.tmpdir(), "workbench-docker-environments", sourceHash.slice(0, 32));
113
+ const dockerfilePath = path.join(contextRoot, "Dockerfile");
114
+ await fs.rm(contextRoot, { recursive: true, force: true }).catch(() => undefined);
115
+ await fs.mkdir(contextRoot, { recursive: true });
116
+ await fs.writeFile(dockerfilePath, `${dockerfile}\n`, { mode: 0o600 });
117
+ await execFileAsync("docker", ["build", "-t", image, "-f", dockerfilePath, contextRoot], { maxBuffer: 20 * 1024 * 1024 });
104
118
  return image;
119
+ })();
120
+ mutableDockerTemplateImageBuilds.set(image, build);
121
+ try {
122
+ return await build;
123
+ }
124
+ finally {
125
+ if (mutableDockerTemplateImageBuilds.get(image) === build) {
126
+ mutableDockerTemplateImageBuilds.delete(image);
127
+ }
105
128
  }
106
- const contextRoot = path.join(args.workdir ?? os.tmpdir(), "workbench-docker-environments", sourceHash.slice(0, 32));
107
- const dockerfilePath = path.join(contextRoot, "Dockerfile");
108
- await fs.rm(contextRoot, { recursive: true, force: true }).catch(() => undefined);
109
- await fs.mkdir(contextRoot, { recursive: true });
110
- await fs.writeFile(dockerfilePath, `${dockerfile}\n`, { mode: 0o600 });
111
- await execFileAsync("docker", ["build", "-t", image, "-f", dockerfilePath, contextRoot], { maxBuffer: 20 * 1024 * 1024 });
112
- return image;
113
129
  }
114
130
  async function prepareDockerSandboxWorkspace(args, request, startedAt) {
115
131
  const [{ execFile }, fs, os, path, { promisify }] = await Promise.all([
@@ -168,7 +184,7 @@ async function runDockerSandboxExecution(args, sandbox, execution) {
168
184
  const runtimeImport = readRequiredMetadataString(metadata, "runtimeImport", DOCKER_SANDBOX_BACKEND);
169
185
  const sandboxUid = readRequiredMetadataNumber(metadata, "sandboxUid", DOCKER_SANDBOX_BACKEND);
170
186
  const sandboxGid = readRequiredMetadataNumber(metadata, "sandboxGid", DOCKER_SANDBOX_BACKEND);
171
- const progressTarget = readOptionalProgressTarget(metadata.progressTarget);
187
+ const progressTarget = args.progress ?? readOptionalProgressTarget(metadata.progressTarget);
172
188
  const network = asRuntimeRecord(metadata.network);
173
189
  const resources = execution.policy.resources;
174
190
  const tmpfsSize = dockerSize(resources.diskGb);
@@ -213,6 +229,8 @@ async function runDockerSandboxExecution(args, sandbox, execution) {
213
229
  "--env",
214
230
  "USER=workbench",
215
231
  "--env",
232
+ `PATH=${DOCKER_RUNTIME_MOUNT}/node_modules/.bin:/usr/local/bin:/usr/bin:/bin`,
233
+ "--env",
216
234
  `WORKBENCH_WORKSPACE_ROOT=${workspaceRoot}`,
217
235
  "--env",
218
236
  `WORKBENCH_RUNTIME_IMPORT=${runtimeImport}`,
@@ -564,17 +582,17 @@ function findDockerSourceRoot() {
564
582
  }
565
583
  const cwd = process.cwd();
566
584
  const moduleDir = path.dirname(fileURLToPath(import.meta.url));
567
- const candidates = [
585
+ const roots = [
568
586
  cwd,
569
587
  path.resolve(cwd, ".."),
570
588
  path.resolve(cwd, "../.."),
571
589
  path.resolve(cwd, "../../.."),
572
590
  path.resolve(moduleDir, "../../../../../.."),
573
591
  ];
574
- for (const candidate of candidates) {
575
- if (existsSync(path.join(candidate, "products/workbench/packages/core/worker/sandbox-adapter-runner.cjs")) &&
576
- existsSync(path.join(candidate, "products/workbench/packages/core/src/index.ts"))) {
577
- return candidate;
592
+ for (const root of roots) {
593
+ if (existsSync(path.join(root, "products/workbench/packages/core/worker/sandbox-adapter-runner.cjs")) &&
594
+ existsSync(path.join(root, "products/workbench/packages/core/src/index.ts"))) {
595
+ return root;
578
596
  }
579
597
  }
580
598
  return null;
@@ -32,7 +32,7 @@ export function createWorkbenchSandboxFileStore(args) {
32
32
  };
33
33
  }
34
34
  export function materializeWorkbenchSandboxInput(args, execution, input) {
35
- if (input.name === "candidate") {
35
+ if (input.name === "skill" || input.name === "skills") {
36
36
  return materializedFileInput(input, args.baseFiles);
37
37
  }
38
38
  if (input.name === "case") {
@@ -165,8 +165,8 @@ export async function executionResultFromCompletedSandboxJob(args) {
165
165
  };
166
166
  }
167
167
  export function outputPayloadForContract(output, outputName) {
168
- if (outputName === "candidate_patch") {
169
- return isJsonPayload(output.candidatePatch) ? output.candidatePatch : undefined;
168
+ if (outputName === "skill_patch") {
169
+ return isJsonPayload(output.skillPatch) ? output.skillPatch : undefined;
170
170
  }
171
171
  if (outputName === "result") {
172
172
  return isJsonPayload(output.result) ? output.result : undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"sandbox-plane.d.ts","sourceRoot":"","sources":["../src/sandbox-plane.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,aAAa,EACb,IAAI,EACJ,mBAAmB,EACnB,4BAA4B,EAC5B,0BAA0B,EAC1B,+BAA+B,EAC/B,wBAAwB,EACxB,sBAAsB,EACtB,0BAA0B,EAC1B,iCAAiC,EACjC,sBAAsB,EACvB,MAAM,kCAAkC,CAAC;AAE1C,OAAO,EAGL,KAAK,gCAAgC,EACtC,MAAM,wBAAwB,CAAC;AAEhC,MAAM,WAAW,wBAAwB;IACvC,KAAK,EAAE,0BAA0B,CAAC;IAClC,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,OAAO,GAAG,MAAM,CAAC;IACvB,KAAK,CAAC,EAAE,mBAAmB,EAAE,CAAC;IAC9B,IAAI,CAAC,EAAE,IAAI,CAAC;CACb;AAED,MAAM,WAAW,yBAAyB;IACxC,iBAAiB,CAAC,SAAS,EAAE,sBAAsB,GAAG,OAAO,CAAC,wBAAwB,EAAE,CAAC,CAAC;IAC1F,WAAW,CAAC,UAAU,EAAE,4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utionOutputPayloads, } from "./execution-outputs.js";
2
+ const SANDBOX_SETUP_TTL_BUFFER_MS = 15 * 60_000;
2
3
  export async function executeValidatedSandboxExecution(plane, execution, options) {
3
4
  assertWorkbenchExecutionIsolation(execution);
4
5
  assertSandboxBackendSupportsNetworkPolicy(plane.backend, execution);
@@ -146,7 +147,7 @@ export function createWorkbenchSandboxExecutionMetadata(args) {
146
147
  },
147
148
  capability: {
148
149
  ...args.capability,
149
- candidate: { ...args.capability.candidate },
150
+ skill: { ...args.capability.skill },
150
151
  inputs: args.capability.inputs.map((input) => ({ ...input })),
151
152
  network: { ...args.capability.network },
152
153
  },
@@ -178,7 +179,7 @@ export function collectSandboxHandleScopeIssues(sandbox, allocation, execution)
178
179
  }
179
180
  export function createWorkbenchSandboxAllocation(execution, options) {
180
181
  const nowMs = options.now ? Date.parse(options.now) : Date.now();
181
- const ttlMs = options.ttlMs ?? Math.max(60_000, execution.policy.resources.timeoutMinutes * 60_000 + 60_000);
182
+ const ttlMs = options.ttlMs ?? workbenchSandboxLifetimeTtlMs(execution);
182
183
  const safeExecutionId = execution.id.replace(/[^a-z0-9_]+/giu, "_");
183
184
  const nonce = allocationNonce();
184
185
  return {
@@ -208,14 +209,14 @@ function allocationNonce() {
208
209
  }
209
210
  export function createWorkbenchExecutionCapability(execution, options = {}) {
210
211
  const nowMs = options.now ? Date.parse(options.now) : Date.now();
211
- const ttlMs = options.ttlMs ?? Math.max(60_000, execution.policy.resources.timeoutMinutes * 60_000 + 60_000);
212
+ const ttlMs = options.ttlMs ?? workbenchSandboxLifetimeTtlMs(execution);
212
213
  return {
213
214
  executionId: execution.id,
214
- candidate: {
215
+ skill: {
215
216
  tenantId: execution.policy.tenantId,
216
217
  projectId: execution.projectId,
217
218
  runId: execution.runId,
218
- ...(execution.candidateId ? { candidateId: execution.candidateId } : {}),
219
+ ...(execution.versionId ? { versionId: execution.versionId } : {}),
219
220
  },
220
221
  inputs: execution.inputs.map((input) => ({ ...input })),
221
222
  outputPrefix: options.outputPrefix ?? `executions/${execution.id}/outputs/`,
@@ -223,19 +224,22 @@ export function createWorkbenchExecutionCapability(execution, options = {}) {
223
224
  expiresAt: new Date(nowMs + ttlMs).toISOString(),
224
225
  };
225
226
  }
227
+ function workbenchSandboxLifetimeTtlMs(execution) {
228
+ return Math.max(60_000, execution.policy.resources.timeoutMinutes * 60_000 + SANDBOX_SETUP_TTL_BUFFER_MS);
229
+ }
226
230
  export function collectExecutionCapabilityScopeIssues(capability, execution, options = {}) {
227
231
  const issues = [];
228
232
  if (capability.executionId !== execution.id) {
229
233
  issues.push(`Capability execution id ${capability.executionId} does not match ${execution.id}.`);
230
234
  }
231
- if (capability.candidate.tenantId !== execution.policy.tenantId) {
235
+ if (capability.skill.tenantId !== execution.policy.tenantId) {
232
236
  issues.push(`Capability tenant id does not match execution ${execution.id}.`);
233
237
  }
234
- if (capability.candidate.projectId !== execution.projectId || capability.candidate.runId !== execution.runId) {
238
+ if (capability.skill.projectId !== execution.projectId || capability.skill.runId !== execution.runId) {
235
239
  issues.push(`Capability project/run scope does not match execution ${execution.id}.`);
236
240
  }
237
- if ((capability.candidate.candidateId ?? null) !== (execution.candidateId ?? null)) {
238
- issues.push(`Capability candidate scope does not match execution ${execution.id}.`);
241
+ if ((capability.skill.versionId ?? null) !== (execution.versionId ?? null)) {
242
+ issues.push(`Capability skill version scope does not match execution ${execution.id}.`);
239
243
  }
240
244
  if (!capability.outputPrefix.startsWith(`executions/${execution.id}/`)) {
241
245
  issues.push(`Capability output prefix must be scoped under executions/${execution.id}/.`);
@@ -0,0 +1,8 @@
1
+ import type { SurfaceSnapshotFile, WorkbenchSkillPatch } from "@workbench-ai/workbench-contract";
2
+ export interface ApplyWorkbenchSkillPatchInput {
3
+ baseFiles: readonly SurfaceSnapshotFile[];
4
+ patch: WorkbenchSkillPatch;
5
+ edits: readonly string[];
6
+ }
7
+ export declare function applyWorkbenchSkillPatch(input: ApplyWorkbenchSkillPatchInput): SurfaceSnapshotFile[];
8
+ //# sourceMappingURL=skill-patch.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"skill-patch.d.ts","sourceRoot":"","sources":["../src/skill-patch.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,mBAAmB,EACnB,mBAAmB,EACpB,MAAM,kCAAkC,CAAC;AAE1C,MAAM,WAAW,6BAA6B;IAC5C,SAAS,EAAE,SAAS,mBAAmB,EAAE,CAAC;IAC1C,KAAK,EAAE,mBAAmB,CAAC;IAC3B,KAAK,EAAE,SAAS,MAAM,EAAE,CAAC;CAC1B;AAED,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,6BAA6B,GAAG,mBAAmB,EAAE,CAgDpG"}
@@ -1,24 +1,24 @@
1
- export function applyWorkbenchCandidatePatch(input) {
1
+ export function applyWorkbenchSkillPatch(input) {
2
2
  const issues = [];
3
3
  const edits = input.edits.map(normalizeRelativePath).filter(Boolean);
4
4
  const patchPaths = new Set();
5
5
  for (const file of input.patch.files) {
6
6
  const filePath = normalizeRelativePath(file.path);
7
7
  if (!isSafeRelativePath(filePath)) {
8
- issues.push(`Candidate patch contains unsafe path ${file.path}.`);
8
+ issues.push(`Skill patch contains unsafe path ${file.path}.`);
9
9
  }
10
10
  if (!isAllowedEditPath(filePath, edits)) {
11
- issues.push(`Candidate patch contains path outside improve edits: ${file.path}.`);
11
+ issues.push(`Skill patch contains path outside improve edits: ${file.path}.`);
12
12
  }
13
13
  patchPaths.add(filePath);
14
14
  }
15
15
  for (const fileChange of input.patch.fileChanges) {
16
16
  const filePath = normalizeRelativePath(fileChange);
17
17
  if (!isSafeRelativePath(filePath)) {
18
- issues.push(`Candidate patch fileChanges contains unsafe path ${fileChange}.`);
18
+ issues.push(`Skill patch fileChanges contains unsafe path ${fileChange}.`);
19
19
  }
20
20
  if (!isAllowedEditPath(filePath, edits)) {
21
- issues.push(`Candidate patch fileChanges contains path outside improve edits: ${fileChange}.`);
21
+ issues.push(`Skill patch fileChanges contains path outside improve edits: ${fileChange}.`);
22
22
  }
23
23
  }
24
24
  if (issues.length > 0) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@workbench-ai/workbench-core",
3
- "version": "0.0.67",
3
+ "version": "0.0.69",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/workbench-ai/workbench.git",
@@ -22,8 +22,8 @@
22
22
  ],
23
23
  "dependencies": {
24
24
  "yaml": "^2.8.2",
25
- "@workbench-ai/workbench-contract": "0.0.67",
26
- "@workbench-ai/workbench-protocol": "0.0.67"
25
+ "@workbench-ai/workbench-contract": "0.0.69",
26
+ "@workbench-ai/workbench-protocol": "0.0.69"
27
27
  },
28
28
  "devDependencies": {
29
29
  "@types/node": "^24.3.1",
@@ -214,7 +214,7 @@ function runtimeInputsFromInputBundle(bundle) {
214
214
  }
215
215
  }
216
216
  return {
217
- baseFiles: filesByName.get("candidate") || [],
217
+ baseFiles: filesByName.get("skills") || filesByName.get("skill") || [],
218
218
  engineResolveFiles: filesByName.get("case") || [],
219
219
  traceFiles: filesByName.get("traces") || [],
220
220
  };
@@ -262,7 +262,7 @@ function isJson(value) {
262
262
 
263
263
  function collectExecutionMismatchIssues(jobExecution, execution) {
264
264
  const issues = [];
265
- for (const key of ["id", "projectId", "runId", "candidateId", "purpose"]) {
265
+ for (const key of ["id", "projectId", "runId", "versionId", "purpose"]) {
266
266
  if ((jobExecution[key] ?? null) !== (execution[key] ?? null)) {
267
267
  issues.push(`job execution ${key} does not match request execution ${key}.`);
268
268
  }
@@ -1,8 +0,0 @@
1
- import type { SurfaceSnapshotFile, WorkbenchCandidatePatch } from "@workbench-ai/workbench-contract";
2
- export interface ApplyWorkbenchCandidatePatchInput {
3
- baseFiles: readonly SurfaceSnapshotFile[];
4
- patch: WorkbenchCandidatePatch;
5
- edits: readonly string[];
6
- }
7
- export declare function applyWorkbenchCandidatePatch(input: ApplyWorkbenchCandidatePatchInput): SurfaceSnapshotFile[];
8
- //# sourceMappingURL=candidate-patch.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"candidate-patch.d.ts","sourceRoot":"","sources":["../src/candidate-patch.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,mBAAmB,EACnB,uBAAuB,EACxB,MAAM,kCAAkC,CAAC;AAE1C,MAAM,WAAW,iCAAiC;IAChD,SAAS,EAAE,SAAS,mBAAmB,EAAE,CAAC;IAC1C,KAAK,EAAE,uBAAuB,CAAC;IAC/B,KAAK,EAAE,SAAS,MAAM,EAAE,CAAC;CAC1B;AAED,wBAAgB,4BAA4B,CAAC,KAAK,EAAE,iCAAiC,GAAG,mBAAmB,EAAE,CAgD5G"}
@@ -1,22 +0,0 @@
1
- import type { CandidateCaseReview, RemoteWorkbenchJob, RemoteWorkbenchJobStatus, WorkbenchExecutionEventRole, WorkbenchExecutionSpec, WorkbenchExecutionTrace, WorkbenchExecutionEvidence, WorkbenchTraceSession } from "@workbench-ai/workbench-contract";
2
- export declare function buildCandidateCaseExecutionRefs(args: {
3
- jobs: readonly RemoteWorkbenchJob[];
4
- candidateId: string;
5
- caseId: string;
6
- sampleIndex?: number;
7
- }): CandidateCaseReview["executions"];
8
- export declare function buildWorkbenchExecutionEvidence(args: {
9
- jobs: readonly RemoteWorkbenchJob[];
10
- traceIdPrefix: string;
11
- traceForJob: (job: RemoteWorkbenchJob, role: WorkbenchExecutionEventRole) => WorkbenchExecutionTrace;
12
- traceSessionsForJob?: (job: RemoteWorkbenchJob, role: WorkbenchExecutionEventRole) => WorkbenchTraceSession[];
13
- }): WorkbenchExecutionEvidence[];
14
- export declare function readWorkbenchExecutionPurpose(job: RemoteWorkbenchJob): WorkbenchExecutionSpec["purpose"] | null;
15
- export declare function readWorkbenchExecutionId(job: RemoteWorkbenchJob): string | null;
16
- export declare function readWorkbenchExecutionMetadataString(job: RemoteWorkbenchJob, key: string): string | null;
17
- export declare function readWorkbenchExecutionMetadataNumber(job: RemoteWorkbenchJob, key: string): number | null;
18
- export declare function isWorkbenchExecutionActive(execution: CandidateCaseReview["executions"][number]): boolean;
19
- export declare function resolveWorkbenchJobGroupStatus(jobs: readonly {
20
- status: RemoteWorkbenchJobStatus;
21
- }[]): RemoteWorkbenchJobStatus;
22
- //# sourceMappingURL=execution-evidence.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"execution-evidence.d.ts","sourceRoot":"","sources":["../src/execution-evidence.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,mBAAmB,EACnB,kBAAkB,EAClB,wBAAwB,EAExB,2BAA2B,EAC3B,sBAAsB,EACtB,uBAAuB,EACvB,0BAA0B,EAC1B,qBAAqB,EACtB,MAAM,kCAAkC,CAAC;AAI1C,wBAAgB,+BAA+B,CAAC,IAAI,EAAE;IACpD,IAAI,EAAE,SAAS,kBAAkB,EAAE,CAAC;IACpC,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,GAAG,mBAAmB,CAAC,YAAY,CAAC,CAgEpC;AAED,wBAAgB,+BAA+B,CAAC,IAAI,EAAE;IACpD,IAAI,EAAE,SAAS,kBAAkB,EAAE,CAAC;IACpC,aAAa,EAAE,MAAM,CAAC;IACtB,WAAW,EAAE,CACX,GAAG,EAAE,kBAAkB,EACvB,IAAI,EAAE,2BAA2B,KAC9B,uBAAuB,CAAC;IAC7B,mBAAmB,CAAC,EAAE,CACpB,GAAG,EAAE,kBAAkB,EACvB,IAAI,EAAE,2BAA2B,KAC9B,qBAAqB,EAAE,CAAC;CAC9B,GAAG,0BAA0B,EAAE,CAgF/B;AAED,wBAAgB,6BAA6B,CAC3C,GAAG,EAAE,kBAAkB,GACtB,sBAAsB,CAAC,SAAS,CAAC,GAAG,IAAI,CAQ1C;AAED,wBAAgB,wBAAwB,CAAC,GAAG,EAAE,kBAAkB,GAAG,MAAM,GAAG,IAAI,CAG/E;AAED,wBAAgB,oCAAoC,CAClD,GAAG,EAAE,kBAAkB,EACvB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