@reclaimprotocol/client 0.1.42 → 0.1.44

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.
@@ -1,5 +1,5 @@
1
1
  // AUTO-GENERATED by packages/app/scripts/openapi-typegen.ts
2
- // from packages/app/openapi.yaml (spec v0.1.0, source sha256:c3421d6bcf76).
2
+ // from packages/app/openapi.yaml (spec v0.1.0, source sha256:cbe3daf2a1f3).
3
3
  // The hash catches drift the version misses (a spec can change without a
4
4
  // version bump) — do not remove it as "redundant" with the version.
5
5
  // Run `npm run openapi:gen --workspace=packages/app` to regenerate. Do not edit by hand.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@reclaimprotocol/client",
3
3
  "title": "Reclaim Client",
4
- "version": "0.1.42",
4
+ "version": "0.1.44",
5
5
  "description": "Typed SDK/HTTP client SDK for the Reclaim Protocol — the programmatic way to use Reclaim Protocol to verify **data points** about your users (a follower count, an account balance, an order). Can be directly integrated by apps to request verification for their users using Reclaim Protocol and verify the results.",
6
6
  "type": "module",
7
7
  "sideEffects": false,
package/src/result.ts CHANGED
@@ -647,6 +647,14 @@ export async function verifyResultFull(
647
647
  }
648
648
  if(hasContentValidation(commonValidation)) {
649
649
  await verifyRequestProofGroup(proofGroups, commonValidation)
650
+ } else if(isProviderlessAiResult(payload, providerResults)) {
651
+ // AI sessions have no provider or recipe, so there is no content to
652
+ // match. Attestor trust, proof signatures, and session binding still
653
+ // apply through `commonValidation`.
654
+ await verifyRequestProofGroup(proofGroups, {
655
+ ...commonValidation,
656
+ dangerouslyDisableContentValidation: true,
657
+ })
650
658
  } else {
651
659
  await verifyByResolvedRecipes(commonValidation, expectedSessionId)
652
660
  }
@@ -832,6 +840,30 @@ function hasContentValidation(config: VerifyRequestProofOptions): boolean {
832
840
  )
833
841
  }
834
842
 
843
+ /**
844
+ * Whether a result comes from an AI session: the session declares no
845
+ * providers, and no `results` entry names a provider or version. Any other
846
+ * shape, including a mix of both kinds of entries, takes the recipe path.
847
+ */
848
+ function isProviderlessAiResult(
849
+ payload: Record<string, unknown>,
850
+ entries: Record<string, unknown>[],
851
+ ) {
852
+ const session = payload.verification_session
853
+ if(!session || typeof session !== 'object' || Array.isArray(session)) {
854
+ return false
855
+ }
856
+
857
+ const { providers } = session as Record<string, unknown>
858
+ return Array.isArray(providers)
859
+ && providers.length === 0
860
+ && entries.length > 0
861
+ && entries.every((entry) => (
862
+ entry.provider_id === undefined
863
+ && entry.resolved_version === undefined
864
+ ))
865
+ }
866
+
835
867
  function proofGroupKey(group: {
836
868
  providerId?: string
837
869
  providerVersion?: string
package/src/routes.gen.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  // AUTO-GENERATED by packages/app/scripts/mcp-tools-gen.ts
2
- // from packages/app/openapi.yaml (spec v0.1.0, source sha256:c3421d6bcf76).
2
+ // from packages/app/openapi.yaml (spec v0.1.0, source sha256:cbe3daf2a1f3).
3
3
  // The hash catches drift the version misses (a spec can change without a
4
4
  // version bump) — do not remove it as "redundant" with the version.
5
5
  // Run `npm run openapi:gen --workspace=packages/app` to regenerate. Do not edit by hand.
@@ -14,12 +14,15 @@ export const ROUTES = {
14
14
  "AdminBillingPlans": {"method":"get","path":"/admin/billing/plans"},
15
15
  "AdminBillingTransactions": {"method":"get","path":"/admin/billing/transactions"},
16
16
  "AdminCallbackDlq": {"method":"get","path":"/admin/callback-dlq"},
17
+ "AdminDisableOrgAiAppKey": {"method":"post","path":"/admin/orgs/{orgId}/ai-app-key/disable"},
17
18
  "AdminFeatureFlags": {"method":"get","path":"/admin/feature-flags"},
19
+ "AdminGetOrgAiAppKey": {"method":"get","path":"/admin/orgs/{orgId}/ai-app-key"},
18
20
  "AdminGrantOrgCredit": {"method":"post","path":"/admin/orgs/{orgId}/credits"},
19
21
  "AdminHome": {"method":"get","path":"/admin"},
20
22
  "AdminOrgs": {"method":"get","path":"/admin/orgs"},
21
23
  "AdminProviders": {"method":"get","path":"/admin/providers"},
22
24
  "AdminReviews": {"method":"get","path":"/admin/reviews"},
25
+ "AdminRotateOrgAiAppKey": {"method":"post","path":"/admin/orgs/{orgId}/ai-app-key/rotate"},
23
26
  "AdminSessions": {"method":"get","path":"/admin/sessions"},
24
27
  "AdminSetProviderFixWithAi": {"method":"put","path":"/admin/providers/{providerId}/fix-with-ai"},
25
28
  "AdminSetUserOrgLimit": {"method":"put","path":"/users/{userId}/org-limit"},
@@ -131,6 +134,8 @@ export const ROUTES = {
131
134
  "ProviderPreviewImage": {"method":"get","path":"/providers/{providerId}/preview.png"},
132
135
  "Providers": {"method":"get","path":"/providers"},
133
136
  "PublishProviderVersion": {"method":"post","path":"/providers/{providerId}/versions/{version}/publish"},
137
+ "ReceiveAiVerificationCancel": {"method":"post","path":"/verifications/ai-sessions/{sessionId}/cancel"},
138
+ "ReceiveAiVerificationProofs": {"method":"post","path":"/verifications/ai-sessions/{sessionId}/proofs"},
134
139
  "RefreshBillingPlans": {"method":"post","path":"/admin/billing/plans/refresh"},
135
140
  "RefundTransaction": {"method":"post","path":"/admin/billing/transactions/{txId}/refund"},
136
141
  "ReleaseCallbackListener": {"method":"post","path":"/verifications/callback-listener/release"},
@@ -161,6 +166,7 @@ export const ROUTES = {
161
166
  "Sitemap": {"method":"get","path":"/sitemap.xml"},
162
167
  "SitePage": {"method":"get","path":"/site/{domain}"},
163
168
  "SitePanel": {"method":"get","path":"/site/{domain}/panel"},
169
+ "StartAiVerificationSession": {"method":"post","path":"/verifications/ai-sessions/{sessionId}/start"},
164
170
  "StartSocialLogin": {"method":"get","path":"/login/social/{provider}"},
165
171
  "StripeWebhook": {"method":"post","path":"/billing/stripe/webhook"},
166
172
  "SubmitConsent": {"method":"post","path":"/oauth/consent"},