weft-sdk 0.6.2 → 0.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (87) hide show
  1. checksums.yaml +4 -4
  2. data/docs/AccountDetails.md +8 -12
  3. data/docs/EnrolledResource.md +44 -0
  4. data/docs/Fetch403Response.md +49 -0
  5. data/docs/FetchBalanceSnapshot.md +5 -1
  6. data/docs/FetchResponse.md +1 -1
  7. data/docs/InsufficientScopeResponse.md +22 -0
  8. data/docs/MeApiKey.md +26 -0
  9. data/docs/MeApiKeyCreator.md +22 -0
  10. data/docs/ResourceEnrollmentRequest.md +24 -0
  11. data/docs/ResourceEnrollmentResponse.md +18 -0
  12. data/docs/ResourceStats.md +30 -0
  13. data/docs/ResourcesApi.md +72 -0
  14. data/docs/SearchFilters.md +1 -1
  15. data/docs/SearchResponse.md +1 -1
  16. data/docs/SearchResponseResultsInner.md +36 -0
  17. data/docs/Wallet.md +5 -1
  18. data/lib/weft/generated/api/account_api.rb +1 -1
  19. data/lib/weft/generated/api/api_keys_api.rb +1 -1
  20. data/lib/weft/generated/api/auth_api.rb +1 -1
  21. data/lib/weft/generated/api/balance_api.rb +1 -1
  22. data/lib/weft/generated/api/default_api.rb +1 -1
  23. data/lib/weft/generated/api/fetch_api.rb +1 -1
  24. data/lib/weft/generated/api/payments_api.rb +1 -1
  25. data/lib/weft/generated/api/resources_api.rb +90 -0
  26. data/lib/weft/generated/api/search_api.rb +1 -1
  27. data/lib/weft/generated/api_client.rb +1 -1
  28. data/lib/weft/generated/api_error.rb +1 -1
  29. data/lib/weft/generated/api_model_base.rb +1 -1
  30. data/lib/weft/generated/configuration.rb +1 -1
  31. data/lib/weft/generated/models/account_details.rb +65 -106
  32. data/lib/weft/generated/models/api_key.rb +1 -1
  33. data/lib/weft/generated/models/api_key_created.rb +1 -1
  34. data/lib/weft/generated/models/api_key_created_response.rb +1 -1
  35. data/lib/weft/generated/models/api_key_list_response.rb +1 -1
  36. data/lib/weft/generated/models/auth_response.rb +1 -1
  37. data/lib/weft/generated/models/auth_response_data.rb +1 -1
  38. data/lib/weft/generated/models/balance_response.rb +1 -1
  39. data/lib/weft/generated/models/confirm_request.rb +1 -1
  40. data/lib/weft/generated/models/create_api_key_request.rb +1 -1
  41. data/lib/weft/generated/models/enrolled_resource.rb +474 -0
  42. data/lib/weft/generated/models/error.rb +1 -1
  43. data/lib/weft/generated/models/error_response.rb +1 -1
  44. data/lib/weft/generated/models/fetch403_response.rb +104 -0
  45. data/lib/weft/generated/models/fetch_balance_snapshot.rb +58 -3
  46. data/lib/weft/generated/models/fetch_error_response.rb +4 -4
  47. data/lib/weft/generated/models/fetch_request.rb +1 -1
  48. data/lib/weft/generated/models/fetch_request_body.rb +1 -1
  49. data/lib/weft/generated/models/fetch_response.rb +3 -3
  50. data/lib/weft/generated/models/insufficient_scope_response.rb +242 -0
  51. data/lib/weft/generated/models/me_api_key.rb +217 -0
  52. data/lib/weft/generated/models/me_api_key_creator.rb +200 -0
  53. data/lib/weft/generated/models/me_response.rb +1 -1
  54. data/lib/weft/generated/models/merchant.rb +1 -1
  55. data/lib/weft/generated/models/message_response.rb +1 -1
  56. data/lib/weft/generated/models/message_response_data.rb +1 -1
  57. data/lib/weft/generated/models/pagination.rb +1 -1
  58. data/lib/weft/generated/models/password_reset_request.rb +1 -1
  59. data/lib/weft/generated/models/password_update_request.rb +1 -1
  60. data/lib/weft/generated/models/payment.rb +1 -1
  61. data/lib/weft/generated/models/payment_list_response.rb +1 -1
  62. data/lib/weft/generated/models/payment_response.rb +1 -1
  63. data/lib/weft/generated/models/promo_balance.rb +1 -1
  64. data/lib/weft/generated/models/resend_confirmation_request.rb +1 -1
  65. data/lib/weft/generated/models/resource_enrollment_request.rb +212 -0
  66. data/lib/weft/generated/models/resource_enrollment_response.rb +164 -0
  67. data/lib/weft/generated/models/resource_stats.rb +323 -0
  68. data/lib/weft/generated/models/search_agent_card.rb +1 -1
  69. data/lib/weft/generated/models/search_endpoints.rb +1 -1
  70. data/lib/weft/generated/models/search_error_response.rb +1 -1
  71. data/lib/weft/generated/models/search_filters.rb +4 -4
  72. data/lib/weft/generated/models/search_pricing.rb +1 -1
  73. data/lib/weft/generated/models/search_ranking.rb +1 -1
  74. data/lib/weft/generated/models/search_request.rb +1 -1
  75. data/lib/weft/generated/models/search_response.rb +3 -3
  76. data/lib/weft/generated/models/search_response_results_inner.rb +103 -0
  77. data/lib/weft/generated/models/search_result.rb +3 -3
  78. data/lib/weft/generated/models/search_skill.rb +1 -1
  79. data/lib/weft/generated/models/search_skill_endpoint.rb +1 -1
  80. data/lib/weft/generated/models/sign_in_request.rb +1 -1
  81. data/lib/weft/generated/models/sign_up_request.rb +1 -1
  82. data/lib/weft/generated/models/spending_policy.rb +1 -1
  83. data/lib/weft/generated/models/user.rb +1 -1
  84. data/lib/weft/generated/models/wallet.rb +57 -3
  85. data/lib/weft/generated/version.rb +2 -2
  86. data/lib/weft/sdk.rb +1 -1
  87. metadata +22 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7b655aaa72e7fb724df4e7752a8e116c50a7d588bf09b2da19d51fc390710e64
4
- data.tar.gz: 579b015e44ae2f2942400f14a94bcb4b922628b3c91104eabd787544b46b19e1
3
+ metadata.gz: 0aaf25197f0063b4c1395a610ae562335a24303eb17691103bc523be80a6097a
4
+ data.tar.gz: 12efca83b6af39dcddc777c9c5df46adeaec781e6edb79f678d879f9afb31787
5
5
  SHA512:
6
- metadata.gz: 00f7be6a8755a4ed58d586bd78844c0719b8cf039b8cbca464942ac37294524e6a452cd0bd795647ae9c14f84ad77766def84cc76d3e6ad533f67f76c7b3794b
7
- data.tar.gz: 52241fa8074224c5ea0b7fc85250a01ef0acd08ccda511044803324451d04aaf78d0d02fd526e9cce64b5867ccd6fdd7db156e2a0fec34ca69170eddd299d656
6
+ metadata.gz: 8e600a6083dc32201aace8809c420da51447be550da953709ade7036158bd3eab8a653ecead0ea34aa91b4b45c3d5255e5f1c248e460069f29c754c1ef422cd7
7
+ data.tar.gz: e0b6ef4b0667c7177fba16ed6b87536f97dcbbce14a6be3300dd2130e771608048e690a890774d279e633f2e56b1d5db7c6b415d87e44a528fac40404ba37001
@@ -5,12 +5,10 @@
5
5
  | Name | Type | Description | Notes |
6
6
  | ---- | ---- | ----------- | ----- |
7
7
  | **id** | **Integer** | | |
8
- | **email** | **String** | | |
9
- | **status** | **String** | | |
10
- | **display_name** | **String** | | [optional] |
11
- | **public_profile** | **Boolean** | | |
12
- | **public_slug** | **String** | | [optional] |
13
- | **created_at** | **Time** | | |
8
+ | **name** | **String** | | |
9
+ | **slug** | **String** | | |
10
+ | **kind** | **String** | | |
11
+ | **api_key** | [**MeApiKey**](MeApiKey.md) | | |
14
12
 
15
13
  ## Example
16
14
 
@@ -19,12 +17,10 @@ require 'weft-sdk'
19
17
 
20
18
  instance = Weft::AccountDetails.new(
21
19
  id: null,
22
- email: null,
23
- status: null,
24
- display_name: null,
25
- public_profile: null,
26
- public_slug: null,
27
- created_at: null
20
+ name: null,
21
+ slug: null,
22
+ kind: null,
23
+ api_key: null
28
24
  )
29
25
  ```
30
26
 
@@ -0,0 +1,44 @@
1
+ # Weft::EnrolledResource
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **id** | **Integer** | | |
8
+ | **name** | **String** | | |
9
+ | **slug** | **String** | | |
10
+ | **description** | **String** | | [optional] |
11
+ | **kind** | **String** | | |
12
+ | **visibility** | **String** | | |
13
+ | **wallet_address** | **String** | Declared wallet address, or `null` if none was provided. | [optional] |
14
+ | **category** | **String** | Legacy v3 taxonomy field. Returns a string only for `agent`-kind resources that carry a `category` in their metadata; `null` for all other kinds and for agents without one. Always `null` on enrollment (category is a post-claim concern). | |
15
+ | **verified** | **Boolean** | | |
16
+ | **claimed** | **Boolean** | True once the resource has an owning provider. Always false at enrollment. | |
17
+ | **created_at** | **Time** | | |
18
+ | **stats** | [**ResourceStats**](ResourceStats.md) | | |
19
+ | **claim_token** | **String** | Single-use token for the magic claim URL. Surfaced only on enrollment. | |
20
+ | **claim_url** | **String** | Dashboard path the agent hands to its human to claim the resource. | |
21
+
22
+ ## Example
23
+
24
+ ```ruby
25
+ require 'weft-sdk'
26
+
27
+ instance = Weft::EnrolledResource.new(
28
+ id: null,
29
+ name: null,
30
+ slug: null,
31
+ description: null,
32
+ kind: agent,
33
+ visibility: public_profile,
34
+ wallet_address: null,
35
+ category: null,
36
+ verified: null,
37
+ claimed: null,
38
+ created_at: null,
39
+ stats: null,
40
+ claim_token: null,
41
+ claim_url: null
42
+ )
43
+ ```
44
+
@@ -0,0 +1,49 @@
1
+ # Weft::Fetch403Response
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::Fetch403Response.openapi_one_of
15
+ # =>
16
+ # [
17
+ # :'FetchErrorResponse',
18
+ # :'InsufficientScopeResponse'
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::Fetch403Response.build(data)
32
+ # => #<FetchErrorResponse:0x00007fdd4aab02a0>
33
+
34
+ Weft::Fetch403Response.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
+ - `FetchErrorResponse`
47
+ - `InsufficientScopeResponse`
48
+ - `nil` (if no type matches)
49
+
@@ -5,7 +5,9 @@
5
5
  | Name | Type | Description | Notes |
6
6
  | ---- | ---- | ----------- | ----- |
7
7
  | **promo_usd** | **String** | | |
8
- | **wallet_usdc** | **String** | | |
8
+ | **wallet_usdc** | **String** | Live Base USDC balance. | |
9
+ | **tempo_usd** | **String** | Aggregated USD of allowlisted Tempo dollar tokens, 2dp. &#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
+ | **total_usd** | **String** | Aggregated USD balance &#x3D; Base USDC + Tempo dollar tokens, 2dp. Equals &#x60;wallet_usdc&#x60; alone when &#x60;tempo_usd&#x60; is null. Null when the Base USDC provider is unreachable. | |
9
11
  | **spent_today_usd** | **String** | | |
10
12
 
11
13
  ## Example
@@ -16,6 +18,8 @@ require 'weft-sdk'
16
18
  instance = Weft::FetchBalanceSnapshot.new(
17
19
  promo_usd: 0.00,
18
20
  wallet_usdc: 12.34,
21
+ tempo_usd: 3.00,
22
+ total_usd: 15.34,
19
23
  spent_today_usd: 0.42
20
24
  )
21
25
  ```
@@ -9,7 +9,7 @@
9
9
  | **body_base64** | **String** | Base64-encoded response body. Empty string for empty bodies. | |
10
10
  | **paid_usd** | **String** | USD amount actually settled. Null for free upstreams. | |
11
11
  | **tx_hash** | **String** | Settlement transaction hash. Null for free upstreams. | |
12
- | **artifact_id** | **String** | Internal artifact identifier if the response was persisted. | |
12
+ | **artifact_id** | **Integer** | Internal artifact identifier if the response was persisted; &#x60;null&#x60; otherwise. | |
13
13
  | **merchant** | [**Merchant**](Merchant.md) | Merchant reputation snapshot. Null for free upstreams. | |
14
14
 
15
15
  ## Example
@@ -0,0 +1,22 @@
1
+ # Weft::InsufficientScopeResponse
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **error** | **String** | | |
8
+ | **error_description** | **String** | | |
9
+ | **scope** | **String** | Space-delimited list of scopes the endpoint requires. | |
10
+
11
+ ## Example
12
+
13
+ ```ruby
14
+ require 'weft-sdk'
15
+
16
+ instance = Weft::InsufficientScopeResponse.new(
17
+ error: insufficient_scope,
18
+ error_description: The access token does not include the required scope.,
19
+ scope: balance
20
+ )
21
+ ```
22
+
data/docs/MeApiKey.md ADDED
@@ -0,0 +1,26 @@
1
+ # Weft::MeApiKey
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **id** | **Integer** | | |
8
+ | **name** | **String** | | [optional] |
9
+ | **created_at** | **Time** | | |
10
+ | **last_used_at** | **Time** | | [optional] |
11
+ | **created_by** | [**MeApiKeyCreator**](MeApiKeyCreator.md) | | [optional] |
12
+
13
+ ## Example
14
+
15
+ ```ruby
16
+ require 'weft-sdk'
17
+
18
+ instance = Weft::MeApiKey.new(
19
+ id: null,
20
+ name: null,
21
+ created_at: null,
22
+ last_used_at: null,
23
+ created_by: null
24
+ )
25
+ ```
26
+
@@ -0,0 +1,22 @@
1
+ # Weft::MeApiKeyCreator
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **id** | **Integer** | | |
8
+ | **email** | **String** | | |
9
+ | **display_name** | **String** | | [optional] |
10
+
11
+ ## Example
12
+
13
+ ```ruby
14
+ require 'weft-sdk'
15
+
16
+ instance = Weft::MeApiKeyCreator.new(
17
+ id: null,
18
+ email: null,
19
+ display_name: null
20
+ )
21
+ ```
22
+
@@ -0,0 +1,24 @@
1
+ # Weft::ResourceEnrollmentRequest
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **kind** | **String** | Resource kind. Must be one of the supported kinds (currently &#x60;agent&#x60;); an unknown value is rejected with a 422. | |
8
+ | **name** | **String** | Human-readable name; the server derives the slug from it. | |
9
+ | **description** | **String** | | [optional] |
10
+ | **wallet_address** | **String** | Declared EVM wallet address for the ghost resource. Stored as a claim (unverified) until the resource is claimed. | [optional] |
11
+
12
+ ## Example
13
+
14
+ ```ruby
15
+ require 'weft-sdk'
16
+
17
+ instance = Weft::ResourceEnrollmentRequest.new(
18
+ kind: agent,
19
+ name: Self-Enrolled Bot,
20
+ description: null,
21
+ wallet_address: null
22
+ )
23
+ ```
24
+
@@ -0,0 +1,18 @@
1
+ # Weft::ResourceEnrollmentResponse
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **data** | [**EnrolledResource**](EnrolledResource.md) | | |
8
+
9
+ ## Example
10
+
11
+ ```ruby
12
+ require 'weft-sdk'
13
+
14
+ instance = Weft::ResourceEnrollmentResponse.new(
15
+ data: null
16
+ )
17
+ ```
18
+
@@ -0,0 +1,30 @@
1
+ # Weft::ResourceStats
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **total_paid** | **Integer** | Total atomic units paid out by this resource. | |
8
+ | **total_received** | **Integer** | Total atomic units received by this resource. | |
9
+ | **payments_made** | **Integer** | | |
10
+ | **payments_received** | **Integer** | | |
11
+ | **unique_counterparties** | **Integer** | | |
12
+ | **first_seen** | **Time** | | |
13
+ | **last_active** | **Time** | | |
14
+
15
+ ## Example
16
+
17
+ ```ruby
18
+ require 'weft-sdk'
19
+
20
+ instance = Weft::ResourceStats.new(
21
+ total_paid: null,
22
+ total_received: null,
23
+ payments_made: null,
24
+ payments_received: null,
25
+ unique_counterparties: null,
26
+ first_seen: null,
27
+ last_active: null
28
+ )
29
+ ```
30
+
@@ -0,0 +1,72 @@
1
+ # Weft::ResourcesApi
2
+
3
+ All URIs are relative to *https://weft.network*
4
+
5
+ | Method | HTTP request | Description |
6
+ | ------ | ------------ | ----------- |
7
+ | [**enroll_resource**](ResourcesApi.md#enroll_resource) | **POST** /api/v1/resources/enroll | Self-enroll a ghost resource (public, no auth) |
8
+
9
+
10
+ ## enroll_resource
11
+
12
+ > <ResourceEnrollmentResponse> enroll_resource(resource_enrollment_request)
13
+
14
+ Self-enroll a ghost resource (public, no auth)
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.
17
+
18
+ ### Examples
19
+
20
+ ```ruby
21
+ require 'time'
22
+ require 'weft-sdk'
23
+
24
+ api_instance = Weft::ResourcesApi.new
25
+ resource_enrollment_request = Weft::ResourceEnrollmentRequest.new({kind: 'agent', name: 'Self-Enrolled Bot'}) # ResourceEnrollmentRequest |
26
+
27
+ begin
28
+ # Self-enroll a ghost resource (public, no auth)
29
+ result = api_instance.enroll_resource(resource_enrollment_request)
30
+ p result
31
+ rescue Weft::ApiError => e
32
+ puts "Error when calling ResourcesApi->enroll_resource: #{e}"
33
+ end
34
+ ```
35
+
36
+ #### Using the enroll_resource_with_http_info variant
37
+
38
+ This returns an Array which contains the response data, status code and headers.
39
+
40
+ > <Array(<ResourceEnrollmentResponse>, Integer, Hash)> enroll_resource_with_http_info(resource_enrollment_request)
41
+
42
+ ```ruby
43
+ begin
44
+ # Self-enroll a ghost resource (public, no auth)
45
+ data, status_code, headers = api_instance.enroll_resource_with_http_info(resource_enrollment_request)
46
+ p status_code # => 2xx
47
+ p headers # => { ... }
48
+ p data # => <ResourceEnrollmentResponse>
49
+ rescue Weft::ApiError => e
50
+ puts "Error when calling ResourcesApi->enroll_resource_with_http_info: #{e}"
51
+ end
52
+ ```
53
+
54
+ ### Parameters
55
+
56
+ | Name | Type | Description | Notes |
57
+ | ---- | ---- | ----------- | ----- |
58
+ | **resource_enrollment_request** | [**ResourceEnrollmentRequest**](ResourceEnrollmentRequest.md) | | |
59
+
60
+ ### Return type
61
+
62
+ [**ResourceEnrollmentResponse**](ResourceEnrollmentResponse.md)
63
+
64
+ ### Authorization
65
+
66
+ No authorization required
67
+
68
+ ### HTTP request headers
69
+
70
+ - **Content-Type**: application/json
71
+ - **Accept**: application/json
72
+
@@ -7,7 +7,7 @@
7
7
  | **min_price_usd** | **String** | Decimal USD floor; agent must have at least one skill priced at or above this. | [optional] |
8
8
  | **max_price_usd** | **String** | Decimal USD ceiling; agent must have at least one skill priced at or below this. | [optional] |
9
9
  | **payment_protocol** | **String** | Payment protocol the agent settles on. | [optional] |
10
- | **agent_protocol** | **String** | Agent protocol surface (Agent-to-Agent, MCP, or raw OpenAPI). | [optional] |
10
+ | **agent_protocol** | **String** | Agent protocol surface (Agent-to-Agent, MCP, raw OpenAPI, or AgentNet). | [optional] |
11
11
  | **domain** | **String** | Substring match against any of the agent&#39;s declared domain tags (e.g. &#x60;email&#x60;, &#x60;sales&#x60;, &#x60;enrichment&#x60;). | [optional] |
12
12
 
13
13
  ## Example
@@ -4,7 +4,7 @@
4
4
 
5
5
  | Name | Type | Description | Notes |
6
6
  | ---- | ---- | ----------- | ----- |
7
- | **results** | [**Array&lt;SearchResult&gt;**](SearchResult.md) | | |
7
+ | **results** | [**Array&lt;SearchResponseResultsInner&gt;**](SearchResponseResultsInner.md) | | |
8
8
  | **paid_usd** | **String** | Always &#x60;null&#x60; in v1. | [optional] |
9
9
  | **tx_hash** | **String** | Always &#x60;null&#x60; in v1. | [optional] |
10
10
  | **artifact_id** | **String** | Always &#x60;null&#x60; in v1. | [optional] |
@@ -0,0 +1,36 @@
1
+ # Weft::SearchResponseResultsInner
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **id** | **String** | Stable agent identifier (e.g. &#x60;weft:agent:agentmail&#x60;). | |
8
+ | **score** | **Float** | Cosine similarity score, clipped to [0, 1]. | |
9
+ | **protocol** | **String** | Agent protocol surface. | |
10
+ | **domain** | **Array&lt;String&gt;** | Domain tags declared by the agent. | |
11
+ | **reseller** | **String** | Reseller slug if this agent is fronted by an aggregator (e.g. &#x60;locus&#x60;). | [optional] |
12
+ | **upstream** | **String** | Upstream provider hostname when fronted by a reseller. | [optional] |
13
+ | **agent_card** | [**SearchAgentCard**](SearchAgentCard.md) | | |
14
+ | **pricing** | [**SearchPricing**](SearchPricing.md) | | |
15
+ | **ranking** | [**SearchRanking**](SearchRanking.md) | | |
16
+ | **endpoints** | [**SearchEndpoints**](SearchEndpoints.md) | | |
17
+
18
+ ## Example
19
+
20
+ ```ruby
21
+ require 'weft-sdk'
22
+
23
+ instance = Weft::SearchResponseResultsInner.new(
24
+ id: null,
25
+ score: null,
26
+ protocol: null,
27
+ domain: null,
28
+ reseller: null,
29
+ upstream: null,
30
+ agent_card: null,
31
+ pricing: null,
32
+ ranking: null,
33
+ endpoints: null
34
+ )
35
+ ```
36
+
data/docs/Wallet.md CHANGED
@@ -5,7 +5,9 @@
5
5
  | Name | Type | Description | Notes |
6
6
  | ---- | ---- | ----------- | ----- |
7
7
  | **address** | **String** | EVM address of the buyer&#39;s Privy-managed wallet. Null if no wallet provisioned. | |
8
- | **balance_usdc** | **String** | Live USDC balance, 2dp. Returns \&quot;0.00\&quot; if the upstream wallet provider is unreachable. | |
8
+ | **balance_usdc** | **String** | Live Base USDC balance, 2dp. Returns \&quot;0.00\&quot; if the upstream wallet provider is unreachable. | |
9
+ | **tempo_usd** | **String** | Aggregated USD value of the allowlisted Tempo TIP-20 dollar tokens on the wallet&#39;s paired Tempo chain, 2dp. &#x60;null&#x60; when the value is UNKNOWN — the Tempo RPC read failed, or no dollar token is allowlisted for that chain yet (e.g. Tempo mainnet pre-launch). A null here is never \&quot;0.00\&quot;; it means \&quot;we couldn&#39;t determine it\&quot;, and &#x60;total_usd&#x60; then reflects the Base component only. | |
10
+ | **total_usd** | **String** | Single aggregated USD balance &#x3D; Base USDC + Tempo dollar tokens, 2dp. When &#x60;tempo_usd&#x60; is null (unavailable/unallowlisted) this equals &#x60;balance_usdc&#x60; alone. Null when the Base USDC provider is unreachable, because the surface never claims zero for a component it could not read. | |
9
11
  | **network** | **String** | Wallet network (e.g. &#x60;base-sepolia&#x60;). | |
10
12
 
11
13
  ## Example
@@ -16,6 +18,8 @@ require 'weft-sdk'
16
18
  instance = Weft::Wallet.new(
17
19
  address: null,
18
20
  balance_usdc: 12.34,
21
+ tempo_usd: 3.00,
22
+ total_usd: 15.34,
19
23
  network: null
20
24
  )
21
25
  ```
@@ -3,7 +3,7 @@
3
3
 
4
4
  #The Weft API is the buyer-runtime surface that powers the `weft` CLI, the hosted MCP server (`weft.network/mcp`), and any third-party agent that wants to discover and pay for paid resources on Weft. v1 covers five buyer concerns: 1. Account onboarding (`/api/v1/auth/*`, `/api/v1/me`) 2. CLI authentication (`/api/v1/api_keys`) 3. Wallet visibility (`/api/v1/balance`) 4. Discovery (`/api/v1/search`) 5. Paid execution (`/api/v1/fetch`) 6. Purchase history (`/api/v1/payments`) Seller-side concerns (agent management, payout analytics, webhook delivery, the public storefront for `data_api` resources) live in the dashboard and are intentionally not documented here. They will be split out into a separate, dashboard-scoped spec when they need to be SDK-consumable. All errors share the envelope defined by `ErrorResponse`, except the buyer-runtime endpoints (`/search`, `/fetch`) which use bespoke envelopes carrying additional context — see `SearchErrorResponse` and `FetchErrorResponse`.
5
5
 
6
- The version of the OpenAPI document: 0.6.2
6
+ The version of the OpenAPI document: 0.7.0
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.19.0
@@ -3,7 +3,7 @@
3
3
 
4
4
  #The Weft API is the buyer-runtime surface that powers the `weft` CLI, the hosted MCP server (`weft.network/mcp`), and any third-party agent that wants to discover and pay for paid resources on Weft. v1 covers five buyer concerns: 1. Account onboarding (`/api/v1/auth/*`, `/api/v1/me`) 2. CLI authentication (`/api/v1/api_keys`) 3. Wallet visibility (`/api/v1/balance`) 4. Discovery (`/api/v1/search`) 5. Paid execution (`/api/v1/fetch`) 6. Purchase history (`/api/v1/payments`) Seller-side concerns (agent management, payout analytics, webhook delivery, the public storefront for `data_api` resources) live in the dashboard and are intentionally not documented here. They will be split out into a separate, dashboard-scoped spec when they need to be SDK-consumable. All errors share the envelope defined by `ErrorResponse`, except the buyer-runtime endpoints (`/search`, `/fetch`) which use bespoke envelopes carrying additional context — see `SearchErrorResponse` and `FetchErrorResponse`.
5
5
 
6
- The version of the OpenAPI document: 0.6.2
6
+ The version of the OpenAPI document: 0.7.0
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.19.0
@@ -3,7 +3,7 @@
3
3
 
4
4
  #The Weft API is the buyer-runtime surface that powers the `weft` CLI, the hosted MCP server (`weft.network/mcp`), and any third-party agent that wants to discover and pay for paid resources on Weft. v1 covers five buyer concerns: 1. Account onboarding (`/api/v1/auth/*`, `/api/v1/me`) 2. CLI authentication (`/api/v1/api_keys`) 3. Wallet visibility (`/api/v1/balance`) 4. Discovery (`/api/v1/search`) 5. Paid execution (`/api/v1/fetch`) 6. Purchase history (`/api/v1/payments`) Seller-side concerns (agent management, payout analytics, webhook delivery, the public storefront for `data_api` resources) live in the dashboard and are intentionally not documented here. They will be split out into a separate, dashboard-scoped spec when they need to be SDK-consumable. All errors share the envelope defined by `ErrorResponse`, except the buyer-runtime endpoints (`/search`, `/fetch`) which use bespoke envelopes carrying additional context — see `SearchErrorResponse` and `FetchErrorResponse`.
5
5
 
6
- The version of the OpenAPI document: 0.6.2
6
+ The version of the OpenAPI document: 0.7.0
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.19.0
@@ -3,7 +3,7 @@
3
3
 
4
4
  #The Weft API is the buyer-runtime surface that powers the `weft` CLI, the hosted MCP server (`weft.network/mcp`), and any third-party agent that wants to discover and pay for paid resources on Weft. v1 covers five buyer concerns: 1. Account onboarding (`/api/v1/auth/*`, `/api/v1/me`) 2. CLI authentication (`/api/v1/api_keys`) 3. Wallet visibility (`/api/v1/balance`) 4. Discovery (`/api/v1/search`) 5. Paid execution (`/api/v1/fetch`) 6. Purchase history (`/api/v1/payments`) Seller-side concerns (agent management, payout analytics, webhook delivery, the public storefront for `data_api` resources) live in the dashboard and are intentionally not documented here. They will be split out into a separate, dashboard-scoped spec when they need to be SDK-consumable. All errors share the envelope defined by `ErrorResponse`, except the buyer-runtime endpoints (`/search`, `/fetch`) which use bespoke envelopes carrying additional context — see `SearchErrorResponse` and `FetchErrorResponse`.
5
5
 
6
- The version of the OpenAPI document: 0.6.2
6
+ The version of the OpenAPI document: 0.7.0
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.19.0
@@ -3,7 +3,7 @@
3
3
 
4
4
  #The Weft API is the buyer-runtime surface that powers the `weft` CLI, the hosted MCP server (`weft.network/mcp`), and any third-party agent that wants to discover and pay for paid resources on Weft. v1 covers five buyer concerns: 1. Account onboarding (`/api/v1/auth/*`, `/api/v1/me`) 2. CLI authentication (`/api/v1/api_keys`) 3. Wallet visibility (`/api/v1/balance`) 4. Discovery (`/api/v1/search`) 5. Paid execution (`/api/v1/fetch`) 6. Purchase history (`/api/v1/payments`) Seller-side concerns (agent management, payout analytics, webhook delivery, the public storefront for `data_api` resources) live in the dashboard and are intentionally not documented here. They will be split out into a separate, dashboard-scoped spec when they need to be SDK-consumable. All errors share the envelope defined by `ErrorResponse`, except the buyer-runtime endpoints (`/search`, `/fetch`) which use bespoke envelopes carrying additional context — see `SearchErrorResponse` and `FetchErrorResponse`.
5
5
 
6
- The version of the OpenAPI document: 0.6.2
6
+ The version of the OpenAPI document: 0.7.0
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.19.0
@@ -3,7 +3,7 @@
3
3
 
4
4
  #The Weft API is the buyer-runtime surface that powers the `weft` CLI, the hosted MCP server (`weft.network/mcp`), and any third-party agent that wants to discover and pay for paid resources on Weft. v1 covers five buyer concerns: 1. Account onboarding (`/api/v1/auth/*`, `/api/v1/me`) 2. CLI authentication (`/api/v1/api_keys`) 3. Wallet visibility (`/api/v1/balance`) 4. Discovery (`/api/v1/search`) 5. Paid execution (`/api/v1/fetch`) 6. Purchase history (`/api/v1/payments`) Seller-side concerns (agent management, payout analytics, webhook delivery, the public storefront for `data_api` resources) live in the dashboard and are intentionally not documented here. They will be split out into a separate, dashboard-scoped spec when they need to be SDK-consumable. All errors share the envelope defined by `ErrorResponse`, except the buyer-runtime endpoints (`/search`, `/fetch`) which use bespoke envelopes carrying additional context — see `SearchErrorResponse` and `FetchErrorResponse`.
5
5
 
6
- The version of the OpenAPI document: 0.6.2
6
+ The version of the OpenAPI document: 0.7.0
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.19.0
@@ -3,7 +3,7 @@
3
3
 
4
4
  #The Weft API is the buyer-runtime surface that powers the `weft` CLI, the hosted MCP server (`weft.network/mcp`), and any third-party agent that wants to discover and pay for paid resources on Weft. v1 covers five buyer concerns: 1. Account onboarding (`/api/v1/auth/*`, `/api/v1/me`) 2. CLI authentication (`/api/v1/api_keys`) 3. Wallet visibility (`/api/v1/balance`) 4. Discovery (`/api/v1/search`) 5. Paid execution (`/api/v1/fetch`) 6. Purchase history (`/api/v1/payments`) Seller-side concerns (agent management, payout analytics, webhook delivery, the public storefront for `data_api` resources) live in the dashboard and are intentionally not documented here. They will be split out into a separate, dashboard-scoped spec when they need to be SDK-consumable. All errors share the envelope defined by `ErrorResponse`, except the buyer-runtime endpoints (`/search`, `/fetch`) which use bespoke envelopes carrying additional context — see `SearchErrorResponse` and `FetchErrorResponse`.
5
5
 
6
- The version of the OpenAPI document: 0.6.2
6
+ The version of the OpenAPI document: 0.7.0
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.19.0
@@ -0,0 +1,90 @@
1
+ =begin
2
+ #Weft API
3
+
4
+ #The Weft API is the buyer-runtime surface that powers the `weft` CLI, the hosted MCP server (`weft.network/mcp`), and any third-party agent that wants to discover and pay for paid resources on Weft. v1 covers five buyer concerns: 1. Account onboarding (`/api/v1/auth/*`, `/api/v1/me`) 2. CLI authentication (`/api/v1/api_keys`) 3. Wallet visibility (`/api/v1/balance`) 4. Discovery (`/api/v1/search`) 5. Paid execution (`/api/v1/fetch`) 6. Purchase history (`/api/v1/payments`) Seller-side concerns (agent management, payout analytics, webhook delivery, the public storefront for `data_api` resources) live in the dashboard and are intentionally not documented here. They will be split out into a separate, dashboard-scoped spec when they need to be SDK-consumable. All errors share the envelope defined by `ErrorResponse`, except the buyer-runtime endpoints (`/search`, `/fetch`) which use bespoke envelopes carrying additional context — see `SearchErrorResponse` and `FetchErrorResponse`.
5
+
6
+ The version of the OpenAPI document: 0.7.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.19.0
10
+
11
+ =end
12
+
13
+ require 'cgi'
14
+
15
+ module Weft
16
+ class ResourcesApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Self-enroll a ghost resource (public, no auth)
23
+ # 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.
24
+ # @param resource_enrollment_request [ResourceEnrollmentRequest]
25
+ # @param [Hash] opts the optional parameters
26
+ # @return [ResourceEnrollmentResponse]
27
+ def enroll_resource(resource_enrollment_request, opts = {})
28
+ data, _status_code, _headers = enroll_resource_with_http_info(resource_enrollment_request, opts)
29
+ data
30
+ end
31
+
32
+ # Self-enroll a ghost resource (public, no auth)
33
+ # Lets an unauthenticated agent (or its operator) self-enroll a Resource as a \&quot;ghost\&quot; (no owning provider). The server generates the &#x60;slug&#x60; and a single-use &#x60;claim_token&#x60;; the response also carries a &#x60;claim_url&#x60; the agent hands to its human controller to claim the resource from the dashboard. Client-supplied &#x60;slug&#x60; and &#x60;category&#x60; are silently ignored: slugs are server-generated from &#x60;name&#x60; (so callers cannot squat on reserved names), and &#x60;category&#x60; is a post-claim concern set by a real human. Rate-limited to 10 enrollments/hour/IP.
34
+ # @param resource_enrollment_request [ResourceEnrollmentRequest]
35
+ # @param [Hash] opts the optional parameters
36
+ # @return [Array<(ResourceEnrollmentResponse, Integer, Hash)>] ResourceEnrollmentResponse data, response status code and response headers
37
+ def enroll_resource_with_http_info(resource_enrollment_request, opts = {})
38
+ if @api_client.config.debugging
39
+ @api_client.config.logger.debug 'Calling API: ResourcesApi.enroll_resource ...'
40
+ end
41
+ # verify the required parameter 'resource_enrollment_request' is set
42
+ if @api_client.config.client_side_validation && resource_enrollment_request.nil?
43
+ fail ArgumentError, "Missing the required parameter 'resource_enrollment_request' when calling ResourcesApi.enroll_resource"
44
+ end
45
+ # resource path
46
+ local_var_path = '/api/v1/resources/enroll'
47
+
48
+ # query parameters
49
+ query_params = opts[:query_params] || {}
50
+
51
+ # header parameters
52
+ header_params = opts[:header_params] || {}
53
+ # HTTP header 'Accept' (if needed)
54
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
55
+ # HTTP header 'Content-Type'
56
+ content_type = @api_client.select_header_content_type(['application/json'])
57
+ if !content_type.nil?
58
+ header_params['Content-Type'] = content_type
59
+ end
60
+
61
+ # form parameters
62
+ form_params = opts[:form_params] || {}
63
+
64
+ # http body (model)
65
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(resource_enrollment_request)
66
+
67
+ # return_type
68
+ return_type = opts[:debug_return_type] || 'ResourceEnrollmentResponse'
69
+
70
+ # auth_names
71
+ auth_names = opts[:debug_auth_names] || []
72
+
73
+ new_options = opts.merge(
74
+ :operation => :"ResourcesApi.enroll_resource",
75
+ :header_params => header_params,
76
+ :query_params => query_params,
77
+ :form_params => form_params,
78
+ :body => post_body,
79
+ :auth_names => auth_names,
80
+ :return_type => return_type
81
+ )
82
+
83
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
84
+ if @api_client.config.debugging
85
+ @api_client.config.logger.debug "API called: ResourcesApi#enroll_resource\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
86
+ end
87
+ return data, status_code, headers
88
+ end
89
+ end
90
+ end
@@ -3,7 +3,7 @@
3
3
 
4
4
  #The Weft API is the buyer-runtime surface that powers the `weft` CLI, the hosted MCP server (`weft.network/mcp`), and any third-party agent that wants to discover and pay for paid resources on Weft. v1 covers five buyer concerns: 1. Account onboarding (`/api/v1/auth/*`, `/api/v1/me`) 2. CLI authentication (`/api/v1/api_keys`) 3. Wallet visibility (`/api/v1/balance`) 4. Discovery (`/api/v1/search`) 5. Paid execution (`/api/v1/fetch`) 6. Purchase history (`/api/v1/payments`) Seller-side concerns (agent management, payout analytics, webhook delivery, the public storefront for `data_api` resources) live in the dashboard and are intentionally not documented here. They will be split out into a separate, dashboard-scoped spec when they need to be SDK-consumable. All errors share the envelope defined by `ErrorResponse`, except the buyer-runtime endpoints (`/search`, `/fetch`) which use bespoke envelopes carrying additional context — see `SearchErrorResponse` and `FetchErrorResponse`.
5
5
 
6
- The version of the OpenAPI document: 0.6.2
6
+ The version of the OpenAPI document: 0.7.0
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.19.0