weft-sdk 0.7.0 → 0.9.1

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 (170) hide show
  1. checksums.yaml +4 -4
  2. data/docs/APIKeysApi.md +1 -2
  3. data/docs/AccountApi.md +6 -5
  4. data/docs/AccountDetails.md +2 -1
  5. data/docs/ApiKey.md +0 -1
  6. data/docs/ApiKeyCreated.md +0 -1
  7. data/docs/ApiKeyCreatedResponse.md +0 -1
  8. data/docs/ApiKeyListResponse.md +0 -1
  9. data/docs/AuthApi.md +6 -7
  10. data/docs/AuthResponse.md +0 -1
  11. data/docs/AuthResponseData.md +0 -1
  12. data/docs/BalanceApi.md +1 -2
  13. data/docs/BalanceResponse.md +3 -4
  14. data/docs/ConfirmRequest.md +0 -1
  15. data/docs/CreateApiKeyRequest.md +0 -1
  16. data/docs/DefaultApi.md +0 -1
  17. data/docs/EnrolledResource.md +0 -1
  18. data/docs/Error.md +0 -1
  19. data/docs/ErrorResponse.md +0 -1
  20. data/docs/Fetch403Response.md +0 -1
  21. data/docs/FetchApi.md +10 -7
  22. data/docs/FetchBalanceSnapshot.md +2 -3
  23. data/docs/FetchErrorResponse.md +0 -1
  24. data/docs/FetchRequest.md +0 -1
  25. data/docs/FetchRequestBody.md +0 -1
  26. data/docs/FetchResponse.md +5 -2
  27. data/docs/InsufficientScopeResponse.md +0 -1
  28. data/docs/MeApiKey.md +0 -1
  29. data/docs/MeApiKeyCreator.md +0 -1
  30. data/docs/MeResponse.md +1 -2
  31. data/docs/MeResponseData.md +78 -0
  32. data/docs/Merchant.md +0 -1
  33. data/docs/MessageResponse.md +0 -1
  34. data/docs/MessageResponseData.md +0 -1
  35. data/docs/Pagination.md +0 -1
  36. data/docs/PasswordResetRequest.md +0 -1
  37. data/docs/PasswordUpdateRequest.md +0 -1
  38. data/docs/Payment.md +0 -3
  39. data/docs/PaymentListResponse.md +0 -1
  40. data/docs/PaymentResponse.md +0 -1
  41. data/docs/PaymentsApi.md +0 -1
  42. data/docs/PrincipalWallet.md +19 -0
  43. data/docs/PromoBalance.md +0 -1
  44. data/docs/Purchase.md +43 -0
  45. data/docs/PurchaseArtifact.md +23 -0
  46. data/docs/PurchaseListResponse.md +19 -0
  47. data/docs/PurchaseResponse.md +17 -0
  48. data/docs/PurchasesApi.md +148 -0
  49. data/docs/ResendConfirmationRequest.md +0 -1
  50. data/docs/ResourceEnrollmentRequest.md +0 -1
  51. data/docs/ResourceEnrollmentResponse.md +0 -1
  52. data/docs/ResourceStats.md +0 -1
  53. data/docs/ResourcesApi.md +2 -3
  54. data/docs/SearchApi.md +2 -3
  55. data/docs/SearchCapabilityRef.md +19 -0
  56. data/docs/SearchEndpointCall.md +23 -0
  57. data/docs/SearchEndpointHit.md +41 -0
  58. data/docs/SearchEndpointPrice.md +25 -0
  59. data/docs/SearchErrorResponse.md +0 -1
  60. data/docs/SearchFilterSpec.md +23 -0
  61. data/docs/SearchPaymentOffer.md +31 -0
  62. data/docs/SearchPriceAtomicFilter.md +25 -0
  63. data/docs/SearchPriceUsdFilter.md +25 -0
  64. data/docs/SearchProtocolFilter.md +19 -0
  65. data/docs/SearchProviderRef.md +21 -0
  66. data/docs/SearchRequest.md +3 -4
  67. data/docs/SearchResourceTypeFilter.md +19 -0
  68. data/docs/SearchResponse.md +35 -8
  69. data/docs/SearchResponseWarningsInner.md +23 -0
  70. data/docs/SearchResult.md +8 -21
  71. data/docs/SignInRequest.md +0 -1
  72. data/docs/SignUpRequest.md +0 -1
  73. data/docs/SpendingPolicy.md +0 -1
  74. data/docs/User.md +0 -1
  75. data/docs/UserPrincipal.md +33 -0
  76. data/docs/Wallet.md +3 -4
  77. data/lib/weft/generated/api/account_api.rb +6 -4
  78. data/lib/weft/generated/api/api_keys_api.rb +4 -4
  79. data/lib/weft/generated/api/auth_api.rb +14 -14
  80. data/lib/weft/generated/api/balance_api.rb +4 -4
  81. data/lib/weft/generated/api/default_api.rb +2 -2
  82. data/lib/weft/generated/api/fetch_api.rb +22 -6
  83. data/lib/weft/generated/api/payments_api.rb +2 -2
  84. data/lib/weft/generated/api/purchases_api.rb +150 -0
  85. data/lib/weft/generated/api/resources_api.rb +6 -6
  86. data/lib/weft/generated/api/search_api.rb +6 -6
  87. data/lib/weft/generated/api_client.rb +2 -2
  88. data/lib/weft/generated/api_error.rb +2 -2
  89. data/lib/weft/generated/api_model_base.rb +2 -2
  90. data/lib/weft/generated/configuration.rb +2 -2
  91. data/lib/weft/generated/models/account_details.rb +54 -4
  92. data/lib/weft/generated/models/api_key.rb +2 -2
  93. data/lib/weft/generated/models/api_key_created.rb +2 -2
  94. data/lib/weft/generated/models/api_key_created_response.rb +2 -2
  95. data/lib/weft/generated/models/api_key_list_response.rb +2 -2
  96. data/lib/weft/generated/models/auth_response.rb +2 -2
  97. data/lib/weft/generated/models/auth_response_data.rb +2 -2
  98. data/lib/weft/generated/models/balance_response.rb +5 -5
  99. data/lib/weft/generated/models/confirm_request.rb +2 -2
  100. data/lib/weft/generated/models/create_api_key_request.rb +2 -2
  101. data/lib/weft/generated/models/enrolled_resource.rb +4 -4
  102. data/lib/weft/generated/models/error.rb +3 -3
  103. data/lib/weft/generated/models/error_response.rb +3 -3
  104. data/lib/weft/generated/models/fetch403_response.rb +2 -2
  105. data/lib/weft/generated/models/fetch_balance_snapshot.rb +5 -5
  106. data/lib/weft/generated/models/fetch_error_response.rb +5 -5
  107. data/lib/weft/generated/models/fetch_request.rb +5 -5
  108. data/lib/weft/generated/models/fetch_request_body.rb +2 -2
  109. data/lib/weft/generated/models/fetch_response.rb +83 -5
  110. data/lib/weft/generated/models/insufficient_scope_response.rb +3 -3
  111. data/lib/weft/generated/models/me_api_key.rb +2 -2
  112. data/lib/weft/generated/models/me_api_key_creator.rb +3 -3
  113. data/lib/weft/generated/models/me_response.rb +3 -3
  114. data/lib/weft/generated/models/me_response_data.rb +55 -0
  115. data/lib/weft/generated/models/merchant.rb +2 -2
  116. data/lib/weft/generated/models/message_response.rb +2 -2
  117. data/lib/weft/generated/models/message_response_data.rb +2 -2
  118. data/lib/weft/generated/models/pagination.rb +2 -2
  119. data/lib/weft/generated/models/password_reset_request.rb +2 -2
  120. data/lib/weft/generated/models/password_update_request.rb +2 -2
  121. data/lib/weft/generated/models/payment.rb +3 -12
  122. data/lib/weft/generated/models/payment_list_response.rb +2 -2
  123. data/lib/weft/generated/models/payment_response.rb +2 -2
  124. data/lib/weft/generated/models/principal_wallet.rb +190 -0
  125. data/lib/weft/generated/models/promo_balance.rb +3 -3
  126. data/lib/weft/generated/models/purchase.rb +427 -0
  127. data/lib/weft/generated/models/{search_agent_card.rb → purchase_artifact.rb} +91 -82
  128. data/lib/weft/generated/models/purchase_list_response.rb +192 -0
  129. data/lib/weft/generated/models/purchase_response.rb +164 -0
  130. data/lib/weft/generated/models/resend_confirmation_request.rb +2 -2
  131. data/lib/weft/generated/models/resource_enrollment_request.rb +5 -5
  132. data/lib/weft/generated/models/resource_enrollment_response.rb +2 -2
  133. data/lib/weft/generated/models/resource_stats.rb +2 -2
  134. data/lib/weft/generated/models/{search_skill_endpoint.rb → search_capability_ref.rb} +18 -19
  135. data/lib/weft/generated/models/search_endpoint_call.rb +179 -0
  136. data/lib/weft/generated/models/search_endpoint_hit.rb +296 -0
  137. data/lib/weft/generated/models/{search_skill.rb → search_endpoint_price.rb} +76 -112
  138. data/lib/weft/generated/models/search_error_response.rb +5 -5
  139. data/lib/weft/generated/models/search_filter_spec.rb +175 -0
  140. data/lib/weft/generated/models/{search_pricing.rb → search_payment_offer.rb} +64 -67
  141. data/lib/weft/generated/models/search_price_atomic_filter.rb +284 -0
  142. data/lib/weft/generated/models/search_price_usd_filter.rb +294 -0
  143. data/lib/weft/generated/models/search_protocol_filter.rb +200 -0
  144. data/lib/weft/generated/models/{search_endpoints.rb → search_provider_ref.rb} +26 -36
  145. data/lib/weft/generated/models/search_request.rb +36 -27
  146. data/lib/weft/generated/models/search_resource_type_filter.rb +200 -0
  147. data/lib/weft/generated/models/search_response.rb +367 -31
  148. data/lib/weft/generated/models/search_response_warnings_inner.rb +210 -0
  149. data/lib/weft/generated/models/search_result.rb +68 -220
  150. data/lib/weft/generated/models/sign_in_request.rb +2 -2
  151. data/lib/weft/generated/models/sign_up_request.rb +2 -2
  152. data/lib/weft/generated/models/spending_policy.rb +2 -2
  153. data/lib/weft/generated/models/user.rb +2 -2
  154. data/lib/weft/generated/models/user_principal.rb +370 -0
  155. data/lib/weft/generated/models/wallet.rb +5 -5
  156. data/lib/weft/generated/version.rb +3 -3
  157. data/lib/weft/generated.rb +10 -4
  158. data/lib/weft/sdk.rb +1 -1
  159. metadata +57 -19
  160. data/docs/SearchAgentCard.md +0 -34
  161. data/docs/SearchEndpoints.md +0 -24
  162. data/docs/SearchFilters.md +0 -26
  163. data/docs/SearchPricing.md +0 -24
  164. data/docs/SearchRanking.md +0 -26
  165. data/docs/SearchResponseResultsInner.md +0 -36
  166. data/docs/SearchSkill.md +0 -36
  167. data/docs/SearchSkillEndpoint.md +0 -20
  168. data/lib/weft/generated/models/search_filters.rb +0 -277
  169. data/lib/weft/generated/models/search_ranking.rb +0 -277
  170. data/lib/weft/generated/models/search_response_results_inner.rb +0 -103
@@ -0,0 +1,23 @@
1
+ # Weft::PurchaseArtifact
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **id** | **Integer** | | |
8
+ | **merchant_url** | **String** | | |
9
+ | **bytes** | **Integer** | | |
10
+ | **mime** | **String** | | |
11
+
12
+ ## Example
13
+
14
+ ```ruby
15
+ require 'weft-sdk'
16
+
17
+ instance = Weft::PurchaseArtifact.new(
18
+ id: null,
19
+ merchant_url: null,
20
+ bytes: null,
21
+ mime: null
22
+ )
23
+ ```
@@ -0,0 +1,19 @@
1
+ # Weft::PurchaseListResponse
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **data** | [**Array<Purchase>**](Purchase.md) | | |
8
+ | **pagination** | [**Pagination**](Pagination.md) | | |
9
+
10
+ ## Example
11
+
12
+ ```ruby
13
+ require 'weft-sdk'
14
+
15
+ instance = Weft::PurchaseListResponse.new(
16
+ data: null,
17
+ pagination: null
18
+ )
19
+ ```
@@ -0,0 +1,17 @@
1
+ # Weft::PurchaseResponse
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **data** | [**Purchase**](Purchase.md) | | |
8
+
9
+ ## Example
10
+
11
+ ```ruby
12
+ require 'weft-sdk'
13
+
14
+ instance = Weft::PurchaseResponse.new(
15
+ data: null
16
+ )
17
+ ```
@@ -0,0 +1,148 @@
1
+ # Weft::PurchasesApi
2
+
3
+ All URIs are relative to *https://weft.network*
4
+
5
+ | Method | HTTP request | Description |
6
+ | ------ | ------------ | ----------- |
7
+ | [**get_purchase**](PurchasesApi.md#get_purchase) | **GET** /api/v1/purchases/{id} | Get a buyer purchase |
8
+ | [**list_purchases**](PurchasesApi.md#list_purchases) | **GET** /api/v1/purchases | List buyer purchases |
9
+
10
+
11
+ ## get_purchase
12
+
13
+ > <PurchaseResponse> get_purchase(id)
14
+
15
+ Get a buyer purchase
16
+
17
+ ### Examples
18
+
19
+ ```ruby
20
+ require 'time'
21
+ require 'weft-sdk'
22
+ # setup authorization
23
+ Weft.configure do |config|
24
+ # Configure Bearer authorization (APIKey): bearerAuth
25
+ config.access_token = 'YOUR_BEARER_TOKEN'
26
+ end
27
+
28
+ api_instance = Weft::PurchasesApi.new
29
+ id = 56 # Integer | Purchase ID
30
+
31
+ begin
32
+ # Get a buyer purchase
33
+ result = api_instance.get_purchase(id)
34
+ p result
35
+ rescue Weft::ApiError => e
36
+ puts "Error when calling PurchasesApi->get_purchase: #{e}"
37
+ end
38
+ ```
39
+
40
+ #### Using the get_purchase_with_http_info variant
41
+
42
+ This returns an Array which contains the response data, status code and headers.
43
+
44
+ > <Array(<PurchaseResponse>, Integer, Hash)> get_purchase_with_http_info(id)
45
+
46
+ ```ruby
47
+ begin
48
+ # Get a buyer purchase
49
+ data, status_code, headers = api_instance.get_purchase_with_http_info(id)
50
+ p status_code # => 2xx
51
+ p headers # => { ... }
52
+ p data # => <PurchaseResponse>
53
+ rescue Weft::ApiError => e
54
+ puts "Error when calling PurchasesApi->get_purchase_with_http_info: #{e}"
55
+ end
56
+ ```
57
+
58
+ ### Parameters
59
+
60
+ | Name | Type | Description | Notes |
61
+ | ---- | ---- | ----------- | ----- |
62
+ | **id** | **Integer** | Purchase ID | |
63
+
64
+ ### Return type
65
+
66
+ [**PurchaseResponse**](PurchaseResponse.md)
67
+
68
+ ### Authorization
69
+
70
+ [bearerAuth](../README.md#bearerAuth)
71
+
72
+ ### HTTP request headers
73
+
74
+ - **Content-Type**: Not defined
75
+ - **Accept**: application/json
76
+
77
+
78
+ ## list_purchases
79
+
80
+ > <PurchaseListResponse> list_purchases(opts)
81
+
82
+ List buyer purchases
83
+
84
+ Returns the authenticated buyer's signing and settlement ledger. Unlike `/api/v1/payments`, this endpoint is User-scoped and backed by `signed_events`, so rejected and pending attempts are included. Scoped to the buyer's own merchant spend, matching the dashboard's Purchases page. Internal signings are excluded: the Tempo refill self-transfer (`rebalance`) and operator signings (`manual`) are not payments the buyer made and never appear here.
85
+
86
+ ### Examples
87
+
88
+ ```ruby
89
+ require 'time'
90
+ require 'weft-sdk'
91
+ # setup authorization
92
+ Weft.configure do |config|
93
+ # Configure Bearer authorization (APIKey): bearerAuth
94
+ config.access_token = 'YOUR_BEARER_TOKEN'
95
+ end
96
+
97
+ api_instance = Weft::PurchasesApi.new
98
+ opts = {
99
+ page: 56, # Integer | Page number
100
+ per_page: 56 # Integer | Items per page
101
+ }
102
+
103
+ begin
104
+ # List buyer purchases
105
+ result = api_instance.list_purchases(opts)
106
+ p result
107
+ rescue Weft::ApiError => e
108
+ puts "Error when calling PurchasesApi->list_purchases: #{e}"
109
+ end
110
+ ```
111
+
112
+ #### Using the list_purchases_with_http_info variant
113
+
114
+ This returns an Array which contains the response data, status code and headers.
115
+
116
+ > <Array(<PurchaseListResponse>, Integer, Hash)> list_purchases_with_http_info(opts)
117
+
118
+ ```ruby
119
+ begin
120
+ # List buyer purchases
121
+ data, status_code, headers = api_instance.list_purchases_with_http_info(opts)
122
+ p status_code # => 2xx
123
+ p headers # => { ... }
124
+ p data # => <PurchaseListResponse>
125
+ rescue Weft::ApiError => e
126
+ puts "Error when calling PurchasesApi->list_purchases_with_http_info: #{e}"
127
+ end
128
+ ```
129
+
130
+ ### Parameters
131
+
132
+ | Name | Type | Description | Notes |
133
+ | ---- | ---- | ----------- | ----- |
134
+ | **page** | **Integer** | Page number | [optional][default to 1] |
135
+ | **per_page** | **Integer** | Items per page | [optional][default to 25] |
136
+
137
+ ### Return type
138
+
139
+ [**PurchaseListResponse**](PurchaseListResponse.md)
140
+
141
+ ### Authorization
142
+
143
+ [bearerAuth](../README.md#bearerAuth)
144
+
145
+ ### HTTP request headers
146
+
147
+ - **Content-Type**: Not defined
148
+ - **Accept**: application/json
@@ -15,4 +15,3 @@ instance = Weft::ResendConfirmationRequest.new(
15
15
  email: null
16
16
  )
17
17
  ```
18
-
@@ -21,4 +21,3 @@ instance = Weft::ResourceEnrollmentRequest.new(
21
21
  wallet_address: null
22
22
  )
23
23
  ```
24
-
@@ -15,4 +15,3 @@ instance = Weft::ResourceEnrollmentResponse.new(
15
15
  data: null
16
16
  )
17
17
  ```
18
-
@@ -27,4 +27,3 @@ instance = Weft::ResourceStats.new(
27
27
  last_active: null
28
28
  )
29
29
  ```
30
-
data/docs/ResourcesApi.md CHANGED
@@ -13,7 +13,7 @@ All URIs are relative to *https://weft.network*
13
13
 
14
14
  Self-enroll a ghost resource (public, no auth)
15
15
 
16
- Lets an unauthenticated agent (or its operator) self-enroll a Resource as a \"ghost\" (no owning provider). The server generates the `slug` and a single-use `claim_token`; the response also carries a `claim_url` the agent hands to its human controller to claim the resource from the dashboard. Client-supplied `slug` and `category` are silently ignored: slugs are server-generated from `name` (so callers cannot squat on reserved names), and `category` is a post-claim concern set by a real human. Rate-limited to 10 enrollments/hour/IP.
16
+ Lets an unauthenticated agent (or its operator) self-enroll a Resource as a \"ghost\" (no owning provider). The server generates the `slug` and a single-use `claim_token`; the response also carries a `claim_url` the agent hands to its human controller to claim the resource from the dashboard. Client-supplied `slug` and `category` are silently ignored: slugs are server-generated from `name` (so callers cannot squat on reserved names), and `category` is a post-claim concern set by a real human. Rate-limited to 10 enrollments/hour/IP.
17
17
 
18
18
  ### Examples
19
19
 
@@ -22,7 +22,7 @@ require 'time'
22
22
  require 'weft-sdk'
23
23
 
24
24
  api_instance = Weft::ResourcesApi.new
25
- resource_enrollment_request = Weft::ResourceEnrollmentRequest.new({kind: 'agent', name: 'Self-Enrolled Bot'}) # ResourceEnrollmentRequest |
25
+ resource_enrollment_request = Weft::ResourceEnrollmentRequest.new({kind: 'agent', name: 'Self-Enrolled Bot'}) # ResourceEnrollmentRequest |
26
26
 
27
27
  begin
28
28
  # Self-enroll a ghost resource (public, no auth)
@@ -69,4 +69,3 @@ No authorization required
69
69
 
70
70
  - **Content-Type**: application/json
71
71
  - **Accept**: application/json
72
-
data/docs/SearchApi.md CHANGED
@@ -13,7 +13,7 @@ All URIs are relative to *https://weft.network*
13
13
 
14
14
  Search the Weft index
15
15
 
16
- Semantic search over the Weft index of paid agent resources. The request body carries a free-text `query`, an optional `limit`, and an optional `filters` object that narrows by price band, payment protocol, agent protocol, or domain tag. Filters are applied as a post-filter after the embedding score is computed. Backend selection is server-side via the `SEARCH_BACKEND` env var: `mock` (default, reads YAML fixtures and sets `_mock: true` in the response) or `platform` (proxies to the upstream search service). Both backends return the same envelope. Account-scoped: the bearer token must be a buyer-scoped API key. Free for authenticated buyers in v1; billing is planned for a later release. 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. Backend selection is server-side via the `SEARCH_BACKEND` env var: `mock` (default, reads YAML fixtures and sets `_mock: true` in the response) or `platform` (proxies to the upstream search service). Both backends return the platform `SearchResponse` envelope. Account-scoped: the bearer token must be a buyer-scoped API key. Free for authenticated buyers in v1; billing is planned for a later release. 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.
17
17
 
18
18
  ### Examples
19
19
 
@@ -27,7 +27,7 @@ Weft.configure do |config|
27
27
  end
28
28
 
29
29
  api_instance = Weft::SearchApi.new
30
- search_request = Weft::SearchRequest.new({query: 'send email from an agent'}) # SearchRequest |
30
+ search_request = Weft::SearchRequest.new({query: 'send email from an agent'}) # SearchRequest |
31
31
 
32
32
  begin
33
33
  # Search the Weft index
@@ -74,4 +74,3 @@ end
74
74
 
75
75
  - **Content-Type**: application/json
76
76
  - **Accept**: application/json, text/markdown
77
-
@@ -0,0 +1,19 @@
1
+ # Weft::SearchCapabilityRef
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **capability_id** | **String** | | [optional] |
8
+ | **capability_type** | **String** | | [optional] |
9
+
10
+ ## Example
11
+
12
+ ```ruby
13
+ require 'weft-sdk'
14
+
15
+ instance = Weft::SearchCapabilityRef.new(
16
+ capability_id: null,
17
+ capability_type: null
18
+ )
19
+ ```
@@ -0,0 +1,23 @@
1
+ # Weft::SearchEndpointCall
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
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] |
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
+ | **example_response** | **Object** | | [optional] |
11
+
12
+ ## Example
13
+
14
+ ```ruby
15
+ require 'weft-sdk'
16
+
17
+ instance = Weft::SearchEndpointCall.new(
18
+ method: null,
19
+ input_schema: null,
20
+ example_request: null,
21
+ example_response: null
22
+ )
23
+ ```
@@ -0,0 +1,41 @@
1
+ # Weft::SearchEndpointHit
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **endpoint_id** | **String** | | [optional] |
8
+ | **url** | **String** | | [optional] |
9
+ | **resource_type** | **String** | | [optional] |
10
+ | **primary_protocol** | **String** | | [optional] |
11
+ | **call** | [**SearchEndpointCall**](SearchEndpointCall.md) | | [optional] |
12
+ | **price** | [**SearchEndpointPrice**](SearchEndpointPrice.md) | | [optional] |
13
+ | **payment** | [**Array&lt;SearchPaymentOffer&gt;**](SearchPaymentOffer.md) | The settlement routes this endpoint&#39;s own 402 challenge published — one entry per rail × network × asset × payee it accepts. Sibling of &#x60;call&#x60;: that block says how to shape the request, this says how to pay for it, so a caller can settle with its OWN x402/mpp SDK instead of guessing. A list because rails are irreducibly plural. Order is the provider&#39;s own preference order. Honest-empty when the pipeline observed no challenge. | [optional] |
14
+ | **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] |
15
+ | **operated_by_id** | **String** | | [optional] |
16
+ | **settled_via_facilitator_id** | **String** | | [optional] |
17
+ | **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] |
18
+ | **last_verified_at** | **Time** | When Weft last CONFIRMED this endpoint answers — the most recent conclusive probe. Null when never probed, or when the latest probe errored: an endpoint we last failed to reach has no current verification. | [optional] |
19
+ | **latency_p50_ms** | **Integer** | Median time-to-first-byte in ms across the endpoint&#39;s probe call set. First-byte latency, not full-response time. Null when unmeasured (never 0). | [optional] |
20
+
21
+ ## Example
22
+
23
+ ```ruby
24
+ require 'weft-sdk'
25
+
26
+ instance = Weft::SearchEndpointHit.new(
27
+ endpoint_id: null,
28
+ url: null,
29
+ resource_type: null,
30
+ primary_protocol: null,
31
+ call: null,
32
+ price: null,
33
+ payment: null,
34
+ operator_type: null,
35
+ operated_by_id: null,
36
+ settled_via_facilitator_id: null,
37
+ settlements: null,
38
+ last_verified_at: null,
39
+ latency_p50_ms: null
40
+ )
41
+ ```
@@ -0,0 +1,25 @@
1
+ # Weft::SearchEndpointPrice
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **indexed_usd** | **String** | The indexed price in USD as a decimal string (e.g. \&quot;0.008\&quot;) — the dollar value people and agents reason in. A decimal string, never a float; trailing zeros trimmed. Null when unpriced. | [optional] |
8
+ | **atomic** | **Integer** | The same price in integer micro-USD — the settlement grain, exact. Null exactly when &#x60;indexed_usd&#x60; is. Use this for settlement. | [optional] |
9
+ | **source** | **String** | Where the amount came from. &#x60;probe&#x60; &#x3D; observed live in the endpoint&#39;s own 402 payment-required challenge — an observation, the strongest evidence we hold. &#x60;inferred&#x60; &#x3D; derived from a spec (OpenAPI) or a resale edge by the extraction pipeline, so it can lag a provider&#39;s re-pricing. Null when the endpoint carries no price. | [optional] |
10
+ | **last_observed_at** | **Time** | When the amount was observed. Null when unrecorded. | [optional] |
11
+ | **live_verified** | **Boolean** | Whether this amount was confirmed against a live 402 challenge for THIS response. Search does not issue a payment-required probe at query time, so this is &#x60;false&#x60; today — treat an unflagged price as indexed, not verified. | [optional] |
12
+
13
+ ## Example
14
+
15
+ ```ruby
16
+ require 'weft-sdk'
17
+
18
+ instance = Weft::SearchEndpointPrice.new(
19
+ indexed_usd: null,
20
+ atomic: null,
21
+ source: null,
22
+ last_observed_at: null,
23
+ live_verified: null
24
+ )
25
+ ```
@@ -17,4 +17,3 @@ instance = Weft::SearchErrorResponse.new(
17
17
  details: null
18
18
  )
19
19
  ```
20
-
@@ -0,0 +1,23 @@
1
+ # Weft::SearchFilterSpec
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **price** | [**SearchPriceUsdFilter**](SearchPriceUsdFilter.md) | | [optional] |
8
+ | **price_atomic** | [**SearchPriceAtomicFilter**](SearchPriceAtomicFilter.md) | | [optional] |
9
+ | **type** | [**SearchResourceTypeFilter**](SearchResourceTypeFilter.md) | | [optional] |
10
+ | **protocol** | [**SearchProtocolFilter**](SearchProtocolFilter.md) | | [optional] |
11
+
12
+ ## Example
13
+
14
+ ```ruby
15
+ require 'weft-sdk'
16
+
17
+ instance = Weft::SearchFilterSpec.new(
18
+ price: null,
19
+ price_atomic: null,
20
+ type: null,
21
+ protocol: null
22
+ )
23
+ ```
@@ -0,0 +1,31 @@
1
+ # Weft::SearchPaymentOffer
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **protocol** | **String** | The payment rail (e.g. &#x60;x402&#x60;, &#x60;mpp&#x60;). | |
8
+ | **scheme** | **String** | | [optional] |
9
+ | **network** | **String** | | [optional] |
10
+ | **asset** | **String** | | [optional] |
11
+ | **amount** | **String** | | [optional] |
12
+ | **pay_to** | **String** | | [optional] |
13
+ | **max_timeout_seconds** | **Integer** | | [optional] |
14
+ | **facilitator** | **String** | | [optional] |
15
+
16
+ ## Example
17
+
18
+ ```ruby
19
+ require 'weft-sdk'
20
+
21
+ instance = Weft::SearchPaymentOffer.new(
22
+ protocol: null,
23
+ scheme: null,
24
+ network: null,
25
+ asset: null,
26
+ amount: null,
27
+ pay_to: null,
28
+ max_timeout_seconds: null,
29
+ facilitator: null
30
+ )
31
+ ```
@@ -0,0 +1,25 @@
1
+ # Weft::SearchPriceAtomicFilter
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **lte** | **Integer** | Price ≤ this many micro-USD (inclusive ceiling). | [optional] |
8
+ | **gte** | **Integer** | Price ≥ this many micro-USD (inclusive floor). | [optional] |
9
+ | **eq** | **Integer** | Price exactly this many micro-USD. | [optional] |
10
+ | **range_gte** | **Integer** | Range lower bound (inclusive), micro-USD. Set with range_lte. | [optional] |
11
+ | **range_lte** | **Integer** | Range upper bound (inclusive), micro-USD. Set with range_gte. | [optional] |
12
+
13
+ ## Example
14
+
15
+ ```ruby
16
+ require 'weft-sdk'
17
+
18
+ instance = Weft::SearchPriceAtomicFilter.new(
19
+ lte: null,
20
+ gte: null,
21
+ eq: null,
22
+ range_gte: null,
23
+ range_lte: null
24
+ )
25
+ ```
@@ -0,0 +1,25 @@
1
+ # Weft::SearchPriceUsdFilter
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **lte** | **String** | Price ≤ this many USD (inclusive ceiling), e.g. \&quot;0.009\&quot;. | [optional] |
8
+ | **gte** | **String** | Price ≥ this many USD (inclusive floor), e.g. \&quot;0.001\&quot;. | [optional] |
9
+ | **eq** | **String** | Price exactly this many USD, e.g. \&quot;1.5\&quot;. | [optional] |
10
+ | **range_gte** | **String** | Range lower bound (inclusive), USD. Set with range_lte. | [optional] |
11
+ | **range_lte** | **String** | Range upper bound (inclusive), USD. Set with range_gte. | [optional] |
12
+
13
+ ## Example
14
+
15
+ ```ruby
16
+ require 'weft-sdk'
17
+
18
+ instance = Weft::SearchPriceUsdFilter.new(
19
+ lte: null,
20
+ gte: null,
21
+ eq: null,
22
+ range_gte: null,
23
+ range_lte: null
24
+ )
25
+ ```
@@ -0,0 +1,19 @@
1
+ # Weft::SearchProtocolFilter
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **eq** | **String** | Primary protocol is exactly this value. | [optional] |
8
+ | **_in** | **Array&lt;String&gt;** | Primary protocol is one of these values. | [optional] |
9
+
10
+ ## Example
11
+
12
+ ```ruby
13
+ require 'weft-sdk'
14
+
15
+ instance = Weft::SearchProtocolFilter.new(
16
+ eq: null,
17
+ _in: null
18
+ )
19
+ ```
@@ -0,0 +1,21 @@
1
+ # Weft::SearchProviderRef
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **provider_id** | **String** | | [optional] |
8
+ | **display_name** | **String** | | [optional] |
9
+ | **origin_domains** | **Array&lt;String&gt;** | | [optional] |
10
+
11
+ ## Example
12
+
13
+ ```ruby
14
+ require 'weft-sdk'
15
+
16
+ instance = Weft::SearchProviderRef.new(
17
+ provider_id: null,
18
+ display_name: null,
19
+ origin_domains: null
20
+ )
21
+ ```
@@ -5,8 +5,8 @@
5
5
  | Name | Type | Description | Notes |
6
6
  | ---- | ---- | ----------- | ----- |
7
7
  | **query** | **String** | Free-text query. Required and non-empty. | |
8
- | **limit** | **Integer** | Max number of hits to return. Clamped to [1, 50]. | [optional][default to 10] |
9
- | **filters** | [**SearchFilters**](SearchFilters.md) | | [optional] |
8
+ | **max_results** | **Integer** | Max number of hits to return. Invalid values are rejected, not clamped. | [optional][default to 10] |
9
+ | **filters** | [**SearchFilterSpec**](SearchFilterSpec.md) | | [optional] |
10
10
 
11
11
  ## Example
12
12
 
@@ -15,8 +15,7 @@ require 'weft-sdk'
15
15
 
16
16
  instance = Weft::SearchRequest.new(
17
17
  query: send email from an agent,
18
- limit: null,
18
+ max_results: null,
19
19
  filters: null
20
20
  )
21
21
  ```
22
-
@@ -0,0 +1,19 @@
1
+ # Weft::SearchResourceTypeFilter
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **eq** | **String** | Resource type is exactly this value. | [optional] |
8
+ | **_in** | **Array&lt;String&gt;** | Resource type is one of these values. | [optional] |
9
+
10
+ ## Example
11
+
12
+ ```ruby
13
+ require 'weft-sdk'
14
+
15
+ instance = Weft::SearchResourceTypeFilter.new(
16
+ eq: null,
17
+ _in: null
18
+ )
19
+ ```
@@ -4,10 +4,24 @@
4
4
 
5
5
  | Name | Type | Description | Notes |
6
6
  | ---- | ---- | ----------- | ----- |
7
- | **results** | [**Array&lt;SearchResponseResultsInner&gt;**](SearchResponseResultsInner.md) | | |
8
- | **paid_usd** | **String** | Always &#x60;null&#x60; in v1. | [optional] |
9
- | **tx_hash** | **String** | Always &#x60;null&#x60; in v1. | [optional] |
10
- | **artifact_id** | **String** | Always &#x60;null&#x60; in v1. | [optional] |
7
+ | **query_trace_id** | **String** | Opaque trace id for the served query, matching the platform &#x60;query_trace_id&#x60; — and the &#x60;search_id&#x60; that re-reads it. Deliberately the same id rather than a second handle: one serve, one name. | |
8
+ | **query** | **String** | | |
9
+ | **format** | **String** | Which view this response carries, echoing the requested format. &#x60;json&#x60; populates &#x60;results&#x60; and leaves &#x60;markdown&#x60; null; &#x60;markdown&#x60; populates &#x60;markdown&#x60; and leaves &#x60;results&#x60; empty. Exactly one is populated per response, never both — returning both eagerly would double the payload. | [optional] |
10
+ | **markdown** | **String** | The flat comparison table, when &#x60;format&#x60; is &#x60;markdown&#x60;; null otherwise. Rendered deterministically from the same stored result the &#x60;json&#x60; view returns, so the two views of one search can never disagree. | [optional] |
11
+ | **result_count** | **Integer** | How many &#x60;(Provider + Capability)&#x60; results the search produced. Read THIS, not &#x60;results.length&#x60;, for the count: on a &#x60;markdown&#x60; response &#x60;results&#x60; is empty by design, so &#x60;result_count &gt; 0&#x60; with an empty &#x60;results&#x60; is a rendered table while &#x60;result_count &#x3D;&#x3D; 0&#x60; is a genuine zero-result. | [optional] |
12
+ | **served_from** | **String** | &#x60;live&#x60; for a fresh serve; &#x60;snapshot&#x60; for an immutable replay of a completed search. A re-read is a snapshot and says so — read it with &#x60;as_of&#x60; and &#x60;stale&#x60;. | [optional] |
13
+ | **as_of** | **Time** | When the results were produced. Now on a &#x60;live&#x60; serve; on a &#x60;snapshot&#x60; the ORIGINAL serve time, because a replay returns exactly what was paid for, not current truth. | [optional] |
14
+ | **stale** | **Boolean** | Whether the active search index has changed since these results were produced. &#x60;true&#x60; does not mean the results are wrong — it means they are a snapshot of an index that has since moved. Always &#x60;false&#x60; on a &#x60;live&#x60; serve. | [optional] |
15
+ | **payment_note** | **String** | How payment works across the catalog, stated once for the whole response rather than repeated in every endpoint&#39;s usage instructions. | [optional] |
16
+ | **applied_filters** | [**SearchFilterSpec**](SearchFilterSpec.md) | The &#x60;FilterSpec&#x60; actually applied to recall, echoed back so the caller sees exactly what constrained the results. In the current contract this is the caller&#39;s &#x60;filters&#x60; verbatim (empty object when none were sent). | [optional] |
17
+ | **decomposition_source** | **String** | Origin of &#x60;applied_filters&#x60;; always &#x60;CALLER&#x60;. | [optional] |
18
+ | **embedder_model** | **String** | | |
19
+ | **candidates_considered** | **Integer** | | |
20
+ | **warnings** | [**Array&lt;SearchResponseWarningsInner&gt;**](SearchResponseWarningsInner.md) | | |
21
+ | **match_quality** | **String** | Calibrated confidence in this result set — read this instead of thresholding a raw similarity score. &#x60;strong&#x60;: the top match is confidently on-intent, proceed. &#x60;weak&#x60;: above the relevance floor but inside the band where plausible-but-wrong matches live, verify the result before paying. &#x60;none&#x60;: nothing cleared the floor — &#x60;results&#x60; is empty and &#x60;reason&#x60; / &#x60;suggestion&#x60; say why. Results below the floor are never returned as near-misses. | [optional][default to &#39;none&#39;] |
22
+ | **reason** | **String** | Machine-readable cause of an empty result set, non-null exactly when &#x60;match_quality&#x60; is &#x60;none&#x60;. &#x60;below_relevance_floor&#x60;: candidates ranked but the best scored under the floor. &#x60;filter_collapsed_pool&#x60;: a caller filter cut the pool before ranking and nothing relevant survived — relax the filter. &#x60;no_catalog_coverage&#x60;: recall returned no candidates at all on an unfiltered query. &#x60;unsupported_filter_value&#x60;: a CATEGORICAL filter value (&#x60;type&#x60; / &#x60;protocol&#x60;) matches zero stored values, so it could never have matched — categorical only, since a continuous bound like &#x60;price&#x60; that matches nothing is reported as &#x60;filter_collapsed_pool&#x60; instead (the bound needs raising, the dimension is not unsupported). &#x60;index_unavailable&#x60;: no active index — an operational fault, paired with the &#x60;EMPTY_INDEX&#x60; warning. | [optional] |
23
+ | **suggestion** | **String** | Human/agent-readable explanation of &#x60;reason&#x60;, carrying the concrete numbers behind it (pool sizes, the best discarded score against the floor, the values actually stored for a filter). Non-null exactly when &#x60;reason&#x60; is. | [optional] |
24
+ | **results** | [**Array&lt;SearchResult&gt;**](SearchResult.md) | Ranked &#x60;(Provider + Capability)&#x60; results; empty when the index is empty or nothing cleared the relevance floor. Results BELOW the floor are never returned — an empty list plus a &#x60;reason&#x60; is the honest answer, not a list of near-misses in the same shape as a genuine match. | |
11
25
  | **_mock** | **Boolean** | Present and &#x60;true&#x60; only when served by the mock backend. | [optional] |
12
26
 
13
27
  ## Example
@@ -16,11 +30,24 @@
16
30
  require 'weft-sdk'
17
31
 
18
32
  instance = Weft::SearchResponse.new(
33
+ query_trace_id: null,
34
+ query: null,
35
+ format: null,
36
+ markdown: null,
37
+ result_count: null,
38
+ served_from: null,
39
+ as_of: null,
40
+ stale: null,
41
+ payment_note: null,
42
+ applied_filters: null,
43
+ decomposition_source: null,
44
+ embedder_model: null,
45
+ candidates_considered: null,
46
+ warnings: null,
47
+ match_quality: null,
48
+ reason: null,
49
+ suggestion: null,
19
50
  results: null,
20
- paid_usd: null,
21
- tx_hash: null,
22
- artifact_id: null,
23
51
  _mock: null
24
52
  )
25
53
  ```
26
-