weft-sdk 0.9.1 → 0.14.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 (134) hide show
  1. checksums.yaml +4 -4
  2. data/docs/APIKeysApi.md +4 -0
  3. data/docs/AccountApi.md +1 -1
  4. data/docs/AccountBootstrapApproval.md +21 -0
  5. data/docs/AccountBootstrapCreated.md +29 -0
  6. data/docs/AccountBootstrapCreatedApproval.md +23 -0
  7. data/docs/AccountBootstrapCreatedResponse.md +17 -0
  8. data/docs/AccountBootstrapRequest.md +27 -0
  9. data/docs/AccountBootstrapStatus.md +25 -0
  10. data/docs/AccountBootstrapStatusResponse.md +17 -0
  11. data/docs/AgentBootstrapApi.md +209 -0
  12. data/docs/BalanceApi.md +1 -1
  13. data/docs/CuratedMarketplaceContract.md +31 -0
  14. data/docs/FetchApi.md +1 -1
  15. data/docs/FetchBalanceSnapshot.md +1 -1
  16. data/docs/FetchRequest.md +7 -1
  17. data/docs/RateLimitResponse.md +19 -0
  18. data/docs/SearchAccessMethod.md +37 -0
  19. data/docs/SearchApi.md +68 -1
  20. data/docs/SearchCuratedCallability.md +19 -0
  21. data/docs/SearchCuratedExecution.md +17 -0
  22. data/docs/SearchCuratedOperation.md +21 -0
  23. data/docs/SearchCuratedService.md +19 -0
  24. data/docs/SearchCuratedSource.md +21 -0
  25. data/docs/SearchEndpointHit.md +18 -0
  26. data/docs/SearchExecutionModeFilter.md +19 -0
  27. data/docs/SearchFilterSpec.md +11 -1
  28. data/docs/SearchMethodFilter.md +19 -0
  29. data/docs/SearchResponse.md +1 -3
  30. data/docs/SearchStringSetFilter.md +19 -0
  31. data/docs/SearchWeftFetchCompatibility.md +21 -0
  32. data/docs/Wallet.md +7 -3
  33. data/lib/weft/generated/api/account_api.rb +4 -4
  34. data/lib/weft/generated/api/agent_bootstrap_api.rb +224 -0
  35. data/lib/weft/generated/api/api_keys_api.rb +6 -2
  36. data/lib/weft/generated/api/auth_api.rb +2 -2
  37. data/lib/weft/generated/api/balance_api.rb +4 -4
  38. data/lib/weft/generated/api/default_api.rb +2 -2
  39. data/lib/weft/generated/api/fetch_api.rb +4 -4
  40. data/lib/weft/generated/api/payments_api.rb +2 -2
  41. data/lib/weft/generated/api/purchases_api.rb +2 -2
  42. data/lib/weft/generated/api/resources_api.rb +2 -2
  43. data/lib/weft/generated/api/search_api.rb +83 -4
  44. data/lib/weft/generated/api_client.rb +2 -2
  45. data/lib/weft/generated/api_error.rb +2 -2
  46. data/lib/weft/generated/api_model_base.rb +2 -2
  47. data/lib/weft/generated/configuration.rb +10 -10
  48. data/lib/weft/generated/models/account_bootstrap_approval.rb +259 -0
  49. data/lib/weft/generated/models/account_bootstrap_created.rb +349 -0
  50. data/lib/weft/generated/models/account_bootstrap_created_approval.rb +297 -0
  51. data/lib/weft/generated/models/account_bootstrap_created_response.rb +164 -0
  52. data/lib/weft/generated/models/account_bootstrap_request.rb +317 -0
  53. data/lib/weft/generated/models/account_bootstrap_status.rb +282 -0
  54. data/lib/weft/generated/models/account_bootstrap_status_response.rb +164 -0
  55. data/lib/weft/generated/models/account_details.rb +2 -2
  56. data/lib/weft/generated/models/api_key.rb +2 -2
  57. data/lib/weft/generated/models/api_key_created.rb +2 -2
  58. data/lib/weft/generated/models/api_key_created_response.rb +2 -2
  59. data/lib/weft/generated/models/api_key_list_response.rb +2 -2
  60. data/lib/weft/generated/models/auth_response.rb +2 -2
  61. data/lib/weft/generated/models/auth_response_data.rb +2 -2
  62. data/lib/weft/generated/models/balance_response.rb +2 -2
  63. data/lib/weft/generated/models/confirm_request.rb +2 -2
  64. data/lib/weft/generated/models/create_api_key_request.rb +2 -2
  65. data/lib/weft/generated/models/curated_marketplace_contract.rb +384 -0
  66. data/lib/weft/generated/models/enrolled_resource.rb +2 -2
  67. data/lib/weft/generated/models/error.rb +2 -2
  68. data/lib/weft/generated/models/error_response.rb +2 -2
  69. data/lib/weft/generated/models/fetch403_response.rb +2 -2
  70. data/lib/weft/generated/models/fetch_balance_snapshot.rb +3 -3
  71. data/lib/weft/generated/models/fetch_error_response.rb +4 -4
  72. data/lib/weft/generated/models/fetch_request.rb +36 -6
  73. data/lib/weft/generated/models/fetch_request_body.rb +2 -2
  74. data/lib/weft/generated/models/fetch_response.rb +2 -2
  75. data/lib/weft/generated/models/insufficient_scope_response.rb +2 -2
  76. data/lib/weft/generated/models/me_api_key.rb +2 -2
  77. data/lib/weft/generated/models/me_api_key_creator.rb +2 -2
  78. data/lib/weft/generated/models/me_response.rb +2 -2
  79. data/lib/weft/generated/models/me_response_data.rb +2 -2
  80. data/lib/weft/generated/models/merchant.rb +2 -2
  81. data/lib/weft/generated/models/message_response.rb +2 -2
  82. data/lib/weft/generated/models/message_response_data.rb +2 -2
  83. data/lib/weft/generated/models/pagination.rb +2 -2
  84. data/lib/weft/generated/models/password_reset_request.rb +2 -2
  85. data/lib/weft/generated/models/password_update_request.rb +2 -2
  86. data/lib/weft/generated/models/payment.rb +2 -2
  87. data/lib/weft/generated/models/payment_list_response.rb +2 -2
  88. data/lib/weft/generated/models/payment_response.rb +2 -2
  89. data/lib/weft/generated/models/principal_wallet.rb +2 -2
  90. data/lib/weft/generated/models/promo_balance.rb +2 -2
  91. data/lib/weft/generated/models/purchase.rb +2 -2
  92. data/lib/weft/generated/models/purchase_artifact.rb +2 -2
  93. data/lib/weft/generated/models/purchase_list_response.rb +2 -2
  94. data/lib/weft/generated/models/purchase_response.rb +2 -2
  95. data/lib/weft/generated/models/rate_limit_response.rb +214 -0
  96. data/lib/weft/generated/models/resend_confirmation_request.rb +2 -2
  97. data/lib/weft/generated/models/resource_enrollment_request.rb +2 -2
  98. data/lib/weft/generated/models/resource_enrollment_response.rb +2 -2
  99. data/lib/weft/generated/models/resource_stats.rb +2 -2
  100. data/lib/weft/generated/models/search_access_method.rb +341 -0
  101. data/lib/weft/generated/models/search_capability_ref.rb +2 -2
  102. data/lib/weft/generated/models/search_curated_callability.rb +216 -0
  103. data/lib/weft/generated/models/search_curated_execution.rb +181 -0
  104. data/lib/weft/generated/models/search_curated_operation.rb +199 -0
  105. data/lib/weft/generated/models/search_curated_service.rb +190 -0
  106. data/lib/weft/generated/models/search_curated_source.rb +240 -0
  107. data/lib/weft/generated/models/search_endpoint_call.rb +2 -2
  108. data/lib/weft/generated/models/search_endpoint_hit.rb +86 -3
  109. data/lib/weft/generated/models/search_endpoint_price.rb +2 -2
  110. data/lib/weft/generated/models/search_error_response.rb +2 -2
  111. data/lib/weft/generated/models/search_execution_mode_filter.rb +197 -0
  112. data/lib/weft/generated/models/search_filter_spec.rb +55 -6
  113. data/lib/weft/generated/models/search_method_filter.rb +197 -0
  114. data/lib/weft/generated/models/search_payment_offer.rb +2 -2
  115. data/lib/weft/generated/models/search_price_atomic_filter.rb +2 -2
  116. data/lib/weft/generated/models/search_price_usd_filter.rb +2 -2
  117. data/lib/weft/generated/models/search_protocol_filter.rb +2 -2
  118. data/lib/weft/generated/models/search_provider_ref.rb +2 -2
  119. data/lib/weft/generated/models/search_request.rb +2 -2
  120. data/lib/weft/generated/models/search_resource_type_filter.rb +2 -2
  121. data/lib/weft/generated/models/search_response.rb +7 -17
  122. data/lib/weft/generated/models/search_response_warnings_inner.rb +2 -2
  123. data/lib/weft/generated/models/search_result.rb +2 -2
  124. data/lib/weft/generated/models/search_string_set_filter.rb +177 -0
  125. data/lib/weft/generated/models/search_weft_fetch_compatibility.rb +240 -0
  126. data/lib/weft/generated/models/sign_in_request.rb +2 -2
  127. data/lib/weft/generated/models/sign_up_request.rb +2 -2
  128. data/lib/weft/generated/models/spending_policy.rb +2 -2
  129. data/lib/weft/generated/models/user.rb +2 -2
  130. data/lib/weft/generated/models/user_principal.rb +2 -2
  131. data/lib/weft/generated/models/wallet.rb +84 -6
  132. data/lib/weft/generated/version.rb +3 -3
  133. data/lib/weft/sdk.rb +1 -1
  134. metadata +42 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 90961e9b0a274edab597a57dcccfa99ddb4be6d276dae6e9aaabdeae0637c05e
4
- data.tar.gz: d8e4e02bbff40abbe6f05de86b790dece9a89694a1b1d0cf62b42c76c0ba3cf1
3
+ metadata.gz: f8f3c4ab682b8f77dcd1f610b4c57ba7afb7ab4e7dc6d1be4f2225b6efb45a92
4
+ data.tar.gz: 5b9582a8d977a9dadc4e8e37061b19eaaeb6fb343d93f3214c812a20764c9425
5
5
  SHA512:
6
- metadata.gz: a9788d2dbb714a9518de4e884891e4f450a78d4477e164f790592b6be2a72acfde42f8322fc8cf6b579cd85701fe8236d2541f030eb436f1767dfbeab81dfdfd
7
- data.tar.gz: 0ecf39370784d1bcb0a41a339aa3fac634a37024b052f6f1396bf92372c2513b8f7bad78df646ca2475936597b65607abf92b13ff66141d50ec22fe12c21a021
6
+ metadata.gz: 769a73ba75bb46b94dbfb0ed383dfc44d7a9ff707fe87ac58bb1a73fbca02c4dfc058a5b7db3209b6d04c575249be068b2896ae1bc0b69df50a93d0e585756ce
7
+ data.tar.gz: 3ffd63792808c022c9bcc2f2ff55003275880a144a2dd99f202acaed01c622d40c7baa0875e293e570c1167626b733eb25acedfff8b4fcc5d2b3a910974665df
data/docs/APIKeysApi.md CHANGED
@@ -15,6 +15,8 @@ All URIs are relative to *https://weft.network*
15
15
 
16
16
  Create an API key
17
17
 
18
+ Create an `ax_live_*` resource key for the authenticated seller Organization. Buyer `wk_*` keys are created in the buyer dashboard.
19
+
18
20
  ### Examples
19
21
 
20
22
  ```ruby
@@ -82,6 +84,8 @@ end
82
84
 
83
85
  List API keys
84
86
 
87
+ List `ax_live_*` resource keys for the seller Organization.
88
+
85
89
  ### Examples
86
90
 
87
91
  ```ruby
data/docs/AccountApi.md CHANGED
@@ -13,7 +13,7 @@ All URIs are relative to *https://weft.network*
13
13
 
14
14
  Get the current credential principal
15
15
 
16
- Returns the Organization represented by a resource API key, or the User represented by an account API key or OAuth access token. Branch on `data.principal_type`; existing Organization fields remain unchanged.
16
+ Returns the seller Organization represented by an `ax_live_*` resource key, or the buyer User represented by a `wk_*` account key, OAuth access token, or claimed `wbt_*` bearer. Branch on `data.principal_type`.
17
17
 
18
18
  ### Examples
19
19
 
@@ -0,0 +1,21 @@
1
+ # Weft::AccountBootstrapApproval
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **method** | **String** | | |
8
+ | **expires_in** | **Integer** | | |
9
+ | **interval** | **Integer** | Minimum status polling interval in seconds. | |
10
+
11
+ ## Example
12
+
13
+ ```ruby
14
+ require 'weft-sdk'
15
+
16
+ instance = Weft::AccountBootstrapApproval.new(
17
+ method: null,
18
+ expires_in: null,
19
+ interval: null
20
+ )
21
+ ```
@@ -0,0 +1,29 @@
1
+ # Weft::AccountBootstrapCreated
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **id** | **String** | | |
8
+ | **status** | **String** | | |
9
+ | **capabilities** | **Array<String>** | | |
10
+ | **expires_at** | **Time** | Claim-window expiry. Null after the credential is promoted. | |
11
+ | **approval** | [**AccountBootstrapCreatedApproval**](AccountBootstrapCreatedApproval.md) | | |
12
+ | **temporary_api_key** | **String** | Returned once. Store as a secret; it cannot be recovered. | |
13
+ | **device_code** | **String** | Transitional response field for older CLI releases that use OAuth device exchange. | [optional] |
14
+
15
+ ## Example
16
+
17
+ ```ruby
18
+ require 'weft-sdk'
19
+
20
+ instance = Weft::AccountBootstrapCreated.new(
21
+ id: null,
22
+ status: null,
23
+ capabilities: null,
24
+ expires_at: null,
25
+ approval: null,
26
+ temporary_api_key: null,
27
+ device_code: null
28
+ )
29
+ ```
@@ -0,0 +1,23 @@
1
+ # Weft::AccountBootstrapCreatedApproval
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **method** | **String** | | |
8
+ | **expires_in** | **Integer** | | |
9
+ | **interval** | **Integer** | Minimum status polling interval in seconds. | |
10
+ | **user_code** | **String** | Show this code to the human; approval requires a matching normalized code. | |
11
+
12
+ ## Example
13
+
14
+ ```ruby
15
+ require 'weft-sdk'
16
+
17
+ instance = Weft::AccountBootstrapCreatedApproval.new(
18
+ method: null,
19
+ expires_in: null,
20
+ interval: null,
21
+ user_code: null
22
+ )
23
+ ```
@@ -0,0 +1,17 @@
1
+ # Weft::AccountBootstrapCreatedResponse
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **data** | [**AccountBootstrapCreated**](AccountBootstrapCreated.md) | | |
8
+
9
+ ## Example
10
+
11
+ ```ruby
12
+ require 'weft-sdk'
13
+
14
+ instance = Weft::AccountBootstrapCreatedResponse.new(
15
+ data: null
16
+ )
17
+ ```
@@ -0,0 +1,27 @@
1
+ # Weft::AccountBootstrapRequest
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **email** | **String** | | |
8
+ | **agent_name** | **String** | | |
9
+ | **host_name** | **String** | | [optional] |
10
+ | **reason** | **String** | | [optional] |
11
+ | **oauth_client_id** | **String** | Transitional compatibility for older CLI releases that use OAuth device exchange. | [optional] |
12
+ | **requested_scopes** | **Array<String>** | Transitional compatibility for older CLI releases that use OAuth device exchange. | [optional] |
13
+
14
+ ## Example
15
+
16
+ ```ruby
17
+ require 'weft-sdk'
18
+
19
+ instance = Weft::AccountBootstrapRequest.new(
20
+ email: null,
21
+ agent_name: null,
22
+ host_name: null,
23
+ reason: null,
24
+ oauth_client_id: null,
25
+ requested_scopes: null
26
+ )
27
+ ```
@@ -0,0 +1,25 @@
1
+ # Weft::AccountBootstrapStatus
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **id** | **String** | | |
8
+ | **status** | **String** | | |
9
+ | **capabilities** | **Array<String>** | | |
10
+ | **expires_at** | **Time** | Claim-window expiry. Null after the credential is promoted. | |
11
+ | **approval** | [**AccountBootstrapApproval**](AccountBootstrapApproval.md) | | |
12
+
13
+ ## Example
14
+
15
+ ```ruby
16
+ require 'weft-sdk'
17
+
18
+ instance = Weft::AccountBootstrapStatus.new(
19
+ id: null,
20
+ status: null,
21
+ capabilities: null,
22
+ expires_at: null,
23
+ approval: null
24
+ )
25
+ ```
@@ -0,0 +1,17 @@
1
+ # Weft::AccountBootstrapStatusResponse
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **data** | [**AccountBootstrapStatus**](AccountBootstrapStatus.md) | | |
8
+
9
+ ## Example
10
+
11
+ ```ruby
12
+ require 'weft-sdk'
13
+
14
+ instance = Weft::AccountBootstrapStatusResponse.new(
15
+ data: null
16
+ )
17
+ ```
@@ -0,0 +1,209 @@
1
+ # Weft::AgentBootstrapApi
2
+
3
+ All URIs are relative to *https://weft.network*
4
+
5
+ | Method | HTTP request | Description |
6
+ | ------ | ------------ | ----------- |
7
+ | [**cancel_account_bootstrap**](AgentBootstrapApi.md#cancel_account_bootstrap) | **DELETE** /api/v1/account_bootstraps/{id} | Cancel or revoke a bootstrap credential |
8
+ | [**create_account_bootstrap**](AgentBootstrapApi.md#create_account_bootstrap) | **POST** /api/v1/account_bootstraps | Create a temporary agent bootstrap |
9
+ | [**get_account_bootstrap**](AgentBootstrapApi.md#get_account_bootstrap) | **GET** /api/v1/account_bootstraps/{id} | Read bootstrap lifecycle status |
10
+
11
+
12
+ ## cancel_account_bootstrap
13
+
14
+ > <AccountBootstrapStatusResponse> cancel_account_bootstrap(id)
15
+
16
+ Cancel or revoke a bootstrap credential
17
+
18
+ A pending bootstrap becomes rejected. A claimed promoted credential becomes revoked and fails every subsequent request immediately.
19
+
20
+ ### Examples
21
+
22
+ ```ruby
23
+ require 'time'
24
+ require 'weft-sdk'
25
+ # setup authorization
26
+ Weft.configure do |config|
27
+ # Configure Bearer authorization (BootstrapToken): bootstrapAuth
28
+ config.access_token = 'YOUR_BEARER_TOKEN'
29
+ end
30
+
31
+ api_instance = Weft::AgentBootstrapApi.new
32
+ id = 'id_example' # String |
33
+
34
+ begin
35
+ # Cancel or revoke a bootstrap credential
36
+ result = api_instance.cancel_account_bootstrap(id)
37
+ p result
38
+ rescue Weft::ApiError => e
39
+ puts "Error when calling AgentBootstrapApi->cancel_account_bootstrap: #{e}"
40
+ end
41
+ ```
42
+
43
+ #### Using the cancel_account_bootstrap_with_http_info variant
44
+
45
+ This returns an Array which contains the response data, status code and headers.
46
+
47
+ > <Array(<AccountBootstrapStatusResponse>, Integer, Hash)> cancel_account_bootstrap_with_http_info(id)
48
+
49
+ ```ruby
50
+ begin
51
+ # Cancel or revoke a bootstrap credential
52
+ data, status_code, headers = api_instance.cancel_account_bootstrap_with_http_info(id)
53
+ p status_code # => 2xx
54
+ p headers # => { ... }
55
+ p data # => <AccountBootstrapStatusResponse>
56
+ rescue Weft::ApiError => e
57
+ puts "Error when calling AgentBootstrapApi->cancel_account_bootstrap_with_http_info: #{e}"
58
+ end
59
+ ```
60
+
61
+ ### Parameters
62
+
63
+ | Name | Type | Description | Notes |
64
+ | ---- | ---- | ----------- | ----- |
65
+ | **id** | **String** | | |
66
+
67
+ ### Return type
68
+
69
+ [**AccountBootstrapStatusResponse**](AccountBootstrapStatusResponse.md)
70
+
71
+ ### Authorization
72
+
73
+ [bootstrapAuth](../README.md#bootstrapAuth)
74
+
75
+ ### HTTP request headers
76
+
77
+ - **Content-Type**: Not defined
78
+ - **Accept**: application/json
79
+
80
+
81
+ ## create_account_bootstrap
82
+
83
+ > <AccountBootstrapCreatedResponse> create_account_bootstrap(account_bootstrap_request)
84
+
85
+ Create a temporary agent bootstrap
86
+
87
+ Creates a 30-minute, search-only bootstrap and emails a separate claim link to the supplied address. Human approval binds the same `wbt_*` bearer to the account and promotes it to the fixed durable capability set. The response is deliberately identical for new and existing account emails and never contains the claim token. Rate limits apply per IP and normalized email; request bodies over 4 KiB are rejected before parsing. The bootstrap row and one-time credentials are committed only after the mail relay accepts the claim email. A retryable 503 leaves no bootstrap row behind.
88
+
89
+ ### Examples
90
+
91
+ ```ruby
92
+ require 'time'
93
+ require 'weft-sdk'
94
+
95
+ api_instance = Weft::AgentBootstrapApi.new
96
+ account_bootstrap_request = Weft::AccountBootstrapRequest.new({email: 'email_example', agent_name: 'agent_name_example'}) # AccountBootstrapRequest |
97
+
98
+ begin
99
+ # Create a temporary agent bootstrap
100
+ result = api_instance.create_account_bootstrap(account_bootstrap_request)
101
+ p result
102
+ rescue Weft::ApiError => e
103
+ puts "Error when calling AgentBootstrapApi->create_account_bootstrap: #{e}"
104
+ end
105
+ ```
106
+
107
+ #### Using the create_account_bootstrap_with_http_info variant
108
+
109
+ This returns an Array which contains the response data, status code and headers.
110
+
111
+ > <Array(<AccountBootstrapCreatedResponse>, Integer, Hash)> create_account_bootstrap_with_http_info(account_bootstrap_request)
112
+
113
+ ```ruby
114
+ begin
115
+ # Create a temporary agent bootstrap
116
+ data, status_code, headers = api_instance.create_account_bootstrap_with_http_info(account_bootstrap_request)
117
+ p status_code # => 2xx
118
+ p headers # => { ... }
119
+ p data # => <AccountBootstrapCreatedResponse>
120
+ rescue Weft::ApiError => e
121
+ puts "Error when calling AgentBootstrapApi->create_account_bootstrap_with_http_info: #{e}"
122
+ end
123
+ ```
124
+
125
+ ### Parameters
126
+
127
+ | Name | Type | Description | Notes |
128
+ | ---- | ---- | ----------- | ----- |
129
+ | **account_bootstrap_request** | [**AccountBootstrapRequest**](AccountBootstrapRequest.md) | | |
130
+
131
+ ### Return type
132
+
133
+ [**AccountBootstrapCreatedResponse**](AccountBootstrapCreatedResponse.md)
134
+
135
+ ### Authorization
136
+
137
+ No authorization required
138
+
139
+ ### HTTP request headers
140
+
141
+ - **Content-Type**: application/json
142
+ - **Accept**: application/json
143
+
144
+
145
+ ## get_account_bootstrap
146
+
147
+ > <AccountBootstrapStatusResponse> get_account_bootstrap(id)
148
+
149
+ Read bootstrap lifecycle status
150
+
151
+ ### Examples
152
+
153
+ ```ruby
154
+ require 'time'
155
+ require 'weft-sdk'
156
+ # setup authorization
157
+ Weft.configure do |config|
158
+ # Configure Bearer authorization (BootstrapToken): bootstrapAuth
159
+ config.access_token = 'YOUR_BEARER_TOKEN'
160
+ end
161
+
162
+ api_instance = Weft::AgentBootstrapApi.new
163
+ id = 'id_example' # String |
164
+
165
+ begin
166
+ # Read bootstrap lifecycle status
167
+ result = api_instance.get_account_bootstrap(id)
168
+ p result
169
+ rescue Weft::ApiError => e
170
+ puts "Error when calling AgentBootstrapApi->get_account_bootstrap: #{e}"
171
+ end
172
+ ```
173
+
174
+ #### Using the get_account_bootstrap_with_http_info variant
175
+
176
+ This returns an Array which contains the response data, status code and headers.
177
+
178
+ > <Array(<AccountBootstrapStatusResponse>, Integer, Hash)> get_account_bootstrap_with_http_info(id)
179
+
180
+ ```ruby
181
+ begin
182
+ # Read bootstrap lifecycle status
183
+ data, status_code, headers = api_instance.get_account_bootstrap_with_http_info(id)
184
+ p status_code # => 2xx
185
+ p headers # => { ... }
186
+ p data # => <AccountBootstrapStatusResponse>
187
+ rescue Weft::ApiError => e
188
+ puts "Error when calling AgentBootstrapApi->get_account_bootstrap_with_http_info: #{e}"
189
+ end
190
+ ```
191
+
192
+ ### Parameters
193
+
194
+ | Name | Type | Description | Notes |
195
+ | ---- | ---- | ----------- | ----- |
196
+ | **id** | **String** | | |
197
+
198
+ ### Return type
199
+
200
+ [**AccountBootstrapStatusResponse**](AccountBootstrapStatusResponse.md)
201
+
202
+ ### Authorization
203
+
204
+ [bootstrapAuth](../README.md#bootstrapAuth)
205
+
206
+ ### HTTP request headers
207
+
208
+ - **Content-Type**: Not defined
209
+ - **Accept**: application/json
data/docs/BalanceApi.md CHANGED
@@ -13,7 +13,7 @@ All URIs are relative to *https://weft.network*
13
13
 
14
14
  Get wallet, spending policy, and current-window spend
15
15
 
16
- Read-only snapshot for the buyer behind the bearer token. The response always includes a `promo` block — values are zero in v1 and fill in once the freemium promo ledger ships, without a shape change. `wallet.balance_usdc` is fetched live from Privy; if Privy is unreachable the field returns `\"0.00\"` rather than erroring the whole call. Account-scoped: the bearer must be a buyer-scoped API key.
16
+ Read-only snapshot for the buyer behind the bearer token. The response always includes a `promo` block — values are zero in v1 and fill in once the freemium promo ledger ships, without a shape change. Base USDC and Tempo balances are fetched server-side through Crossmint. If Crossmint is unreachable, the balance fields are `null`; consumers must not interpret that as zero. Account-scoped: the bearer must be a buyer-scoped API key, an OAuth access token carrying `balance`, or a claimed `wbt_*` bearer.
17
17
 
18
18
  ### Examples
19
19
 
@@ -0,0 +1,31 @@
1
+ # Weft::CuratedMarketplaceContract
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **schema_version** | **Integer** | | |
8
+ | **snapshot** | **Hash&lt;String, Object&gt;** | | |
9
+ | **provider** | **Hash&lt;String, Object&gt;** | | |
10
+ | **service** | **Hash&lt;String, Object&gt;** | | |
11
+ | **operation** | **Hash&lt;String, Object&gt;** | | |
12
+ | **request** | **Hash&lt;String, Object&gt;** | | |
13
+ | **access_methods** | **Array&lt;Hash&lt;String, Object&gt;&gt;** | | |
14
+ | **evidence** | **Array&lt;Hash&lt;String, Object&gt;&gt;** | | |
15
+
16
+ ## Example
17
+
18
+ ```ruby
19
+ require 'weft-sdk'
20
+
21
+ instance = Weft::CuratedMarketplaceContract.new(
22
+ schema_version: null,
23
+ snapshot: null,
24
+ provider: null,
25
+ service: null,
26
+ operation: null,
27
+ request: null,
28
+ access_methods: null,
29
+ evidence: null
30
+ )
31
+ ```
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 proxy)
15
15
 
16
- Universal x402 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`, parses the merchant's challenge. 3. Compares the asking price to `max_cost_usd` and the buyer's policy (`max_tx_usd`, daily/weekly limits). 4. Signs an EIP-3009 transfer from the buyer's wallet. 5. Replays the request with the `X-Payment` header. 6. Streams the upstream artifact back, base64-encoded under `body_base64`, with `paid_usd`, `held_usd`, `payment_status`, `tx_hash`, 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. **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 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`, parses the merchant's challenge. 3. Compares the asking price to `max_cost_usd` and the buyer's policy (`max_tx_usd`, daily/weekly limits). 4. Signs an EIP-3009 transfer from the buyer's wallet. 5. Replays the request with the `X-Payment` header. 6. Streams the upstream artifact back, base64-encoded under `body_base64`, with `paid_usd`, `held_usd`, `payment_status`, `tx_hash`, 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.
17
17
 
18
18
  ### Examples
19
19
 
@@ -5,7 +5,7 @@
5
5
  | Name | Type | Description | Notes |
6
6
  | ---- | ---- | ----------- | ----- |
7
7
  | **promo_usd** | **String** | | |
8
- | **wallet_usdc** | **String** | Live Base USDC balance. | |
8
+ | **wallet_usdc** | **String** | Live Base USDC balance read server-side through Crossmint. Null when Crossmint is unavailable; never treat null as zero. | |
9
9
  | **tempo_usd** | **String** | Aggregated USD of allowlisted Tempo dollar tokens, exact to the micro-dollar. &#x60;null&#x60; when UNKNOWN (RPC read failed or no token allowlisted for the paired chain) — never \&quot;0.00\&quot; for an unread component. | |
10
10
  | **total_usd** | **String** | Aggregated USD balance &#x3D; Base USDC + Tempo dollar tokens, exact to the micro-dollar. Equals &#x60;wallet_usdc&#x60; alone when &#x60;tempo_usd&#x60; is null. Null when the Base USDC provider is unreachable. | |
11
11
  | **spent_today_usd** | **String** | | |
data/docs/FetchRequest.md CHANGED
@@ -9,6 +9,9 @@
9
9
  | **method** | **String** | HTTP method to use against the upstream. | [optional][default to &#39;GET&#39;] |
10
10
  | **body** | [**FetchRequestBody**](FetchRequestBody.md) | | [optional] |
11
11
  | **headers** | **Hash&lt;String, String&gt;** | Headers forwarded to the upstream. Up to 32 headers, 4 KB total. The following are silently stripped: &#x60;host&#x60;, &#x60;authorization&#x60;, &#x60;cookie&#x60;, &#x60;proxy-authorization&#x60;, &#x60;x-forwarded-*&#x60;, &#x60;x-real-ip&#x60;, &#x60;x-payment&#x60;, &#x60;connection&#x60;, &#x60;upgrade&#x60;. | [optional] |
12
+ | **search_id** | **String** | The &#x60;query_trace_id&#x60; from the &#x60;POST /api/v1/search&#x60; 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
+ | **operation_id** | **String** | Advisory operation id returned by search. | [optional] |
14
+ | **access_method_id** | **String** | Advisory access-method id returned by search. | [optional] |
12
15
 
13
16
  ## Example
14
17
 
@@ -20,6 +23,9 @@ instance = Weft::FetchRequest.new(
20
23
  max_cost_usd: 0.05,
21
24
  method: null,
22
25
  body: null,
23
- headers: {Accept&#x3D;application/json, User-Agent&#x3D;my-agent/1.0}
26
+ headers: {Accept&#x3D;application/json, User-Agent&#x3D;my-agent/1.0},
27
+ search_id: 11111111-1111-4111-8111-111111111111,
28
+ operation_id: null,
29
+ access_method_id: null
24
30
  )
25
31
  ```
@@ -0,0 +1,19 @@
1
+ # Weft::RateLimitResponse
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **error** | **String** | | |
8
+ | **error_description** | **String** | | |
9
+
10
+ ## Example
11
+
12
+ ```ruby
13
+ require 'weft-sdk'
14
+
15
+ instance = Weft::RateLimitResponse.new(
16
+ error: null,
17
+ error_description: null
18
+ )
19
+ ```
@@ -0,0 +1,37 @@
1
+ # Weft::SearchAccessMethod
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **access_method_id** | **String** | | |
8
+ | **protocol** | **String** | | |
9
+ | **scheme** | **String** | | [optional] |
10
+ | **network** | **String** | | [optional] |
11
+ | **asset** | **String** | | [optional] |
12
+ | **asset_decimals** | **Integer** | | [optional] |
13
+ | **price** | **Object** | | |
14
+ | **merchant** | **Object** | | [optional] |
15
+ | **terms** | **Object** | | [optional] |
16
+ | **status** | **String** | | [optional] |
17
+ | **weft_fetch** | [**SearchWeftFetchCompatibility**](SearchWeftFetchCompatibility.md) | | |
18
+
19
+ ## Example
20
+
21
+ ```ruby
22
+ require 'weft-sdk'
23
+
24
+ instance = Weft::SearchAccessMethod.new(
25
+ access_method_id: null,
26
+ protocol: null,
27
+ scheme: null,
28
+ network: null,
29
+ asset: null,
30
+ asset_decimals: null,
31
+ price: null,
32
+ merchant: null,
33
+ terms: null,
34
+ status: null,
35
+ weft_fetch: null
36
+ )
37
+ ```
data/docs/SearchApi.md CHANGED
@@ -4,16 +4,83 @@ 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 |
7
8
  | [**search**](SearchApi.md#search) | **POST** /api/v1/search | Search the Weft index |
8
9
 
9
10
 
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
+
10
77
  ## search
11
78
 
12
79
  > <SearchResponse> search(search_request)
13
80
 
14
81
  Search the Weft index
15
82
 
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.
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.
17
84
 
18
85
  ### Examples
19
86
 
@@ -0,0 +1,19 @@
1
+ # Weft::SearchCuratedCallability
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **state** | **String** | | |
8
+ | **missing** | **Array&lt;String&gt;** | | |
9
+
10
+ ## Example
11
+
12
+ ```ruby
13
+ require 'weft-sdk'
14
+
15
+ instance = Weft::SearchCuratedCallability.new(
16
+ state: null,
17
+ missing: null
18
+ )
19
+ ```