@lobehub/cli 0.0.206 → 0.0.208

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
@@ -9957,6 +9957,11 @@ var init_upload = __esmMin((() => {
9957
9957
  */
9958
9958
  ratio: number$1().optional(),
9959
9959
  /**
9960
+ * base64 ThumbHash of the image, recorded for images so consumers can paint a
9961
+ * blurred placeholder before the file loads
9962
+ */
9963
+ thumbhash: string().optional(),
9964
+ /**
9960
9965
  * intrinsic image width in pixels, recorded for images
9961
9966
  */
9962
9967
  width: number$1().optional()
@@ -41605,26 +41610,56 @@ function withEvidenceUploadOptions(cmd) {
41605
41610
 
41606
41611
  //#endregion
41607
41612
  //#region src/commands/acceptance/run/report.ts
41613
+ /**
41614
+ * What a run can do once its operation token is refused on `report upsert`.
41615
+ *
41616
+ * The refusal is deliberate: the report carries the round's verdict, so the
41617
+ * round's verifier writes it, and `upsertReport` stays off the operation-token
41618
+ * allowlist. A token without `acceptance:evidence` is refused one step earlier,
41619
+ * on the language check's `user.getUserState`, and is no closer to writing it.
41620
+ * A same-account stored login has already been tried by the time the refusal
41621
+ * reaches the command (`operationTokenFallbackLink`), so it is final; a bare
41622
+ * 401 only got retried. The commands below take the run's own operation id,
41623
+ * which the token is bound to.
41624
+ */
41625
+ const reportRefusalGuidance = (runId) => {
41626
+ const operation = process.env.LOBEHUB_OPERATION_ID || "<operationId>";
41627
+ return [
41628
+ `This run's token cannot write the report of round ${runId}: a round's report and verdict are written by that round's verifier.`,
41629
+ ` Check for a plan round: lh acceptance plan state ${operation} (it has one when "confirmed" shows a time).`,
41630
+ " With a plan round, hand in evidence instead:",
41631
+ ` lh acceptance run ingest <reportDir> --operation ${operation}`,
41632
+ ` lh acceptance run result submit --operation ${operation} --item <checkItemId> --type <type> --file <path>`,
41633
+ " Without one, or if that check is refused too, report the handoff as blocked. Do not retry report upsert."
41634
+ ];
41635
+ };
41608
41636
  async function reportUpsertAction(options) {
41609
41637
  const num = (s) => s === void 0 ? void 0 : Number.parseInt(s, 10);
41610
41638
  const client = await getTrpcClient();
41611
- await assertReportLanguage(client, [{
41612
- path: "--summary",
41613
- text: options.summary
41614
- }, {
41615
- path: "--content",
41616
- text: options.content
41617
- }]);
41618
- const created = await client.verify.upsertReport.mutate({
41619
- content: options.content,
41620
- failedChecks: num(options.failed),
41621
- passedChecks: num(options.passed),
41622
- summary: options.summary,
41623
- totalChecks: num(options.total),
41624
- uncertainChecks: num(options.uncertain),
41625
- verdict: options.verdict,
41626
- verifyRunId: options.run
41627
- });
41639
+ let created;
41640
+ try {
41641
+ await assertReportLanguage(client, [{
41642
+ path: "--summary",
41643
+ text: options.summary
41644
+ }, {
41645
+ path: "--content",
41646
+ text: options.content
41647
+ }]);
41648
+ created = await client.verify.upsertReport.mutate({
41649
+ content: options.content,
41650
+ failedChecks: num(options.failed),
41651
+ passedChecks: num(options.passed),
41652
+ summary: options.summary,
41653
+ totalChecks: num(options.total),
41654
+ uncertainChecks: num(options.uncertain),
41655
+ verdict: options.verdict,
41656
+ verifyRunId: options.run
41657
+ });
41658
+ } catch (error) {
41659
+ if (!isOperationTokenRefusal(error)) throw error;
41660
+ for (const line of reportRefusalGuidance(options.run)) log$15.error(line);
41661
+ process.exit(1);
41662
+ }
41628
41663
  if (options.json !== void 0) {
41629
41664
  outputJson(created, typeof options.json === "string" ? options.json : void 0);
41630
41665
  return;
package/man/man1/lh.1 CHANGED
@@ -1,6 +1,6 @@
1
1
  .\" Code generated by `npm run man:generate`; DO NOT EDIT.
2
2
  .\" Manual command details come from the Commander command tree.
3
- .TH LH 1 "" "@lobehub/cli 0.0.206" "User Commands"
3
+ .TH LH 1 "" "@lobehub/cli 0.0.208" "User Commands"
4
4
  .SH NAME
5
5
  lh \- LobeHub CLI \- manage and connect to LobeHub services
6
6
  .SH SYNOPSIS
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lobehub/cli",
3
- "version": "0.0.206",
3
+ "version": "0.0.208",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/lobehub/lobehub",
@@ -83,5 +83,5 @@
83
83
  "access": "public",
84
84
  "registry": "https://registry.npmjs.org"
85
85
  },
86
- "gitHead": "18ff6aead33b35bfb8b6a4566ffa66578f81041e"
86
+ "gitHead": "35afe8b2773a5b79ff766b383c0f9020a18ab11f"
87
87
  }