@warmhub/cli 0.46.0 → 0.47.0
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/wh.js +104 -19
- package/package.json +1 -1
package/dist/wh.js
CHANGED
|
@@ -19515,7 +19515,7 @@ function findSystemComponent(componentId) {
|
|
|
19515
19515
|
// ../../packages/sdk-ts/package.json
|
|
19516
19516
|
var package_default = {
|
|
19517
19517
|
name: "@warmhub/sdk-ts",
|
|
19518
|
-
version: "0.
|
|
19518
|
+
version: "0.46.0",
|
|
19519
19519
|
private: false,
|
|
19520
19520
|
type: "module",
|
|
19521
19521
|
description: "The TypeScript SDK for WarmHub — create repos, commit and query data, and compound knowledge with your AI agents.",
|
|
@@ -20755,13 +20755,14 @@ class WarmHubClient {
|
|
|
20755
20755
|
throw toWarmHubError(error);
|
|
20756
20756
|
}
|
|
20757
20757
|
},
|
|
20758
|
-
create: async (orgName, repoName, description, visibility) => {
|
|
20758
|
+
create: async (orgName, repoName, description, visibility, displayName) => {
|
|
20759
20759
|
try {
|
|
20760
20760
|
return await this.trpc.repo.create.mutate({
|
|
20761
20761
|
orgName,
|
|
20762
20762
|
repoName,
|
|
20763
20763
|
description,
|
|
20764
|
-
visibility
|
|
20764
|
+
visibility,
|
|
20765
|
+
displayName
|
|
20765
20766
|
});
|
|
20766
20767
|
} catch (error) {
|
|
20767
20768
|
throw toWarmHubError(error);
|
|
@@ -20778,6 +20779,17 @@ class WarmHubClient {
|
|
|
20778
20779
|
throw toWarmHubError(error);
|
|
20779
20780
|
}
|
|
20780
20781
|
},
|
|
20782
|
+
setDisplayName: async (orgName, repoName, displayName) => {
|
|
20783
|
+
try {
|
|
20784
|
+
return await this.trpc.repo.setDisplayName.mutate({
|
|
20785
|
+
orgName,
|
|
20786
|
+
repoName,
|
|
20787
|
+
displayName
|
|
20788
|
+
});
|
|
20789
|
+
} catch (error) {
|
|
20790
|
+
throw toWarmHubError(error);
|
|
20791
|
+
}
|
|
20792
|
+
},
|
|
20781
20793
|
setVisibility: async (orgName, repoName, visibility) => {
|
|
20782
20794
|
try {
|
|
20783
20795
|
return await this.trpc.repo.setVisibility.mutate({
|
|
@@ -20800,6 +20812,13 @@ class WarmHubClient {
|
|
|
20800
20812
|
throw toWarmHubError(error);
|
|
20801
20813
|
}
|
|
20802
20814
|
},
|
|
20815
|
+
update: async (input) => {
|
|
20816
|
+
try {
|
|
20817
|
+
return await this.trpc.repo.update.mutate(input);
|
|
20818
|
+
} catch (error) {
|
|
20819
|
+
throw toWarmHubError(error);
|
|
20820
|
+
}
|
|
20821
|
+
},
|
|
20803
20822
|
archive: async (orgName, repoName) => {
|
|
20804
20823
|
try {
|
|
20805
20824
|
return await this.trpc.repo.archive.mutate({
|
|
@@ -33598,7 +33617,7 @@ cat wrefs.txt | wh thing view --format jsonl # one JSON line per *deduped
|
|
|
33598
33617
|
- \`wh shape rename <oldName> <newName>\` — Rename shape
|
|
33599
33618
|
|
|
33600
33619
|
### repo — Repository management
|
|
33601
|
-
- \`wh repo create <org/name> [--description]\` — Create repo
|
|
33620
|
+
- \`wh repo create <org/name> [--display-name] [--description] [--visibility]\` — Create repo
|
|
33602
33621
|
- \`wh repo list [org]\` — List repos
|
|
33603
33622
|
- \`wh repo view [org/repo]\` — Repo details
|
|
33604
33623
|
|
|
@@ -33680,7 +33699,7 @@ wh commit submit --add my-item --shape MyShape --kind assertion \\
|
|
|
33680
33699
|
wh shape template Hypothesis Evidence -o ops.json # add --kind assertion --about TargetShape/name for assertions
|
|
33681
33700
|
# edit ops.json — fill FILL_IN placeholders
|
|
33682
33701
|
wh commit submit --file ops.json -m "batch update" # submit all operations (bare \`wh commit\` is equivalent)
|
|
33683
|
-
# --file format: docs.warmhub.ai/cli-reference/
|
|
33702
|
+
# --file format: docs.warmhub.ai/cli-reference/commit-operations
|
|
33684
33703
|
\`\`\`
|
|
33685
33704
|
|
|
33686
33705
|
**Bulk write (JSONL stream, >1k ops)** — one chunked stream beats per-record commits (~60× faster):
|
|
@@ -33821,6 +33840,11 @@ var PRIME_DOMAIN = defineDomain({
|
|
|
33821
33840
|
function usageError8(usage, example) {
|
|
33822
33841
|
throw new CliError(2 /* UserInput */, "USER_INPUT", usage, undefined, `Example: ${example}`);
|
|
33823
33842
|
}
|
|
33843
|
+
function ensureNonEmptyDisplayName(value, exampleCommand) {
|
|
33844
|
+
if (value !== undefined && value.trim() === "") {
|
|
33845
|
+
usageError8("--display-name requires a non-empty value", exampleCommand);
|
|
33846
|
+
}
|
|
33847
|
+
}
|
|
33824
33848
|
function resolveOrgRepoArg(ref, orgFlag) {
|
|
33825
33849
|
if (ref?.includes("/")) {
|
|
33826
33850
|
const parts = ref.split("/");
|
|
@@ -33840,9 +33864,12 @@ function resolveOrgRepoArg(ref, orgFlag) {
|
|
|
33840
33864
|
teachingNote: `Note: prefer \`wh repo create ${orgFlag}/${ref}\` — proceeding with combined form.`
|
|
33841
33865
|
};
|
|
33842
33866
|
}
|
|
33843
|
-
usageError8(
|
|
33867
|
+
usageError8('Usage: wh repo create <org/repo> [--display-name "..."] [--description <desc>] [--visibility <public|private>]. Note: org and repo are a single positional argument `<org/name>`, not separate flags.', 'wh repo create myorg/myrepo -d "My repository" --visibility private');
|
|
33844
33868
|
}
|
|
33845
33869
|
var createFlags6 = {
|
|
33870
|
+
"display-name": flag.string({
|
|
33871
|
+
description: "Display name for the repo"
|
|
33872
|
+
}),
|
|
33846
33873
|
description: flag.string({ short: "d", description: "Repo description" }),
|
|
33847
33874
|
visibility: flag.string({
|
|
33848
33875
|
short: "v",
|
|
@@ -33865,6 +33892,8 @@ var handleCreate5 = async (ctx, { flags, args }) => {
|
|
|
33865
33892
|
if (vis !== undefined && vis !== "public" && vis !== "private") {
|
|
33866
33893
|
usageError8('Invalid visibility: must be "public" or "private"', "wh repo create myorg/myrepo --visibility private");
|
|
33867
33894
|
}
|
|
33895
|
+
const displayName2 = flags["display-name"];
|
|
33896
|
+
ensureNonEmptyDisplayName(displayName2, 'wh repo create myorg/myrepo --display-name "My Repo"');
|
|
33868
33897
|
const c = ctx.colors;
|
|
33869
33898
|
try {
|
|
33870
33899
|
await ctx.client.org.get(orgName);
|
|
@@ -33876,9 +33905,12 @@ var handleCreate5 = async (ctx, { flags, args }) => {
|
|
|
33876
33905
|
throw e;
|
|
33877
33906
|
}
|
|
33878
33907
|
}
|
|
33879
|
-
const result = await ctx.client.repo.create(orgName, repoName, desc, vis);
|
|
33908
|
+
const result = await ctx.client.repo.create(orgName, repoName, desc, vis, displayName2);
|
|
33880
33909
|
writeOutput(ctx, result, () => {
|
|
33881
33910
|
ctx.status(`${c.green}Initialized empty repo${c.reset} ${c.bold}${orgName}/${repoName}${c.reset}`);
|
|
33911
|
+
if (result.displayName && result.displayName !== result.name) {
|
|
33912
|
+
ctx.status(` ${c.dim}${result.displayName}${c.reset}`);
|
|
33913
|
+
}
|
|
33882
33914
|
if (desc)
|
|
33883
33915
|
ctx.status(` ${c.dim}${desc}${c.reset}`);
|
|
33884
33916
|
});
|
|
@@ -33904,9 +33936,10 @@ var handleList5 = async (ctx, { flags, args }) => {
|
|
|
33904
33936
|
}
|
|
33905
33937
|
ctx.out(`${c.bold}Repos in ${orgName}:${c.reset}`);
|
|
33906
33938
|
for (const r of repos.items) {
|
|
33939
|
+
const display = r.displayName && r.displayName !== r.name ? ` ${c.dim}${r.displayName}${c.reset}` : "";
|
|
33907
33940
|
const desc = r.description ? ` ${c.dim}${r.description}${c.reset}` : "";
|
|
33908
33941
|
const archived = r.archivedAt ? ` ${c.yellow}[archived]${c.reset}` : "";
|
|
33909
|
-
ctx.out(` ${c.cyan}${orgName}/${r.name}${c.reset}${desc}${archived}`);
|
|
33942
|
+
ctx.out(` ${c.cyan}${orgName}/${r.name}${c.reset}${display}${desc}${archived}`);
|
|
33910
33943
|
}
|
|
33911
33944
|
});
|
|
33912
33945
|
};
|
|
@@ -33926,6 +33959,9 @@ var handleView6 = async (ctx, { args }) => {
|
|
|
33926
33959
|
]);
|
|
33927
33960
|
writeOutput(ctx, { ...repoInfo, stats, configureStats }, () => {
|
|
33928
33961
|
ctx.out(`${c.bold}${org}/${repo}${c.reset}`);
|
|
33962
|
+
if (repoInfo.displayName && repoInfo.displayName !== repoInfo.name) {
|
|
33963
|
+
ctx.out(` ${repoInfo.displayName}`);
|
|
33964
|
+
}
|
|
33929
33965
|
if (repoInfo.description)
|
|
33930
33966
|
ctx.out(` ${repoInfo.description}`);
|
|
33931
33967
|
if (repoInfo.archivedAt) {
|
|
@@ -33950,16 +33986,58 @@ var handleVisibility = async (ctx, { args }) => {
|
|
|
33950
33986
|
ctx.out(`${c.green}Set${c.reset} ${c.cyan}${orgName}/${repoName}${c.reset} to ${c.bold}${newVisibility}${c.reset}`);
|
|
33951
33987
|
});
|
|
33952
33988
|
};
|
|
33953
|
-
var
|
|
33989
|
+
var repoRenameFlags = {
|
|
33990
|
+
"display-name": flag.string({
|
|
33991
|
+
description: "New display name (must be non-empty)"
|
|
33992
|
+
}),
|
|
33993
|
+
slug: flag.string({
|
|
33994
|
+
description: "New slug (alias for the positional argument)"
|
|
33995
|
+
})
|
|
33996
|
+
};
|
|
33997
|
+
var handleRepoRename = async (ctx, { args, flags }) => {
|
|
33954
33998
|
const orgRepo = args[0];
|
|
33955
|
-
const
|
|
33956
|
-
|
|
33957
|
-
|
|
33999
|
+
const positionalSlug = args[1];
|
|
34000
|
+
const flagSlug = flags.slug;
|
|
34001
|
+
const displayName2 = flags["display-name"];
|
|
34002
|
+
const rawSlugFromInvocation = ctx.invocation.positional[2];
|
|
34003
|
+
if (!orgRepo?.includes("/")) {
|
|
34004
|
+
usageError8('Usage: wh repo rename <org/repoName> [<newName>] [--slug <slug>] [--display-name "..."]', 'wh repo rename myorg/oldrepo newrepo --display-name "New Repo"');
|
|
34005
|
+
}
|
|
34006
|
+
if (positionalSlug && flagSlug !== undefined && positionalSlug !== flagSlug) {
|
|
34007
|
+
usageError8("Specify the new slug as either a positional or --slug, not both", "wh repo rename myorg/foo bar # or: wh repo rename myorg/foo --slug bar");
|
|
34008
|
+
}
|
|
34009
|
+
const newSlug = positionalSlug !== undefined ? positionalSlug : flagSlug;
|
|
34010
|
+
if (newSlug === undefined && displayName2 === undefined) {
|
|
34011
|
+
usageError8('Usage: wh repo rename <org/repoName> [<newName>] [--slug <slug>] [--display-name "..."]', 'wh repo rename myorg/oldrepo newrepo --display-name "New Repo"');
|
|
34012
|
+
}
|
|
34013
|
+
if (newSlug !== undefined && newSlug.length === 0 || rawSlugFromInvocation === "" || flagSlug === "") {
|
|
34014
|
+
usageError8("New slug must be a non-empty string", "wh repo rename myorg/oldrepo newrepo");
|
|
33958
34015
|
}
|
|
34016
|
+
ensureNonEmptyDisplayName(displayName2, 'wh repo rename myorg/oldrepo --display-name "New Repo"');
|
|
33959
34017
|
const [orgName, oldName] = orgRepo.split("/", 2);
|
|
33960
34018
|
const c = ctx.colors;
|
|
33961
|
-
|
|
33962
|
-
|
|
34019
|
+
const slugChange = newSlug && newSlug !== oldName ? newSlug : undefined;
|
|
34020
|
+
if (displayName2 !== undefined && slugChange) {
|
|
34021
|
+
await ctx.client.repo.update({
|
|
34022
|
+
orgName,
|
|
34023
|
+
repoName: oldName,
|
|
34024
|
+
displayName: displayName2,
|
|
34025
|
+
newName: slugChange
|
|
34026
|
+
});
|
|
34027
|
+
} else if (displayName2 !== undefined) {
|
|
34028
|
+
await ctx.client.repo.setDisplayName(orgName, oldName, displayName2);
|
|
34029
|
+
} else if (newSlug !== undefined) {
|
|
34030
|
+
await ctx.client.repo.rename(orgName, oldName, newSlug);
|
|
34031
|
+
}
|
|
34032
|
+
if (slugChange) {
|
|
34033
|
+
ctx.out(`${c.green}Updated slug${c.reset} ${c.cyan}${orgName}/${oldName}${c.reset} → ${c.cyan}${orgName}/${slugChange}${c.reset}`);
|
|
34034
|
+
} else if (newSlug !== undefined && displayName2 === undefined) {
|
|
34035
|
+
ctx.out(`${c.dim}No changes requested for${c.reset} ${c.cyan}${orgName}/${oldName}${c.reset}`);
|
|
34036
|
+
}
|
|
34037
|
+
if (displayName2 !== undefined) {
|
|
34038
|
+
const repoForDisplay = slugChange ?? oldName;
|
|
34039
|
+
ctx.out(`${c.green}Updated display name${c.reset} ${c.cyan}${orgName}/${repoForDisplay}${c.reset}`);
|
|
34040
|
+
}
|
|
33963
34041
|
};
|
|
33964
34042
|
var updateFlags3 = {
|
|
33965
34043
|
description: flag.string({ short: "d", description: "New repo description" })
|
|
@@ -34369,6 +34447,7 @@ var REPO_DOMAIN = defineDomain({
|
|
|
34369
34447
|
examples: [
|
|
34370
34448
|
"wh repo create myorg/myrepo",
|
|
34371
34449
|
'wh repo create myorg/myrepo -d "My repo"',
|
|
34450
|
+
'wh repo create myorg/myrepo --display-name "My Repo"',
|
|
34372
34451
|
'wh repo create myorg/myrepo --visibility private -d "Private repo"'
|
|
34373
34452
|
],
|
|
34374
34453
|
handler: handleCreate5
|
|
@@ -34411,9 +34490,15 @@ var REPO_DOMAIN = defineDomain({
|
|
|
34411
34490
|
handler: handleVisibility
|
|
34412
34491
|
},
|
|
34413
34492
|
rename: {
|
|
34414
|
-
summary: "Rename a repo",
|
|
34415
|
-
args: "<org/
|
|
34416
|
-
|
|
34493
|
+
summary: "Rename a repo and/or update its display name",
|
|
34494
|
+
args: "<org/repoName> [<newName>]",
|
|
34495
|
+
flags: repoRenameFlags,
|
|
34496
|
+
examples: [
|
|
34497
|
+
"wh repo rename myorg/oldrepo newrepo",
|
|
34498
|
+
"wh repo rename myorg/foo --slug bar",
|
|
34499
|
+
'wh repo rename myorg/foo --display-name "Foo"',
|
|
34500
|
+
'wh repo rename myorg/foo bar --display-name "Bar"'
|
|
34501
|
+
],
|
|
34417
34502
|
handler: handleRepoRename
|
|
34418
34503
|
},
|
|
34419
34504
|
update: {
|
|
@@ -37247,7 +37332,7 @@ function resolveLogLevel(flags, env) {
|
|
|
37247
37332
|
// package.json
|
|
37248
37333
|
var package_default3 = {
|
|
37249
37334
|
name: "@warmhub/cli",
|
|
37250
|
-
version: "0.
|
|
37335
|
+
version: "0.47.0",
|
|
37251
37336
|
private: false,
|
|
37252
37337
|
type: "module",
|
|
37253
37338
|
description: "The wh CLI for WarmHub — create repos, commit and query data, and compound knowledge with your AI agents.",
|
|
@@ -38253,4 +38338,4 @@ if (!updateCheckSuppressedByArgv && shouldRunUpdateCheck(updateEligibility)) {
|
|
|
38253
38338
|
var interceptedExitCode = await maybeHandleComponentShellBoundary(dispatchArgv);
|
|
38254
38339
|
process.exitCode = interceptedExitCode === undefined ? await runCli(dispatchArgv, { version: package_default3.version }) : interceptedExitCode;
|
|
38255
38340
|
|
|
38256
|
-
//# debugId=
|
|
38341
|
+
//# debugId=7F3BC88908F9842C64756E2164756E21
|
package/package.json
CHANGED