@domino-sdk/relay 1.62.0 → 1.63.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 (74) hide show
  1. package/CHANGELOG.md +120 -0
  2. package/dist/{accounts-CCqCKCVx.d.ts → accounts-nz3mzfRQ.d.ts} +21 -3
  3. package/dist/{attempt-captures-Cm-5G0PC.d.ts → attempt-captures-DMi8oR9T.d.ts} +1 -1
  4. package/dist/authoring.d.ts +54 -20
  5. package/dist/authoring.js +58 -24
  6. package/dist/{automatic-outcomes-pAsOyIVp.d.ts → automatic-outcomes-C_LLQU1p.d.ts} +11 -1
  7. package/dist/avatar.d.ts +1 -1
  8. package/dist/browser.d.ts +9 -9
  9. package/dist/browser.js +15 -13
  10. package/dist/capability-error-CuI_F7yM.d.ts +296 -0
  11. package/dist/{catalog--ZIlskAo.d.ts → catalog-BaTOKpNw.d.ts} +21 -10
  12. package/dist/{chunk-3PYYGFSB.js → chunk-3RFP6GT5.js} +3 -3
  13. package/dist/{chunk-HTZHBTIL.js → chunk-4GQW43UU.js} +193 -357
  14. package/dist/{chunk-D26YNACF.js → chunk-4NOFSGAL.js} +56 -56
  15. package/dist/{chunk-UW5232GG.js → chunk-5XLZ34PV.js} +5 -5
  16. package/dist/{chunk-QYPMPWVX.js → chunk-7X67QLPB.js} +43 -43
  17. package/dist/{chunk-5TEYFX6X.js → chunk-7Z4SZ6YM.js} +2 -2
  18. package/dist/{chunk-Y322OTCH.js → chunk-AQOL3SK5.js} +1 -1
  19. package/dist/{chunk-CICDIBOF.js → chunk-EHUSD3O2.js} +76 -72
  20. package/dist/chunk-FO2LCZTL.js +19 -0
  21. package/dist/{chunk-3KLC4AMA.js → chunk-FU5CGNTR.js} +135 -173
  22. package/dist/{chunk-K2KS3JLY.js → chunk-GLH6MEI2.js} +7 -2
  23. package/dist/chunk-ICXZZNPS.js +199 -0
  24. package/dist/{chunk-MK425RXJ.js → chunk-ID3BZXFZ.js} +709 -640
  25. package/dist/{chunk-UAKYDVT3.js → chunk-KP2MCX3R.js} +111 -89
  26. package/dist/{chunk-GKIFABGN.js → chunk-LZWXCBUB.js} +74 -247
  27. package/dist/{chunk-6WCIWXUV.js → chunk-MTKRIQEU.js} +2 -2
  28. package/dist/{chunk-4OC7REYX.js → chunk-MWMCQLCG.js} +3 -3
  29. package/dist/{chunk-XJFYAXET.js → chunk-N4BDKS6Y.js} +19 -19
  30. package/dist/{chunk-E6IKQHTX.js → chunk-N4LNEGQX.js} +2 -2
  31. package/dist/chunk-NQDEWJWE.js +554 -0
  32. package/dist/{chunk-GTDW453U.js → chunk-QR6HH4DI.js} +100 -114
  33. package/dist/chunk-TLSQETTY.js +41 -0
  34. package/dist/{chunk-CZFXGGEK.js → chunk-U66GUVSG.js} +2 -2
  35. package/dist/{chunk-KDR2VAJP.js → chunk-UYVJZR33.js} +2 -2
  36. package/dist/chunk-UZ765UGH.js +18 -0
  37. package/dist/{chunk-XNKSSE32.js → chunk-VWQGWGCH.js} +7 -7
  38. package/dist/{chunk-WSBYWVTZ.js → chunk-W7YSMSGC.js} +166 -158
  39. package/dist/{client-B-hbHX30.d.ts → client-DHmG7rn6.d.ts} +25 -61
  40. package/dist/{capability-error-DFMwSuSf.d.ts → dashboards-CLemT6kj.d.ts} +14 -294
  41. package/dist/{deployments-M4OHn7G3.d.ts → deployments-DTULi7dF.d.ts} +46 -3
  42. package/dist/{identity-integration-3mX6b5iH.d.ts → identity-integration-DOeNZaxF.d.ts} +32 -2
  43. package/dist/index.d.ts +10 -10
  44. package/dist/index.js +13 -11
  45. package/dist/internal.d.ts +27 -13
  46. package/dist/internal.js +41 -13
  47. package/dist/{analytics-BwAKLi7O.d.ts → limits-kNzYdZ00.d.ts} +124 -3
  48. package/dist/{offers-DhAtss4_.d.ts → offers-CYeN_I0Y.d.ts} +3 -2
  49. package/dist/portal-proxy.d.ts +19 -3
  50. package/dist/portal-proxy.js +64 -22
  51. package/dist/react/index.d.ts +21 -14
  52. package/dist/react/index.js +55 -29
  53. package/dist/{pages-B8q8Y_dQ.d.ts → reward-deliveries-drp-x1G-.d.ts} +300 -233
  54. package/dist/runtime/authoring.js +1 -1
  55. package/dist/runtime/chunks/UGDV5W4N.js +1 -0
  56. package/dist/runtime/manifest.json +3 -3
  57. package/dist/runtime/schema.js +1 -1
  58. package/dist/schema.d.ts +193 -18
  59. package/dist/schema.js +31 -26
  60. package/dist/server/index.d.ts +13 -13
  61. package/dist/server/index.js +5885 -6224
  62. package/dist/{sign-in-providers-BkjcDsFF.d.ts → sign-in-providers-B1Q9eDRm.d.ts} +7 -2
  63. package/dist/{submission-input-DHGKhXfp.d.ts → submission-input-DZCbjQUH.d.ts} +3 -2
  64. package/dist/{telegram-browser-BCE7zdOb.d.ts → telegram-browser-NL0Asmsi.d.ts} +4 -4
  65. package/dist/telegram.d.ts +8 -8
  66. package/dist/telegram.js +2 -2
  67. package/dist/testing.d.ts +228 -26
  68. package/dist/testing.js +137 -92
  69. package/dist/{tracker-data-Hb1uQnk5.d.ts → tracker-data-esm3WG8R.d.ts} +34 -8
  70. package/dist/{transport-DkhX2Cbs.d.ts → transport-Czht_irp.d.ts} +41259 -39835
  71. package/dist/{wallet-DTO7SXj7.d.ts → wallet-B7e06v4m.d.ts} +14 -4
  72. package/package.json +1 -1
  73. package/dist/chunk-UPQPUJOU.js +0 -457
  74. package/dist/runtime/chunks/Y4OAVXFR.js +0 -1
@@ -1,7 +1,12 @@
1
- import { J as SignInProvider } from './accounts-CCqCKCVx.js';
1
+ import { J as SignInProvider } from './accounts-nz3mzfRQ.js';
2
2
  import * as z from 'zod';
3
- import { a as TelegramSignInMethods } from './submission-input-DHGKhXfp.js';
3
+ import { a as TelegramSignInMethods } from './submission-input-DZCbjQUH.js';
4
4
 
5
+ /**
6
+ * `GET /v1/auth/providers`, as `relay.auth.providers()` reads it. Exported as a schema only, for the
7
+ * wire fixtures that pin its released shape (compat/wire/participant/auth-providers-*.json):
8
+ * `providers` keeps SDK 1.x's closed `AuthProvider`, and `signInProviders` is its open sibling.
9
+ */
5
10
  declare const authProvidersSchema: z.ZodObject<{
6
11
  providers: z.ZodArray<z.ZodObject<{
7
12
  provider: z.ZodEnum<{
@@ -1,6 +1,6 @@
1
1
  import * as z from 'zod';
2
- import { L as LedgerReference, Q as QuestHandle } from './tracker-data-Hb1uQnk5.js';
3
- import { B as ProjectGroupReference } from './accounts-CCqCKCVx.js';
2
+ import { L as LedgerReference, Q as QuestHandle } from './tracker-data-esm3WG8R.js';
3
+ import { B as ProjectGroupReference } from './accounts-nz3mzfRQ.js';
4
4
 
5
5
  declare const completionPrerequisiteSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
6
6
  kind: z.ZodLiteral<"completion">;
@@ -227,6 +227,7 @@ declare const telegramConnectionInputSchema: z.ZodObject<{
227
227
  declare const telegramConnectionSchema: z.ZodObject<{
228
228
  userId: z.ZodString;
229
229
  }, z.core.$strip>;
230
+ /** The member's linked Telegram account, as `ctx.telegram.connection()` reads it. */
230
231
  type TelegramConnection = z.infer<typeof telegramConnectionSchema>;
231
232
  /** A member's status in a chat as Telegram reports it; a later Telegram may add others. */
232
233
  type TelegramChatMemberStatus = "creator" | "administrator" | "member" | "restricted" | (string & {});
@@ -1,8 +1,8 @@
1
- import { c as AuthProvider, J as SignInProvider } from './accounts-CCqCKCVx.js';
2
- import { p as createRelayClient, k as RelayRequestOptions, g as RelayError } from './client-B-hbHX30.js';
3
- import { a as TelegramSignInMethods } from './submission-input-DHGKhXfp.js';
1
+ import { c as AuthProvider, J as SignInProvider } from './accounts-nz3mzfRQ.js';
2
+ import { p as createRelayClient, k as RelayRequestOptions, g as RelayError } from './client-DHmG7rn6.js';
3
+ import { a as TelegramSignInMethods } from './submission-input-DZCbjQUH.js';
4
4
  import { b as ParticipantSession } from './participant-activity-D-Drp24G.js';
5
- import { C as CosmosChain, a as CosmosNetwork, m as WalletSigner, k as WalletSignInNetwork } from './wallet-DTO7SXj7.js';
5
+ import { C as CosmosChain, a as CosmosNetwork, m as WalletSigner, k as WalletSignInNetwork } from './wallet-B7e06v4m.js';
6
6
 
7
7
  /** An EIP-1193 provider, such as `window.ethereum` or an EIP-6963 announcement's provider. */
8
8
  type Eip1193Provider = {
@@ -1,15 +1,15 @@
1
- import { k as RelayRequestOptions, R as RelayClient } from './client-B-hbHX30.js';
1
+ import { k as RelayRequestOptions, R as RelayClient } from './client-DHmG7rn6.js';
2
2
  import { b as ParticipantSession } from './participant-activity-D-Drp24G.js';
3
- import './accounts-CCqCKCVx.js';
3
+ import './accounts-nz3mzfRQ.js';
4
4
  import 'zod';
5
- import './tracker-data-Hb1uQnk5.js';
6
- import './wallet-DTO7SXj7.js';
7
- import './pages-B8q8Y_dQ.js';
8
- import './submission-input-DHGKhXfp.js';
5
+ import './tracker-data-esm3WG8R.js';
6
+ import './wallet-B7e06v4m.js';
7
+ import './submission-input-DZCbjQUH.js';
9
8
  import './request-error-D_dUPLwo.js';
10
- import './catalog--ZIlskAo.js';
9
+ import './reward-deliveries-drp-x1G-.js';
10
+ import './catalog-BaTOKpNw.js';
11
11
  import './action-9Xl0StBg.js';
12
- import './sign-in-providers-BkjcDsFF.js';
12
+ import './sign-in-providers-B1Q9eDRm.js';
13
13
 
14
14
  /**
15
15
  * A plugin's own sign-in method, such as Telegram's Mini App sign-in: the app passes the vendor's
package/dist/telegram.js CHANGED
@@ -3,8 +3,8 @@ import {
3
3
  } from "./chunk-FWLQ5XCS.js";
4
4
  import {
5
5
  withPluginNamespace
6
- } from "./chunk-6WCIWXUV.js";
7
- import "./chunk-K2KS3JLY.js";
6
+ } from "./chunk-MTKRIQEU.js";
7
+ import "./chunk-GLH6MEI2.js";
8
8
 
9
9
  // src/plugins/telegram.generated.ts
10
10
  function withTelegram(relay) {
package/dist/testing.d.ts CHANGED
@@ -1,17 +1,19 @@
1
- import { d3 as pointBalanceSchema, bD as discordMemberSchema, bG as discordMessageSchema, cZ as photoResultSchema, a8 as TextReviewInput, H as Reward, ac as Decision, P as PointBalance, y as PointLedgerReference, u as PointEntry, o as LeaderboardPage } from './accounts-CCqCKCVx.js';
1
+ import { d3 as pointBalanceSchema, bD as discordMemberSchema, bG as discordMessageSchema, cZ as photoResultSchema, a8 as TextReviewInput, H as Reward, ac as Decision, P as PointBalance, y as PointLedgerReference, u as PointEntry, o as LeaderboardPage } from './accounts-nz3mzfRQ.js';
2
2
  import * as z from 'zod';
3
- import { k as CapabilityFailure, _ as memberCompletionSchema } from './capability-error-DFMwSuSf.js';
4
- export { C as CapabilityError } from './capability-error-DFMwSuSf.js';
5
- import { z as xConnectionSchema, C as xProfileSchema, B as xPostSchema, f as ImageReference, s as imageInspectionSchema, o as imageComparisonSchema, v as imageSightingsSchema } from './analytics-BwAKLi7O.js';
6
- import { aI as memberIdentitySchema, bc as trackerQuerySchema, b7 as trackerPageSchema, bl as trackerSummarySchema, a8 as TrackerContentQuery, aU as trackerContentSchema, a4 as TrackerAttribution, l as Tracker, m as TrackerData, C as ContentBody, v as TrackerTriggerContext, H as TrackerPage } from './tracker-data-Hb1uQnk5.js';
7
- import { aO as profileReferralSchema, aE as linkedWalletSchema, aY as walletBalanceSchema, b2 as walletNftsSchema, M as WalletCallArgument, aZ as walletCallSchema, a$ as walletDelegationsSchema, U as WalletEventCondition, b0 as walletEventsSchema, b7 as walletTransactionsSchema } from './wallet-DTO7SXj7.js';
8
- import { C as telegramConnectionSchema, y as telegramChatMemberSchema } from './submission-input-DHGKhXfp.js';
3
+ import { N as NftCollection, aO as profileReferralSchema, aE as linkedWalletSchema, aY as walletBalanceSchema, b2 as walletNftsSchema, M as WalletCallArgument, aZ as walletCallSchema, a$ as walletDelegationsSchema, U as WalletEventCondition, b0 as walletEventsSchema, b7 as walletTransactionsSchema, v as WalletReader } from './wallet-B7e06v4m.js';
4
+ import { f as CapabilityFailure, q as memberCompletionSchema } from './capability-error-CuI_F7yM.js';
5
+ export { C as CapabilityError } from './capability-error-CuI_F7yM.js';
6
+ import { C as xConnectionSchema, G as xProfileSchema, F as xPostSchema, g as ImageReference, u as imageInspectionSchema, q as imageComparisonSchema, x as imageSightingsSchema } from './limits-kNzYdZ00.js';
7
+ export { L as Limits, l as limits } from './limits-kNzYdZ00.js';
8
+ import { aM as memberIdentitySchema, bf as trackerQuerySchema, ba as trackerPageSchema, bo as trackerSummarySchema, ac as TrackerContentQuery, aX as trackerContentSchema, a8 as TrackerAttribution, o as Tracker, p as TrackerData, H as ContentBody, B as TrackerTriggerContext, U as TrackerPage } from './tracker-data-esm3WG8R.js';
9
+ import { C as telegramConnectionSchema, y as telegramChatMemberSchema, e as TelegramReader } from './submission-input-DZCbjQUH.js';
9
10
  import { EvaluationMember } from './authoring.js';
10
- export { A as AttemptCapture, C as CapturedFact } from './attempt-captures-Cm-5G0PC.js';
11
+ export { A as AttemptCapture, C as CapturedFact } from './attempt-captures-DMi8oR9T.js';
11
12
  import { b as ParticipantSession, R as RelayEvent } from './participant-activity-D-Drp24G.js';
12
- import { B as Badge } from './offers-DhAtss4_.js';
13
- import { b as QuestView, q as questExperienceSchema } from './catalog--ZIlskAo.js';
13
+ import { B as Badge } from './offers-CYeN_I0Y.js';
14
+ import { b as QuestView, q as questExperienceSchema } from './catalog-BaTOKpNw.js';
14
15
  import './streaks-0YuipsUQ.js';
16
+ import './dashboards-CLemT6kj.js';
15
17
  import './units-CwgsPB_r.js';
16
18
 
17
19
  /** One project time-zone change: from `effectiveAt` on, days are counted in `timeZone`. */
@@ -224,6 +226,123 @@ type CapabilityKind = keyof typeof capabilityRequestSchemas;
224
226
  type CapabilityRequest = {
225
227
  [K in CapabilityKind]: z.output<(typeof capabilityRequestSchemas)[K]>;
226
228
  }[CapabilityKind];
229
+ /**
230
+ * `ctx.telegram.connection()` and `member()`'s request. It stays out of `CapabilityRequest`: that union is closed in
231
+ * SDK 1.x's public `CapabilityCall` and `ReplayDivergence`, and gaining a member would break code
232
+ * that switches over it (docs/adr/0011-telegram.md). The kit answers and numbers Telegram calls as
233
+ * Relay does, but lists them only in a run's `capabilityCalls`, not in the deprecated `calls`.
234
+ */
235
+ declare const telegramRequestSchema: z.ZodObject<{
236
+ kind: z.ZodLiteral<"telegram">;
237
+ input: z.ZodUnion<readonly [z.ZodObject<{
238
+ chat: z.ZodString;
239
+ }, z.core.$strict>, z.ZodObject<{
240
+ operation: z.ZodLiteral<"connection">;
241
+ }, z.core.$strict>]>;
242
+ }, z.core.$strict>;
243
+ type TelegramRequest = z.output<typeof telegramRequestSchema>;
244
+ /**
245
+ * `ctx.wallet.nfts()`'s request. Like Telegram's, it stays out of the closed `CapabilityRequest`:
246
+ * the kit answers and numbers NFT reads, but lists them only in a run's `capabilityCalls`, not in the deprecated `calls`.
247
+ */
248
+ declare const walletNftsRequestSchema: z.ZodObject<{
249
+ kind: z.ZodLiteral<"wallet-nfts">;
250
+ collection: z.ZodString & z.ZodType<NftCollection, string, z.core.$ZodTypeInternals<NftCollection, string>>;
251
+ address: z.ZodNullable<z.ZodString>;
252
+ }, z.core.$strict>;
253
+ type WalletNftsRequest = z.output<typeof walletNftsRequestSchema>;
254
+ declare const walletEventsRequestSchema: z.ZodObject<{
255
+ kind: z.ZodLiteral<"wallet-events">;
256
+ event: z.ZodString & z.ZodType<`eip155:${number}:0x${string} ${string}`, string, z.core.$ZodTypeInternals<`eip155:${number}:0x${string} ${string}`, string>>;
257
+ account: z.ZodString;
258
+ since: z.ZodNumber;
259
+ afterActivation: z.ZodBoolean;
260
+ where: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodBoolean, z.ZodObject<{
261
+ gte: z.ZodString;
262
+ }, z.core.$strict>]>>>;
263
+ address: z.ZodNullable<z.ZodString>;
264
+ newest: z.ZodOptional<z.ZodNumber>;
265
+ }, z.core.$strict>;
266
+ type WalletEventsRequest = z.output<typeof walletEventsRequestSchema>;
267
+ /** `ctx.wallet.transactions()`'s request: answered and numbered like event reads, and unlisted the same way. */
268
+ declare const walletTransactionsRequestSchema: z.ZodObject<{
269
+ kind: z.ZodLiteral<"wallet-transactions">;
270
+ program: z.ZodString & z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
271
+ since: z.ZodNumber;
272
+ afterActivation: z.ZodBoolean;
273
+ mint: z.ZodNullable<z.ZodString>;
274
+ address: z.ZodNullable<z.ZodString>;
275
+ }, z.core.$strict>;
276
+ type WalletTransactionsRequest = z.output<typeof walletTransactionsRequestSchema>;
277
+ /**
278
+ * `ctx.wallet.call()`'s and `ctx.wallet.delegations()`'s requests. Like NFT reads, they stay out of
279
+ * the closed `CapabilityRequest`: the kit answers and numbers them, but lists them only in a run's `capabilityCalls`, not in the deprecated `calls`.
280
+ */
281
+ declare const walletCallRequestSchema: z.ZodObject<{
282
+ kind: z.ZodLiteral<"wallet-call">;
283
+ call: z.ZodString & z.ZodType<`eip155:${number}:0x${string} function ${string}`, string, z.core.$ZodTypeInternals<`eip155:${number}:0x${string} function ${string}`, string>>;
284
+ args: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
285
+ wallet: z.ZodLiteral<true>;
286
+ }, z.core.$strict>, z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
287
+ address: z.ZodNullable<z.ZodString>;
288
+ }, z.core.$strict>;
289
+ type WalletCallRequest = z.output<typeof walletCallRequestSchema>;
290
+ declare const walletDelegationsRequestSchema: z.ZodObject<{
291
+ kind: z.ZodLiteral<"wallet-delegations">;
292
+ chain: z.ZodCustom<`cosmos:${string}`, `cosmos:${string}`>;
293
+ validator: z.ZodNullable<z.ZodString>;
294
+ address: z.ZodNullable<z.ZodString>;
295
+ }, z.core.$strict>;
296
+ type WalletDelegationsRequest = z.output<typeof walletDelegationsRequestSchema>;
297
+ /**
298
+ * `ctx.member.balance()`, `completions()`, `groups()`, `enrolled()` and `referrals()`, which read
299
+ * Relay's own state of the member. Like Telegram's, they stay out of the closed `CapabilityRequest`: the kit answers and
300
+ * numbers them, but lists them only in a run's `capabilityCalls`, not in the deprecated `calls`.
301
+ */
302
+ declare const memberStateRequestSchemas: {
303
+ "member-balance": z.ZodObject<{
304
+ kind: z.ZodLiteral<"member-balance">;
305
+ ledger: z.ZodString;
306
+ }, z.core.$strict>;
307
+ "member-completions": z.ZodObject<{
308
+ kind: z.ZodLiteral<"member-completions">;
309
+ quest: z.ZodNullable<z.ZodString>;
310
+ since: z.ZodNullable<z.ZodNumber>;
311
+ limit: z.ZodNumber;
312
+ }, z.core.$strict>;
313
+ "member-groups": z.ZodObject<{
314
+ kind: z.ZodLiteral<"member-groups">;
315
+ }, z.core.$strict>;
316
+ "member-enrolled": z.ZodObject<{
317
+ kind: z.ZodLiteral<"member-enrolled">;
318
+ campaign: z.ZodString;
319
+ }, z.core.$strict>;
320
+ "member-referrals": z.ZodObject<{
321
+ kind: z.ZodLiteral<"member-referrals">;
322
+ program: z.ZodString;
323
+ }, z.core.$strict>;
324
+ };
325
+ type MemberStateRequest = z.output<(typeof memberStateRequestSchemas)[keyof typeof memberStateRequestSchemas]>;
326
+ /** Every request the kit answers: the public `CapabilityRequest` kinds, Telegram's, NFT, contract call and delegation reads, and the member's state. */
327
+ type KitRequest = CapabilityRequest | TelegramRequest | WalletNftsRequest | WalletCallRequest | WalletDelegationsRequest | WalletEventsRequest | WalletTransactionsRequest | MemberStateRequest;
328
+ /**
329
+ * The capability kinds this release of the kit knows, one per reader method family.
330
+ *
331
+ * @compat open
332
+ */
333
+ type KnownCapabilityKind = KitRequest["kind"];
334
+ /**
335
+ * One capability request quest code sent, as Relay validated it: `kind` names the reader, and the
336
+ * other fields are the wire request's, such as `{ kind: "wallet-events", event, account, since }`.
337
+ * Open: a later release adds kinds, and a request of a kind this release does not know keeps its
338
+ * fields. Compare it whole, or narrow on `kind` and read the fields you expect.
339
+ *
340
+ * @compat output
341
+ */
342
+ type CapabilityCallRequest = {
343
+ kind: KnownCapabilityKind | (string & {});
344
+ [field: string]: unknown;
345
+ };
227
346
 
228
347
  /** A result as a fake writes it: Relay's result schema fills defaults before quest code reads it. */
229
348
  type Result<S extends z.ZodType> = z.input<S>;
@@ -358,23 +477,21 @@ type TestFacts = {
358
477
  ], Result<typeof walletBalanceSchema> | null>;
359
478
  /**
360
479
  * `ctx.wallet.nfts({ collection })`. Like `balance`, it reads null while the member has no
361
- * linked wallet of the collection's family (EVM or Solana). A run's `calls` does not list NFT reads: its request type is closed in
362
- * SDK 1.x.
480
+ * linked wallet of the collection's family (EVM or Solana). A run's `capabilityCalls` lists these calls; the deprecated `calls` does not.
363
481
  */
364
482
  nfts?: FakeAnswer<[
365
483
  query: WalletNftsQueryRequest
366
484
  ], Result<typeof walletNftsSchema> | null>;
367
485
  /**
368
486
  * `ctx.wallet.call({ call, args })`. Like `balance`, it reads null while the member has no
369
- * linked EVM wallet. A run's `calls` does not list contract calls: its request type is closed
370
- * in SDK 1.x.
487
+ * linked EVM wallet. A run's `capabilityCalls` lists these calls; the deprecated `calls` does not.
371
488
  */
372
489
  call?: FakeAnswer<[
373
490
  query: WalletCallQueryRequest
374
491
  ], Result<typeof walletCallSchema> | null>;
375
492
  /**
376
493
  * `ctx.wallet.delegations({ chain, validator })`. Like `balance`, it reads null while the member
377
- * has no wallet linked on that Cosmos network. A run's `calls` does not list delegation reads.
494
+ * has no wallet linked on that Cosmos network. A run's `capabilityCalls` lists these calls; the deprecated `calls` does not.
378
495
  */
379
496
  delegations?: FakeAnswer<[
380
497
  query: WalletDelegationsQueryRequest
@@ -383,7 +500,7 @@ type TestFacts = {
383
500
  * `ctx.wallet.events({ event, account, since })`. Like `balance`, it reads null while the
384
501
  * member has no linked EVM wallet. The kit does not apply `where`, `since` or `newest`: answer
385
502
  * with the logs Relay would return, and `complete: false` for a `newest` read that left older
386
- * events out. A run's `calls` does not list event reads.
503
+ * events out. A run's `capabilityCalls` lists these calls; the deprecated `calls` does not.
387
504
  */
388
505
  events?: FakeAnswer<[
389
506
  query: WalletEventsQueryRequest
@@ -392,7 +509,7 @@ type TestFacts = {
392
509
  * `ctx.wallet.transactions({ program, since })`. Like `balance`, it reads null while the
393
510
  * member has no linked Solana wallet. The kit does not apply `program`, `since` or `mint`:
394
511
  * answer with the transactions Relay would return, with `instructions` when the program's
395
- * setting has an Anchor IDL. A run's `calls` does not list transaction reads.
512
+ * setting has an Anchor IDL. A run's `capabilityCalls` lists these calls; the deprecated `calls` does not.
396
513
  */
397
514
  transactions?: FakeAnswer<[
398
515
  query: WalletTransactionsQueryRequest
@@ -426,8 +543,7 @@ type TestFacts = {
426
543
  * `ctx.telegram.connection()` and `ctx.telegram.member({ chat })`, which the testing kit supplies
427
544
  * to every quest as Relay does. `connection` is answered once per run, as Relay pins the account.
428
545
  * Throw `new CapabilityError("integration-required", …)` from `member` to act out a chat the
429
- * project has not connected. A run's `calls` does not list Telegram calls: its request type is
430
- * closed in SDK 1.x.
546
+ * project has not connected. A run's `capabilityCalls` lists these calls; the deprecated `calls` does not.
431
547
  */
432
548
  telegram?: {
433
549
  connection?: FakeAnswer<[], Result<typeof telegramConnectionSchema> | null>;
@@ -500,6 +616,8 @@ declare const defaultSeed = "attempt_test";
500
616
  /**
501
617
  * The most capability calls one hosted evaluation run can make, shared by all capabilities. The
502
618
  * next call throws a `CapabilityError` with code `capability-limit`.
619
+ *
620
+ * @deprecated Use `limits.capabilityCalls`, which a 1.x release can raise.
503
621
  */
504
622
  declare const maxCapabilityCalls = 8;
505
623
  /**
@@ -582,7 +700,8 @@ type RunQuestOptions<Q extends TestableQuest = TestableQuest> = {
582
700
  facts?: TestFacts;
583
701
  };
584
702
  /**
585
- * One capability call, as Relay captures it for replay.
703
+ * One capability call, as Relay captures it for replay. Its request type is closed in SDK 1.x, so
704
+ * lists of it leave out the kinds it cannot name; use `CapabilityCallRecord`.
586
705
  *
587
706
  * @compat output
588
707
  */
@@ -591,6 +710,17 @@ type CapabilityCall = {
591
710
  request: CapabilityRequest;
592
711
  outcome: CapabilityOutcome;
593
712
  };
713
+ /**
714
+ * One capability call of any kind, as Relay captures it for replay: its position in the run, the
715
+ * request quest code sent, and the value or failure quest code received.
716
+ *
717
+ * @compat output
718
+ */
719
+ type CapabilityCallRecord = {
720
+ sequence: number;
721
+ request: CapabilityCallRequest;
722
+ outcome: CapabilityOutcome;
723
+ };
594
724
  /**
595
725
  * The published release a run used: what `describe` returned for the settings.
596
726
  *
@@ -616,8 +746,15 @@ type QuestDiagnostic = {
616
746
  type TestContext<Q extends TestableQuest = TestableQuest> = {
617
747
  /** The host context to pass to `quest.evaluate`. */
618
748
  context: QuestHostContext<Q>;
619
- /** The capability calls quest code has made so far, in order. */
749
+ /**
750
+ * The capability calls of the kinds `CapabilityRequest` names, in order.
751
+ *
752
+ * @deprecated Use `capabilityCalls`, which lists every kind: Telegram, NFT, contract call,
753
+ * delegation, wallet event and transaction reads and the member's state are missing here.
754
+ */
620
755
  calls: CapabilityCall[];
756
+ /** Every capability call quest code has made so far, of any kind, in order. */
757
+ capabilityCalls: CapabilityCallRecord[];
621
758
  /** What `quest.evaluate` has reported so far that had no effect. */
622
759
  diagnostics: QuestDiagnostic[];
623
760
  release: TestRelease;
@@ -628,7 +765,15 @@ type TestContext<Q extends TestableQuest = TestableQuest> = {
628
765
  /** @compat output */
629
766
  type QuestRun = {
630
767
  decision: Decision;
768
+ /**
769
+ * The capability calls of the kinds `CapabilityRequest` names, in order.
770
+ *
771
+ * @deprecated Use `capabilityCalls`, which lists every kind: Telegram, NFT, contract call,
772
+ * delegation, wallet event and transaction reads and the member's state are missing here.
773
+ */
631
774
  calls: CapabilityCall[];
775
+ /** Every capability call the run made, of any kind, in order. `runQuest` always sets it. */
776
+ capabilityCalls?: CapabilityCallRecord[];
632
777
  release: TestRelease;
633
778
  /**
634
779
  * What the run did that had no effect; Relay records none of it for hosted attempts. `runQuest`
@@ -638,6 +783,8 @@ type QuestRun = {
638
783
  };
639
784
  /** What `runQuest` resolves with. */
640
785
  type DiagnosedRun = QuestRun & {
786
+ /** Every capability call the run made, of any kind, in order. */
787
+ capabilityCalls: CapabilityCallRecord[];
641
788
  /** What the run did that had no effect; Relay records none of it for hosted attempts. */
642
789
  diagnostics: QuestDiagnostic[];
643
790
  };
@@ -663,7 +810,7 @@ declare function createTestContext<Q extends TestableQuest>(quest: Q, options?:
663
810
  * capability readers answered from `facts` and checked against Relay's capability contracts, and
664
811
  * the decision's rewards checked against the published bundle.
665
812
  *
666
- * Resolves with the decision and every capability call. Rejects with a capability failure that
813
+ * Resolves with the decision and every capability call, in `capabilityCalls`. Rejects with a capability failure that
667
814
  * escaped quest code, as thrown or wrapped (Relay retries a retryable one); with an
668
815
  * `EvaluatorError` for anything else quest code threw, which Relay fails the attempt with once;
669
816
  * or with a `TestSetupError` for a call the facts cannot answer.
@@ -680,6 +827,19 @@ declare function runQuest<Q extends TestableQuest>(quest: Q, options?: RunQuestO
680
827
  */
681
828
  declare function fakeEvaluationMember(member?: Partial<EvaluationMember>): EvaluationMember;
682
829
 
830
+ /**
831
+ * A `WalletReader` with every method Relay supplies, answered from `facts.wallet` as `runQuest`
832
+ * answers it: a member with no linked wallet unless `facts.wallet.list` links one. Use it in a
833
+ * test that builds its own evaluation context; a minor release that adds a reader method gives it
834
+ * here too, so the test keeps compiling and the new method keeps working.
835
+ */
836
+ declare function fakeWalletReader(facts?: Pick<TestFacts, "wallet">): Required<WalletReader>;
837
+ /**
838
+ * A `TelegramReader` with every method Relay supplies, answered from `facts.telegram` as
839
+ * `runQuest` answers it: a member who has not linked Telegram unless the facts say otherwise.
840
+ */
841
+ declare function fakeTelegramReader(facts?: Pick<TestFacts, "telegram">): Required<TelegramReader>;
842
+
683
843
  type Kind = Decision["kind"];
684
844
  type DecisionOf<K extends Kind> = Extract<Decision, {
685
845
  kind: K;
@@ -782,7 +942,8 @@ type ReplayOptions = {
782
942
  facts?: TestFacts;
783
943
  };
784
944
  /**
785
- * The first call the capture could not answer.
945
+ * The first call the capture could not answer, when its kind is one `CapabilityRequest` names.
946
+ * Use `CapabilityDivergence`, which reports every kind.
786
947
  *
787
948
  * @compat output
788
949
  */
@@ -797,6 +958,27 @@ type ReplayDivergence = {
797
958
  recorded: Record<string, unknown> | null;
798
959
  replayed: CapabilityRequest;
799
960
  };
961
+ /**
962
+ * Why the capture could not answer a call. `"new"`: the captured run made no such call.
963
+ * `"changed"`: it sent another request. `"uncaptured"`: its answer was a retryable failure Relay
964
+ * did not keep.
965
+ *
966
+ * @compat open
967
+ */
968
+ type KnownDivergenceReason = "new" | "changed" | "uncaptured";
969
+ /**
970
+ * The first call the capture could not answer, of any capability kind.
971
+ *
972
+ * @compat output
973
+ */
974
+ type CapabilityDivergence = {
975
+ sequence: number;
976
+ reason: KnownDivergenceReason | (string & {});
977
+ /** The request the captured run sent at this position; null for a new call. */
978
+ recorded: Record<string, unknown> | null;
979
+ /** The request current quest code sent. */
980
+ replayed: CapabilityCallRequest;
981
+ };
800
982
  /** @compat output */
801
983
  type AttemptReplay = {
802
984
  /** What the current quest code decides; null when the replay stopped at a divergence. */
@@ -808,9 +990,26 @@ type AttemptReplay = {
808
990
  * key. Null when either is missing.
809
991
  */
810
992
  changed: boolean | null;
811
- /** The first call the capture could not answer, or null when it answered every call. */
993
+ /**
994
+ * The first call the capture could not answer, or null when it answered every call or the
995
+ * first such call is of a kind `CapabilityRequest` does not name.
996
+ *
997
+ * @deprecated Use `capabilityDivergence`, which reports every kind.
998
+ */
812
999
  divergence: ReplayDivergence | null;
1000
+ /**
1001
+ * The first call the capture could not answer, of any kind, or null when it answered every
1002
+ * call. `replayAttempt` always sets it.
1003
+ */
1004
+ capabilityDivergence?: CapabilityDivergence | null;
1005
+ /**
1006
+ * The capability calls of the kinds `CapabilityRequest` names, in order.
1007
+ *
1008
+ * @deprecated Use `capabilityCalls`, which lists every kind.
1009
+ */
813
1010
  calls: CapabilityCall[];
1011
+ /** Every capability call the replay made, of any kind, in order. `replayAttempt` always sets it. */
1012
+ capabilityCalls?: CapabilityCallRecord[];
814
1013
  };
815
1014
  /**
816
1015
  * Evaluates current quest code against a captured attempt: the release's settings and rewards,
@@ -823,7 +1022,10 @@ type AttemptReplay = {
823
1022
  * alters a past outcome. A call the capture cannot answer stops the replay unless `facts`
824
1023
  * answers it; the result names the first one.
825
1024
  */
826
- declare function replayAttempt<Q extends TestableQuest>(quest: Q, capture: unknown, options?: ReplayOptions): Promise<AttemptReplay>;
1025
+ declare function replayAttempt<Q extends TestableQuest>(quest: Q, capture: unknown, options?: ReplayOptions): Promise<AttemptReplay & {
1026
+ capabilityDivergence: CapabilityDivergence | null;
1027
+ capabilityCalls: CapabilityCallRecord[];
1028
+ }>;
827
1029
 
828
1030
  type Experience = z.output<typeof questExperienceSchema>;
829
1031
  /**
@@ -900,4 +1102,4 @@ type FakeRelay = {
900
1102
  */
901
1103
  declare function createFakeRelay(options?: FakeRelayOptions): FakeRelay;
902
1104
 
903
- export { type AttemptReplay, type CalendarSegment, type CapabilityCall, type CapabilityOutcome, type CapabilityRequest, Decision, DecisionAssertionError, EvaluatorError, type FakeAnswer, type FakeRelay, type FakeRelayOptions, type FakeRelayRequest, type QuestDiagnostic, type QuestHostContext, type QuestInputOf, type QuestRun, type ReplayDivergence, type ReplayOptions, type RunQuestOptions, type TestContext, type TestFacts, type TestRelease, TestSetupError, type TestableQuest, type TrackerFacts, type TrackerObservationInput, type TrackerReadRequest, type TrackerRecordInput, type WalletBalanceRequest, createFakeRelay, createTestContext, defaultMember, defaultNow, defaultSeed, expectAccept, expectDefer, expectProgress, expectReject, expectReview, fakeEvaluationMember, maxCapabilityCalls, replayAttempt, runQuest, trackerObservation, trackerPage };
1105
+ export { type AttemptReplay, type CalendarSegment, type CapabilityCall, type CapabilityCallRecord, type CapabilityCallRequest, type CapabilityDivergence, type CapabilityOutcome, type CapabilityRequest, Decision, DecisionAssertionError, EvaluatorError, type FakeAnswer, type FakeRelay, type FakeRelayOptions, type FakeRelayRequest, type KnownCapabilityKind, type KnownDivergenceReason, type QuestDiagnostic, type QuestHostContext, type QuestInputOf, type QuestRun, type ReplayDivergence, type ReplayOptions, type RunQuestOptions, type TestContext, type TestFacts, type TestRelease, TestSetupError, type TestableQuest, type TrackerFacts, type TrackerObservationInput, type TrackerReadRequest, type TrackerRecordInput, type WalletBalanceRequest, createFakeRelay, createTestContext, defaultMember, defaultNow, defaultSeed, expectAccept, expectDefer, expectProgress, expectReject, expectReview, fakeEvaluationMember, fakeTelegramReader, fakeWalletReader, maxCapabilityCalls, replayAttempt, runQuest, trackerObservation, trackerPage };