@workbench-ai/workbench 0.0.98 → 0.0.100

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.
package/dist/index.js CHANGED
@@ -419,7 +419,7 @@ export async function runCli(argv, io = {
419
419
  ? undefined
420
420
  : await runEvidenceFingerprints(core).catch(() => undefined);
421
421
  if (parsed.flags["dry-run"] !== true) {
422
- writeCliProgress(io, `workbench sync: syncing ${optionalPositional(parsed, 1) ?? "default remote"}.`);
422
+ writeCliProgress(parsed, io, `workbench sync: syncing ${optionalPositional(parsed, 1) ?? "default remote"}.`);
423
423
  }
424
424
  const result = await syncWorkbenchRemote({
425
425
  ...core,
@@ -463,9 +463,9 @@ export async function runCli(argv, io = {
463
463
  let remote;
464
464
  let result;
465
465
  try {
466
- writeCliProgress(io, "workbench publish: preparing Cloud skill.");
466
+ writeCliProgress(parsed, io, "workbench publish: preparing Cloud skill.");
467
467
  remote = await ensurePublishRemote(parsed);
468
- writeCliProgress(io, `workbench publish: publishing ${optionalPositional(parsed, 1) ?? "current"} source.`);
468
+ writeCliProgress(parsed, io, `workbench publish: publishing ${optionalPositional(parsed, 1) ?? "current"} source.`);
469
469
  result = await publishWorkbenchVersion({
470
470
  ...core,
471
471
  version: optionalPositional(parsed, 1),
@@ -1599,7 +1599,10 @@ function writeCloudProgress(io, message, enabled = true) {
1599
1599
  }
1600
1600
  io.stderr.write(`${message}\n`);
1601
1601
  }
1602
- function writeCliProgress(io, message) {
1602
+ function writeCliProgress(parsed, io, message) {
1603
+ if (parsed.flags.json === true) {
1604
+ return;
1605
+ }
1603
1606
  io.stderr.write(`${message}\n`);
1604
1607
  }
1605
1608
  function formatCloudRunStatuses(runs) {
@@ -3046,6 +3049,7 @@ async function statusWithCausalNext(status, auth, core, machine) {
3046
3049
  };
3047
3050
  }
3048
3051
  const snapshot = await createWorkbenchReadOnlyInspectionSnapshot(core).catch(() => null);
3052
+ const currentVersionId = status.project.currentVersionId ?? snapshot?.status.currentVersionId ?? snapshot?.refs.current;
3049
3053
  const lastRun = snapshot?.runs
3050
3054
  .slice()
3051
3055
  .sort((left, right) => right.createdAt.localeCompare(left.createdAt))[0];
@@ -3054,8 +3058,11 @@ async function statusWithCausalNext(status, auth, core, machine) {
3054
3058
  }
3055
3059
  const failedRemote = status.remotes.find((remote) => remote.sync.status === "error");
3056
3060
  const hasWorkflowCase = snapshot ? snapshotHasWorkflowCase(snapshot) : false;
3057
- const hasScoredRun = snapshot?.runs.some((run) => scoredRunValue(run) !== undefined) ?? false;
3058
- const canPublish = hasWorkflowCase && hasScoredRun;
3061
+ const hasCurrentScoredProofRun = snapshot?.runs.some((run) => currentVersionId !== undefined &&
3062
+ scoredRunValue(run) !== undefined &&
3063
+ ((run.kind === "eval" && run.versionId === currentVersionId) ||
3064
+ (run.kind === "improve" && run.outputVersionId === currentVersionId))) ?? false;
3065
+ const canPublish = hasWorkflowCase && hasCurrentScoredProofRun;
3059
3066
  const cloudAuthMissing = auth.workbenchCloud.status !== "authenticated";
3060
3067
  const cloudRemoteNeedsAuth = status.remotes.some((remote) => remote.kind === "workbench-cloud" &&
3061
3068
  (remote.sync.status !== "up_to_date" || remote.publication.status === "unpublished"));
@@ -3071,6 +3078,9 @@ async function statusWithCausalNext(status, auth, core, machine) {
3071
3078
  if (!hasWorkflowCase) {
3072
3079
  return { ...status, next: "edit .workbench/cases, then run workbench eval" };
3073
3080
  }
3081
+ if (!hasCurrentScoredProofRun) {
3082
+ return { ...status, next: "workbench eval" };
3083
+ }
3074
3084
  const cloudRemote = status.remotes.find((remote) => remote.kind === "workbench-cloud");
3075
3085
  if (canPublish && !cloudRemote) {
3076
3086
  return { ...status, next: "workbench publish" };
@@ -3081,7 +3091,6 @@ async function statusWithCausalNext(status, auth, core, machine) {
3081
3091
  if (unpublishedCloudRemote) {
3082
3092
  return { ...status, next: "workbench publish" };
3083
3093
  }
3084
- const currentVersionId = status.project.currentVersionId ?? snapshot?.status.currentVersionId ?? snapshot?.refs.current;
3085
3094
  const stalePublishedCloudRemote = status.remotes.find((remote) => remote.kind === "workbench-cloud" &&
3086
3095
  remote.publication.status === "published" &&
3087
3096
  remote.sync.status === "up_to_date" &&
@@ -45,7 +45,7 @@ export async function installSnapshotToStore(options) {
45
45
  const previous = existingHash
46
46
  ? existingHash === contentHash ? "unchanged" : canUpdateExisting ? "updated" : "overwritten"
47
47
  : "none";
48
- if (existingHash && previous === "overwritten" && !options.overwrite) {
48
+ if (!options.dryRun && existingHash && previous === "overwritten" && !options.overwrite) {
49
49
  throw new WorkbenchCodedError("install_failed", `Canonical skill already exists: ${destination}`, {
50
50
  remediation: "Pass --yes to overwrite the existing canonical store skill.",
51
51
  subject: { destination },
@@ -103,7 +103,7 @@ export async function readInstalledSkillsInventory(options = {}) {
103
103
  return {
104
104
  stores,
105
105
  skills,
106
- next: next ? `workbench install ${next}` : skills.length === 0 ? "workbench install OWNER/SKILL" : null,
106
+ next: next ? `workbench install ${next}` : null,
107
107
  };
108
108
  }
109
109
  export function installedInventoryToJson(inventory) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@workbench-ai/workbench",
3
- "version": "0.0.98",
3
+ "version": "0.0.100",
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.98",
25
- "@workbench-ai/workbench-protocol": "0.0.98",
26
- "@workbench-ai/workbench-core": "0.0.98",
27
- "@workbench-ai/workbench-contract": "0.0.98"
24
+ "@workbench-ai/workbench-built-in-adapters": "0.0.100",
25
+ "@workbench-ai/workbench-protocol": "0.0.100",
26
+ "@workbench-ai/workbench-core": "0.0.100",
27
+ "@workbench-ai/workbench-contract": "0.0.100"
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.98"
38
+ "@workbench-ai/workbench-ui": "0.0.100"
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",