@warmhub/cli 0.87.0 → 0.88.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.
Files changed (2) hide show
  1. package/dist/wh.js +53 -20
  2. package/package.json +1 -1
package/dist/wh.js CHANGED
@@ -43379,7 +43379,7 @@ function completedOperationsFrom(result) {
43379
43379
  // ../../packages/sdk-ts/package.json
43380
43380
  var package_default = {
43381
43381
  name: "@warmhub/sdk-ts",
43382
- version: "0.85.0",
43382
+ version: "0.86.0",
43383
43383
  private: false,
43384
43384
  type: "module",
43385
43385
  description: "The TypeScript SDK for WarmHub — create repos, commit and query data, and compound knowledge with your AI agents.",
@@ -60702,10 +60702,10 @@ var checkpointFlags = {
60702
60702
  latest: flag.boolean({
60703
60703
  description: "Use the latest completed checkpoint"
60704
60704
  }),
60705
- archive: flag.boolean({ description: "Download the checkpoint archive" }),
60706
- manifest: flag.boolean({ description: "Download the checkpoint manifest" }),
60705
+ archive: flag.boolean({ description: "Select the checkpoint archive" }),
60706
+ manifest: flag.boolean({ description: "Select the checkpoint manifest" }),
60707
60707
  chunk: flag.string({
60708
- description: "Download this checkpoint chunk path",
60708
+ description: "Select this checkpoint chunk path",
60709
60709
  constraints: { nonEmpty: true }
60710
60710
  }),
60711
60711
  output: flag.string({
@@ -60714,6 +60714,8 @@ var checkpointFlags = {
60714
60714
  })
60715
60715
  };
60716
60716
  var CHECKPOINT_ID_EXAMPLE = "0198f6d5-78aa-7000-8000-000000000001";
60717
+ var CHECKPOINT_ACCESS_EXAMPLE = "wh repo checkpoint access acme/widgets --latest --archive";
60718
+ var CHECKPOINT_DOWNLOAD_EXAMPLE = "wh repo checkpoint download acme/widgets --latest --archive --output checkpoint.zip";
60717
60719
  var CHECKPOINT_READ_NOTE = "Requires unrestricted repo:read plus repo:checkpoint-read.";
60718
60720
  var CHECKPOINT_MANAGEMENT_NOTE = "Requires unrestricted repo:read, repo:checkpoint-read, and repo:admin.";
60719
60721
  var generateFlags = {
@@ -60728,13 +60730,16 @@ var retryFlags = {
60728
60730
  checkpoint: checkpointFlags.checkpoint,
60729
60731
  wait: checkpointFlags.wait
60730
60732
  };
60731
- var downloadFlags = {
60733
+ var accessFlags = {
60732
60734
  latest: checkpointFlags.latest,
60733
60735
  checkpoint: checkpointFlags.checkpoint,
60734
60736
  "repo-seq": checkpointFlags["repo-seq"],
60735
60737
  archive: checkpointFlags.archive,
60736
60738
  manifest: checkpointFlags.manifest,
60737
- chunk: checkpointFlags.chunk,
60739
+ chunk: checkpointFlags.chunk
60740
+ };
60741
+ var downloadFlags = {
60742
+ ...accessFlags,
60738
60743
  output: checkpointFlags.output
60739
60744
  };
60740
60745
  function repoFor(ctx, args) {
@@ -60760,19 +60765,30 @@ function selectCheckpoint(flags) {
60760
60765
  return { repoSeq };
60761
60766
  throw new Error("Checkpoint selector was validated without a selector");
60762
60767
  }
60763
- function selectDownloadCheckpoint(flags) {
60768
+ function selectArtifactCheckpoint(flags, example) {
60764
60769
  const selected = Number(flags.latest === true) + Number(flags.checkpoint !== undefined) + Number(flags["repo-seq"] !== undefined);
60765
60770
  if (selected !== 1) {
60766
- usageError("Provide exactly one checkpoint selector: --latest, --checkpoint, or --repo-seq.", "wh repo checkpoint download acme/widgets --latest --archive --output checkpoint.zip");
60771
+ usageError("Provide exactly one checkpoint selector: --latest, --checkpoint, or --repo-seq.", example);
60767
60772
  }
60768
60773
  if (flags.latest)
60769
60774
  return "latest";
60770
60775
  return selectCheckpoint(flags);
60771
60776
  }
60772
- function selectArtifact(flags) {
60777
+ function printAccess(ctx, result) {
60778
+ writeOutput(ctx, result, () => {
60779
+ ctx.out(`Checkpoint: ${result.checkpointId}`);
60780
+ ctx.out(`Repository sequence: ${result.repoSeq}`);
60781
+ ctx.out(`Content type: ${result.contentType}`);
60782
+ ctx.out(`Bytes: ${result.byteLength}`);
60783
+ ctx.out(`SHA-256: ${result.sha256}`);
60784
+ ctx.out(`Expires at: ${result.expiresAt.toISOString()}`);
60785
+ ctx.out(`URL: ${result.url}`);
60786
+ });
60787
+ }
60788
+ function selectArtifact(flags, example) {
60773
60789
  const selected = Number(flags.archive === true) + Number(flags.manifest === true) + Number(flags.chunk !== undefined);
60774
60790
  if (selected !== 1) {
60775
- usageError("Provide exactly one artifact selector: --archive, --manifest, or --chunk PATH.", "wh repo checkpoint download acme/widgets --latest --archive --output checkpoint.zip");
60791
+ usageError("Provide exactly one artifact selector: --archive, --manifest, or --chunk PATH.", example);
60776
60792
  }
60777
60793
  if (flags.archive)
60778
60794
  return "archive";
@@ -60858,15 +60874,15 @@ var handleRetry = async (ctx, { args, flags }) => {
60858
60874
  };
60859
60875
  var handleDownload = async (ctx, { args, flags }) => {
60860
60876
  if (!flags.output) {
60861
- usageError("--output PATH|- is required for download.", "wh repo checkpoint download acme/widgets --latest --archive --output checkpoint.zip");
60877
+ usageError("--output PATH|- is required for download.", CHECKPOINT_DOWNLOAD_EXAMPLE);
60862
60878
  }
60863
60879
  if (flags.output === "-" && ctx.format !== "pretty") {
60864
60880
  throw new CliError(2 /* UserInput */, "USER_INPUT", "Binary stdout requires --format pretty; JSON and JSONL cannot carry artifact bytes.");
60865
60881
  }
60866
60882
  const { org, repo } = repoFor(ctx, args);
60867
60883
  const access = await checkpointClient(ctx).getAccess(org, repo, {
60868
- checkpoint: selectDownloadCheckpoint(flags),
60869
- artifact: selectArtifact(flags)
60884
+ checkpoint: selectArtifactCheckpoint(flags, CHECKPOINT_DOWNLOAD_EXAMPLE),
60885
+ artifact: selectArtifact(flags, CHECKPOINT_DOWNLOAD_EXAMPLE)
60870
60886
  });
60871
60887
  if (!ctx.rawFetch) {
60872
60888
  throw new CliError(1 /* Runtime */, "UNKNOWN", "Raw signed-URL transport is unavailable for this command context.");
@@ -60878,6 +60894,13 @@ var handleDownload = async (ctx, { args, flags }) => {
60878
60894
  if (flags.output !== "-")
60879
60895
  ctx.status(`Downloaded checkpoint artifact to ${flags.output}`);
60880
60896
  };
60897
+ var handleAccess = async (ctx, { args, flags }) => {
60898
+ const { org, repo } = repoFor(ctx, args);
60899
+ printAccess(ctx, await checkpointClient(ctx).getAccess(org, repo, {
60900
+ checkpoint: selectArtifactCheckpoint(flags, CHECKPOINT_ACCESS_EXAMPLE),
60901
+ artifact: selectArtifact(flags, CHECKPOINT_ACCESS_EXAMPLE)
60902
+ }));
60903
+ };
60881
60904
  var handleVerify = async (ctx, { args }) => {
60882
60905
  const archive = args[0];
60883
60906
  if (!archive) {
@@ -60905,7 +60928,7 @@ var handleVerify = async (ctx, { args }) => {
60905
60928
  };
60906
60929
  var CHECKPOINT_SUBDOMAIN = defineDomain({
60907
60930
  name: "checkpoint",
60908
- summary: "Generate, download, and verify portable repository checkpoints",
60931
+ summary: "Generate, access, download, and verify repository checkpoints",
60909
60932
  verbs: {
60910
60933
  generate: {
60911
60934
  summary: "Generate a repository checkpoint",
@@ -60945,6 +60968,18 @@ var CHECKPOINT_SUBDOMAIN = defineDomain({
60945
60968
  ],
60946
60969
  handler: handleRetry
60947
60970
  },
60971
+ access: {
60972
+ summary: "Show a short-lived checkpoint artifact URL",
60973
+ args: "[org/repo]",
60974
+ flags: accessFlags,
60975
+ notes: [
60976
+ CHECKPOINT_READ_NOTE,
60977
+ "The URL is a short-lived bearer credential. Handle command output as a secret.",
60978
+ "Requires exactly one checkpoint selector and one artifact selector."
60979
+ ],
60980
+ examples: [CHECKPOINT_ACCESS_EXAMPLE],
60981
+ handler: handleAccess
60982
+ },
60948
60983
  download: {
60949
60984
  summary: "Download one checkpoint artifact",
60950
60985
  args: "[org/repo]",
@@ -60953,9 +60988,7 @@ var CHECKPOINT_SUBDOMAIN = defineDomain({
60953
60988
  CHECKPOINT_READ_NOTE,
60954
60989
  "Requires exactly one checkpoint selector, one artifact selector, and --output PATH|-."
60955
60990
  ],
60956
- examples: [
60957
- "wh repo checkpoint download acme/widgets --latest --archive --output checkpoint.zip"
60958
- ],
60991
+ examples: [CHECKPOINT_DOWNLOAD_EXAMPLE],
60959
60992
  handler: handleDownload
60960
60993
  },
60961
60994
  verify: {
@@ -65810,7 +65843,7 @@ function resolveLogLevel(flagLevel, env) {
65810
65843
  // package.json
65811
65844
  var package_default3 = {
65812
65845
  name: "@warmhub/cli",
65813
- version: "0.87.0",
65846
+ version: "0.88.0",
65814
65847
  private: false,
65815
65848
  type: "module",
65816
65849
  description: "The wh CLI for WarmHub — create repos, commit and query data, and compound knowledge with your AI agents.",
@@ -66429,5 +66462,5 @@ process.exitCode = interceptedExitCode === undefined ? await runPreparedCli(laun
66429
66462
  version: package_default3.version
66430
66463
  }) : interceptedExitCode;
66431
66464
 
66432
- //# debugId=8EDFBA735C4E16A864756E2164756E21
66433
- //# warmhub-cli-build-info {"cliVersion":"0.87.0","sdkVersion":"0.85.0"}
66465
+ //# debugId=964BFCCE631EA49D64756E2164756E21
66466
+ //# warmhub-cli-build-info {"cliVersion":"0.88.0","sdkVersion":"0.86.0"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@warmhub/cli",
3
- "version": "0.87.0",
3
+ "version": "0.88.0",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "description": "The wh CLI for WarmHub — create repos, commit and query data, and compound knowledge with your AI agents.",