@wix/himalaya-cli 0.1308.0 → 0.1310.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 (106) hide show
  1. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/dev-server/src/builder.d.ts +7 -0
  2. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/sdk/iap/src/delivery-contract.d.ts +3 -3
  3. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/sdk/iap/src/delivery.d.ts +3 -0
  4. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/sdk/iap/src/host-session.d.ts +31 -0
  5. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/sdk/iap/src/index.d.ts +1 -0
  6. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/sdk/iap/src/wix-payments-contract.d.ts +19 -14
  7. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/sdk/iap/src/wix-payments-wire.d.ts +2 -4
  8. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/sdk/iap/src/wix-payments.d.ts +11 -12
  9. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/ts/src/schema.d.ts +32 -0
  10. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/ts/src/validator.d.ts +60 -0
  11. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/flows/iap-checkout/src/apple-iap-contract.d.ts +17 -9
  12. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/flows/iap-checkout/src/iap-order-backend.d.ts +6 -1
  13. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/core.mjs +31 -0
  14. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/iap-checkout.mjs +119 -65
  15. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/iap.mjs +117 -35
  16. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/sdui.mjs +31 -0
  17. package/dist/cli.mjs +1305 -863
  18. package/dist/preview-assets.generated.bin +0 -0
  19. package/guides/app-config.md +2 -2
  20. package/guides/component-reference.json +2 -2
  21. package/guides/component-reference.md +10 -0
  22. package/guides/getting-started.md +40 -0
  23. package/guides/himi-skill.md +40 -0
  24. package/guides/qa-builds.md +16 -12
  25. package/guides/sdk-reference.json +61 -25
  26. package/package.json +3 -2
  27. package/templates/beauty-salon/himalaya.content.json +86 -0
  28. package/templates/beauty-salon-owner/dev/index.ts +574 -181
  29. package/templates/beauty-salon-owner/himalaya.content.json +179 -0
  30. package/templates/beauty-salon-owner/tier5-src/_shared/aria-chat.ts +136 -12
  31. package/templates/beauty-salon-owner/tier5-src/_shared/aria-client-tools.ts +57 -9
  32. package/templates/beauty-salon-owner/tier5-src/_shared/aria-row-id.ts +14 -0
  33. package/templates/beauty-salon-owner/tier5-src/himi-owner-lite-aria/index.ts +3 -0
  34. package/templates/branded-lite/himalaya.content.json +254 -0
  35. package/templates/brandy/himalaya.content.json +18 -1
  36. package/templates/community-club/himalaya.content.json +68 -0
  37. package/templates/community-club-owner/dev/index.ts +574 -181
  38. package/templates/community-club-owner/himalaya.content.json +173 -0
  39. package/templates/community-club-owner/tier5-src/_shared/aria-chat.ts +136 -12
  40. package/templates/community-club-owner/tier5-src/_shared/aria-client-tools.ts +57 -9
  41. package/templates/community-club-owner/tier5-src/_shared/aria-row-id.ts +14 -0
  42. package/templates/community-club-owner/tier5-src/himi-owner-lite-aria/index.ts +3 -0
  43. package/templates/events-meetups/himalaya.content.json +62 -0
  44. package/templates/events-meetups-owner/dev/index.ts +574 -181
  45. package/templates/events-meetups-owner/himalaya.content.json +155 -0
  46. package/templates/events-meetups-owner/tier5-src/_shared/aria-chat.ts +136 -12
  47. package/templates/events-meetups-owner/tier5-src/_shared/aria-client-tools.ts +57 -9
  48. package/templates/events-meetups-owner/tier5-src/_shared/aria-row-id.ts +14 -0
  49. package/templates/events-meetups-owner/tier5-src/himi-owner-lite-aria/index.ts +3 -0
  50. package/templates/gym-fitness/himalaya.content.json +101 -0
  51. package/templates/gym-fitness-owner/dev/index.ts +574 -181
  52. package/templates/gym-fitness-owner/himalaya.content.json +188 -0
  53. package/templates/gym-fitness-owner/tier5-src/_shared/aria-chat.ts +136 -12
  54. package/templates/gym-fitness-owner/tier5-src/_shared/aria-client-tools.ts +57 -9
  55. package/templates/gym-fitness-owner/tier5-src/_shared/aria-row-id.ts +14 -0
  56. package/templates/gym-fitness-owner/tier5-src/himi-owner-lite-aria/index.ts +3 -0
  57. package/templates/himi-chat/himalaya.content.json +8 -0
  58. package/templates/nonprofit-cause/himalaya.content.json +74 -0
  59. package/templates/nonprofit-cause-owner/dev/index.ts +574 -181
  60. package/templates/nonprofit-cause-owner/himalaya.content.json +170 -0
  61. package/templates/nonprofit-cause-owner/tier5-src/_shared/aria-chat.ts +136 -12
  62. package/templates/nonprofit-cause-owner/tier5-src/_shared/aria-client-tools.ts +57 -9
  63. package/templates/nonprofit-cause-owner/tier5-src/_shared/aria-row-id.ts +14 -0
  64. package/templates/nonprofit-cause-owner/tier5-src/himi-owner-lite-aria/index.ts +3 -0
  65. package/templates/owner-lite/dev/index.ts +574 -181
  66. package/templates/owner-lite/himalaya.content.json +203 -0
  67. package/templates/owner-lite/tier5-src/_shared/aria-chat.ts +136 -12
  68. package/templates/owner-lite/tier5-src/_shared/aria-client-tools.ts +57 -9
  69. package/templates/owner-lite/tier5-src/_shared/aria-row-id.ts +14 -0
  70. package/templates/owner-lite/tier5-src/himi-owner-lite-aria/index.ts +3 -0
  71. package/templates/podcast-creator/himalaya.content.json +71 -0
  72. package/templates/podcast-creator-owner/dev/index.ts +574 -181
  73. package/templates/podcast-creator-owner/himalaya.content.json +173 -0
  74. package/templates/podcast-creator-owner/tier5-src/_shared/aria-chat.ts +136 -12
  75. package/templates/podcast-creator-owner/tier5-src/_shared/aria-client-tools.ts +57 -9
  76. package/templates/podcast-creator-owner/tier5-src/_shared/aria-row-id.ts +14 -0
  77. package/templates/podcast-creator-owner/tier5-src/himi-owner-lite-aria/index.ts +3 -0
  78. package/templates/portfolio-creative/himalaya.content.json +80 -0
  79. package/templates/portfolio-creative-owner/dev/index.ts +574 -181
  80. package/templates/portfolio-creative-owner/himalaya.content.json +179 -0
  81. package/templates/portfolio-creative-owner/tier5-src/_shared/aria-chat.ts +136 -12
  82. package/templates/portfolio-creative-owner/tier5-src/_shared/aria-client-tools.ts +57 -9
  83. package/templates/portfolio-creative-owner/tier5-src/_shared/aria-row-id.ts +14 -0
  84. package/templates/portfolio-creative-owner/tier5-src/himi-owner-lite-aria/index.ts +3 -0
  85. package/templates/restaurant/himalaya.content.json +65 -0
  86. package/templates/restaurant-owner/dev/index.ts +574 -181
  87. package/templates/restaurant-owner/himalaya.content.json +188 -0
  88. package/templates/restaurant-owner/tier5-src/_shared/aria-chat.ts +136 -12
  89. package/templates/restaurant-owner/tier5-src/_shared/aria-client-tools.ts +57 -9
  90. package/templates/restaurant-owner/tier5-src/_shared/aria-row-id.ts +14 -0
  91. package/templates/restaurant-owner/tier5-src/himi-owner-lite-aria/index.ts +3 -0
  92. package/templates/retail-store/himalaya.content.json +62 -0
  93. package/templates/retail-store-owner/dev/index.ts +574 -181
  94. package/templates/retail-store-owner/himalaya.content.json +164 -0
  95. package/templates/retail-store-owner/tier5-src/_shared/aria-chat.ts +136 -12
  96. package/templates/retail-store-owner/tier5-src/_shared/aria-client-tools.ts +57 -9
  97. package/templates/retail-store-owner/tier5-src/_shared/aria-row-id.ts +14 -0
  98. package/templates/retail-store-owner/tier5-src/himi-owner-lite-aria/index.ts +3 -0
  99. package/templates/surface-showcase/himalaya.content.json +11 -0
  100. package/templates/yoga-studio/himalaya.content.json +80 -0
  101. package/templates/yoga-studio-owner/dev/index.ts +574 -181
  102. package/templates/yoga-studio-owner/himalaya.content.json +170 -0
  103. package/templates/yoga-studio-owner/tier5-src/_shared/aria-chat.ts +136 -12
  104. package/templates/yoga-studio-owner/tier5-src/_shared/aria-client-tools.ts +57 -9
  105. package/templates/yoga-studio-owner/tier5-src/_shared/aria-row-id.ts +14 -0
  106. package/templates/yoga-studio-owner/tier5-src/himi-owner-lite-aria/index.ts +3 -0
@@ -156,7 +156,7 @@ function createPurchaseCoordinator(deps) {
156
156
  if (!isCurrent(session)) return noDelivery();
157
157
  const wasAllowed = item.finishAllowed;
158
158
  if (delivered.signInLost && !wasAllowed) {
159
- blockWithoutSession(item, context);
159
+ blockWithoutSession(item);
160
160
  continue;
161
161
  }
162
162
  if (await deliverItem(session, item, context)) delivered.finished = true;
@@ -165,9 +165,8 @@ function createPurchaseCoordinator(deps) {
165
165
  }
166
166
  return delivered;
167
167
  }
168
- function blockWithoutSession(item, context) {
169
- const foreign = context !== void 0 && !sameAccount(item.transaction.appAccountToken, context.appAccountToken);
170
- block(item.state, foreign ? "ownershipConflict" : "signInRequired", null);
168
+ function blockWithoutSession(item) {
169
+ block(item.state, item.transaction.appAccountToken === null ? "ownershipConflict" : "signInRequired", null);
171
170
  }
172
171
  async function deliverItem(session, item, context) {
173
172
  if (!item.finishAllowed) {
@@ -176,7 +175,7 @@ function createPurchaseCoordinator(deps) {
176
175
  return complete(session, item);
177
176
  }
178
177
  async function confirmAccess(session, item, context) {
179
- if (!sameAccount(item.transaction.appAccountToken, context.appAccountToken)) {
178
+ if (item.transaction.appAccountToken === null) {
180
179
  block(item.state, "ownershipConflict", null);
181
180
  return false;
182
181
  }
@@ -368,6 +367,7 @@ function createPurchaseCoordinator(deps) {
368
367
  const known = new Set([...items.keys()].filter((key) => items.get(key).state.productId === context.productId));
369
368
  pendingApproval = { productId: context.productId, token: context.appAccountToken, known };
370
369
  setOutcome("awaitingApproval");
370
+ deps.onAwaitingApproval?.(context.productId);
371
371
  return true;
372
372
  }
373
373
  function setOutcome(next) {
@@ -459,10 +459,10 @@ function decodeContext(settled, isContext) {
459
459
  return { kind: "unavailable", retryAfterMs: retryAfter(raw.retryAfterMs) };
460
460
  }
461
461
  function isPurchaseContext(value) {
462
- return isMemberContext(value) && isObject(value) && isNonEmpty(value.productId);
462
+ return isMemberContext(value) && isObject(value) && isNonEmpty(value.productId) && isNonEmpty(value.appAccountToken);
463
463
  }
464
464
  function isMemberContext(value) {
465
- return isObject(value) && isNonEmpty(value.appAccountToken) && isNonEmpty(value.scopeKey);
465
+ return isObject(value) && isNonEmpty(value.scopeKey);
466
466
  }
467
467
  function retryAfter(value) {
468
468
  return typeof value === "number" && Number.isFinite(value) && value >= 0 ? value : void 0;
@@ -852,6 +852,92 @@ function onlineProgramItem(program, commerceDisplayPrice) {
852
852
  return { reference: { kind: ONLINE_PROGRAM, id }, ...commerceDisplayPrice ? { commerceDisplayPrice } : {} };
853
853
  }
854
854
 
855
+ // ../../core/sdk/iap/src/host-session.ts
856
+ var SIGNED_OUT = {
857
+ generation: 0,
858
+ kind: "signedOut",
859
+ memberId: null,
860
+ siteId: null,
861
+ appId: null,
862
+ ready: false,
863
+ epoch: 0
864
+ };
865
+ var KINDS = /* @__PURE__ */ new Set(["member", "visitor", "owner", "signedOut"]);
866
+ function createHostSession(source) {
867
+ let seen = -1;
868
+ let latest = SIGNED_OUT;
869
+ const byGeneration = /* @__PURE__ */ new Map();
870
+ function pull() {
871
+ const snap = parseSession(source.current());
872
+ if (snap.generation < seen) return latest;
873
+ seen = snap.generation;
874
+ latest = snap;
875
+ const expectation = expectationOf(snap);
876
+ if (expectation && !byGeneration.has(snap.generation)) byGeneration.set(snap.generation, expectation);
877
+ return snap;
878
+ }
879
+ return {
880
+ identityBound: source.identityBound,
881
+ current() {
882
+ const snap = pull();
883
+ return { generation: snap.generation, kind: snap.kind };
884
+ },
885
+ identity(session) {
886
+ pull();
887
+ return byGeneration.get(session.generation) ?? null;
888
+ },
889
+ subscribe(listener) {
890
+ return source.subscribe(() => {
891
+ const before = seen;
892
+ pull();
893
+ if (latest.generation >= before) listener();
894
+ });
895
+ }
896
+ };
897
+ }
898
+ function hostSessionFromGlobal() {
899
+ const api = wixApiGlobal();
900
+ const session = api?.session;
901
+ if (!session || typeof session.current !== "function" || typeof session.subscribe !== "function") {
902
+ return createHostSession({ identityBound: false, current: () => SIGNED_OUT, subscribe: () => () => {
903
+ } });
904
+ }
905
+ return createHostSession({
906
+ identityBound: api?.identityBound === true,
907
+ current: () => session.current(),
908
+ subscribe: (listener) => session.subscribe(listener)
909
+ });
910
+ }
911
+ function memberIdentityOf(source) {
912
+ return { memberId: (session) => Promise.resolve(source.identity(session)?.memberId ?? null) };
913
+ }
914
+ function readIdentityBound() {
915
+ return wixApiGlobal()?.identityBound === true;
916
+ }
917
+ function expectationOf(snap) {
918
+ if (!snap.ready || snap.kind !== "member" || !snap.memberId || !snap.siteId || !snap.appId) return null;
919
+ return { generation: snap.generation, kind: "member", memberId: snap.memberId, siteId: snap.siteId, appId: snap.appId };
920
+ }
921
+ function parseSession(raw) {
922
+ if (raw === null || typeof raw !== "object") return SIGNED_OUT;
923
+ const value = raw;
924
+ const kind = value.kind;
925
+ if (typeof value.generation !== "number" || !Number.isSafeInteger(value.generation)) return SIGNED_OUT;
926
+ if (typeof kind !== "string" || !KINDS.has(kind)) return SIGNED_OUT;
927
+ return {
928
+ generation: value.generation,
929
+ kind,
930
+ memberId: typeof value.memberId === "string" && value.memberId.length > 0 ? value.memberId : null,
931
+ siteId: typeof value.siteId === "string" && value.siteId.length > 0 ? value.siteId : null,
932
+ appId: typeof value.appId === "string" && value.appId.length > 0 ? value.appId : null,
933
+ ready: value.ready === true,
934
+ epoch: typeof value.epoch === "number" ? value.epoch : 0
935
+ };
936
+ }
937
+ function wixApiGlobal() {
938
+ return globalThis.himalaya?.wixApi;
939
+ }
940
+
855
941
  // ../../core/sdk/iap/src/wix-payments-wire.ts
856
942
  function startPaymentCall(scope, wixTransactionId) {
857
943
  return post(scope, "/payments/start", { appId: scope.binding.purchasesAppId, wixTransactionId });
@@ -859,9 +945,6 @@ function startPaymentCall(scope, wixTransactionId) {
859
945
  function completePaymentCall(scope, signedTransaction) {
860
946
  return post(scope, "/payments/complete", { appId: scope.binding.purchasesAppId, apple: { signedTransaction } });
861
947
  }
862
- function customerIdCall(scope) {
863
- return get(scope, `/customer-id?appId=${encodeURIComponent(scope.binding.purchasesAppId)}`);
864
- }
865
948
  function paymentCall(scope, paymentId) {
866
949
  return get(scope, `/payments/${encodeURIComponent(paymentId)}`);
867
950
  }
@@ -869,16 +952,13 @@ function isRoutePrefix(prefix) {
869
952
  return /^\/[A-Za-z0-9._~\-/]*[A-Za-z0-9._~-]$/.test(prefix);
870
953
  }
871
954
  function decodeStarted(raw, expected) {
872
- if (!isObject3(raw) || !isStoreProductId(raw.storeProductId) || !isUUID(raw.customerId)) return null;
955
+ if (!isObject3(raw) || !isStoreProductId(raw.storeProductId) || !isUUID(raw.appAccountToken)) return null;
873
956
  const payment = decodePayment(raw.payment, expected);
874
- return payment && { payment, storeProductId: raw.storeProductId, customerId: raw.customerId };
957
+ return payment && { payment, storeProductId: raw.storeProductId, appAccountToken: raw.appAccountToken };
875
958
  }
876
959
  function decodePaymentAnswer(raw, expected) {
877
960
  return isObject3(raw) ? decodePayment(raw.payment, expected) : null;
878
961
  }
879
- function decodeCustomerId(raw) {
880
- return isObject3(raw) && isUUID(raw.customerId) ? raw.customerId : null;
881
- }
882
962
  function decodePayment(raw, expected) {
883
963
  if (!isObject3(raw) || !hasPaymentIds(raw) || !echoes(raw, expected) || !hasValidOptionals(raw)) return null;
884
964
  const status = ownValue(STATUSES, raw.status);
@@ -993,7 +1073,7 @@ function createWixIapClient(deps) {
993
1073
  codes: START_PAYMENT_CODES,
994
1074
  request: (scope) => startPaymentCall(scope, input.wixTransactionId),
995
1075
  decode: (raw, scope) => {
996
- const started = decodeStarted(raw, { ...expectationOf(scope), wixTransactionId: input.wixTransactionId });
1076
+ const started = decodeStarted(raw, { ...expectationOf2(scope), wixTransactionId: input.wixTransactionId });
997
1077
  return started && { status: "started", ...started };
998
1078
  }
999
1079
  });
@@ -1006,22 +1086,11 @@ function createWixIapClient(deps) {
1006
1086
  codes: COMPLETE_PAYMENT_CODES,
1007
1087
  request: (scope) => completePaymentCall(scope, transaction.signedTransaction),
1008
1088
  decode: (raw, scope) => {
1009
- const payment = decodePaymentAnswer(raw, expectationOf(scope));
1089
+ const payment = decodePaymentAnswer(raw, expectationOf2(scope));
1010
1090
  return payment && { status: "matched", payment };
1011
1091
  }
1012
1092
  });
1013
1093
  }
1014
- function getCustomerId() {
1015
- return run({
1016
- operation: "getCustomerId",
1017
- codes: GET_CUSTOMER_ID_CODES,
1018
- request: customerIdCall,
1019
- decode: (raw) => {
1020
- const customerId = decodeCustomerId(raw);
1021
- return customerId ? { status: "found", customerId } : null;
1022
- }
1023
- });
1024
- }
1025
1094
  function getPayment(input) {
1026
1095
  if (!isUUID(input.paymentId)) return Promise.resolve(failure("getPayment", "invalidArgument"));
1027
1096
  return run({
@@ -1029,7 +1098,7 @@ function createWixIapClient(deps) {
1029
1098
  codes: GET_PAYMENT_CODES,
1030
1099
  request: (scope) => paymentCall(scope, input.paymentId),
1031
1100
  decode: (raw, scope) => {
1032
- const payment = decodePaymentAnswer(raw, { ...expectationOf(scope), paymentId: input.paymentId });
1101
+ const payment = decodePaymentAnswer(raw, { ...expectationOf2(scope), paymentId: input.paymentId });
1033
1102
  return payment && { status: "found", payment };
1034
1103
  }
1035
1104
  });
@@ -1062,17 +1131,26 @@ function createWixIapClient(deps) {
1062
1131
  const transport = deps.transport ?? bridgeTransport();
1063
1132
  if (!transport) return refused(spec.operation, "notEnabled");
1064
1133
  if (!isCurrent(scope.session)) return refused(spec.operation, "sessionChanged");
1065
- const outcome = await attempt(transport, spec.request(scope), spec);
1134
+ const expectation = boundExpectation(scope.session, deps.transport == null);
1135
+ if (expectation === "refuse") return refused(spec.operation, "notEnabled");
1136
+ const outcome = await attempt(transport, spec.request(scope), spec, expectation);
1066
1137
  return isCurrent(scope.session) ? outcome : refused(spec.operation, "sessionChanged");
1067
1138
  }
1139
+ function boundExpectation(session, liveHost) {
1140
+ const source = deps.session;
1141
+ if (liveHost && (source.identityBound !== true || !readIdentityBound())) return "refuse";
1142
+ if (typeof source.identity !== "function") return liveHost ? "refuse" : void 0;
1143
+ return source.identity(session) ?? "refuse";
1144
+ }
1068
1145
  function isCurrent(session) {
1069
1146
  return deps.session.current().generation === session.generation;
1070
1147
  }
1071
- return { startPayment, completePayment, getCustomerId, getPayment };
1148
+ return { startPayment, completePayment, getPayment };
1072
1149
  }
1073
- async function attempt(transport, call, spec) {
1150
+ async function attempt(transport, call, spec, expectation) {
1074
1151
  try {
1075
- return { answer: await transport.call(call.method, call.path, call.body, call.headers) };
1152
+ const answer = expectation ? await transport.call(call.method, call.path, call.body, call.headers, expectation) : await transport.call(call.method, call.path, call.body, call.headers);
1153
+ return { answer };
1076
1154
  } catch (error) {
1077
1155
  return { failure: classifyFailure(error, spec.operation, spec.codes) };
1078
1156
  }
@@ -1087,7 +1165,7 @@ async function read(call, operation) {
1087
1165
  function refused(operation, kind) {
1088
1166
  return { failure: failure(operation, kind) };
1089
1167
  }
1090
- function expectationOf(scope) {
1168
+ function expectationOf2(scope) {
1091
1169
  return { appId: scope.binding.purchasesAppId, memberId: scope.memberId };
1092
1170
  }
1093
1171
  function refuseProof(transaction) {
@@ -1119,9 +1197,9 @@ var COMPLETE_PAYMENT_CODES = [
1119
1197
  "NOT_PURCHASED",
1120
1198
  "ZERO_PRICE",
1121
1199
  "NO_MATCHING_PAYMENT",
1200
+ "PAYMENT_NOT_PENDING",
1122
1201
  "APP_NOT_CONFIGURED"
1123
1202
  ];
1124
- var GET_CUSTOMER_ID_CODES = ["APP_NOT_CONFIGURED"];
1125
1203
  var GET_PAYMENT_CODES = ["NOT_FOUND"];
1126
1204
 
1127
1205
  // ../../core/sdk/iap/src/index.ts
@@ -1223,6 +1301,7 @@ export {
1223
1301
  MAX_RETRY_DELAY_MS,
1224
1302
  appleManagedStore,
1225
1303
  consume,
1304
+ createHostSession,
1226
1305
  createIapCatalogPricing,
1227
1306
  createPricingController,
1228
1307
  createPurchaseCoordinator,
@@ -1232,10 +1311,13 @@ export {
1232
1311
  getPaywallConfig,
1233
1312
  getProducts,
1234
1313
  getUnfinishedTransactions,
1314
+ hostSessionFromGlobal,
1235
1315
  iapPriceFields,
1316
+ memberIdentityOf,
1236
1317
  onlineProgramItem,
1237
1318
  purchase,
1238
1319
  purchaseForVerification,
1320
+ readIdentityBound,
1239
1321
  restore,
1240
1322
  version
1241
1323
  };
@@ -6961,6 +6961,12 @@ var screenDescriptorSchema = {
6961
6961
  type: "object",
6962
6962
  additionalProperties: false,
6963
6963
  required: ["screenId", "renderer", "schemaVersion"],
6964
+ // RFC 0069 replaces the legacy policy; combining both selects different
6965
+ // host implementations, so reject that ambiguous descriptor.
6966
+ not: {
6967
+ required: ["transcriptScroll", "scrollToBottom"],
6968
+ properties: { scrollToBottom: { const: true } }
6969
+ },
6964
6970
  properties: {
6965
6971
  screenId: { type: "string", minLength: 1 },
6966
6972
  renderer: {
@@ -6976,6 +6982,19 @@ var screenDescriptorSchema = {
6976
6982
  // Chat-transcript scroll: host pins the scroll to the bottom with a
6977
6983
  // floating "jump to latest" affordance. Absent/false = top-anchored.
6978
6984
  scrollToBottom: { type: "boolean" },
6985
+ // RFC 0069 — the chat transcript scroll policy (pin the sent turn, follow the
6986
+ // reply). Both paths are `$service:` sentinels: a literal token could never
6987
+ // change, so the policy would never fire.
6988
+ transcriptScroll: {
6989
+ type: "object",
6990
+ additionalProperties: false,
6991
+ required: ["sendPath"],
6992
+ properties: {
6993
+ sendPath: { type: "string", pattern: "^\\$service:" },
6994
+ anchorPath: { type: "string", pattern: "^$|^\\$service:" },
6995
+ jumpLabel: { type: "string" }
6996
+ }
6997
+ },
6979
6998
  url: { type: "string", format: "uri" },
6980
6999
  capabilitiesRequired: {
6981
7000
  type: "array",
@@ -7390,6 +7409,18 @@ var screenDescriptorSchema = {
7390
7409
  trigger: { type: "string", enum: ["on_change", "on_appear", "both", "none"] }
7391
7410
  }
7392
7411
  },
7412
+ // RFC 0069 — recurring, finite, transform-only motion on a decorative node. `kind`
7413
+ // is an open string: an unknown kind renders no motion, so an older validator must
7414
+ // not reject a newer one.
7415
+ ambientMotion: {
7416
+ type: "object",
7417
+ additionalProperties: false,
7418
+ properties: {
7419
+ kind: { type: "string" },
7420
+ minGapMs: { type: "integer", minimum: 0 },
7421
+ maxGapMs: { type: "integer", minimum: 0 }
7422
+ }
7423
+ },
7393
7424
  // #1052 — explicit drop shadow (colour token + radius + offset), alongside the `shadow` token form.
7394
7425
  boxShadow: {
7395
7426
  type: "object",