weft-sdk 0.24.0 → 0.32.2

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 (156) hide show
  1. checksums.yaml +4 -4
  2. data/docs/FetchApi.md +3 -3
  3. data/docs/FetchErrorResponse.md +1 -1
  4. data/docs/FetchRequest.md +6 -2
  5. data/docs/FetchResponse.md +4 -4
  6. data/docs/GetPurchaseIdParameter.md +48 -0
  7. data/docs/PaymentsApi.md +2 -0
  8. data/docs/Purchase.md +6 -0
  9. data/docs/PurchasesApi.md +2 -2
  10. data/docs/SearchApi.md +1 -68
  11. data/docs/SearchCompactAccess.md +23 -0
  12. data/docs/SearchCompactAccessPrice.md +23 -0
  13. data/docs/SearchCompactNextCall.md +23 -0
  14. data/docs/SearchCompactResult.md +47 -0
  15. data/docs/SearchCompactResultAttribution.md +21 -0
  16. data/docs/SearchCompactResultBlockedScopesInner.md +19 -0
  17. data/docs/SearchCompactResultOperation.md +21 -0
  18. data/docs/SearchCompactResultProvider.md +19 -0
  19. data/docs/SearchEndpointCall.md +1 -1
  20. data/docs/SearchEndpointCallInputSchema.md +14 -0
  21. data/docs/SearchEndpointHit.md +5 -1
  22. data/docs/SearchHelperDocs.md +23 -0
  23. data/docs/SearchRequest.md +3 -1
  24. data/docs/SearchResponse.md +9 -3
  25. data/docs/SearchWeftFetchCompatibility.md +3 -1
  26. data/docs/WebhooksApi.md +414 -0
  27. data/lib/weft/client.rb +271 -0
  28. data/lib/weft/error.rb +41 -0
  29. data/lib/weft/facilitator/client.rb +179 -42
  30. data/lib/weft/facilitator/echo.rb +99 -0
  31. data/lib/weft/facilitator/extensions.rb +183 -0
  32. data/lib/weft/facilitator/fee.rb +26 -11
  33. data/lib/weft/facilitator/handshake.rb +92 -0
  34. data/lib/weft/facilitator/json_wire.rb +74 -0
  35. data/lib/weft/facilitator/middleware.rb +562 -137
  36. data/lib/weft/facilitator/path_match.rb +179 -0
  37. data/lib/weft/facilitator/product.rb +380 -0
  38. data/lib/weft/facilitator/replay.rb +46 -0
  39. data/lib/weft/facilitator/settlement.rb +117 -0
  40. data/lib/weft/facilitator/x402.rb +355 -0
  41. data/lib/weft/generated/api/account_api.rb +2 -2
  42. data/lib/weft/generated/api/agent_bootstrap_api.rb +2 -2
  43. data/lib/weft/generated/api/api_keys_api.rb +2 -2
  44. data/lib/weft/generated/api/auth_api.rb +2 -2
  45. data/lib/weft/generated/api/balance_api.rb +2 -2
  46. data/lib/weft/generated/api/documentation_api.rb +2 -2
  47. data/lib/weft/generated/api/fetch_api.rb +6 -6
  48. data/lib/weft/generated/api/payments_api.rb +4 -2
  49. data/lib/weft/generated/api/purchases_api.rb +4 -4
  50. data/lib/weft/generated/api/resources_api.rb +2 -2
  51. data/lib/weft/generated/api/search_api.rb +4 -83
  52. data/lib/weft/generated/api/webhooks_api.rb +388 -0
  53. data/lib/weft/generated/api_client.rb +2 -2
  54. data/lib/weft/generated/api_error.rb +2 -2
  55. data/lib/weft/generated/api_model_base.rb +2 -2
  56. data/lib/weft/generated/configuration.rb +2 -2
  57. data/lib/weft/generated/models/account_bootstrap_approval.rb +2 -2
  58. data/lib/weft/generated/models/account_bootstrap_created.rb +2 -2
  59. data/lib/weft/generated/models/account_bootstrap_created_approval.rb +2 -2
  60. data/lib/weft/generated/models/account_bootstrap_created_response.rb +2 -2
  61. data/lib/weft/generated/models/account_bootstrap_request.rb +2 -2
  62. data/lib/weft/generated/models/account_bootstrap_status.rb +2 -2
  63. data/lib/weft/generated/models/account_bootstrap_status_response.rb +2 -2
  64. data/lib/weft/generated/models/account_details.rb +2 -2
  65. data/lib/weft/generated/models/api_key.rb +2 -2
  66. data/lib/weft/generated/models/api_key_created.rb +2 -2
  67. data/lib/weft/generated/models/api_key_created_response.rb +2 -2
  68. data/lib/weft/generated/models/api_key_list_response.rb +2 -2
  69. data/lib/weft/generated/models/auth_response.rb +2 -2
  70. data/lib/weft/generated/models/auth_response_data.rb +2 -2
  71. data/lib/weft/generated/models/balance_response.rb +2 -2
  72. data/lib/weft/generated/models/confirm_request.rb +2 -2
  73. data/lib/weft/generated/models/create_api_key_request.rb +2 -2
  74. data/lib/weft/generated/models/enrolled_resource.rb +2 -2
  75. data/lib/weft/generated/models/error.rb +2 -2
  76. data/lib/weft/generated/models/error_response.rb +2 -2
  77. data/lib/weft/generated/models/fetch403_response.rb +2 -2
  78. data/lib/weft/generated/models/fetch_balance_snapshot.rb +2 -2
  79. data/lib/weft/generated/models/fetch_error_response.rb +5 -5
  80. data/lib/weft/generated/models/fetch_request.rb +46 -5
  81. data/lib/weft/generated/models/fetch_request_body.rb +2 -2
  82. data/lib/weft/generated/models/fetch_response.rb +30 -85
  83. data/lib/weft/generated/models/get_purchase_id_parameter.rb +104 -0
  84. data/lib/weft/generated/models/insufficient_scope_response.rb +2 -2
  85. data/lib/weft/generated/models/me_api_key.rb +2 -2
  86. data/lib/weft/generated/models/me_api_key_creator.rb +2 -2
  87. data/lib/weft/generated/models/me_response.rb +2 -2
  88. data/lib/weft/generated/models/me_response_data.rb +2 -2
  89. data/lib/weft/generated/models/message_response.rb +2 -2
  90. data/lib/weft/generated/models/message_response_data.rb +2 -2
  91. data/lib/weft/generated/models/pagination.rb +2 -2
  92. data/lib/weft/generated/models/password_reset_request.rb +2 -2
  93. data/lib/weft/generated/models/password_update_request.rb +2 -2
  94. data/lib/weft/generated/models/payment.rb +2 -2
  95. data/lib/weft/generated/models/payment_list_response.rb +2 -2
  96. data/lib/weft/generated/models/payment_response.rb +2 -2
  97. data/lib/weft/generated/models/principal_wallet.rb +2 -2
  98. data/lib/weft/generated/models/promo_balance.rb +2 -2
  99. data/lib/weft/generated/models/purchase.rb +75 -3
  100. data/lib/weft/generated/models/purchase_artifact.rb +2 -2
  101. data/lib/weft/generated/models/purchase_list_response.rb +2 -2
  102. data/lib/weft/generated/models/purchase_response.rb +2 -2
  103. data/lib/weft/generated/models/rate_limit_response.rb +2 -2
  104. data/lib/weft/generated/models/resend_confirmation_request.rb +2 -2
  105. data/lib/weft/generated/models/resource_enrollment_request.rb +2 -2
  106. data/lib/weft/generated/models/resource_enrollment_response.rb +2 -2
  107. data/lib/weft/generated/models/resource_stats.rb +2 -2
  108. data/lib/weft/generated/models/search_access_method.rb +2 -2
  109. data/lib/weft/generated/models/search_capability_ref.rb +2 -2
  110. data/lib/weft/generated/models/search_compact_access.rb +179 -0
  111. data/lib/weft/generated/models/search_compact_access_price.rb +176 -0
  112. data/lib/weft/generated/models/search_compact_next_call.rb +275 -0
  113. data/lib/weft/generated/models/search_compact_result.rb +389 -0
  114. data/lib/weft/generated/models/search_compact_result_attribution.rb +166 -0
  115. data/lib/weft/generated/models/search_compact_result_blocked_scopes_inner.rb +156 -0
  116. data/lib/weft/generated/models/search_compact_result_operation.rb +183 -0
  117. data/lib/weft/generated/models/search_compact_result_provider.rb +156 -0
  118. data/lib/weft/generated/models/search_curated_callability.rb +2 -2
  119. data/lib/weft/generated/models/search_curated_execution.rb +2 -2
  120. data/lib/weft/generated/models/search_curated_operation.rb +2 -2
  121. data/lib/weft/generated/models/search_curated_service.rb +2 -2
  122. data/lib/weft/generated/models/search_curated_source.rb +2 -2
  123. data/lib/weft/generated/models/search_endpoint_call.rb +4 -4
  124. data/lib/weft/generated/models/search_endpoint_call_input_schema.rb +103 -0
  125. data/lib/weft/generated/models/search_endpoint_hit.rb +25 -6
  126. data/lib/weft/generated/models/search_endpoint_price.rb +2 -2
  127. data/lib/weft/generated/models/search_error_response.rb +4 -4
  128. data/lib/weft/generated/models/search_execution_mode_filter.rb +2 -2
  129. data/lib/weft/generated/models/search_filter_spec.rb +2 -2
  130. data/lib/weft/generated/models/search_helper_docs.rb +175 -0
  131. data/lib/weft/generated/models/search_method_filter.rb +2 -2
  132. data/lib/weft/generated/models/search_payment_offer.rb +2 -2
  133. data/lib/weft/generated/models/search_price_atomic_filter.rb +2 -2
  134. data/lib/weft/generated/models/search_price_usd_filter.rb +2 -2
  135. data/lib/weft/generated/models/search_protocol_filter.rb +2 -2
  136. data/lib/weft/generated/models/search_provider_ref.rb +2 -2
  137. data/lib/weft/generated/models/search_request.rb +50 -6
  138. data/lib/weft/generated/models/search_resource_type_filter.rb +2 -2
  139. data/lib/weft/generated/models/search_response.rb +71 -8
  140. data/lib/weft/generated/models/search_response_warnings_inner.rb +2 -2
  141. data/lib/weft/generated/models/search_result.rb +2 -2
  142. data/lib/weft/generated/models/search_string_set_filter.rb +2 -2
  143. data/lib/weft/generated/models/search_weft_fetch_compatibility.rb +28 -6
  144. data/lib/weft/generated/models/sign_in_request.rb +2 -2
  145. data/lib/weft/generated/models/sign_up_request.rb +2 -2
  146. data/lib/weft/generated/models/spending_policy.rb +2 -2
  147. data/lib/weft/generated/models/user.rb +2 -2
  148. data/lib/weft/generated/models/user_principal.rb +2 -2
  149. data/lib/weft/generated/models/wallet.rb +2 -2
  150. data/lib/weft/generated/version.rb +3 -3
  151. data/lib/weft/sdk.rb +3 -1
  152. metadata +39 -8
  153. data/docs/CuratedMarketplaceContract.md +0 -31
  154. data/docs/Merchant.md +0 -23
  155. data/lib/weft/generated/models/curated_marketplace_contract.rb +0 -384
  156. data/lib/weft/generated/models/merchant.rb +0 -264
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: af959ec2ea194d5996d702f9427a914d7d1e89f4c4a402dea2591d7f3ac207ab
4
- data.tar.gz: e6c513cf99e32f4506fb22cfacc97a32060e1d442c8e20f7cf8ce84ae9f54efb
3
+ metadata.gz: 49f6e59bc59298066b25022afb6f38b5e80292f6a313ad2ec35d62206500a824
4
+ data.tar.gz: 37b8b509144e36d1750482d42802255eb8da53d5fd5fac901e788b096c9a5b55
5
5
  SHA512:
6
- metadata.gz: 6f275514b42abf780dd7fa1f0cbe232721ac9fe1fce60701d0ae31a7e9151a4763a8288f7e18cabedee997f4d4c57fb596770cc7205b4ae02e774ffdef116c62
7
- data.tar.gz: 5fa416be2160f0a58426f4af16cebdc3725126666a728090565e0ddce8498a7b83190dbf225c63272abd160d35bc21753a521b6f1b8aac0d4460c9144a71d390
6
+ metadata.gz: 32b028a2b10064f0992c818d162eb47433bfe7ee6ac6635c8ce36b355683ff1e70d8982cfec6637db38757b9dc4cf758ca9321c2f26ed70341aa5a752f0fa2df
7
+ data.tar.gz: 5de9290d8982fe2e1586fd35081cdb2dcc43c57f1c0a89a870e163b859ebb11fc9274c1e8ccce974895d0e61a7f6381d367b3803ee1397b50cbb9e979307e21e
data/docs/FetchApi.md CHANGED
@@ -13,7 +13,7 @@ All URIs are relative to *https://weft.network*
13
13
 
14
14
  Pay-and-fetch any URL (x402/MPP proxy)
15
15
 
16
- Universal x402/MPP fetch proxy. The caller provides a target `url`, a hard `max_cost_usd` ceiling, and optional `method` / `body` / `headers`. Weft: 1. Issues the request. 2. On `402 Payment Required`, selects a supported x402 or MPP challenge. 3. Compares the asking price to `max_cost_usd` and the buyer's policy (`max_tx_usd`, daily/weekly limits). 4. Authorizes payment from the buyer's wallet on the selected rail. 5. Replays the request with the protocol-specific payment credential. 6. Streams the upstream artifact back, base64-encoded under `body_base64`, with `paid_usd`, `held_usd`, `payment_status`, `tx_hash`, `protocol`, and the merchant's reputation snapshot. `paid_usd` is \"0.00\" until the charge is CONFIRMED settled — a signed-but- unsettled hold (the common case for x402, which settles asynchronously) reports its amount in `held_usd` instead, never in `paid_usd`. Errors are structured with a stable `error` code, and each error response carries the buyer's `policy`, `balance`, and a `dashboard_url` so a CLI can render an actionable message without a second round-trip. Account-scoped: the bearer must be a buyer-scoped API key, an OAuth access token carrying `fetch`, or a claimed `wbt_*` bearer. **Forwarded headers:** the caller's `headers` are passed through to the upstream, except a denylist of hop-by-hop and Weft-internal headers (`host`, `authorization`, `cookie`, `proxy-authorization`, `x-forwarded-*`, `x-real-ip`, `x-payment`, `connection`, `upgrade`). Up to 32 headers, 4 KB of combined value bytes.
16
+ Universal x402/MPP fetch proxy. The caller provides a target `url`, a merchant-principal `max_cost_usd` ceiling, and optional `method` / `body` / `headers`. Weft: 1. Issues the request. 2. On `402 Payment Required`, selects a supported x402 or MPP challenge. 3. Compares the asking price to `max_cost_usd` and the buyer's policy (`max_tx_usd`, daily/weekly limits). 4. If refill is allowed and an eligible mainnet MPP challenge finds its Tempo token short, creates or adopts a buyer-owned Base-to-Tempo refill and returns `409 FUNDING_PENDING` with `details.reason=funding_active`. If an overlapping payment invalidates the balance observation before a bridge is created, the same retryable response carries `details.reason=balance_changed`. The caller retries the identical fetch after `details.retry_after_seconds`; that later request obtains a fresh challenge and reruns rail selection and all payment controls. 5. Authorizes payment from the buyer's wallet on the selected rail. 6. Replays the request with the protocol-specific payment credential. 7. Streams the upstream artifact back, base64-encoded under `body_base64`, with `paid_usd`, `held_usd`, `payment_status`, `tx_hash`, `protocol`, and `purchase_id`. `paid_usd` is \"0.00\" until the charge is CONFIRMED settled — a signed-but- unsettled hold (the common case for x402, which settles asynchronously) reports its amount in `held_usd` instead, never in `paid_usd`. `purchase_id` is the id that `GET /api/v1/purchases/{id}` accepts, so a caller can read how a pending charge ends. **Opt-in safety controls:** `allow_tempo_refill: false` prevents this request from creating, adopting, or enqueueing a Base-to-Tempo bridge. A Tempo shortfall returns `402 INSUFFICIENT_BALANCE`; unrelated bridges and their jobs remain unchanged. `access_method_id` is advisory and does not enforce a payment rail. `max_total_cost_usd` is an all-in ceiling covering merchant principal, network gas, provider fees, and prerequisite buyer-paid operations. It disables refill; explicitly combining it with `allow_tempo_refill: true` returns `422 INCOMPATIBLE_FETCH_CONTROLS`. Current wallet integrations provide no supported binding all-in fee guarantee. Therefore all-in requests return `402 TOTAL_COST_UNVERIFIABLE` before payment preparation, approval, reservation, or refill. This also refuses recovery of older payments and SIWX wallet signing; it admits no positive paid route. Increasing the ceiling does not resolve missing fee authority. Omitted controls preserve existing behavior. Ordinary non-402 merchant responses retain `MERCHANT_RETURNED_NON_402`. Stored-result replay is historical payment information, not a new bounded authorization. Errors are structured with a stable `error` code, and each error response carries the buyer's `policy`, `balance`, and a `dashboard_url` so a CLI can render an actionable message without a second round-trip. Account-scoped: the bearer must be a buyer-scoped API key, an OAuth access token carrying `fetch`, or a claimed `wbt_*` bearer. **Forwarded headers:** the caller's `headers` are passed through to the upstream, except a denylist of hop-by-hop and Weft-internal headers (`host`, `authorization`, `cookie`, `proxy-authorization`, `x-forwarded-*`, `x-real-ip`, `x-payment`, `connection`, `upgrade`). Up to 32 headers, 4 KB of combined value bytes.
17
17
 
18
18
  ### Examples
19
19
 
@@ -29,7 +29,7 @@ end
29
29
  api_instance = Weft::FetchApi.new
30
30
  fetch_request = Weft::FetchRequest.new({url: 'https://x402.api.agentmail.to/v0/inboxes'}) # FetchRequest |
31
31
  opts = {
32
- idempotency_key: 'idempotency_key_example' # String | Opaque caller-generated retry key. Reusing the same key for the same buyer converges on one paid fetch; keys are hashed and namespaced by buyer before storage. Send this header for every unattended or retryable paid request.
32
+ idempotency_key: 'idempotency_key_example' # String | Opaque caller-generated retry key. Reusing the same key for the same buyer converges on one paid fetch; keys are hashed and namespaced by buyer before storage. Send this header for every unattended or retryable paid request. Effective safety controls participate in retry identity. Changing them under a reserved key returns `IDEMPOTENCY_CONFLICT`; an older unconstrained payment cannot become a bounded success on retry.
33
33
  }
34
34
 
35
35
  begin
@@ -64,7 +64,7 @@ end
64
64
  | Name | Type | Description | Notes |
65
65
  | ---- | ---- | ----------- | ----- |
66
66
  | **fetch_request** | [**FetchRequest**](FetchRequest.md) | | |
67
- | **idempotency_key** | **String** | Opaque caller-generated retry key. Reusing the same key for the same buyer converges on one paid fetch; keys are hashed and namespaced by buyer before storage. Send this header for every unattended or retryable paid request. | [optional] |
67
+ | **idempotency_key** | **String** | Opaque caller-generated retry key. Reusing the same key for the same buyer converges on one paid fetch; keys are hashed and namespaced by buyer before storage. Send this header for every unattended or retryable paid request. Effective safety controls participate in retry identity. Changing them under a reserved key returns `IDEMPOTENCY_CONFLICT`; an older unconstrained payment cannot become a bounded success on retry. | [optional] |
68
68
 
69
69
  ### Return type
70
70
 
@@ -5,7 +5,7 @@
5
5
  | Name | Type | Description | Notes |
6
6
  | ---- | ---- | ----------- | ----- |
7
7
  | **error** | **String** | Stable error code. | |
8
- | **details** | **Hash<String, Object>** | Optional context. Shape varies by error code. | |
8
+ | **details** | **Hash<String, Object>** | Optional context. Shape varies by error code. `purchase_id` (opaque string) is present when the failure follows a payment row for this request — a new, resumed, or replayed payment. It is the id that `GET /api/v1/purchases/{id}` accepts: read that purchase to learn whether the charge settled, instead of assuming either outcome. It is absent when the request was refused before any payment row existed. | |
9
9
  | **policy** | [**SpendingPolicy**](SpendingPolicy.md) | | |
10
10
  | **balance** | [**FetchBalanceSnapshot**](FetchBalanceSnapshot.md) | | |
11
11
  | **dashboard_url** | **String** | Deep-link to the dashboard's policy page. | |
data/docs/FetchRequest.md CHANGED
@@ -5,13 +5,15 @@
5
5
  | Name | Type | Description | Notes |
6
6
  | ---- | ---- | ----------- | ----- |
7
7
  | **url** | **String** | Target URL. Must pass Weft's URL safety check (no SSRF / private IP ranges). | |
8
- | **max_cost_usd** | **String** | Hard ceiling on what the buyer is willing to pay. Defaults to `0.10` USD. | [optional][default to '0.10'] |
8
+ | **max_cost_usd** | **String** | Merchant-principal ceiling, excluding gas, provider fees and prerequisites. Defaults to `0.10` USD; use `max_total_cost_usd` for an all-in bound. | [optional][default to '0.10'] |
9
+ | **allow_tempo_refill** | **Boolean** | Whether this request may create, adopt, or enqueue a Base-to-Tempo refill. Only JSON booleans are accepted. Omission allows legacy refill behavior unless `max_total_cost_usd` is supplied, in which case refill is disabled. False leaves unrelated bridges and jobs unchanged and reports an unfunded Tempo pocket as `INSUFFICIENT_BALANCE`. This does not select a rail or bound fees. | [optional] |
10
+ | **max_total_cost_usd** | **String** | Optional all-in buyer-debit ceiling in USD, including principal, gas, provider fees and prerequisite operations. Requires a binding upstream upper bound before any payment effect. Current integrations have no such guarantee, so requests requiring wallet signing or payment fail closed with `TOTAL_COST_UNVERIFIABLE`, including recovery and replay of previous payments. No positive paid route is currently admitted in this mode. Estimates, expected sponsorship and receipts are not authority. Implies no refill; explicit `allow_tempo_refill: true` is invalid. Omission preserves legacy behavior. | [optional] |
9
11
  | **method** | **String** | HTTP method to use against the upstream. | [optional][default to 'GET'] |
10
12
  | **body** | [**FetchRequestBody**](FetchRequestBody.md) | | [optional] |
11
13
  | **headers** | **Hash<String, String>** | Headers forwarded to the upstream. Up to 32 headers, 4 KB total. The following are silently stripped: `host`, `authorization`, `cookie`, `proxy-authorization`, `x-forwarded-*`, `x-real-ip`, `x-payment`, `connection`, `upgrade`. | [optional] |
12
14
  | **search_id** | **String** | The `query_trace_id` from the `POST /api/v1/search` response that surfaced this URL. Optional and advisory: it attributes the purchase to the search that found it, and is used only for measurement. It never affects payment, authorization, idempotency, or the response body — the buyer is always resolved from the credential, never from this field. A value that is not a well-formed handle is ignored rather than rejected, so an analytics mistake can never cost a fetch. | [optional] |
13
15
  | **operation_id** | **String** | Advisory operation id returned by search. | [optional] |
14
- | **access_method_id** | **String** | Advisory access-method id returned by search. | [optional] |
16
+ | **access_method_id** | **String** | Advisory access-method id returned by search; does not enforce a payment rail. | [optional] |
15
17
 
16
18
  ## Example
17
19
 
@@ -21,6 +23,8 @@ require 'weft-sdk'
21
23
  instance = Weft::FetchRequest.new(
22
24
  url: https://x402.api.agentmail.to/v0/inboxes,
23
25
  max_cost_usd: 0.05,
26
+ allow_tempo_refill: false,
27
+ max_total_cost_usd: 0.05,
24
28
  method: null,
25
29
  body: null,
26
30
  headers: {Accept=application/json, User-Agent=my-agent/1.0},
@@ -4,16 +4,16 @@
4
4
 
5
5
  | Name | Type | Description | Notes |
6
6
  | ---- | ---- | ----------- | ----- |
7
- | **status** | **Integer** | HTTP status returned by the upstream after the paid replay. | |
7
+ | **status** | **Integer** | HTTP status returned by the upstream after the payment or SIWX authentication retry. | |
8
8
  | **headers** | **Hash<String, String>** | Response headers from the upstream. | |
9
9
  | **body_base64** | **String** | Base64-encoded response body. Empty string for empty bodies. | |
10
10
  | **paid_usd** | **String** | USD amount actually settled on-chain. \"0.00\" for any charge that hasn't (yet, or ever) settled — a signed hold is not yet spend. See `held_usd` for the nominal amount in that case. Exact to the micro-dollar, minimum two decimals; parse as a decimal rather than string-comparing against a bare zero literal. | |
11
11
  | **held_usd** | **String** | The nominal charge amount when `paid_usd` is \"0.00\" — a hold awaiting settlement, or a charge that failed/expired without ever settling. `null` once `paid_usd` reflects the real settlement. Same format as `paid_usd`: exact to the micro-dollar, minimum two decimals. | |
12
- | **payment_status** | **String** | Agent-facing settlement status. `pending` = signed, no refusal signal yet (settlement may still land, e.g. x402's async facilitator webhook). `declined-pending` = the merchant refused but the authorization isn't provably dead yet. `declined` / `expired` / `reverted` are terminal — the money never moved (or, for `reverted`, moved and then reversed on-chain) and never will for this charge. | |
12
+ | **payment_status** | **String** | Agent-facing settlement status. `not_required` means SIWX wallet authentication returned the response without payment. `pending` = signed, no refusal signal yet (settlement may still land, e.g. x402's async facilitator webhook). `declined-pending` = the merchant refused but the authorization isn't provably dead yet. `declined` / `expired` / `reverted` are terminal — the money never moved (or, for `reverted`, moved and then reversed on-chain) and never will for this charge. | |
13
13
  | **tx_hash** | **String** | Settlement transaction hash. Null until a settlement hash has been reported. | |
14
14
  | **protocol** | **String** | Payment protocol selected for this fetch. | |
15
15
  | **artifact_id** | **Integer** | Internal artifact identifier if the response was persisted; `null` otherwise. | |
16
- | **merchant** | [**Merchant**](Merchant.md) | Merchant reputation snapshot. | |
16
+ | **purchase_id** | **String** | The buyer purchase that paid for this fetch: an opaque id that `GET /api/v1/purchases/{id}` accepts and that purchase rows carry as `purchase_id`. It is not the sequential `Purchase.id`; do not parse or order by it. That purchase reports its own `status`, not `payment_status`: `signed` while the payment is pending, then `settled` (charged its `amount_usd`, which can be less than `held_usd`) or `declined`, `locked`, `expired`, or `reverted` (not charged). A `settled` purchase with `failure_reason: merchant_delivery_failed` was charged, but no successful paid response was delivered. An idempotent replay returns the same id, so bill at most once for each id. `null` when no payment was made (`payment_status: not_required`). The lookup needs purchase-history access: a `wk_*` key, a claimed `wbt_*` bearer, or a REST OAuth token with the `balance` scope. An OAuth token issued for the MCP server cannot call this endpoint. Current servers always send this field. It is optional in this schema so that a client also accepts a response from an older server. | [optional] |
17
17
 
18
18
  ## Example
19
19
 
@@ -30,6 +30,6 @@ instance = Weft::FetchResponse.new(
30
30
  tx_hash: null,
31
31
  protocol: null,
32
32
  artifact_id: null,
33
- merchant: null
33
+ purchase_id: pur_4V3n9mQ0b7XyK2sLpR8tWc1d
34
34
  )
35
35
  ```
@@ -0,0 +1,48 @@
1
+ # Weft::GetPurchaseIdParameter
2
+
3
+ ## Class instance methods
4
+
5
+ ### `openapi_one_of`
6
+
7
+ Returns the list of classes defined in oneOf.
8
+
9
+ #### Example
10
+
11
+ ```ruby
12
+ require 'weft-sdk'
13
+
14
+ Weft::GetPurchaseIdParameter.openapi_one_of
15
+ # =>
16
+ # [
17
+ # :'Integer',
18
+ # :'String'
19
+ # ]
20
+ ```
21
+
22
+ ### build
23
+
24
+ Find the appropriate object from the `openapi_one_of` list and casts the data into it.
25
+
26
+ #### Example
27
+
28
+ ```ruby
29
+ require 'weft-sdk'
30
+
31
+ Weft::GetPurchaseIdParameter.build(data)
32
+ # => #<Integer:0x00007fdd4aab02a0>
33
+
34
+ Weft::GetPurchaseIdParameter.build(data_that_doesnt_match)
35
+ # => nil
36
+ ```
37
+
38
+ #### Parameters
39
+
40
+ | Name | Type | Description |
41
+ | ---- | ---- | ----------- |
42
+ | **data** | **Mixed** | data to be matched against the list of oneOf items |
43
+
44
+ #### Return type
45
+
46
+ - `Integer`
47
+ - `String`
48
+ - `nil` (if no type matches)
data/docs/PaymentsApi.md CHANGED
@@ -81,6 +81,8 @@ end
81
81
 
82
82
  List payments
83
83
 
84
+ Seller payment receipts for the authenticated organization. A resource key with `product_id` set returns only payments whose `product_id` is that product. A resource key with `product_id` nil returns the organization. A payment outside that scope is not found.
85
+
84
86
  ### Examples
85
87
 
86
88
  ```ruby
data/docs/Purchase.md CHANGED
@@ -5,12 +5,15 @@
5
5
  | Name | Type | Description | Notes |
6
6
  | ---- | ---- | ----------- | ----- |
7
7
  | **id** | **Integer** | | |
8
+ | **purchase_id** | **String** | Opaque purchase id: the value fetch returns as &#x60;purchase_id&#x60; and that &#x60;GET /api/v1/purchases/{id}&#x60; accepts. Prefer it over the sequential &#x60;id&#x60;. Current servers always send this field; it is optional in this schema so that a client also accepts a response from an older server. | [optional] |
8
9
  | **status** | **String** | | |
9
10
  | **amount_usd** | **String** | Exact decimal USD amount with up to six fractional digits. Settled rows report the amount that moved; pending and failed rows report their authorization amount. | |
10
11
  | **recipient_address** | **String** | | |
11
12
  | **network** | **String** | | |
12
13
  | **protocol** | **String** | | |
13
14
  | **context** | **String** | | |
15
+ | **search_id** | **String** | Search trace ID used to attribute this purchase, when available. | |
16
+ | **attribution_status** | **String** | | |
14
17
  | **tx_hash** | **String** | | |
15
18
  | **reject_reason** | **String** | | |
16
19
  | **failure_reason** | **String** | | |
@@ -26,12 +29,15 @@ require 'weft-sdk'
26
29
 
27
30
  instance = Weft::Purchase.new(
28
31
  id: null,
32
+ purchase_id: pur_4V3n9mQ0b7XyK2sLpR8tWc1d,
29
33
  status: null,
30
34
  amount_usd: null,
31
35
  recipient_address: null,
32
36
  network: null,
33
37
  protocol: null,
34
38
  context: null,
39
+ search_id: null,
40
+ attribution_status: null,
35
41
  tx_hash: null,
36
42
  reject_reason: null,
37
43
  failure_reason: null,
data/docs/PurchasesApi.md CHANGED
@@ -26,7 +26,7 @@ Weft.configure do |config|
26
26
  end
27
27
 
28
28
  api_instance = Weft::PurchasesApi.new
29
- id = 56 # Integer | Purchase ID
29
+ id = nil # GetPurchaseIdParameter | The opaque `purchase_id` (`pur_…`) that fetch returns, or the legacy integer `id`. Both resolve only within the caller's own purchases. New callers should store and send `purchase_id`.
30
30
 
31
31
  begin
32
32
  # Get a buyer purchase
@@ -59,7 +59,7 @@ end
59
59
 
60
60
  | Name | Type | Description | Notes |
61
61
  | ---- | ---- | ----------- | ----- |
62
- | **id** | **Integer** | Purchase ID | |
62
+ | **id** | [**GetPurchaseIdParameter**](.md) | The opaque &#x60;purchase_id&#x60; (&#x60;pur_…&#x60;) that fetch returns, or the legacy integer &#x60;id&#x60;. Both resolve only within the caller&#39;s own purchases. New callers should store and send &#x60;purchase_id&#x60;. | |
63
63
 
64
64
  ### Return type
65
65
 
data/docs/SearchApi.md CHANGED
@@ -4,83 +4,16 @@ All URIs are relative to *https://weft.network*
4
4
 
5
5
  | Method | HTTP request | Description |
6
6
  | ------ | ------------ | ----------- |
7
- | [**get_curated_marketplace_contract**](SearchApi.md#get_curated_marketplace_contract) | **GET** /contracts/curated-marketplace/{digest}/{operation_id}.json | Get a curated marketplace operation contract |
8
7
  | [**search**](SearchApi.md#search) | **POST** /api/v1/search | Search the Weft index |
9
8
 
10
9
 
11
- ## get_curated_marketplace_contract
12
-
13
- > <CuratedMarketplaceContract> get_curated_marketplace_contract(digest, operation_id)
14
-
15
- Get a curated marketplace operation contract
16
-
17
- Public, content-addressed detail document linked from compact hosted-MCP search results. A matching document is cacheable for one year and immutable. The digest is the SHA-256 of the canonical JSON document. Every reviewed endpoint includes its request and response evidence; asynchronous endpoints also include the authored submit-and-poll lifecycle, identity-header reuse, terminal states, and known gaps.
18
-
19
- ### Examples
20
-
21
- ```ruby
22
- require 'time'
23
- require 'weft-sdk'
24
-
25
- api_instance = Weft::SearchApi.new
26
- digest = 'digest_example' # String |
27
- operation_id = 'operation_id_example' # String |
28
-
29
- begin
30
- # Get a curated marketplace operation contract
31
- result = api_instance.get_curated_marketplace_contract(digest, operation_id)
32
- p result
33
- rescue Weft::ApiError => e
34
- puts "Error when calling SearchApi->get_curated_marketplace_contract: #{e}"
35
- end
36
- ```
37
-
38
- #### Using the get_curated_marketplace_contract_with_http_info variant
39
-
40
- This returns an Array which contains the response data, status code and headers.
41
-
42
- > <Array(<CuratedMarketplaceContract>, Integer, Hash)> get_curated_marketplace_contract_with_http_info(digest, operation_id)
43
-
44
- ```ruby
45
- begin
46
- # Get a curated marketplace operation contract
47
- data, status_code, headers = api_instance.get_curated_marketplace_contract_with_http_info(digest, operation_id)
48
- p status_code # => 2xx
49
- p headers # => { ... }
50
- p data # => <CuratedMarketplaceContract>
51
- rescue Weft::ApiError => e
52
- puts "Error when calling SearchApi->get_curated_marketplace_contract_with_http_info: #{e}"
53
- end
54
- ```
55
-
56
- ### Parameters
57
-
58
- | Name | Type | Description | Notes |
59
- | ---- | ---- | ----------- | ----- |
60
- | **digest** | **String** | | |
61
- | **operation_id** | **String** | | |
62
-
63
- ### Return type
64
-
65
- [**CuratedMarketplaceContract**](CuratedMarketplaceContract.md)
66
-
67
- ### Authorization
68
-
69
- No authorization required
70
-
71
- ### HTTP request headers
72
-
73
- - **Content-Type**: Not defined
74
- - **Accept**: application/json
75
-
76
-
77
10
  ## search
78
11
 
79
12
  > <SearchResponse> search(search_request)
80
13
 
81
14
  Search the Weft index
82
15
 
83
- Semantic search over the Weft index of paid agent resources. The request body is the weft-search-platform `/v1/search` contract: a free-text `query`, optional `max_results`, and optional structured `filters` (price / price_atomic / type / protocol — the canonical FilterSpec v1 vocabulary, vendored verbatim from the platform). Price is a dual representation of one constraint: `price` in USD decimal strings (the reasoning form) XOR `price_atomic` in integer micro-USD (the settlement form) — mutually exclusive, set at most one. Account-scoped: the bearer token must be a buyer-scoped API key, an OAuth token carrying `search`, or a pending or claimed `wbt_*` bootstrap bearer. Pending bootstrap access uses an anonymous bootstrap identity; after claim, the promoted bearer uses its bound User. Rejection, cancellation, expiry, and revocation end bootstrap search. Bootstrap search is limited to 60 requests per credential and 120 per IP each hour before native credential promotion. Response negotiation: `Accept: application/json` (default) returns the structured envelope; `Accept: text/markdown` returns a rendered Markdown digest of the same results — useful for piping into a chat UI or LLM prompt.
16
+ Semantic search over the Weft index of paid agent resources. The request body is the weft-search-platform `/v1/search` contract: a free-text `query`, optional `max_results`, and optional structured `filters` (price / price_atomic / type / protocol — the canonical FilterSpec v1 vocabulary, vendored verbatim from the platform). Price is a dual representation of one constraint: `price` in USD decimal strings (the reasoning form) XOR `price_atomic` in integer micro-USD (the settlement form) — mutually exclusive, set at most one. Account-scoped: the bearer token must be a buyer-scoped API key, an OAuth token carrying `search`, or a pending or claimed `wbt_*` bootstrap bearer. Pending bootstrap access uses an anonymous bootstrap identity; after claim, the promoted bearer uses its bound User. Rejection, cancellation, expiry, and revocation end bootstrap search. Bootstrap search is limited to 60 requests per credential and 120 per IP each hour before native credential promotion. Response negotiation: `Accept: application/json` (default) returns the structured envelope; `Accept: text/markdown` returns a rendered Markdown digest of the same results — useful for piping into a chat UI or LLM prompt. Compact view: send `view: \"compact\"` to get the agent view of the hosted MCP `weft_search` tool. Each result is a small contract for the next paid call (below 2,000 JSON bytes): typed inputs, the request recipe, one access method with price, attribution, a ready `next_call` to `POST /api/v1/fetch` when the request is determined, and the authenticated `contract_url` for the full contract. Use it when you give search results to a model. The compact rows are in `compact_results`; `results` is empty. The compact view is JSON only and needs the curated search backend.
84
17
 
85
18
  ### Examples
86
19
 
@@ -0,0 +1,23 @@
1
+ # Weft::SearchCompactAccess
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **id** | **String** | The &#x60;access_method_id&#x60; to send to &#x60;POST /api/v1/fetch&#x60;. | [optional] |
8
+ | **protocol** | **String** | | [optional] |
9
+ | **weft_fetch** | **Hash&lt;String, Object&gt;** | Whether the Weft fetch runtime can pay this access method (&#x60;state&#x60;, and &#x60;reason&#x60; and &#x60;coverage&#x60; when they fit). | [optional] |
10
+ | **price** | [**SearchCompactAccessPrice**](SearchCompactAccessPrice.md) | | [optional] |
11
+
12
+ ## Example
13
+
14
+ ```ruby
15
+ require 'weft-sdk'
16
+
17
+ instance = Weft::SearchCompactAccess.new(
18
+ id: null,
19
+ protocol: null,
20
+ weft_fetch: null,
21
+ price: null
22
+ )
23
+ ```
@@ -0,0 +1,23 @@
1
+ # Weft::SearchCompactAccessPrice
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **kind** | **String** | Price kind, such as &#x60;fixed&#x60;, &#x60;dynamic&#x60;, &#x60;free&#x60; or &#x60;unknown&#x60;. | [optional] |
8
+ | **indexed_usd** | **String** | Indexed USD price. A &#x60;dynamic&#x60; price is not a cap. | [optional] |
9
+ | **unit** | **String** | | [optional] |
10
+ | **hint** | **String** | | [optional] |
11
+
12
+ ## Example
13
+
14
+ ```ruby
15
+ require 'weft-sdk'
16
+
17
+ instance = Weft::SearchCompactAccessPrice.new(
18
+ kind: null,
19
+ indexed_usd: null,
20
+ unit: null,
21
+ hint: null
22
+ )
23
+ ```
@@ -0,0 +1,23 @@
1
+ # Weft::SearchCompactNextCall
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **method** | **String** | | |
8
+ | **path** | **String** | | |
9
+ | **body** | **Hash&lt;String, Object&gt;** | A &#x60;FetchRequest&#x60; with documented example values and &#x60;{name}&#x60; placeholders. | |
10
+ | **fill** | **Array&lt;String&gt;** | Names to replace before you send the request. | |
11
+
12
+ ## Example
13
+
14
+ ```ruby
15
+ require 'weft-sdk'
16
+
17
+ instance = Weft::SearchCompactNextCall.new(
18
+ method: null,
19
+ path: null,
20
+ body: null,
21
+ fill: null
22
+ )
23
+ ```
@@ -0,0 +1,47 @@
1
+ # Weft::SearchCompactResult
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **provider** | [**SearchCompactResultProvider**](SearchCompactResultProvider.md) | | [optional] |
8
+ | **operation** | [**SearchCompactResultOperation**](SearchCompactResultOperation.md) | | |
9
+ | **inputs** | **Hash&lt;String, Object&gt;** | Typed business inputs (a bounded JSON schema), or the names and locations of the required inputs when the full schema does not fit. Read the full contract before you send an input not listed. | [optional] |
10
+ | **request** | **Hash&lt;String, Object&gt;** | The request recipe: &#x60;method&#x60;, canonical &#x60;url&#x60;, and, when known, the path, query, header and JSON body bindings of each input. | [optional] |
11
+ | **example** | **Object** | | [optional] |
12
+ | **access** | [**SearchCompactAccess**](SearchCompactAccess.md) | | |
13
+ | **attribution** | [**SearchCompactResultAttribution**](SearchCompactResultAttribution.md) | | [optional] |
14
+ | **output** | **Hash&lt;String, Object&gt;** | Media type, execution mode, a bounded output summary and, for async work, the poll workflow. | [optional] |
15
+ | **docs** | [**SearchHelperDocs**](SearchHelperDocs.md) | | [optional] |
16
+ | **contract_url** | **String** | Content-addressed full Weft contract. GET it with your Weft credential (a buyer account key, an OAuth token with the &#x60;search&#x60; scope, or a claimed &#x60;wbt_*&#x60; bootstrap bearer) before you build a request the summary does not fully describe. A pending bootstrap bearer gets &#x60;401&#x60; until a human approves the account. | |
17
+ | **contract_detail** | **String** | What this summary leaves out of the full contract. | |
18
+ | **completion** | **String** | Completion guidance when the completion rules did not fit inline. | [optional] |
19
+ | **blocked_scopes** | [**Array&lt;SearchCompactResultBlockedScopesInner&gt;**](SearchCompactResultBlockedScopesInner.md) | | [optional] |
20
+ | **contract_gaps** | **Array&lt;String&gt;** | Contract fields that the review did not complete. | [optional] |
21
+ | **readiness** | [**Hash&lt;String, SearchCompactResultBlockedScopesInner&gt;**](SearchCompactResultBlockedScopesInner.md) | Independent readiness claims (&#x60;research&#x60;, &#x60;contract&#x60;, &#x60;runtime&#x60;, &#x60;paid_terminal&#x60;), each with a &#x60;state&#x60; and, when it fits, a &#x60;scope&#x60;. | |
22
+ | **next_call** | [**SearchCompactNextCall**](SearchCompactNextCall.md) | | [optional] |
23
+
24
+ ## Example
25
+
26
+ ```ruby
27
+ require 'weft-sdk'
28
+
29
+ instance = Weft::SearchCompactResult.new(
30
+ provider: null,
31
+ operation: null,
32
+ inputs: null,
33
+ request: null,
34
+ example: null,
35
+ access: null,
36
+ attribution: null,
37
+ output: null,
38
+ docs: null,
39
+ contract_url: null,
40
+ contract_detail: null,
41
+ completion: null,
42
+ blocked_scopes: null,
43
+ contract_gaps: null,
44
+ readiness: null,
45
+ next_call: null
46
+ )
47
+ ```
@@ -0,0 +1,21 @@
1
+ # Weft::SearchCompactResultAttribution
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **search_id** | **String** | | [optional] |
8
+ | **operation_id** | **String** | | [optional] |
9
+ | **access_method_id** | **String** | | [optional] |
10
+
11
+ ## Example
12
+
13
+ ```ruby
14
+ require 'weft-sdk'
15
+
16
+ instance = Weft::SearchCompactResultAttribution.new(
17
+ search_id: null,
18
+ operation_id: null,
19
+ access_method_id: null
20
+ )
21
+ ```
@@ -0,0 +1,19 @@
1
+ # Weft::SearchCompactResultBlockedScopesInner
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **scope** | **String** | | [optional] |
8
+ | **state** | **String** | | [optional] |
9
+
10
+ ## Example
11
+
12
+ ```ruby
13
+ require 'weft-sdk'
14
+
15
+ instance = Weft::SearchCompactResultBlockedScopesInner.new(
16
+ scope: null,
17
+ state: null
18
+ )
19
+ ```
@@ -0,0 +1,21 @@
1
+ # Weft::SearchCompactResultOperation
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **id** | **String** | Catalog operation id. Send it as &#x60;operation_id&#x60; to &#x60;POST /api/v1/fetch&#x60;. | |
8
+ | **name** | **String** | | [optional] |
9
+ | **description** | **String** | | [optional] |
10
+
11
+ ## Example
12
+
13
+ ```ruby
14
+ require 'weft-sdk'
15
+
16
+ instance = Weft::SearchCompactResultOperation.new(
17
+ id: null,
18
+ name: null,
19
+ description: null
20
+ )
21
+ ```
@@ -0,0 +1,19 @@
1
+ # Weft::SearchCompactResultProvider
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **id** | **String** | | [optional] |
8
+ | **name** | **String** | | [optional] |
9
+
10
+ ## Example
11
+
12
+ ```ruby
13
+ require 'weft-sdk'
14
+
15
+ instance = Weft::SearchCompactResultProvider.new(
16
+ id: null,
17
+ name: null
18
+ )
19
+ ```
@@ -5,7 +5,7 @@
5
5
  | Name | Type | Description | Notes |
6
6
  | ---- | ---- | ----------- | ----- |
7
7
  | **method** | **String** | The HTTP verb to send. Empty string when neither the index nor the provider&#39;s own 402 challenge / OpenAPI spec declares one. | [optional] |
8
- | **input_schema** | **Object** | The provider&#39;s OWN structured declaration of the arguments this endpoint takes — the machine-usable form of what &#x60;usage_instructions&#x60; states in prose. Null when the provider declares nothing. | [optional] |
8
+ | **input_schema** | [**SearchEndpointCallInputSchema**](SearchEndpointCallInputSchema.md) | | [optional] |
9
9
  | **example_request** | **Object** | A worked set of arguments grouped by slot (&#x60;query&#x60; / &#x60;body&#x60; / &#x60;path&#x60;). Every value is one the PROVIDER published; never synthesized. | [optional] |
10
10
  | **example_response** | **Object** | | [optional] |
11
11
 
@@ -0,0 +1,14 @@
1
+ # Weft::SearchEndpointCallInputSchema
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+
8
+ ## Example
9
+
10
+ ```ruby
11
+ require 'weft-sdk'
12
+
13
+ instance = Weft::SearchEndpointCallInputSchema.new()
14
+ ```
@@ -14,13 +14,15 @@
14
14
  | **access_methods** | [**Array&lt;SearchAccessMethod&gt;**](SearchAccessMethod.md) | | [optional] |
15
15
  | **service** | [**SearchCuratedService**](SearchCuratedService.md) | | [optional] |
16
16
  | **operation** | [**SearchCuratedOperation**](SearchCuratedOperation.md) | | [optional] |
17
+ | **docs** | [**SearchHelperDocs**](SearchHelperDocs.md) | | [optional] |
18
+ | **contract_url** | **String** | Content-addressed Weft contract for the complete operation, alternatives, evidence, and known gaps. Authenticated GET. | [optional] |
17
19
  | **output_schema** | **Object** | | [optional] |
18
20
  | **output** | **Object** | | [optional] |
19
21
  | **execution** | [**SearchCuratedExecution**](SearchCuratedExecution.md) | | [optional] |
20
22
  | **callability** | [**SearchCuratedCallability**](SearchCuratedCallability.md) | | [optional] |
21
23
  | **compatibility** | **Object** | | [optional] |
22
24
  | **source** | [**SearchCuratedSource**](SearchCuratedSource.md) | | [optional] |
23
- | **operator_type** | **String** | Who you are actually paying. &#x60;first_party&#x60; &#x3D; operated by the provider that makes the capability; &#x60;reseller&#x60; &#x3D; resold, so the price carries someone else&#39;s margin. Null until the platform resolves the operator. | [optional] |
25
+ | **operator_type** | **String** | Who you are actually paying. &#x60;first_party&#x60; &#x3D; operated by the provider that makes the capability; &#x60;reseller&#x60; &#x3D; resold, so the price carries someone else&#39;s margin; &#x60;gateway&#x60; &#x3D; an intermediary routing the provider&#39;s capability. Null until the platform resolves the operator. | [optional] |
24
26
  | **operated_by_id** | **String** | | [optional] |
25
27
  | **settled_via_facilitator_id** | **String** | | [optional] |
26
28
  | **settlements** | **Integer** | Count of payments observed settling against this endpoint by ANYONE (chain-indexed), not just by Weft — the reliability signal a caller can act on. Null when unknown. | [optional] |
@@ -43,6 +45,8 @@ instance = Weft::SearchEndpointHit.new(
43
45
  access_methods: null,
44
46
  service: null,
45
47
  operation: null,
48
+ docs: null,
49
+ contract_url: null,
46
50
  output_schema: null,
47
51
  output: null,
48
52
  execution: null,
@@ -0,0 +1,23 @@
1
+ # Weft::SearchHelperDocs
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **website** | **String** | | [optional] |
8
+ | **homepage** | **String** | | [optional] |
9
+ | **api** | **String** | | [optional] |
10
+ | **llms_txt** | **String** | | [optional] |
11
+
12
+ ## Example
13
+
14
+ ```ruby
15
+ require 'weft-sdk'
16
+
17
+ instance = Weft::SearchHelperDocs.new(
18
+ website: null,
19
+ homepage: null,
20
+ api: null,
21
+ llms_txt: null
22
+ )
23
+ ```
@@ -7,6 +7,7 @@
7
7
  | **query** | **String** | Free-text query. Required and non-empty. | |
8
8
  | **max_results** | **Integer** | Max number of hits to return. Invalid values are rejected, not clamped. | [optional][default to 10] |
9
9
  | **filters** | [**SearchFilterSpec**](SearchFilterSpec.md) | | [optional] |
10
+ | **view** | **String** | Response view. Absent means &#x60;full&#x60;: the complete &#x60;SearchResult&#x60; rows in &#x60;results&#x60;. &#x60;compact&#x60; returns the hosted MCP agent view in &#x60;compact_results&#x60; (see &#x60;SearchCompactResult&#x60;). The compact view applies the same selection as hosted MCP search: it leaves out incomplete PayWithLocus gateway contracts. It does not add filters; send &#x60;weft_fetch_compatible: true&#x60; to get only results that &#x60;POST /api/v1/fetch&#x60; can pay. | [optional] |
10
11
 
11
12
  ## Example
12
13
 
@@ -16,6 +17,7 @@ require 'weft-sdk'
16
17
  instance = Weft::SearchRequest.new(
17
18
  query: send email from an agent,
18
19
  max_results: null,
19
- filters: null
20
+ filters: null,
21
+ view: null
20
22
  )
21
23
  ```