@domino-sdk/relay 1.0.0-next.4 → 1.0.0-next.6

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.
@@ -326,6 +326,12 @@ declare function defineQuest<T extends Record<string, z.ZodType>, const G extend
326
326
  */
327
327
  profile?: QuestProfile;
328
328
  budgets?: Budget[];
329
+ /**
330
+ * Whether staff can review this quest's attempts. Human review is on unless this returns
331
+ * `{ enabled: false }`. With it off, `decision.review(...)` becomes a reject that keeps the
332
+ * review reason, and the attempt records `requestedReview: true`; Console shows "Would have
333
+ * gone to review; human review is off".
334
+ */
329
335
  review?: (ctx: {
330
336
  settings: z.output<z.ZodObject<T>>;
331
337
  }) => {
package/dist/authoring.js CHANGED
@@ -5,10 +5,10 @@ import {
5
5
  defineReferral,
6
6
  formatUnits,
7
7
  parseUnits
8
- } from "./chunk-B76BAJ25.js";
8
+ } from "./chunk-ZKJBCQNI.js";
9
9
  import {
10
10
  isEvmChainId
11
- } from "./chunk-ONDBQSMU.js";
11
+ } from "./chunk-XEQDW7FM.js";
12
12
  import {
13
13
  admittedContentSchema,
14
14
  budgetSchema,
@@ -40,7 +40,7 @@ import {
40
40
  urlOptionsSchema,
41
41
  x,
42
42
  xAccountRoles
43
- } from "./chunk-NKGJEYZM.js";
43
+ } from "./chunk-BRESOTKV.js";
44
44
 
45
45
  // src/authoring.ts
46
46
  import { z } from "zod";
@@ -298,7 +298,11 @@ function defineQuest(definition) {
298
298
  kind: "review",
299
299
  reason: result2.reason,
300
300
  rewards: sample.rewards
301
- } : { kind: "reject", reason: result2.reason }
301
+ } : {
302
+ kind: "reject",
303
+ reason: result2.reason,
304
+ ...result2.kind === "review" ? { requestedReview: true } : {}
305
+ }
302
306
  );
303
307
  }
304
308
  const result = definition.evaluate ? await definition.evaluate({
@@ -321,7 +325,11 @@ function defineQuest(definition) {
321
325
  throw new Error("Evaluator returned no decision");
322
326
  }
323
327
  if (result.kind === "review" && !ctx.humanReview) {
324
- return decisionSchema.parse({ kind: "reject", reason: result.reason });
328
+ return decisionSchema.parse({
329
+ kind: "reject",
330
+ reason: result.reason,
331
+ requestedReview: true
332
+ });
325
333
  }
326
334
  return decisionSchema.parse(
327
335
  result.kind === "accept" || result.kind === "review" ? {