@workbench-ai/workbench 0.0.72 → 0.0.73

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 (2) hide show
  1. package/dist/index.js +15 -10
  2. package/package.json +6 -6
package/dist/index.js CHANGED
@@ -1044,6 +1044,7 @@ async function pathExists(filePath) {
1044
1044
  }
1045
1045
  async function startCloudExecution(command, parsed, io) {
1046
1046
  const root = dirFlag(parsed) ?? process.cwd();
1047
+ const showProgress = parsed.flags.json !== true;
1047
1048
  const remote = await ensureCloudRemoteForExecution(root, parsed);
1048
1049
  const source = parseWorkbenchInstallSource(remote.url);
1049
1050
  if (!source) {
@@ -1061,9 +1062,9 @@ async function startCloudExecution(command, parsed, io) {
1061
1062
  });
1062
1063
  }
1063
1064
  const core = { dir: root, authToken: token };
1064
- writeCloudProgress(io, `workbench cloud: syncing ${remote.name} before hosted ${command}.`);
1065
+ writeCloudProgress(io, `workbench cloud: syncing ${remote.name} before hosted ${command}.`, showProgress);
1065
1066
  const syncBefore = await syncWorkbenchRemote({ ...core, remote: remote.name });
1066
- writeCloudProgress(io, `workbench cloud: synced ${remote.name} before hosted ${command} (pushed=${syncBefore.pushed}, pulled=${syncBefore.pulled}, up-to-date=${syncBefore.upToDate}).`);
1067
+ writeCloudProgress(io, `workbench cloud: synced ${remote.name} before hosted ${command} (pushed=${syncBefore.pushed}, pulled=${syncBefore.pulled}, up-to-date=${syncBefore.upToDate}).`, showProgress);
1067
1068
  const startSnapshot = await createWorkbenchReadOnlyInspectionSnapshot(core);
1068
1069
  const skillId = await resolveCloudSkillId(source);
1069
1070
  const response = await apiRequest(`/api/workbench/skills/${encodeURIComponent(skillId)}${command === "improve" ? "/improve" : "/runs"}`, { method: "POST", body: cloudExecutionRequestBody(command, parsed) }, source.baseUrl);
@@ -1077,14 +1078,15 @@ async function startCloudExecution(command, parsed, io) {
1077
1078
  });
1078
1079
  }
1079
1080
  const initialRunIds = runs.map((run) => run.id);
1080
- writeCloudProgress(io, `workbench cloud: scheduled hosted ${command} on ${remote.url} (${formatCloudRunStatuses(runs)}).`);
1081
+ writeCloudProgress(io, `workbench cloud: scheduled hosted ${command} on ${remote.url} (${formatCloudRunStatuses(runs)}).`, showProgress);
1081
1082
  const initialSyncAfter = await syncWorkbenchRemote({ ...core, remote: remote.name });
1082
- writeCloudProgress(io, `workbench cloud: synced after scheduling hosted ${command} (pushed=${initialSyncAfter.pushed}, pulled=${initialSyncAfter.pulled}, up-to-date=${initialSyncAfter.upToDate}).`);
1083
- writeCloudProgress(io, `workbench cloud: waiting for terminal status; press Ctrl-C to detach and resume with workbench status or workbench show ${displayRef(initialRunIds[0] ?? "run")}.`);
1083
+ writeCloudProgress(io, `workbench cloud: synced after scheduling hosted ${command} (pushed=${initialSyncAfter.pushed}, pulled=${initialSyncAfter.pulled}, up-to-date=${initialSyncAfter.upToDate}).`, showProgress);
1084
+ writeCloudProgress(io, `workbench cloud: waiting for terminal status; press Ctrl-C to detach and resume with workbench status or workbench show ${displayRef(initialRunIds[0] ?? "run")}.`, showProgress);
1084
1085
  const completed = await waitForCloudRuns({
1085
1086
  command,
1086
1087
  core,
1087
1088
  io,
1089
+ progress: showProgress,
1088
1090
  remote,
1089
1091
  runs,
1090
1092
  initialSync: initialSyncAfter,
@@ -1123,7 +1125,7 @@ async function waitForCloudRuns(input) {
1123
1125
  let interrupted = false;
1124
1126
  const onSigint = () => {
1125
1127
  interrupted = true;
1126
- writeCloudProgress(input.io, `workbench cloud: detaching from hosted ${input.command} (${runIds.map(displayRef).join(", ")}).`);
1128
+ writeCloudProgress(input.io, `workbench cloud: detaching from hosted ${input.command} (${runIds.map(displayRef).join(", ")}).`, input.progress);
1127
1129
  };
1128
1130
  process.once("SIGINT", onSigint);
1129
1131
  const seenStatuses = new Map();
@@ -1141,11 +1143,11 @@ async function waitForCloudRuns(input) {
1141
1143
  const previous = seenStatuses.get(run.id);
1142
1144
  if (previous !== run.status) {
1143
1145
  seenStatuses.set(run.id, run.status);
1144
- writeCloudProgress(input.io, `workbench cloud: ${displayRef(run.id)} is ${run.status}.`);
1146
+ writeCloudProgress(input.io, `workbench cloud: ${displayRef(run.id)} is ${run.status}.`, input.progress);
1145
1147
  }
1146
1148
  }
1147
1149
  if (runs.length === runIds.length && runs.every(isTerminalRun)) {
1148
- writeCloudProgress(input.io, `workbench cloud: hosted ${input.command} finished (${formatCloudRunStatuses(runs)}).`);
1150
+ writeCloudProgress(input.io, `workbench cloud: hosted ${input.command} finished (${formatCloudRunStatuses(runs)}).`, input.progress);
1149
1151
  return { runs, sync };
1150
1152
  }
1151
1153
  if (interrupted) {
@@ -1167,7 +1169,7 @@ async function waitForCloudRuns(input) {
1167
1169
  return { runs, sync, detached: true };
1168
1170
  }
1169
1171
  sync = await syncWorkbenchRemote({ ...input.core, remote: input.remote.name });
1170
- writeCloudProgress(input.io, `workbench cloud: synced ${input.remote.name} while waiting (${formatCloudRunStatuses(runs)}).`);
1172
+ writeCloudProgress(input.io, `workbench cloud: synced ${input.remote.name} while waiting (${formatCloudRunStatuses(runs)}).`, input.progress);
1171
1173
  }
1172
1174
  }
1173
1175
  finally {
@@ -1322,7 +1324,10 @@ function cloudExecutionSummary(started) {
1322
1324
  sync: started.sync,
1323
1325
  };
1324
1326
  }
1325
- function writeCloudProgress(io, message) {
1327
+ function writeCloudProgress(io, message, enabled = true) {
1328
+ if (!enabled) {
1329
+ return;
1330
+ }
1326
1331
  io.stderr.write(`${message}\n`);
1327
1332
  }
1328
1333
  function formatCloudRunStatuses(runs) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@workbench-ai/workbench",
3
- "version": "0.0.72",
3
+ "version": "0.0.73",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/workbench-ai/workbench.git",
@@ -21,10 +21,10 @@
21
21
  ],
22
22
  "dependencies": {
23
23
  "yaml": "^2.8.2",
24
- "@workbench-ai/workbench-built-in-adapters": "0.0.72",
25
- "@workbench-ai/workbench-contract": "0.0.72",
26
- "@workbench-ai/workbench-core": "0.0.72",
27
- "@workbench-ai/workbench-protocol": "0.0.72"
24
+ "@workbench-ai/workbench-built-in-adapters": "0.0.73",
25
+ "@workbench-ai/workbench-protocol": "0.0.73",
26
+ "@workbench-ai/workbench-contract": "0.0.73",
27
+ "@workbench-ai/workbench-core": "0.0.73"
28
28
  },
29
29
  "devDependencies": {
30
30
  "@tailwindcss/postcss": "^4.2.2",
@@ -35,7 +35,7 @@
35
35
  "react-dom": "^19.2.0",
36
36
  "typescript": "^5.9.2",
37
37
  "vitest": "^3.2.4",
38
- "@workbench-ai/workbench-ui": "0.0.72"
38
+ "@workbench-ai/workbench-ui": "0.0.73"
39
39
  },
40
40
  "scripts": {
41
41
  "build": "rm -rf dist && tsc -p tsconfig.json && chmod 755 dist/workbench.js && node ./scripts/build-dev-open-assets.mjs",