@domino-sdk/relay 1.72.0 → 1.74.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 (72) hide show
  1. package/CHANGELOG.md +25 -0
  2. package/dist/{accounts-COLmXRbW.d.ts → accounts-C9as33l1.d.ts} +2 -2
  3. package/dist/{attempt-captures-CVl161qB.d.ts → attempt-captures-DU4vi20Y.d.ts} +2 -2
  4. package/dist/authoring.d.ts +103 -106
  5. package/dist/authoring.js +187 -286
  6. package/dist/{automatic-outcomes-5l68PGr1.d.ts → automatic-outcomes-D0yMHSHL.d.ts} +2 -2
  7. package/dist/browser.d.ts +9 -9
  8. package/dist/browser.js +11 -11
  9. package/dist/{dashboards-DXpjHnq-.d.ts → capability-error-Bn6cCqof.d.ts} +298 -5
  10. package/dist/{catalog-BR3g-1H9.d.ts → catalog-9I6t18qP.d.ts} +2 -2
  11. package/dist/{chunk-W6DBNBMT.js → chunk-2LURSPDM.js} +232 -232
  12. package/dist/{chunk-VNEJH4NT.js → chunk-2M5FM7FW.js} +21 -0
  13. package/dist/{chunk-74SMLZZ5.js → chunk-6TDHRGBM.js} +1522 -1278
  14. package/dist/{chunk-QG6XVOOO.js → chunk-724CKAC7.js} +4 -4
  15. package/dist/{chunk-I7XIBXT2.js → chunk-7I7P5UVC.js} +3 -3
  16. package/dist/{chunk-LDO5GP7G.js → chunk-AL5XMXPO.js} +1 -1
  17. package/dist/{chunk-TW4RABVS.js → chunk-CW7FJ5PX.js} +1 -1
  18. package/dist/{chunk-BXUF3CRL.js → chunk-DNOLNMCW.js} +9 -9
  19. package/dist/{chunk-5RLIPTL7.js → chunk-E73HZCG2.js} +1 -1
  20. package/dist/{chunk-UEVZ3TST.js → chunk-ELHMJODS.js} +1 -1
  21. package/dist/{chunk-ASBDB436.js → chunk-F66GGNKD.js} +1 -1
  22. package/dist/{chunk-ETGKC2SB.js → chunk-HCOLMJFX.js} +2 -2
  23. package/dist/chunk-JZT2NLSG.js +7201 -0
  24. package/dist/{chunk-FGZGL5PG.js → chunk-KGZ7SRKJ.js} +2 -2
  25. package/dist/{chunk-3KKRXN5E.js → chunk-KP55TMCC.js} +1 -1
  26. package/dist/chunk-NI6XRGEL.js +374 -0
  27. package/dist/{chunk-VFHLMNYV.js → chunk-RALBAKKX.js} +1 -1
  28. package/dist/chunk-SVZ3QWHT.js +142 -0
  29. package/dist/{chunk-CVJTIVAP.js → chunk-T4PTFCSB.js} +2 -2
  30. package/dist/{chunk-KIRXE37T.js → chunk-TGQNNMCY.js} +6 -6
  31. package/dist/{client-B__hMWtK.d.ts → client-B2aVGf38.d.ts} +7 -7
  32. package/dist/{deployments-CT2kQloT.d.ts → deployments-CGV1rIZm.d.ts} +107 -107
  33. package/dist/{identity-integration-ClX4oUAu.d.ts → identity-integration-C03rUYc0.d.ts} +3 -3
  34. package/dist/index.d.ts +10 -10
  35. package/dist/index.js +10 -10
  36. package/dist/internal.d.ts +36197 -18
  37. package/dist/internal.js +518 -15
  38. package/dist/{limits-B7wbnWhd.d.ts → limits-p-Mg0oSi.d.ts} +1 -1
  39. package/dist/{offers-D4pyeY9b.d.ts → offers-CnMyMeQo.d.ts} +2 -2
  40. package/dist/portal-proxy.d.ts +2 -2
  41. package/dist/portal-proxy.js +10 -10
  42. package/dist/react/index.d.ts +11 -11
  43. package/dist/react/index.js +11 -11
  44. package/dist/{reward-deliveries-HGpj1VFz.d.ts → reward-deliveries-zWfsgc6m.d.ts} +1 -1
  45. package/dist/runtime/authoring.js +1 -1
  46. package/dist/runtime/chunks/NYEWMPJH.js +1 -0
  47. package/dist/runtime/manifest.json +3 -3
  48. package/dist/runtime/schema.js +1 -1
  49. package/dist/schema.d.ts +35 -60
  50. package/dist/schema.js +10 -8
  51. package/dist/server/index.d.ts +13 -13
  52. package/dist/server/index.js +2972 -4528
  53. package/dist/{sign-in-providers-lbOXCF8N.d.ts → sign-in-providers-BG22ZZkl.d.ts} +2 -2
  54. package/dist/solana.d.ts +13 -13
  55. package/dist/solana.js +9 -9
  56. package/dist/stake-BSVjB3BJ.d.ts +254 -0
  57. package/dist/{station-check-in-qBiaftfE.d.ts → station-check-in-a1deSjbm.d.ts} +5 -5
  58. package/dist/{submission-input-U4aIkJuT.d.ts → submission-input-DBDLkTF8.d.ts} +2 -2
  59. package/dist/telegram.d.ts +7 -7
  60. package/dist/telegram.js +2 -2
  61. package/dist/testing.d.ts +159 -160
  62. package/dist/testing.js +47 -344
  63. package/dist/{tracker-data-2BYXZjsN.d.ts → tracker-data-Dwq9dWEm.d.ts} +474 -221
  64. package/dist/{transport-DcRXDZ1j.d.ts → transport-D77Rbf4D.d.ts} +77050 -74062
  65. package/dist/{wallet-BqswMAqZ.d.ts → wallet-CeqgtXNm.d.ts} +2 -7
  66. package/dist/{wallet-browser-B5r7u3xB.d.ts → wallet-browser-Cucpqn3F.d.ts} +1 -1
  67. package/package.json +1 -1
  68. package/dist/capability-error-db7kO8-P.d.ts +0 -297
  69. package/dist/chunk-2UELTHW6.js +0 -467
  70. package/dist/chunk-GHBYWDEZ.js +0 -94
  71. package/dist/chunk-HN7DE2UN.js +0 -53
  72. package/dist/runtime/chunks/A7G5P76B.js +0 -1
@@ -12,10 +12,10 @@ import {
12
12
  resourceHandle,
13
13
  responseShape,
14
14
  tierRewardSchema
15
- } from "./chunk-74SMLZZ5.js";
15
+ } from "./chunk-6TDHRGBM.js";
16
16
  import {
17
17
  parseDefinition
18
- } from "./chunk-VNEJH4NT.js";
18
+ } from "./chunk-2M5FM7FW.js";
19
19
 
20
20
  // src/engagement.ts
21
21
  import * as z from "zod";
@@ -10,7 +10,7 @@ import {
10
10
  skipEnrollmentSchema,
11
11
  telegramSignInMethodsSchema,
12
12
  walletSignInNetworksSchema
13
- } from "./chunk-74SMLZZ5.js";
13
+ } from "./chunk-6TDHRGBM.js";
14
14
 
15
15
  // src/sign-in-providers.ts
16
16
  import * as z from "zod";
@@ -0,0 +1,374 @@
1
+ import {
2
+ imageRequestSchema,
3
+ xRequestSchema
4
+ } from "./chunk-RALBAKKX.js";
5
+ import {
6
+ cosmosAddressSchema,
7
+ cosmosNetworkSchema,
8
+ discordMemberInputSchema,
9
+ discordMessageInputSchema,
10
+ evmChainIdSchema,
11
+ identifier,
12
+ isContractCall,
13
+ isContractEvent,
14
+ isNftCollection,
15
+ isSolanaProgram,
16
+ limits,
17
+ maxSolanaSeeds,
18
+ solanaAddressSchema,
19
+ solanaDevnet,
20
+ solanaMainnet,
21
+ solanaSeedSchema,
22
+ telegramConnectionInputSchema,
23
+ telegramMemberInputSchema,
24
+ textReviewInputSchema,
25
+ trackerContentQuerySchema,
26
+ trackerQuerySchema
27
+ } from "./chunk-6TDHRGBM.js";
28
+
29
+ // src/capability-requests.ts
30
+ import * as z from "zod";
31
+ var trackerInput = /* @__PURE__ */ (() => ({
32
+ reference: identifier,
33
+ query: trackerQuerySchema,
34
+ asOf: z.number().int().nonnegative().safe()
35
+ }))();
36
+ var walletBalanceRequestSchema = /* @__PURE__ */ (() => z.strictObject({
37
+ kind: z.literal("wallet-balance"),
38
+ chain: z.union([
39
+ z.literal(solanaMainnet),
40
+ z.literal(solanaDevnet),
41
+ evmChainIdSchema,
42
+ cosmosNetworkSchema
43
+ ]),
44
+ token: z.string().min(1).max(128).nullable(),
45
+ address: z.string().min(1).max(100).nullable()
46
+ }))();
47
+ var walletCallRequestSchema = /* @__PURE__ */ (() => z.strictObject({
48
+ kind: z.literal("wallet-call"),
49
+ call: z.string().max(400).refine(isContractCall),
50
+ args: z.array(
51
+ z.union([
52
+ z.strictObject({ wallet: z.literal(true) }),
53
+ z.string().max(1e3),
54
+ z.number().finite(),
55
+ z.boolean()
56
+ ])
57
+ ).max(16).refine(
58
+ (args) => args.filter((arg) => typeof arg === "object").length <= 1,
59
+ "Pass the member's wallet ({ wallet: true }) at most once"
60
+ ),
61
+ address: z.string().min(1).max(100).nullable()
62
+ }))();
63
+ var walletEventsRequestSchema = /* @__PURE__ */ (() => z.strictObject({
64
+ kind: z.literal("wallet-events"),
65
+ event: z.string().max(1e3).refine(isContractEvent),
66
+ account: z.string().min(1).max(100),
67
+ since: z.number().int().nonnegative().safe(),
68
+ afterActivation: z.boolean(),
69
+ where: z.record(
70
+ z.string().min(1).max(100),
71
+ z.union([
72
+ z.string().min(1).max(200),
73
+ z.boolean(),
74
+ z.strictObject({ gte: z.string().regex(/^-?(0|[1-9][0-9]{0,77})$/) })
75
+ ])
76
+ ).refine((where) => Object.keys(where).length <= 10, "At most 10 conditions").nullable(),
77
+ address: z.string().min(1).max(100).nullable(),
78
+ newest: z.number().int().min(1).max(limits.walletEventLogs).optional()
79
+ }))();
80
+ var capabilityRequestSchemas = /* @__PURE__ */ (() => ({
81
+ "wallet-balance": walletBalanceRequestSchema,
82
+ "wallet-nfts": z.strictObject({
83
+ kind: z.literal("wallet-nfts"),
84
+ collection: z.string().max(200).refine(isNftCollection),
85
+ address: z.string().min(1).max(100).nullable()
86
+ }),
87
+ "wallet-call": walletCallRequestSchema,
88
+ "wallet-delegations": z.strictObject({
89
+ kind: z.literal("wallet-delegations"),
90
+ chain: cosmosNetworkSchema,
91
+ validator: cosmosAddressSchema.nullable(),
92
+ address: z.string().min(1).max(100).nullable()
93
+ }),
94
+ "wallet-events": walletEventsRequestSchema,
95
+ "wallet-transactions": z.strictObject({
96
+ kind: z.literal("wallet-transactions"),
97
+ program: z.string().max(44).refine(isSolanaProgram),
98
+ chain: z.literal(solanaDevnet).optional(),
99
+ since: z.number().int().nonnegative().safe(),
100
+ afterActivation: z.boolean(),
101
+ mint: solanaAddressSchema.nullable(),
102
+ address: z.string().min(1).max(100).nullable()
103
+ }),
104
+ "wallet-program-account": z.strictObject({
105
+ kind: z.literal("wallet-program-account"),
106
+ program: z.string().max(44).refine(isSolanaProgram),
107
+ chain: z.literal(solanaDevnet).optional(),
108
+ account: z.string().min(1).max(200),
109
+ seeds: z.array(solanaSeedSchema).max(maxSolanaSeeds),
110
+ address: z.string().min(1).max(100).nullable()
111
+ }),
112
+ "wallet-stake": z.strictObject({
113
+ kind: z.literal("wallet-stake"),
114
+ chain: z.literal(solanaDevnet).optional(),
115
+ voteAccount: z.string().min(1).max(100).nullable(),
116
+ address: z.string().min(1).max(100).nullable()
117
+ }),
118
+ "wallet-list": z.strictObject({ kind: z.literal("wallet-list") }),
119
+ "tracker-content": z.strictObject({
120
+ kind: z.literal("tracker-content"),
121
+ reference: identifier,
122
+ query: trackerContentQuerySchema
123
+ }),
124
+ "tracker-records": z.strictObject({
125
+ kind: z.literal("tracker-records"),
126
+ ...trackerInput
127
+ }),
128
+ "tracker-summary": z.strictObject({
129
+ kind: z.literal("tracker-summary"),
130
+ ...trackerInput
131
+ }),
132
+ x: z.strictObject({
133
+ kind: z.literal("x"),
134
+ input: xRequestSchema
135
+ }),
136
+ image: z.strictObject({
137
+ kind: z.literal("image"),
138
+ input: imageRequestSchema
139
+ }),
140
+ text: textReviewInputSchema.extend({ kind: z.literal("text") }).strict(),
141
+ photo: z.strictObject({
142
+ kind: z.literal("photo"),
143
+ criteria: z.string().min(1).max(2e3),
144
+ image: z.string().optional()
145
+ }),
146
+ discord: z.strictObject({
147
+ kind: z.literal("discord"),
148
+ input: z.union([discordMemberInputSchema, discordMessageInputSchema])
149
+ }),
150
+ telegram: z.strictObject({
151
+ kind: z.literal("telegram"),
152
+ input: z.union([telegramMemberInputSchema, telegramConnectionInputSchema])
153
+ }),
154
+ "member-identities": z.strictObject({
155
+ kind: z.literal("member-identities")
156
+ }),
157
+ "member-balance": z.strictObject({
158
+ kind: z.literal("member-balance"),
159
+ ledger: identifier
160
+ }),
161
+ "member-completions": z.strictObject({
162
+ kind: z.literal("member-completions"),
163
+ quest: identifier.nullable(),
164
+ since: z.number().int().nonnegative().safe().nullable(),
165
+ limit: z.number().int().min(1).max(limits.memberCompletions)
166
+ }),
167
+ "member-groups": z.strictObject({ kind: z.literal("member-groups") }),
168
+ "member-enrolled": z.strictObject({
169
+ kind: z.literal("member-enrolled"),
170
+ campaign: identifier
171
+ }),
172
+ "member-referrals": z.strictObject({
173
+ kind: z.literal("member-referrals"),
174
+ program: identifier
175
+ })
176
+ }))();
177
+
178
+ // src/evaluator-readers.ts
179
+ var evaluatorReaderFactories = {
180
+ member: (call, input) => {
181
+ const key = (reference) => typeof reference === "string" ? reference : reference.key;
182
+ return {
183
+ ...input.member,
184
+ identities: () => call("member", "identities", { kind: "member-identities" }),
185
+ balance: (ledger) => call("member", "balance", {
186
+ kind: "member-balance",
187
+ ledger: key(ledger)
188
+ }),
189
+ // The host refuses a limit that is not a positive integer; a larger one reads the most.
190
+ completions: ({ quest, since, limit = 100 } = {}) => call("member", "completions", {
191
+ kind: "member-completions",
192
+ quest: quest === void 0 ? null : key(quest),
193
+ since: since ?? null,
194
+ limit: limit > 100 ? 100 : limit
195
+ }),
196
+ groups: () => call("member", "groups", { kind: "member-groups" }),
197
+ enrolled: (campaign) => call("member", "enrolled", {
198
+ kind: "member-enrolled",
199
+ campaign: key(campaign)
200
+ }),
201
+ referrals: (program) => call("member", "referrals", {
202
+ kind: "member-referrals",
203
+ program: key(program)
204
+ })
205
+ };
206
+ },
207
+ discord: (call) => {
208
+ return {
209
+ member: () => call("discord", "member", { kind: "discord", input: {} }),
210
+ message: (input) => call("discord", "message", { kind: "discord", input })
211
+ };
212
+ },
213
+ // The Telegram plugin's capability (packages/plugins/telegram/src/capability.ts answers it).
214
+ telegram: (call) => {
215
+ return {
216
+ connection: () => call("telegram", "connection", {
217
+ kind: "telegram",
218
+ input: { operation: "connection" }
219
+ }),
220
+ // A `member()` request is `{ chat }`, as before `connection()` existed, so captured requests
221
+ // stay equal.
222
+ member: (input) => call("telegram", "member", { kind: "telegram", input })
223
+ };
224
+ },
225
+ x: (call) => {
226
+ return {
227
+ connection: () => call("x", "connection", {
228
+ kind: "x",
229
+ input: { operation: "connection" }
230
+ }),
231
+ profile: () => call("x", "profile", { kind: "x", input: { operation: "profile" } }),
232
+ post: (input) => call("x", "post", {
233
+ kind: "x",
234
+ input: { ...input, operation: "post" }
235
+ }),
236
+ follows: (input) => call("x", "follows", {
237
+ kind: "x",
238
+ input: { ...input, operation: "follows" }
239
+ }),
240
+ reposted: (input) => call("x", "reposted", {
241
+ kind: "x",
242
+ input: { ...input, operation: "reposted" }
243
+ })
244
+ };
245
+ },
246
+ trackers: (call, input) => {
247
+ const key = (reference) => typeof reference === "string" ? reference : reference.key;
248
+ return {
249
+ records: (reference, query = {}) => {
250
+ const { asOf = input.eligibleAt, ...rest } = query;
251
+ return call("trackers", "records", {
252
+ kind: "tracker-records",
253
+ reference: key(reference),
254
+ query: rest,
255
+ asOf
256
+ });
257
+ },
258
+ summary: (reference, query = {}) => {
259
+ const { asOf = input.eligibleAt, ...rest } = query;
260
+ return call("trackers", "summary", {
261
+ kind: "tracker-summary",
262
+ reference: key(reference),
263
+ query: rest,
264
+ asOf
265
+ });
266
+ },
267
+ content: (reference, query) => call("trackers", "content", {
268
+ kind: "tracker-content",
269
+ reference: key(reference),
270
+ query
271
+ })
272
+ };
273
+ },
274
+ images: (call) => {
275
+ return {
276
+ inspect: (image) => call("images", "inspect", {
277
+ kind: "image",
278
+ input: { operation: "inspect", image }
279
+ }),
280
+ compare: (a, b) => call("images", "compare", {
281
+ kind: "image",
282
+ input: { operation: "compare", images: [a, b] }
283
+ }),
284
+ review: (options) => call("images", "review", {
285
+ kind: "image",
286
+ input: { ...options, operation: "review" }
287
+ }),
288
+ extract: (options) => {
289
+ return call("images", "extract", {
290
+ kind: "image",
291
+ input: { ...options, operation: "extract" }
292
+ });
293
+ },
294
+ seen: (image, options = {}) => call("images", "seen", {
295
+ kind: "image",
296
+ input: { ...options, operation: "seen", image }
297
+ })
298
+ };
299
+ },
300
+ review: (call) => {
301
+ return {
302
+ text: (options) => call("review", "text", { kind: "text", ...options }),
303
+ photo: (options) => call("review", "photo", { kind: "photo", ...options })
304
+ };
305
+ },
306
+ wallet: (call, _input, constants) => {
307
+ const cluster = (chain) => chain === void 0 || chain === "solana" || chain === constants.solanaMainnet ? {} : { chain };
308
+ return {
309
+ list: () => call("wallet", "list", { kind: "wallet-list" }),
310
+ balance: (query) => call("wallet", "balance", {
311
+ kind: "wallet-balance",
312
+ chain: query.chain === "solana" ? constants.solanaMainnet : query.chain,
313
+ token: query.token ?? null,
314
+ address: query.address ?? null
315
+ }),
316
+ nfts: (query) => call("wallet", "nfts", {
317
+ kind: "wallet-nfts",
318
+ collection: query.collection,
319
+ address: query.address ?? null
320
+ }),
321
+ call: (query) => call("wallet", "call", {
322
+ kind: "wallet-call",
323
+ call: query.call,
324
+ args: query.args ?? [],
325
+ address: query.address ?? null
326
+ }),
327
+ delegations: (query) => call("wallet", "delegations", {
328
+ kind: "wallet-delegations",
329
+ chain: query.chain,
330
+ validator: query.validator ?? null,
331
+ address: query.address ?? null
332
+ }),
333
+ events: (query) => call("wallet", "events", {
334
+ kind: "wallet-events",
335
+ event: query.event,
336
+ account: query.account,
337
+ since: query.since,
338
+ afterActivation: query.afterActivation ?? false,
339
+ where: query.where ?? null,
340
+ address: query.address ?? null,
341
+ // Only when set, so a call without it sends the request it always did.
342
+ ...query.newest === void 0 ? {} : { newest: query.newest }
343
+ }),
344
+ transactions: (query) => call("wallet", "transactions", {
345
+ kind: "wallet-transactions",
346
+ program: query.program,
347
+ ...cluster(query.chain),
348
+ since: query.since,
349
+ afterActivation: query.afterActivation ?? false,
350
+ mint: query.mint ?? null,
351
+ address: query.address ?? null
352
+ }),
353
+ programAccount: (query) => call("wallet", "programAccount", {
354
+ kind: "wallet-program-account",
355
+ program: query.program,
356
+ ...cluster(query.chain),
357
+ account: query.account,
358
+ seeds: query.seeds,
359
+ address: query.address ?? null
360
+ }),
361
+ stake: (query) => call("wallet", "stake", {
362
+ kind: "wallet-stake",
363
+ ...cluster(query.chain),
364
+ voteAccount: query.voteAccount ?? null,
365
+ address: query.address ?? null
366
+ })
367
+ };
368
+ }
369
+ };
370
+
371
+ export {
372
+ capabilityRequestSchemas,
373
+ evaluatorReaderFactories
374
+ };
@@ -2,7 +2,7 @@ import {
2
2
  identifier,
3
3
  responseShape,
4
4
  xTweetSchema
5
- } from "./chunk-74SMLZZ5.js";
5
+ } from "./chunk-6TDHRGBM.js";
6
6
 
7
7
  // src/x.ts
8
8
  import * as z from "zod";
@@ -0,0 +1,142 @@
1
+ import {
2
+ imageComparisonSchema,
3
+ imageExtractionSchema,
4
+ imageFieldsSchema,
5
+ imageInspectionSchema,
6
+ imageSightingsSchema
7
+ } from "./chunk-RALBAKKX.js";
8
+ import {
9
+ capabilityFailureSchema
10
+ } from "./chunk-MWMCQLCG.js";
11
+ import {
12
+ attemptActionSchema,
13
+ contentPerformanceSnapshotSchema,
14
+ decisionSchema,
15
+ identifier,
16
+ photoResultSchema,
17
+ rewardBundleSchema,
18
+ settingsValuesSchema,
19
+ trackerTriggerContextSchema
20
+ } from "./chunk-6TDHRGBM.js";
21
+
22
+ // src/image-results.ts
23
+ import * as z from "zod";
24
+ var invalid = (message, path) => new z.ZodError([{ code: "custom", message, path, input: void 0 }]);
25
+ function parseImageExtraction(raw, value) {
26
+ const result = imageExtractionSchema.parse(value);
27
+ const fields = imageFieldsSchema.parse(raw);
28
+ for (const [key, field] of Object.entries(fields)) {
29
+ const extracted = result.values[key];
30
+ if (extracted === void 0) {
31
+ throw invalid("Image extraction omitted " + key, ["values", key]);
32
+ }
33
+ if (extracted !== null && typeof extracted !== field.type) {
34
+ throw invalid("Image extraction returned the wrong type for " + key, [
35
+ "values",
36
+ key
37
+ ]);
38
+ }
39
+ }
40
+ if (Object.keys(result.values).some((key) => !Object.hasOwn(fields, key))) {
41
+ throw invalid("Image extraction returned an undeclared field", ["values"]);
42
+ }
43
+ return result;
44
+ }
45
+ function parseImageResult(request, value) {
46
+ switch (request.operation) {
47
+ case "inspect":
48
+ return imageInspectionSchema.parse(value);
49
+ case "compare":
50
+ return imageComparisonSchema.parse(value);
51
+ case "review":
52
+ return photoResultSchema.parse(value);
53
+ case "extract":
54
+ return parseImageExtraction(request.fields, value);
55
+ case "seen":
56
+ return imageSightingsSchema.parse(value);
57
+ }
58
+ }
59
+
60
+ // src/server/attempt-captures.ts
61
+ import * as z2 from "zod";
62
+ var timestamp = /* @__PURE__ */ (() => z2.number().int().nonnegative().safe())();
63
+ var capturedFactSchema = /* @__PURE__ */ (() => z2.object({
64
+ /** The call's position in the run, from 0. */
65
+ sequence: z2.number().int().nonnegative(),
66
+ /** The capability request quest code sent, after validation. */
67
+ request: z2.record(z2.string(), z2.json()),
68
+ /**
69
+ * The answer every retry of the run receives: the result, or the failure quest code saw. Absent
70
+ * while the call has no answer, such as when the run stopped during it.
71
+ */
72
+ outcome: z2.union([
73
+ z2.object({ value: z2.json() }),
74
+ z2.object({ error: capabilityFailureSchema })
75
+ ]).optional(),
76
+ /**
77
+ * False when a retry of the run asks the provider again: a retryable failure Relay recorded but
78
+ * did not keep, or a call without an answer. A replay cannot answer such a call.
79
+ */
80
+ captured: z2.boolean()
81
+ }))();
82
+ var attemptCaptureSchema = /* @__PURE__ */ (() => z2.object({
83
+ format: z2.literal(1),
84
+ attempt: identifier,
85
+ environment: z2.literal("test"),
86
+ quest: z2.object({
87
+ id: identifier,
88
+ /** The quest's authoring key; null for a quest created in Console. */
89
+ key: identifier.nullable()
90
+ }),
91
+ release: identifier,
92
+ evaluationRun: z2.number().int().nonnegative(),
93
+ /** The evaluator protocol the release was built for. */
94
+ protocol: z2.number().int().positive(),
95
+ /** The seed of the run's `Math.random()` and `crypto.randomUUID()` streams. */
96
+ seed: z2.string().min(1),
97
+ /** The run's frozen start time, `ctx.now`. */
98
+ now: timestamp,
99
+ context: z2.object({
100
+ settings: settingsValuesSchema,
101
+ rewards: rewardBundleSchema,
102
+ humanReview: z2.boolean(),
103
+ integrations: z2.array(z2.string()),
104
+ member: identifier,
105
+ input: z2.record(z2.string(), z2.json()),
106
+ tracker: trackerTriggerContextSchema.nullable(),
107
+ /**
108
+ * The action that started the attempt, `ctx.action`. Absent from captures Relay made before it
109
+ * recorded actions.
110
+ *
111
+ * @experimental A minor release can change quest actions.
112
+ */
113
+ action: attemptActionSchema.nullable().optional(),
114
+ /**
115
+ * The code station the member checked in at, for an attempt a station's code started: its
116
+ * `ctx.action` is `{ kind: "station-code", reference: station }`. Absent for any other attempt.
117
+ *
118
+ * @experimental A minor release can change check-in stations.
119
+ */
120
+ station: z2.string().optional(),
121
+ eligibleAt: timestamp,
122
+ calendar: z2.object({
123
+ segments: z2.array(
124
+ z2.looseObject({ effectiveAt: timestamp, timeZone: z2.string() })
125
+ )
126
+ }),
127
+ performance: contentPerformanceSnapshotSchema.nullable()
128
+ }),
129
+ facts: z2.array(capturedFactSchema),
130
+ /**
131
+ * What quest code decided in the run, before Relay amended, claimed or reviewed it. Null while it
132
+ * has decided nothing, and for runs decided before Relay kept decisions.
133
+ */
134
+ recorded: decisionSchema.nullable()
135
+ }))();
136
+
137
+ export {
138
+ parseImageExtraction,
139
+ parseImageResult,
140
+ capturedFactSchema,
141
+ attemptCaptureSchema
142
+ };
@@ -3,10 +3,10 @@ import {
3
3
  limits,
4
4
  resourceHandle,
5
5
  responseShape
6
- } from "./chunk-74SMLZZ5.js";
6
+ } from "./chunk-6TDHRGBM.js";
7
7
  import {
8
8
  parseDefinition
9
- } from "./chunk-VNEJH4NT.js";
9
+ } from "./chunk-2M5FM7FW.js";
10
10
 
11
11
  // src/server/analytics.ts
12
12
  import * as z from "zod";
@@ -6,13 +6,13 @@ import {
6
6
  imageSightingsSchema,
7
7
  imageUploadsSchema,
8
8
  publishedImageSchema
9
- } from "./chunk-VFHLMNYV.js";
9
+ } from "./chunk-RALBAKKX.js";
10
10
  import {
11
11
  dashboardArtifactSchema,
12
12
  dashboardIssue,
13
13
  dashboardPreviewSchema,
14
14
  normalizeDashboard
15
- } from "./chunk-CVJTIVAP.js";
15
+ } from "./chunk-T4PTFCSB.js";
16
16
  import {
17
17
  authProvidersSchema,
18
18
  collectionPassSchema,
@@ -23,7 +23,7 @@ import {
23
23
  questOutcomePageSchema,
24
24
  questOutcomeSchema,
25
25
  rewardDeliveriesSchema
26
- } from "./chunk-3KKRXN5E.js";
26
+ } from "./chunk-KP55TMCC.js";
27
27
  import {
28
28
  catalogDeploymentSchema,
29
29
  collectionViewSchema,
@@ -37,7 +37,7 @@ import {
37
37
  questExperienceSchema,
38
38
  questTypeVersionSchema,
39
39
  questViewSchema
40
- } from "./chunk-TW4RABVS.js";
40
+ } from "./chunk-CW7FJ5PX.js";
41
41
  import {
42
42
  engagementArtifactSchema,
43
43
  engagementBoundaryPageSchema,
@@ -52,7 +52,7 @@ import {
52
52
  referralDefinitionSchema,
53
53
  referralHistorySchema,
54
54
  referralSummarySchema
55
- } from "./chunk-FGZGL5PG.js";
55
+ } from "./chunk-KGZ7SRKJ.js";
56
56
  import {
57
57
  accountConnectionSchema,
58
58
  attemptSchema,
@@ -120,7 +120,7 @@ import {
120
120
  walletTransactionChallengeSchema,
121
121
  walletTransactionsSchema,
122
122
  whereSettings
123
- } from "./chunk-74SMLZZ5.js";
123
+ } from "./chunk-6TDHRGBM.js";
124
124
 
125
125
  // src/deployments.ts
126
126
  import * as z from "zod";
@@ -1,14 +1,14 @@
1
- import { G as QuizEvidence, a as Attempt, s as MemberProgress, at as referralAcceptSchema, q as LeaderboardQuery, b as AttemptStatus, X as AttemptCodeSource, O as StationCheckIn, f as CampaignEnrollmentInput, h as CampaignWithdrawalInput, J as SignInProvider, c as AuthProvider, I as SignInAccountStatus, x as PointHistoryQuery, v as PointEntryKind, n as LeaderboardHistoryQuery, au as submitSchema, av as engagementPageQuerySchema, aw as contentPerformanceQuerySchema } from './accounts-COLmXRbW.js';
2
- import { M as MissingPrerequisite, V as ValueEvidence } from './submission-input-U4aIkJuT.js';
1
+ import { G as QuizEvidence, a as Attempt, s as MemberProgress, at as referralAcceptSchema, q as LeaderboardQuery, b as AttemptStatus, X as AttemptCodeSource, O as StationCheckIn, f as CampaignEnrollmentInput, h as CampaignWithdrawalInput, J as SignInProvider, c as AuthProvider, I as SignInAccountStatus, x as PointHistoryQuery, v as PointEntryKind, n as LeaderboardHistoryQuery, au as submitSchema, av as engagementPageQuerySchema, aw as contentPerformanceQuerySchema } from './accounts-C9as33l1.js';
2
+ import { M as MissingPrerequisite, V as ValueEvidence } from './submission-input-DBDLkTF8.js';
3
3
  import { R as RequestError, a as RequestErrorDetails, b as RequestErrorKind } from './request-error-C24SY7n9.js';
4
- import { d as WalletProofKind, ar as walletAddressInputSchema, as as walletSignatureSchema, at as walletTransactionProofSchema, L as LinkedWallet, g as WalletSigner } from './wallet-BqswMAqZ.js';
5
- import { q as ResponseSchema, i as PageQuery, k as QuestEnrollmentInput, Q as QuestClaimInput, n as QuestOutcomeQuery, M as MemberConsent, a as ConsentInput, e as CreatorAccountProvider, r as RewardDeliveryQuery, s as RewardDeliveryPage, t as contentQualificationQuerySchema } from './reward-deliveries-HGpj1VFz.js';
6
- import { b as QuestView, q as questExperienceSchema } from './catalog-BR3g-1H9.js';
7
- import { T as TrackerSkipCode, S as SkipEnrollment } from './tracker-data-2BYXZjsN.js';
4
+ import { d as WalletProofKind, ar as walletAddressInputSchema, as as walletSignatureSchema, at as walletTransactionProofSchema, L as LinkedWallet, g as WalletSigner } from './wallet-CeqgtXNm.js';
5
+ import { q as ResponseSchema, i as PageQuery, k as QuestEnrollmentInput, Q as QuestClaimInput, n as QuestOutcomeQuery, M as MemberConsent, a as ConsentInput, e as CreatorAccountProvider, r as RewardDeliveryQuery, s as RewardDeliveryPage, t as contentQualificationQuerySchema } from './reward-deliveries-zWfsgc6m.js';
6
+ import { b as QuestView, q as questExperienceSchema } from './catalog-9I6t18qP.js';
7
+ import { T as TrackerSkipCode, S as SkipEnrollment } from './tracker-data-Dwq9dWEm.js';
8
8
  import { b as ParticipantSession, e as exchangeSchema, R as RelayEvent, P as ParticipantActivity, M as MemberSummary } from './participant-activity-BznrcePT.js';
9
9
  import * as z from 'zod';
10
10
  import { c as createRelayAction, O as OptionalActionId } from './action-BDFKqGlH.js';
11
- import { A as AuthProviders } from './sign-in-providers-lbOXCF8N.js';
11
+ import { A as AuthProviders } from './sign-in-providers-BG22ZZkl.js';
12
12
  import { p as profileUpdateSchema, c as ProfileCompletionQuery } from './profiles-CLDKZVFx.js';
13
13
 
14
14
  /** What happened, as in every Domino client error (see `RequestError`). */