@workbench-ai/workbench 0.0.100 → 0.0.102
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.d.ts.map +1 -1
- package/dist/index.js +60 -40
- package/dist/install-targets.js +1 -1
- package/package.json +6 -6
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAiEA,MAAM,WAAW,KAAK;IACpB,MAAM,EAAE,MAAM,CAAC,cAAc,CAAC;IAC9B,MAAM,EAAE,MAAM,CAAC,cAAc,CAAC;CAC/B;AAuTD,wBAAsB,MAAM,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,EAAE,EAAE,GAAE,KAGzD,GAAG,OAAO,CAAC,MAAM,CAAC,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAiEA,MAAM,WAAW,KAAK;IACpB,MAAM,EAAE,MAAM,CAAC,cAAc,CAAC;IAC9B,MAAM,EAAE,MAAM,CAAC,cAAc,CAAC;CAC/B;AAuTD,wBAAsB,MAAM,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,EAAE,EAAE,GAAE,KAGzD,GAAG,OAAO,CAAC,MAAM,CAAC,CAgOlB"}
|
package/dist/index.js
CHANGED
|
@@ -324,7 +324,11 @@ export async function runCli(argv, io = {
|
|
|
324
324
|
const core = await coreOptions(parsed);
|
|
325
325
|
if (command === "new") {
|
|
326
326
|
const status = await initWorkbenchSkill({ dir: parsed.positionals[1] ?? dirFlag(parsed) });
|
|
327
|
-
return output(status, parsed, io, () =>
|
|
327
|
+
return output(status, parsed, io, () => [
|
|
328
|
+
`Created Workbench skill at ${status.root}.`,
|
|
329
|
+
"Created starter case at .workbench/cases/case-001/case.yaml.",
|
|
330
|
+
"next: edit SKILL.md and .workbench/cases/, then run workbench eval",
|
|
331
|
+
].join("\n"));
|
|
328
332
|
}
|
|
329
333
|
if (command === "status") {
|
|
330
334
|
return await handleStatus(parsed, io);
|
|
@@ -333,7 +337,7 @@ export async function runCli(argv, io = {
|
|
|
333
337
|
rejectExtraInput(parsed, {
|
|
334
338
|
maxPositionals: 1,
|
|
335
339
|
message: "workbench eval does not accept a VERSION argument.",
|
|
336
|
-
remediation: "
|
|
340
|
+
remediation: "workbench eval",
|
|
337
341
|
});
|
|
338
342
|
if (parsed.flags.cloud === true) {
|
|
339
343
|
return await handleCloudEval(parsed, io);
|
|
@@ -369,7 +373,7 @@ export async function runCli(argv, io = {
|
|
|
369
373
|
rejectExtraInput(parsed, {
|
|
370
374
|
maxPositionals: 1,
|
|
371
375
|
message: "workbench improve does not accept a VERSION argument.",
|
|
372
|
-
remediation: "
|
|
376
|
+
remediation: "workbench improve",
|
|
373
377
|
});
|
|
374
378
|
if (parsed.flags.cloud === true) {
|
|
375
379
|
return await handleCloudImprove(parsed, io);
|
|
@@ -380,6 +384,7 @@ export async function runCli(argv, io = {
|
|
|
380
384
|
agent: stringFlag(parsed, "agents"),
|
|
381
385
|
budget: intFlag(parsed, "budget"),
|
|
382
386
|
samples: intFlag(parsed, "samples"),
|
|
387
|
+
progress: (message) => writeCliProgress(parsed, io, message, { json: true }),
|
|
383
388
|
});
|
|
384
389
|
return output({
|
|
385
390
|
...result,
|
|
@@ -465,6 +470,7 @@ export async function runCli(argv, io = {
|
|
|
465
470
|
try {
|
|
466
471
|
writeCliProgress(parsed, io, "workbench publish: preparing Cloud skill.");
|
|
467
472
|
remote = await ensurePublishRemote(parsed);
|
|
473
|
+
await writeAuthenticatedJsonProgress(parsed, io, remote, `workbench publish: publishing ${optionalPositional(parsed, 1) ?? "current"} source.`);
|
|
468
474
|
writeCliProgress(parsed, io, `workbench publish: publishing ${optionalPositional(parsed, 1) ?? "current"} source.`);
|
|
469
475
|
result = await publishWorkbenchVersion({
|
|
470
476
|
...core,
|
|
@@ -531,7 +537,7 @@ async function handleStatus(parsed, io) {
|
|
|
531
537
|
async function handleLog(parsed, io) {
|
|
532
538
|
if (parsed.flags.runs === true && parsed.flags.versions === true) {
|
|
533
539
|
throw new WorkbenchCodedError("usage", "workbench log accepts only one of --runs or --versions.", {
|
|
534
|
-
remediation: "
|
|
540
|
+
remediation: "workbench log --runs",
|
|
535
541
|
exitCode: 2,
|
|
536
542
|
});
|
|
537
543
|
}
|
|
@@ -545,7 +551,7 @@ async function handleLog(parsed, io) {
|
|
|
545
551
|
rejectExtraInput(parsed, {
|
|
546
552
|
maxPositionals: 1,
|
|
547
553
|
message: "workbench log does not accept refs or paths.",
|
|
548
|
-
remediation: "
|
|
554
|
+
remediation: "workbench log",
|
|
549
555
|
});
|
|
550
556
|
}
|
|
551
557
|
const snapshot = await createWorkbenchInspectionSnapshot(await coreOptions(parsed));
|
|
@@ -679,7 +685,7 @@ async function handleAdapterLogout(provider, parsed, io) {
|
|
|
679
685
|
status: "not_authenticated",
|
|
680
686
|
sync: "skipped",
|
|
681
687
|
reason: "not_authenticated",
|
|
682
|
-
remediation: "
|
|
688
|
+
remediation: "workbench login",
|
|
683
689
|
};
|
|
684
690
|
}
|
|
685
691
|
throw error;
|
|
@@ -768,7 +774,7 @@ async function handleLogin(parsed, io) {
|
|
|
768
774
|
}
|
|
769
775
|
if (parsed.flags["start-only"] === true || parsed.flags.wait === true || parsed.flags.timeout !== undefined || parsed.flags["no-open"] === true) {
|
|
770
776
|
throw new WorkbenchCodedError("usage", "Workbench Cloud login flags do not apply to provider login.", {
|
|
771
|
-
remediation: `
|
|
777
|
+
remediation: `workbench login ${provider} --method ${authMethod(parsed, provider)}`,
|
|
772
778
|
exitCode: 2,
|
|
773
779
|
});
|
|
774
780
|
}
|
|
@@ -776,7 +782,7 @@ async function handleLogin(parsed, io) {
|
|
|
776
782
|
}
|
|
777
783
|
if (parsed.flags["start-only"] === true && parsed.flags.wait === true) {
|
|
778
784
|
throw new WorkbenchCodedError("usage", "workbench login accepts only one of --start-only or --wait.", {
|
|
779
|
-
remediation:
|
|
785
|
+
remediation: "workbench login --start-only",
|
|
780
786
|
exitCode: 2,
|
|
781
787
|
});
|
|
782
788
|
}
|
|
@@ -786,13 +792,13 @@ async function handleLogin(parsed, io) {
|
|
|
786
792
|
const timeoutSeconds = intFlag(parsed, "timeout");
|
|
787
793
|
if (startOnly && timeoutSeconds !== undefined) {
|
|
788
794
|
throw new WorkbenchCodedError("usage", "workbench login --timeout only applies with --wait.", {
|
|
789
|
-
remediation:
|
|
795
|
+
remediation: "workbench login --start-only",
|
|
790
796
|
exitCode: 2,
|
|
791
797
|
});
|
|
792
798
|
}
|
|
793
799
|
if (waitOnly && timeoutSeconds === undefined) {
|
|
794
800
|
throw new WorkbenchCodedError("usage", "workbench login --wait requires --timeout N.", {
|
|
795
|
-
remediation: `
|
|
801
|
+
remediation: `workbench login --wait --timeout ${LOGIN_WAIT_TIMEOUT_SECONDS}`,
|
|
796
802
|
exitCode: 2,
|
|
797
803
|
});
|
|
798
804
|
}
|
|
@@ -901,11 +907,11 @@ async function handleInstall(parsed, io) {
|
|
|
901
907
|
rejectExtraInput(parsed, {
|
|
902
908
|
maxPositionals: 1,
|
|
903
909
|
message: "workbench install with no HANDLE_OR_URL lists installed skills.",
|
|
904
|
-
remediation: "
|
|
910
|
+
remediation: "workbench install OWNER/SKILL",
|
|
905
911
|
});
|
|
906
912
|
if (parsed.flags.yes === true || parsed.flags["dry-run"] === true) {
|
|
907
913
|
throw new WorkbenchCodedError("usage", "workbench install inventory does not accept --yes or --dry-run.", {
|
|
908
|
-
remediation: "
|
|
914
|
+
remediation: "workbench install OWNER/SKILL --dry-run",
|
|
909
915
|
exitCode: 2,
|
|
910
916
|
});
|
|
911
917
|
}
|
|
@@ -918,13 +924,13 @@ async function handleInstall(parsed, io) {
|
|
|
918
924
|
rejectExtraInput(parsed, {
|
|
919
925
|
maxPositionals: 2,
|
|
920
926
|
message: "workbench install accepts one HANDLE_OR_URL argument.",
|
|
921
|
-
remediation: "
|
|
927
|
+
remediation: "workbench install OWNER/SKILL",
|
|
922
928
|
});
|
|
923
929
|
const source = await resolveWorkbenchInstallSourceInput(sourceInput);
|
|
924
930
|
const workbenchSource = parseWorkbenchInstallSource(source);
|
|
925
931
|
if (!workbenchSource) {
|
|
926
932
|
throw new WorkbenchCodedError("usage", "workbench install requires a Workbench Cloud source URL.", {
|
|
927
|
-
remediation: "
|
|
933
|
+
remediation: "workbench install OWNER/SKILL",
|
|
928
934
|
exitCode: 2,
|
|
929
935
|
});
|
|
930
936
|
}
|
|
@@ -1092,7 +1098,7 @@ async function startCloudExecution(command, parsed, io) {
|
|
|
1092
1098
|
const source = parseWorkbenchInstallSource(remote.url);
|
|
1093
1099
|
if (!source) {
|
|
1094
1100
|
throw new WorkbenchCodedError("remote_invalid_url", `Workbench remote is not a Cloud skill URL: ${remote.url}`, {
|
|
1095
|
-
remediation: "
|
|
1101
|
+
remediation: "workbench publish",
|
|
1096
1102
|
subject: { remote: remote.name, url: remote.url },
|
|
1097
1103
|
exitCode: 2,
|
|
1098
1104
|
});
|
|
@@ -1237,7 +1243,7 @@ async function resolveCloudAdapterAuthTargets(input) {
|
|
|
1237
1243
|
const version = snapshotVersionByRef(snapshot, input.versionId);
|
|
1238
1244
|
if (!version) {
|
|
1239
1245
|
throw new WorkbenchCodedError("version_not_found", `Version not found: ${input.versionId}`, {
|
|
1240
|
-
remediation: "
|
|
1246
|
+
remediation: "workbench status",
|
|
1241
1247
|
subject: { versionId: input.versionId },
|
|
1242
1248
|
exitCode: 1,
|
|
1243
1249
|
});
|
|
@@ -1259,8 +1265,8 @@ async function assertCloudAdapterAuthConnected(input) {
|
|
|
1259
1265
|
if (!missing) {
|
|
1260
1266
|
return;
|
|
1261
1267
|
}
|
|
1262
|
-
throw new WorkbenchCodedError("adapter_auth_required", `${formatCloudAdapterAuthTarget(missing)} disconnected
|
|
1263
|
-
remediation: `
|
|
1268
|
+
throw new WorkbenchCodedError("adapter_auth_required", `${formatCloudAdapterAuthTarget(missing)} disconnected.`, {
|
|
1269
|
+
remediation: `workbench login ${missing.adapterId}`,
|
|
1264
1270
|
subject: {
|
|
1265
1271
|
adapterId: missing.adapterId,
|
|
1266
1272
|
profile: missing.profile,
|
|
@@ -1393,7 +1399,7 @@ async function switchHostedImproveVersionIfPromoted(started) {
|
|
|
1393
1399
|
const currentVersionId = snapshot.status.currentVersionId ?? snapshot.refs.current;
|
|
1394
1400
|
if (started.startVersionId && currentVersionId && currentVersionId !== started.startVersionId) {
|
|
1395
1401
|
throw new WorkbenchCodedError("worktree_changed", "Local source changed while hosted improve was running; refusing to overwrite it.", {
|
|
1396
|
-
remediation: `
|
|
1402
|
+
remediation: `workbench switch ${outputVersionId}`,
|
|
1397
1403
|
subject: {
|
|
1398
1404
|
startedFrom: started.startVersionId,
|
|
1399
1405
|
current: currentVersionId,
|
|
@@ -1419,7 +1425,7 @@ async function ensureCloudRemoteForExecution(root, parsed) {
|
|
|
1419
1425
|
const source = parseWorkbenchInstallSource(remote.url);
|
|
1420
1426
|
if (!source) {
|
|
1421
1427
|
throw new WorkbenchCodedError("remote_invalid_url", `Workbench remote is not a Cloud skill URL: ${remote.url}`, {
|
|
1422
|
-
remediation: "
|
|
1428
|
+
remediation: "workbench publish",
|
|
1423
1429
|
subject: { remote: remote.name, url: remote.url },
|
|
1424
1430
|
exitCode: 2,
|
|
1425
1431
|
});
|
|
@@ -1481,7 +1487,7 @@ async function resolveCloudSkillId(source) {
|
|
|
1481
1487
|
const skill = listed.skills?.find((entry) => entry.ownerSlug === source.owner && entry.name === source.skill);
|
|
1482
1488
|
if (!skill?.id) {
|
|
1483
1489
|
throw new WorkbenchCodedError("remote_not_found", `Workbench Cloud skill not found: ${source.owner}/${source.skill}`, {
|
|
1484
|
-
remediation: "
|
|
1490
|
+
remediation: "workbench publish",
|
|
1485
1491
|
subject: { owner: source.owner, skill: source.skill },
|
|
1486
1492
|
exitCode: 1,
|
|
1487
1493
|
});
|
|
@@ -1599,8 +1605,8 @@ function writeCloudProgress(io, message, enabled = true) {
|
|
|
1599
1605
|
}
|
|
1600
1606
|
io.stderr.write(`${message}\n`);
|
|
1601
1607
|
}
|
|
1602
|
-
function writeCliProgress(parsed, io, message) {
|
|
1603
|
-
if (parsed.flags.json === true) {
|
|
1608
|
+
function writeCliProgress(parsed, io, message, options = {}) {
|
|
1609
|
+
if (parsed.flags.json === true && options.json !== true) {
|
|
1604
1610
|
return;
|
|
1605
1611
|
}
|
|
1606
1612
|
io.stderr.write(`${message}\n`);
|
|
@@ -1694,7 +1700,7 @@ async function fetchWorkbenchInstallSourceSnapshot(source, displaySource) {
|
|
|
1694
1700
|
throw new WorkbenchCodedError("auth_required", token
|
|
1695
1701
|
? `Workbench Cloud rejected the provided token while installing ${displaySource}.`
|
|
1696
1702
|
: `Authentication is required to install ${displaySource}.`, {
|
|
1697
|
-
remediation: "
|
|
1703
|
+
remediation: "workbench login",
|
|
1698
1704
|
exitCode: 1,
|
|
1699
1705
|
});
|
|
1700
1706
|
}
|
|
@@ -1833,9 +1839,9 @@ function optionalWorkbenchBaseUrl(input = {}) {
|
|
|
1833
1839
|
function workbenchLoginRemediation(baseUrl) {
|
|
1834
1840
|
const normalized = baseUrl ? normalizeBaseUrl(baseUrl) : DEFAULT_WORKBENCH_CLOUD_BASE_URL;
|
|
1835
1841
|
if (normalized === DEFAULT_WORKBENCH_CLOUD_BASE_URL) {
|
|
1836
|
-
return "
|
|
1842
|
+
return "workbench login";
|
|
1837
1843
|
}
|
|
1838
|
-
return `
|
|
1844
|
+
return `workbench login --base-url ${normalized}`;
|
|
1839
1845
|
}
|
|
1840
1846
|
function normalizeBaseUrl(value) {
|
|
1841
1847
|
return value.trim().replace(/\/+$/u, "");
|
|
@@ -1911,7 +1917,7 @@ async function pollDeviceToken(baseUrl, authorization, timeoutSeconds) {
|
|
|
1911
1917
|
}
|
|
1912
1918
|
throw new WorkbenchCodedError("login_pending", "Device login is still waiting for browser authorization.", {
|
|
1913
1919
|
retryable: true,
|
|
1914
|
-
remediation: `
|
|
1920
|
+
remediation: `workbench login --wait --timeout ${LOGIN_WAIT_TIMEOUT_SECONDS}`,
|
|
1915
1921
|
subject: {
|
|
1916
1922
|
retryAfterSeconds: Math.max(1, Math.ceil(intervalMs / 1000)),
|
|
1917
1923
|
verificationUri: authorization.verification_uri,
|
|
@@ -2084,7 +2090,7 @@ async function uploadAdapterConnection(bundle, parsed) {
|
|
|
2084
2090
|
status: "not_authenticated",
|
|
2085
2091
|
sync: "skipped",
|
|
2086
2092
|
reason: "not_authenticated",
|
|
2087
|
-
remediation: "
|
|
2093
|
+
remediation: "workbench login",
|
|
2088
2094
|
};
|
|
2089
2095
|
}
|
|
2090
2096
|
await apiRequest(adapterConnectionApiPath(bundle), { method: "PUT", body: { bundle } });
|
|
@@ -2104,7 +2110,7 @@ async function deleteAdapterConnectionRemote(target, parsed) {
|
|
|
2104
2110
|
status: "not_authenticated",
|
|
2105
2111
|
sync: "skipped",
|
|
2106
2112
|
reason: "not_authenticated",
|
|
2107
|
-
remediation: "
|
|
2113
|
+
remediation: "workbench login",
|
|
2108
2114
|
};
|
|
2109
2115
|
}
|
|
2110
2116
|
await apiRequest(adapterConnectionApiPath(target), { method: "DELETE" });
|
|
@@ -2678,7 +2684,7 @@ async function defaultDiffRange(core) {
|
|
|
2678
2684
|
const current = snapshot.versions.find((version) => version.id === currentId);
|
|
2679
2685
|
if (!current) {
|
|
2680
2686
|
throw new WorkbenchCodedError("version_not_found", "Current Workbench version was not found.", {
|
|
2681
|
-
remediation: "
|
|
2687
|
+
remediation: "workbench log --versions",
|
|
2682
2688
|
exitCode: 1,
|
|
2683
2689
|
});
|
|
2684
2690
|
}
|
|
@@ -2693,7 +2699,7 @@ function parsePublishVisibilityFlags(parsed) {
|
|
|
2693
2699
|
].filter((value) => Boolean(value));
|
|
2694
2700
|
if (selected.length > 1) {
|
|
2695
2701
|
throw new WorkbenchCodedError("usage", "workbench publish accepts only one visibility flag.", {
|
|
2696
|
-
remediation: "
|
|
2702
|
+
remediation: "workbench publish --private",
|
|
2697
2703
|
exitCode: 2,
|
|
2698
2704
|
});
|
|
2699
2705
|
}
|
|
@@ -2712,7 +2718,7 @@ async function previewPublishWithDerivedRemote(parsed) {
|
|
|
2712
2718
|
: snapshotVersionByRef(reconciledSnapshot, reconciledSnapshot.status.currentVersionId ?? reconciledSnapshot.refs.current ?? "");
|
|
2713
2719
|
if (!version) {
|
|
2714
2720
|
throw new WorkbenchCodedError("version_not_found", `Version not found: ${requestedVersion ?? "current"}`, {
|
|
2715
|
-
remediation: "
|
|
2721
|
+
remediation: "workbench log --versions",
|
|
2716
2722
|
subject: { version: requestedVersion ?? "current" },
|
|
2717
2723
|
exitCode: 1,
|
|
2718
2724
|
});
|
|
@@ -2751,6 +2757,20 @@ async function ensurePublishRemote(parsed) {
|
|
|
2751
2757
|
const result = await addWorkbenchRemote(remote.name, remote.url, core);
|
|
2752
2758
|
return result.remote.name;
|
|
2753
2759
|
}
|
|
2760
|
+
async function writeAuthenticatedJsonProgress(parsed, io, remoteName, message) {
|
|
2761
|
+
if (parsed.flags.json !== true) {
|
|
2762
|
+
return;
|
|
2763
|
+
}
|
|
2764
|
+
const root = path.resolve(dirFlag(parsed) ?? process.cwd());
|
|
2765
|
+
const remote = remoteName
|
|
2766
|
+
? (await inspectionRemotes(root)).find((entry) => entry.name === remoteName)
|
|
2767
|
+
: preferredCloudRemote(await inspectionRemotes(root));
|
|
2768
|
+
const source = remote ? parseWorkbenchInstallSource(remote.url) : undefined;
|
|
2769
|
+
if (!source || !await workbenchCloudToken({ baseUrl: source.baseUrl })) {
|
|
2770
|
+
return;
|
|
2771
|
+
}
|
|
2772
|
+
writeCliProgress(parsed, io, message, { json: true });
|
|
2773
|
+
}
|
|
2754
2774
|
async function derivePublishCloudRemote(parsed, action = "workbench publish", name = "cloud") {
|
|
2755
2775
|
const config = await loadConfig();
|
|
2756
2776
|
const baseUrl = optionalWorkbenchBaseUrl({ configBaseUrl: config.baseUrl }) ?? DEFAULT_WORKBENCH_CLOUD_BASE_URL;
|
|
@@ -2763,7 +2783,7 @@ function installHandleFromCloudRemote(remote) {
|
|
|
2763
2783
|
const source = parseWorkbenchInstallSource(remote.url);
|
|
2764
2784
|
if (!source) {
|
|
2765
2785
|
throw new WorkbenchCodedError("remote_invalid_url", `Workbench remote is not a Cloud skill URL: ${remote.url}`, {
|
|
2766
|
-
remediation: "
|
|
2786
|
+
remediation: "workbench publish",
|
|
2767
2787
|
subject: { remote: remote.name, url: remote.url },
|
|
2768
2788
|
exitCode: 2,
|
|
2769
2789
|
});
|
|
@@ -2794,14 +2814,14 @@ async function publishAuthRemediation(parsed, remoteName, fallback) {
|
|
|
2794
2814
|
return workbenchLoginRemediation(source?.baseUrl);
|
|
2795
2815
|
}
|
|
2796
2816
|
catch {
|
|
2797
|
-
return fallback ?? "
|
|
2817
|
+
return fallback ?? "workbench login";
|
|
2798
2818
|
}
|
|
2799
2819
|
}
|
|
2800
2820
|
function parseOwnerSkillHandle(input) {
|
|
2801
2821
|
const handle = normalizedOwnerSkillHandle(input);
|
|
2802
2822
|
if (!handle) {
|
|
2803
2823
|
throw new WorkbenchCodedError("usage", "workbench publish --as expects OWNER/SKILL.", {
|
|
2804
|
-
remediation: "
|
|
2824
|
+
remediation: "workbench publish --as OWNER/SKILL",
|
|
2805
2825
|
exitCode: 2,
|
|
2806
2826
|
});
|
|
2807
2827
|
}
|
|
@@ -2811,7 +2831,7 @@ function derivedOwnerSkillHandle(parsed, config, action) {
|
|
|
2811
2831
|
const owner = config.username?.trim();
|
|
2812
2832
|
if (!owner) {
|
|
2813
2833
|
throw new WorkbenchCodedError("auth_required", `${action} needs a logged-in Workbench Cloud username before it can derive OWNER/SKILL.`, {
|
|
2814
|
-
remediation: "
|
|
2834
|
+
remediation: "workbench login",
|
|
2815
2835
|
exitCode: 1,
|
|
2816
2836
|
});
|
|
2817
2837
|
}
|
|
@@ -2819,7 +2839,7 @@ function derivedOwnerSkillHandle(parsed, config, action) {
|
|
|
2819
2839
|
const handle = normalizeOwnerSkillHandle(owner, path.basename(root));
|
|
2820
2840
|
if (!handle.owner || !handle.skill) {
|
|
2821
2841
|
throw new WorkbenchCodedError("usage", `${action} could not derive a valid OWNER/SKILL handle.`, {
|
|
2822
|
-
remediation:
|
|
2842
|
+
remediation: `${action} --as OWNER/SKILL`,
|
|
2823
2843
|
subject: { owner, skill: path.basename(root) },
|
|
2824
2844
|
exitCode: 2,
|
|
2825
2845
|
});
|
|
@@ -2833,7 +2853,7 @@ async function resolveWorkbenchInstallSourceInput(input) {
|
|
|
2833
2853
|
const handle = normalizedOwnerSkillHandle(input);
|
|
2834
2854
|
if (!handle) {
|
|
2835
2855
|
throw new WorkbenchCodedError("usage", "workbench install expects OWNER/SKILL or a Workbench Cloud skill URL.", {
|
|
2836
|
-
remediation: "
|
|
2856
|
+
remediation: "workbench install OWNER/SKILL",
|
|
2837
2857
|
exitCode: 2,
|
|
2838
2858
|
});
|
|
2839
2859
|
}
|
|
@@ -3442,7 +3462,7 @@ async function fileForRunOrJobRef(core, objectRef, requestedPath) {
|
|
|
3442
3462
|
return file;
|
|
3443
3463
|
}
|
|
3444
3464
|
throw new WorkbenchCodedError("ref_not_found", `File not found in ${objectRef}: ${requestedPath}`, {
|
|
3445
|
-
remediation: `
|
|
3465
|
+
remediation: `workbench show ${objectRef}`,
|
|
3446
3466
|
subject: { ref: objectRef, path: requestedPath },
|
|
3447
3467
|
exitCode: 1,
|
|
3448
3468
|
});
|
|
@@ -3503,7 +3523,7 @@ function singleEquivalentShowFile(files) {
|
|
|
3503
3523
|
function ambiguousShowPath(objectRef, requestedPath, candidates) {
|
|
3504
3524
|
const candidatePaths = candidates.map((file) => file.path);
|
|
3505
3525
|
return new WorkbenchCodedError("ref_ambiguous", `File path is ambiguous in ${objectRef}: ${requestedPath}. Candidates: ${candidatePaths.join(", ")}.`, {
|
|
3506
|
-
remediation: `
|
|
3526
|
+
remediation: `workbench show ${objectRef}`,
|
|
3507
3527
|
subject: { ref: objectRef, path: requestedPath, candidates: candidatePaths },
|
|
3508
3528
|
exitCode: 2,
|
|
3509
3529
|
});
|
package/dist/install-targets.js
CHANGED
|
@@ -47,7 +47,7 @@ export async function installSnapshotToStore(options) {
|
|
|
47
47
|
: "none";
|
|
48
48
|
if (!options.dryRun && existingHash && previous === "overwritten" && !options.overwrite) {
|
|
49
49
|
throw new WorkbenchCodedError("install_failed", `Canonical skill already exists: ${destination}`, {
|
|
50
|
-
remediation:
|
|
50
|
+
remediation: `workbench install ${options.provenance.handle} --yes`,
|
|
51
51
|
subject: { destination },
|
|
52
52
|
exitCode: 1,
|
|
53
53
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@workbench-ai/workbench",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.102",
|
|
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.
|
|
25
|
-
"@workbench-ai/workbench-protocol": "0.0.
|
|
26
|
-
"@workbench-ai/workbench-
|
|
27
|
-
"@workbench-ai/workbench-
|
|
24
|
+
"@workbench-ai/workbench-built-in-adapters": "0.0.102",
|
|
25
|
+
"@workbench-ai/workbench-protocol": "0.0.102",
|
|
26
|
+
"@workbench-ai/workbench-contract": "0.0.102",
|
|
27
|
+
"@workbench-ai/workbench-core": "0.0.102"
|
|
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.
|
|
38
|
+
"@workbench-ai/workbench-ui": "0.0.102"
|
|
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",
|