@workbench-ai/workbench-protocol 0.0.43 → 0.0.45

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.
@@ -1,14 +1,26 @@
1
1
  import YAML from "yaml";
2
+ export const WORKBENCH_ADAPTER_MANIFEST_PROTOCOL = "workbench.adapter.v3";
2
3
  export function adapterCommandName(adapterId) {
3
4
  return `workbench-adapter-${adapterId}`;
4
5
  }
6
+ export function workbenchAdapterManifestSupportsOperation(manifest, operation) {
7
+ return manifest.operations[normalizeWorkbenchAdapterOperation(operation, "adapter operation")] !== undefined;
8
+ }
9
+ export function workbenchAdapterOperationCommand(manifest, operation) {
10
+ const normalizedOperation = normalizeWorkbenchAdapterOperation(operation, "adapter operation");
11
+ const operationManifest = manifest.operations[normalizedOperation];
12
+ if (!operationManifest) {
13
+ throw new Error(`Adapter ${manifest.id} does not implement ${normalizedOperation}.`);
14
+ }
15
+ return operationManifest.command;
16
+ }
5
17
  export function cloneWorkbenchAdapterManifest(manifest) {
6
18
  return {
7
19
  ...manifest,
8
- ...(manifest.capabilities ? { capabilities: [...manifest.capabilities] } : {}),
20
+ operations: cloneJson(manifest.operations),
9
21
  setup: [...manifest.setup],
10
22
  ...(manifest.auth ? { auth: cloneJson(manifest.auth) } : {}),
11
- ...(manifest.refs ? { refs: [...manifest.refs] } : {}),
23
+ ...(manifest.slots ? { slots: cloneJson(manifest.slots) } : {}),
12
24
  };
13
25
  }
14
26
  export function parseWorkbenchAdapterManifest(source, label = "workbench.adapter.yaml") {
@@ -17,42 +29,78 @@ export function parseWorkbenchAdapterManifest(source, label = "workbench.adapter
17
29
  throw new Error(`${label} must be a YAML object.`);
18
30
  }
19
31
  const record = parsed;
20
- rejectUnknownManifestKeys(record, label, ["id", "protocol", "capabilities", "setup", "command", "auth", "refs"]);
32
+ rejectUnknownManifestKeys(record, label, ["id", "protocol", "operations", "setup", "auth", "slots"]);
21
33
  const id = readAdapterId(record.id, `${label}.id`);
22
- if (record.protocol !== "workbench.adapter.v1") {
23
- throw new Error(`${label}.protocol must be workbench.adapter.v1.`);
34
+ if (record.protocol !== WORKBENCH_ADAPTER_MANIFEST_PROTOCOL) {
35
+ throw new Error(`${label}.protocol must be ${WORKBENCH_ADAPTER_MANIFEST_PROTOCOL}.`);
24
36
  }
25
- const command = typeof record.command === "string" && record.command.trim()
26
- ? record.command.trim()
27
- : adapterCommandName(id);
28
37
  const setup = record.setup === undefined
29
38
  ? []
30
39
  : readStringArray(record.setup, `${label}.setup`);
31
- const capabilities = record.capabilities === undefined
32
- ? undefined
33
- : readAdapterCapabilities(record.capabilities, `${label}.capabilities`);
34
- const refs = record.refs === undefined
40
+ const operations = readAdapterOperations(record.operations, `${label}.operations`, id);
41
+ const slots = record.slots === undefined
35
42
  ? undefined
36
- : readAdapterRefs(record.refs, `${label}.refs`);
43
+ : readAdapterSlots(record.slots, `${label}.slots`);
37
44
  const auth = readAuth(record.auth, `${label}.auth`);
38
45
  return {
39
46
  id,
40
- protocol: "workbench.adapter.v1",
41
- ...(capabilities ? { capabilities } : {}),
47
+ protocol: WORKBENCH_ADAPTER_MANIFEST_PROTOCOL,
48
+ operations,
42
49
  setup,
43
- command,
44
50
  ...(auth ? { auth } : {}),
45
- ...(refs ? { refs } : {}),
51
+ ...(slots ? { slots } : {}),
46
52
  };
47
53
  }
48
- function readAdapterCapabilities(value, label) {
49
- const allowed = new Set(["task-source", "runner", "scorer", "optimizer"]);
50
- return readStringArray(value, label).map((entry, index) => {
51
- if (!allowed.has(entry)) {
52
- throw new Error(`${label}[${index}] must be task-source, runner, scorer, or optimizer.`);
54
+ function readAdapterOperations(value, label, adapterId) {
55
+ if (!value || typeof value !== "object" || Array.isArray(value)) {
56
+ throw new Error(`${label} must be an object.`);
57
+ }
58
+ const operations = {};
59
+ for (const [operation, rawConfig] of Object.entries(value).sort()) {
60
+ const normalizedOperation = readAdapterOperation(operation, `${label}.${operation}`);
61
+ if (!rawConfig || typeof rawConfig !== "object" || Array.isArray(rawConfig)) {
62
+ throw new Error(`${label}.${operation} must be an object.`);
53
63
  }
54
- return entry;
55
- });
64
+ const config = rawConfig;
65
+ rejectUnknownManifestKeys(config, `${label}.${operation}`, ["command"]);
66
+ if (operations[normalizedOperation]) {
67
+ throw new Error(`${label} declares ${normalizedOperation} more than once.`);
68
+ }
69
+ operations[normalizedOperation] = {
70
+ command: config.command === undefined
71
+ ? adapterCommandName(adapterId)
72
+ : readNonEmptyString(config.command, `${label}.${operation}.command`),
73
+ };
74
+ }
75
+ if (Object.keys(operations).length === 0) {
76
+ throw new Error(`${label} must declare at least one operation.`);
77
+ }
78
+ return operations;
79
+ }
80
+ function readAdapterSlots(value, label) {
81
+ if (!value || typeof value !== "object" || Array.isArray(value)) {
82
+ throw new Error(`${label} must be an object.`);
83
+ }
84
+ const slots = {};
85
+ for (const [slot, rawConfig] of Object.entries(value).sort()) {
86
+ if (!/^[a-z][a-z0-9-]*$/u.test(slot)) {
87
+ throw new Error(`${label} keys must be lowercase adapter slot names.`);
88
+ }
89
+ if (!rawConfig || typeof rawConfig !== "object" || Array.isArray(rawConfig)) {
90
+ throw new Error(`${label}.${slot} must be an object.`);
91
+ }
92
+ const config = rawConfig;
93
+ rejectUnknownManifestKeys(config, `${label}.${slot}`, ["path", "operation"]);
94
+ const slotPath = readJsonPointer(config.path, `${label}.${slot}.path`);
95
+ slots[slot] = {
96
+ path: slotPath,
97
+ operation: readAdapterOperation(config.operation, `${label}.${slot}.operation`),
98
+ };
99
+ }
100
+ if (Object.keys(slots).length === 0) {
101
+ throw new Error(`${label} must include at least one slot.`);
102
+ }
103
+ return slots;
56
104
  }
57
105
  export function workbenchAdapterManifestRequiresAuth(manifest) {
58
106
  return defaultWorkbenchAdapterAuthForManifest(manifest) !== undefined;
@@ -68,6 +116,66 @@ export function collectWorkbenchAdapterInvocations(roots, manifests) {
68
116
  }
69
117
  return collected;
70
118
  }
119
+ export function collectWorkbenchAdapterOperationRequirements(roots, manifests) {
120
+ const manifestById = manifestMap(manifests);
121
+ const collected = [];
122
+ const queue = roots.flatMap((root) => {
123
+ const invocation = normalizeInvocationLike(root.invocation);
124
+ return invocation ? [{
125
+ invocation,
126
+ operation: normalizeWorkbenchAdapterOperation(root.operation, "adapter operation requirement"),
127
+ }] : [];
128
+ });
129
+ while (queue.length > 0) {
130
+ const requirement = queue.shift();
131
+ collected.push(requirement);
132
+ const manifest = manifestById.get(requirement.invocation.use);
133
+ const slots = manifest?.slots ? Object.values(manifest.slots) : [];
134
+ if (slots.length === 0) {
135
+ continue;
136
+ }
137
+ const config = invocationConfig(requirement.invocation);
138
+ for (const slot of slots) {
139
+ const value = readJsonPointerValue(config, slot.path);
140
+ if (Array.isArray(value)) {
141
+ for (const entry of value) {
142
+ const nested = normalizeInvocationLike(entry);
143
+ if (nested) {
144
+ queue.push({ invocation: nested, operation: slot.operation });
145
+ }
146
+ }
147
+ continue;
148
+ }
149
+ const nested = normalizeInvocationLike(value);
150
+ if (nested) {
151
+ queue.push({ invocation: nested, operation: slot.operation });
152
+ }
153
+ }
154
+ }
155
+ return collected;
156
+ }
157
+ export function collectWorkbenchAdapterOperationIssues(roots, manifests) {
158
+ const manifestById = manifestMap(manifests);
159
+ const issues = new Map();
160
+ for (const requirement of collectWorkbenchAdapterOperationRequirements(roots, manifestById)) {
161
+ const manifest = manifestById.get(requirement.invocation.use);
162
+ const key = `${requirement.invocation.use}:${requirement.operation}`;
163
+ if (!manifest) {
164
+ issues.set(key, `Adapter ${requirement.invocation.use} is referenced but is not installed.`);
165
+ continue;
166
+ }
167
+ if (!workbenchAdapterManifestSupportsOperation(manifest, requirement.operation)) {
168
+ issues.set(key, `Adapter ${requirement.invocation.use} does not implement ${requirement.operation}.`);
169
+ }
170
+ }
171
+ return [...issues.values()];
172
+ }
173
+ export function assertWorkbenchAdapterOperationSupport(roots, manifests) {
174
+ const issues = collectWorkbenchAdapterOperationIssues(roots, manifests);
175
+ if (issues.length > 0) {
176
+ throw new Error(issues.join("\n"));
177
+ }
178
+ }
71
179
  export function collectWorkbenchAdapterAuthRequirements(roots, manifests) {
72
180
  const manifestById = manifestMap(manifests);
73
181
  const targets = new Map();
@@ -86,18 +194,17 @@ export function collectWorkbenchAdapterAuthRequirements(roots, manifests) {
86
194
  export function withDefaultWorkbenchAdapterAuthProfiles(spec, manifests) {
87
195
  const manifestById = manifestMap(manifests);
88
196
  const clone = cloneJson(spec);
89
- if (clone.improve) {
90
- clone.improve = withDefaultWorkbenchAdapterAuth(clone.improve, manifestById);
91
- }
92
- clone.run = withDefaultWorkbenchAdapterAuth(clone.run, manifestById);
93
- if (clone.score) {
94
- clone.score = withDefaultWorkbenchAdapterAuth(clone.score, manifestById);
95
- }
96
- if (clone.grade) {
97
- clone.grade = withDefaultWorkbenchAdapterAuth(clone.grade, manifestById);
98
- }
197
+ applyInvocationDefault(clone, "engine", manifestById);
198
+ applyInvocationDefault(clone, "run", manifestById);
199
+ applyInvocationDefault(clone, "improve", manifestById);
99
200
  return clone;
100
201
  }
202
+ function applyInvocationDefault(record, key, manifestById) {
203
+ const invocation = normalizeInvocationLike(record[key]);
204
+ if (invocation) {
205
+ record[key] = withDefaultWorkbenchAdapterAuth(invocation, manifestById);
206
+ }
207
+ }
101
208
  export function withDefaultWorkbenchAdapterAuth(invocation, manifests) {
102
209
  return applyDefaultWorkbenchAdapterAuth(cloneJson(invocation), manifestMap(manifests));
103
210
  }
@@ -109,12 +216,13 @@ function applyDefaultWorkbenchAdapterAuth(invocation, manifestById) {
109
216
  invocation.auth = defaultAuth;
110
217
  }
111
218
  }
112
- if (!manifest?.refs?.length) {
219
+ const slots = manifest?.slots ? Object.values(manifest.slots) : [];
220
+ if (slots.length === 0) {
113
221
  return invocation;
114
222
  }
115
223
  const config = invocationConfig(invocation);
116
- for (const pointer of manifest.refs) {
117
- const value = readJsonPointer(config, pointer);
224
+ for (const slot of slots) {
225
+ const value = readJsonPointerValue(config, slot.path);
118
226
  if (Array.isArray(value)) {
119
227
  for (let index = 0; index < value.length; index += 1) {
120
228
  const nested = normalizeInvocationLike(value[index]);
@@ -126,7 +234,7 @@ function applyDefaultWorkbenchAdapterAuth(invocation, manifestById) {
126
234
  }
127
235
  const nested = normalizeInvocationLike(value);
128
236
  if (nested) {
129
- const parent = readJsonPointerParent(config, pointer);
237
+ const parent = readJsonPointerParent(config, slot.path);
130
238
  if (parent) {
131
239
  const withDefaults = applyDefaultWorkbenchAdapterAuth(nested, manifestById);
132
240
  if (Array.isArray(parent.container) && typeof parent.key === "number") {
@@ -142,12 +250,13 @@ function applyDefaultWorkbenchAdapterAuth(invocation, manifestById) {
142
250
  }
143
251
  function nestedWorkbenchAdapterInvocations(invocation, manifestById) {
144
252
  const manifest = manifestById.get(invocation.use);
145
- if (!manifest?.refs?.length) {
253
+ const slots = manifest?.slots ? Object.values(manifest.slots) : [];
254
+ if (slots.length === 0) {
146
255
  return [];
147
256
  }
148
257
  const config = invocationConfig(invocation);
149
- return manifest.refs.flatMap((pointer) => {
150
- const value = readJsonPointer(config, pointer);
258
+ return slots.flatMap((slot) => {
259
+ const value = readJsonPointerValue(config, slot.path);
151
260
  if (Array.isArray(value)) {
152
261
  return value.map((entry) => normalizeInvocationLike(entry)).filter(isInvocationLike);
153
262
  }
@@ -235,7 +344,7 @@ function normalizeInvocationLike(value) {
235
344
  function isInvocationLike(value) {
236
345
  return value !== null;
237
346
  }
238
- function readJsonPointer(root, pointer) {
347
+ function readJsonPointerValue(root, pointer) {
239
348
  if (pointer === "") {
240
349
  return root;
241
350
  }
@@ -266,7 +375,7 @@ function readJsonPointerParent(root, pointer) {
266
375
  }
267
376
  const rawSegments = pointer.slice(1).split("/");
268
377
  const last = decodeJsonPointerSegment(rawSegments.pop());
269
- const parent = readJsonPointer(root, rawSegments.length === 0 ? "" : `/${rawSegments.join("/")}`);
378
+ const parent = readJsonPointerValue(root, rawSegments.length === 0 ? "" : `/${rawSegments.join("/")}`);
270
379
  if (Array.isArray(parent)) {
271
380
  const index = Number(last);
272
381
  return Number.isInteger(index) && index >= 0 && index < parent.length
@@ -302,14 +411,24 @@ function readStringArray(value, label) {
302
411
  }
303
412
  return value.map((entry) => entry.trim());
304
413
  }
305
- function readAdapterRefs(value, label) {
306
- const refs = readStringArray(value, label);
307
- for (const ref of refs) {
308
- if (ref !== "" && !ref.startsWith("/")) {
309
- throw new Error(`${label} entries must be JSON pointers.`);
310
- }
414
+ function readAdapterOperation(value, label) {
415
+ return normalizeWorkbenchAdapterOperation(value, label);
416
+ }
417
+ export function normalizeWorkbenchAdapterOperation(value, label) {
418
+ if (value === "engine.resolve" ||
419
+ value === "engine.run" ||
420
+ value === "subject.run" ||
421
+ value === "optimizer.improve") {
422
+ return value;
423
+ }
424
+ throw new Error(`${label} must be engine.resolve, engine.run, subject.run, or optimizer.improve.`);
425
+ }
426
+ function readJsonPointer(value, label) {
427
+ const pointer = readNonEmptyString(value, label);
428
+ if (pointer !== "" && !pointer.startsWith("/")) {
429
+ throw new Error(`${label} must be a JSON pointer.`);
311
430
  }
312
- return refs;
431
+ return pointer;
313
432
  }
314
433
  function readAuth(value, label) {
315
434
  if (value === undefined) {
@@ -1,65 +1,76 @@
1
- import type { Json, UsageSummary, WorkbenchExecutionSpec } from "@workbench-ai/workbench-contract";
2
- export interface WorkbenchAdapterCommandRequest {
3
- protocol: "workbench.adapter.v1";
4
- execution: {
5
- id: string;
6
- jobId?: string;
7
- purpose: WorkbenchExecutionSpec["purpose"];
8
- role: "optimizer" | "runner" | "grader";
9
- candidateId?: string;
10
- trialIndex?: number;
11
- sampleIndex?: number;
12
- caseId?: string;
13
- };
14
- adapter: {
1
+ import type { Json, UsageSummary, WorkbenchResult, WorkbenchSubjectPatch } from "@workbench-ai/workbench-contract";
2
+ import { type WorkbenchEngineResolveResult } from "./engine-resolve-result.ts";
3
+ import type { WorkbenchAdapterOperation } from "./adapter-manifest.ts";
4
+ export declare const WORKBENCH_ADAPTER_PROTOCOL = "workbench.adapter.v3";
5
+ export declare const WORKBENCH_ADAPTER_RESULT_PROTOCOL = "workbench.adapter-result.v1";
6
+ export declare const WORKBENCH_ADAPTER_RESULT_FILE = "workbench-result.json";
7
+ export interface WorkbenchAdapterOperationRequest {
8
+ protocol: typeof WORKBENCH_ADAPTER_PROTOCOL;
9
+ id: string;
10
+ jobId?: string;
11
+ operation: WorkbenchAdapterOperation;
12
+ invocation: {
15
13
  use: string;
16
14
  with?: Json;
17
15
  auth?: Json;
18
16
  };
19
17
  auth?: Json;
20
- benchmark?: {
21
- name?: string;
22
- description?: string;
23
- };
24
- candidate?: {
25
- path?: string;
26
- };
27
- optimizer?: {
28
- edits?: string[];
29
- };
30
- task?: {
31
- text?: string;
18
+ context?: {
19
+ benchmark?: {
20
+ name?: string;
21
+ description?: string;
22
+ };
23
+ subject?: {
24
+ id?: string;
25
+ path?: string;
26
+ run?: {
27
+ use: string;
28
+ with?: Json;
29
+ auth?: Json;
30
+ command?: string;
31
+ };
32
+ };
33
+ optimizer?: {
34
+ edits?: string[];
35
+ };
36
+ attempt?: {
37
+ attemptIndex?: number;
38
+ sampleIndex?: number;
39
+ caseId?: string;
40
+ };
41
+ case?: {
42
+ id?: string;
43
+ prompt?: string;
44
+ };
32
45
  };
33
- expectedOutputs?: Array<{
34
- name?: string;
35
- path?: string;
36
- }>;
37
46
  paths: {
38
47
  workspace: string;
39
- input?: string;
40
48
  output: string;
41
- candidate?: string;
42
- task?: string;
43
- runnerOutput?: string;
49
+ result: string;
50
+ case?: string;
44
51
  traces?: string;
45
52
  cwd?: string;
46
53
  subject?: string;
47
- tests?: string;
54
+ enginePrivate?: string;
48
55
  logs?: string;
49
- artifacts?: string;
50
- scorecard?: string;
51
56
  };
52
57
  }
53
- export interface WorkbenchAdapterResultMetadata {
58
+ export type WorkbenchAdapterOperationResultValue = WorkbenchEngineResolveResult | WorkbenchResult | WorkbenchSubjectPatch | Json | null;
59
+ export interface WorkbenchAdapterOperationResult<TValue extends WorkbenchAdapterOperationResultValue = WorkbenchAdapterOperationResultValue> {
60
+ protocol: typeof WORKBENCH_ADAPTER_RESULT_PROTOCOL;
61
+ operation: WorkbenchAdapterOperation;
54
62
  ok?: boolean;
63
+ value?: TValue;
55
64
  summary?: string;
56
65
  feedback?: Json;
57
66
  usage?: UsageSummary;
58
67
  }
59
- export declare function readWorkbenchAdapterCommandRequest(configuredPath?: string): Promise<WorkbenchAdapterCommandRequest>;
60
- export declare function normalizeWorkbenchAdapterCommandRequest(value: unknown): WorkbenchAdapterCommandRequest;
61
- export declare function ensureWorkbenchAdapterOutputDir(request: WorkbenchAdapterCommandRequest): Promise<void>;
62
- export declare function workbenchAdapterResultPath(outputRoot: string): string;
63
- export declare function writeWorkbenchAdapterResultMetadata(outputRoot: string, result: WorkbenchAdapterResultMetadata): Promise<void>;
64
- export declare function readWorkbenchAdapterResultMetadata(outputRoot: string): Promise<WorkbenchAdapterResultMetadata>;
68
+ export declare function readWorkbenchAdapterOperationRequest(configuredPath?: string): Promise<WorkbenchAdapterOperationRequest>;
69
+ export declare function normalizeWorkbenchAdapterOperationRequest(value: unknown): WorkbenchAdapterOperationRequest;
70
+ export declare function ensureWorkbenchAdapterOutputDir(request: WorkbenchAdapterOperationRequest): Promise<void>;
71
+ export declare function workbenchAdapterOperationResultPath(outputRoot: string): string;
72
+ export declare function writeWorkbenchAdapterOperationResult<TValue extends WorkbenchAdapterOperationResultValue>(outputRoot: string, result: WorkbenchAdapterOperationResult<TValue>): Promise<void>;
73
+ export declare function readWorkbenchAdapterOperationResult(outputRoot: string, operation?: WorkbenchAdapterOperation): Promise<WorkbenchAdapterOperationResult>;
74
+ export declare function normalizeWorkbenchAdapterOperationResult(value: unknown, operation?: WorkbenchAdapterOperation): WorkbenchAdapterOperationResult;
75
+ export declare function assertWorkbenchAdapterOperationResultOk(result: WorkbenchAdapterOperationResult, label?: string): void;
65
76
  //# sourceMappingURL=adapter-protocol.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"adapter-protocol.d.ts","sourceRoot":"","sources":["../src/adapter-protocol.ts"],"names":[],"mappings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