turbopuffer 1.16.0 → 1.17.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 49996bb69761463127455f5c055e194300f90c3019a799a22caba584aea8d782
4
- data.tar.gz: 4de6f2a10ec1a14391748137eb96f93a6e3251f5a567dcb60afb0d914c47dcbe
3
+ metadata.gz: 51ed4f8a26c5c46912e76a0eccd23b4a397408567b0911ee847afabcf41d3a76
4
+ data.tar.gz: cd812fc750088020a732b173c5f0d1744e24a54df391125446601feea7c1248f
5
5
  SHA512:
6
- metadata.gz: 476911f60864a91b8f621a8a0d46a1ca0aa3bd1613bf238c9e4e1609444849874e1b3a2826969f96ff6b24637f476ccae5ea07ad9a705bea50bc9957b79926d2
7
- data.tar.gz: e8ce0b91324f880dac5070f46cda019dabe5eed989a2ce0337078cdf64544e7609442ae5e6554390057377226edd3e6fbd5237f05ef44769b6008d6981a49c66
6
+ metadata.gz: efdbdd5d2cf339959d586d87557784371caea3e63df37ff4528cd97ffd9771f357af788a5a2bf895af88ec80fbef96233cef5b67d53d1f50bdec8064842997bc
7
+ data.tar.gz: b61e2a2038949c21f21ef7dbbb637b17d685938a1c6d9ef6ad2d2c3ba4ba237d9862d9a3afedf73af73f23dd8bc642202e67478c7cb31921b3611dd7bc94f4c6
data/CHANGELOG.md CHANGED
@@ -1,5 +1,24 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.17.0 (2026-03-18)
4
+
5
+ Full Changelog: [v1.16.0...v1.17.0](https://github.com/turbopuffer/turbopuffer-ruby/compare/v1.16.0...v1.17.0)
6
+
7
+ ### Features
8
+
9
+ * Response performance object ([c3ca5e3](https://github.com/turbopuffer/turbopuffer-ruby/commit/c3ca5e32f6cc4cfcdc29bc30e8cd11cd6e5550ef))
10
+ * tpuf: add branching to openapi spec ([7abdd2f](https://github.com/turbopuffer/turbopuffer-ruby/commit/7abdd2fb4f0fc1d2776dae20510b969e6c144b8b))
11
+
12
+
13
+ ### Bug Fixes
14
+
15
+ * **client:** use higher retry delay precision ([bf9becb](https://github.com/turbopuffer/turbopuffer-ruby/commit/bf9becb1a4c0ef1d654e403b75032657a4dbde49))
16
+
17
+
18
+ ### Chores
19
+
20
+ * **internal:** tweak CI branches ([f11cac6](https://github.com/turbopuffer/turbopuffer-ruby/commit/f11cac6b51f4c31c1c013537032ac67711c5e39d))
21
+
3
22
  ## 1.16.0 (2026-03-15)
4
23
 
5
24
  Full Changelog: [v1.15.0...v1.16.0](https://github.com/turbopuffer/turbopuffer-ruby/compare/v1.15.0...v1.16.0)
data/README.md CHANGED
@@ -26,7 +26,7 @@ To use this gem, install via Bundler by adding the following to your application
26
26
  <!-- x-release-please-start-version -->
27
27
 
28
28
  ```ruby
29
- gem "turbopuffer", "~> 1.16.0"
29
+ gem "turbopuffer", "~> 1.17.0"
30
30
  ```
31
31
 
32
32
  <!-- x-release-please-end -->
@@ -10,7 +10,7 @@ module Turbopuffer
10
10
 
11
11
  # Default initial retry delay in seconds.
12
12
  # Overall delay is calculated using exponential backoff + jitter.
13
- DEFAULT_INITIAL_RETRY_DELAY = 0.3
13
+ DEFAULT_INITIAL_RETRY_DELAY = 0.25
14
14
 
15
15
  # Default max retry delay in seconds.
16
16
  DEFAULT_MAX_RETRY_DELAY = 8.0
@@ -12,6 +12,12 @@ module Turbopuffer
12
12
  # @return [String, nil]
13
13
  optional :namespace, String
14
14
 
15
+ # @!attribute branch_from_namespace
16
+ # The namespace to create an instant, copy-on-write clone of.
17
+ #
18
+ # @return [String, nil]
19
+ optional :branch_from_namespace, String
20
+
15
21
  # @!attribute copy_from_namespace
16
22
  # The namespace to copy documents from.
17
23
  #
@@ -124,12 +130,14 @@ module Turbopuffer
124
130
  # @return [Array<Turbopuffer::Models::Row>, nil]
125
131
  optional :upsert_rows, -> { Turbopuffer::Internal::Type::ArrayOf[Turbopuffer::Row] }
126
132
 
127
- # @!method initialize(namespace: nil, copy_from_namespace: nil, delete_by_filter: nil, delete_by_filter_allow_partial: nil, delete_condition: nil, deletes: nil, disable_backpressure: nil, distance_metric: nil, encryption: nil, patch_by_filter: nil, patch_by_filter_allow_partial: nil, patch_columns: nil, patch_condition: nil, patch_rows: nil, return_affected_ids: nil, schema: nil, upsert_columns: nil, upsert_condition: nil, upsert_rows: nil, request_options: {})
133
+ # @!method initialize(namespace: nil, branch_from_namespace: nil, copy_from_namespace: nil, delete_by_filter: nil, delete_by_filter_allow_partial: nil, delete_condition: nil, deletes: nil, disable_backpressure: nil, distance_metric: nil, encryption: nil, patch_by_filter: nil, patch_by_filter_allow_partial: nil, patch_columns: nil, patch_condition: nil, patch_rows: nil, return_affected_ids: nil, schema: nil, upsert_columns: nil, upsert_condition: nil, upsert_rows: nil, request_options: {})
128
134
  # Some parameter documentations has been truncated, see
129
135
  # {Turbopuffer::Models::NamespaceWriteParams} for more details.
130
136
  #
131
137
  # @param namespace [String]
132
138
  #
139
+ # @param branch_from_namespace [String] The namespace to create an instant, copy-on-write clone of.
140
+ #
133
141
  # @param copy_from_namespace [String, Turbopuffer::Models::NamespaceWriteParams::CopyFromNamespace::CopyFromNamespaceConfig] The namespace to copy documents from.
134
142
  #
135
143
  # @param delete_by_filter [Object] The filter specifying which documents to delete.
@@ -42,6 +42,12 @@ module Turbopuffer
42
42
  # @return [Array<String, Integer>, nil]
43
43
  optional :patched_ids, -> { Turbopuffer::Internal::Type::ArrayOf[union: Turbopuffer::ID] }
44
44
 
45
+ # @!attribute performance
46
+ # The performance information for a write request.
47
+ #
48
+ # @return [Turbopuffer::Models::WritePerformance, nil]
49
+ optional :performance, -> { Turbopuffer::WritePerformance }
50
+
45
51
  # @!attribute rows_deleted
46
52
  # The number of rows deleted by the write request.
47
53
  #
@@ -73,7 +79,7 @@ module Turbopuffer
73
79
  # @return [Array<String, Integer>, nil]
74
80
  optional :upserted_ids, -> { Turbopuffer::Internal::Type::ArrayOf[union: Turbopuffer::ID] }
75
81
 
76
- # @!method initialize(billing:, message:, rows_affected:, deleted_ids: nil, patched_ids: nil, rows_deleted: nil, rows_patched: nil, rows_remaining: nil, rows_upserted: nil, upserted_ids: nil, status: :OK)
82
+ # @!method initialize(billing:, message:, rows_affected:, deleted_ids: nil, patched_ids: nil, performance: nil, rows_deleted: nil, rows_patched: nil, rows_remaining: nil, rows_upserted: nil, upserted_ids: nil, status: :OK)
77
83
  # Some parameter documentations has been truncated, see
78
84
  # {Turbopuffer::Models::NamespaceWriteResponse} for more details.
79
85
  #
@@ -89,6 +95,8 @@ module Turbopuffer
89
95
  #
90
96
  # @param patched_ids [Array<String, Integer>] The IDs of documents that were patched. Only included when `return_affected_ids`
91
97
  #
98
+ # @param performance [Turbopuffer::Models::WritePerformance] The performance information for a write request.
99
+ #
92
100
  # @param rows_deleted [Integer] The number of rows deleted by the write request.
93
101
  #
94
102
  # @param rows_patched [Integer] The number of rows patched by the write request.
@@ -0,0 +1,18 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Turbopuffer
4
+ module Models
5
+ class WritePerformance < Turbopuffer::Internal::Type::BaseModel
6
+ # @!attribute server_total_ms
7
+ # Request time measured on the server, in milliseconds.
8
+ #
9
+ # @return [Integer]
10
+ required :server_total_ms, Integer
11
+
12
+ # @!method initialize(server_total_ms:)
13
+ # The performance information for a write request.
14
+ #
15
+ # @param server_total_ms [Integer] Request time measured on the server, in milliseconds.
16
+ end
17
+ end
18
+ end
@@ -115,4 +115,6 @@ module Turbopuffer
115
115
  VectorEncoding = Turbopuffer::Models::VectorEncoding
116
116
 
117
117
  WriteBilling = Turbopuffer::Models::WriteBilling
118
+
119
+ WritePerformance = Turbopuffer::Models::WritePerformance
118
120
  end
@@ -307,10 +307,12 @@ module Turbopuffer
307
307
  #
308
308
  # Create, update, or delete documents.
309
309
  #
310
- # @overload write(namespace: nil, copy_from_namespace: nil, delete_by_filter: nil, delete_by_filter_allow_partial: nil, delete_condition: nil, deletes: nil, disable_backpressure: nil, distance_metric: nil, encryption: nil, patch_by_filter: nil, patch_by_filter_allow_partial: nil, patch_columns: nil, patch_condition: nil, patch_rows: nil, return_affected_ids: nil, schema: nil, upsert_columns: nil, upsert_condition: nil, upsert_rows: nil, request_options: {})
310
+ # @overload write(namespace: nil, branch_from_namespace: nil, copy_from_namespace: nil, delete_by_filter: nil, delete_by_filter_allow_partial: nil, delete_condition: nil, deletes: nil, disable_backpressure: nil, distance_metric: nil, encryption: nil, patch_by_filter: nil, patch_by_filter_allow_partial: nil, patch_columns: nil, patch_condition: nil, patch_rows: nil, return_affected_ids: nil, schema: nil, upsert_columns: nil, upsert_condition: nil, upsert_rows: nil, request_options: {})
311
311
  #
312
312
  # @param namespace [String] Path param: The name of the namespace.
313
313
  #
314
+ # @param branch_from_namespace [String] Body param: The namespace to create an instant, copy-on-write clone of.
315
+ #
314
316
  # @param copy_from_namespace [String, Turbopuffer::Models::NamespaceWriteParams::CopyFromNamespace::CopyFromNamespaceConfig] Body param: The namespace to copy documents from.
315
317
  #
316
318
  # @param delete_by_filter [Object] Body param: The filter specifying which documents to delete.
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Turbopuffer
4
- VERSION = "1.16.0"
4
+ VERSION = "1.17.0"
5
5
  end
data/lib/turbopuffer.rb CHANGED
@@ -100,6 +100,7 @@ require_relative "turbopuffer/models/tokenizer"
100
100
  require_relative "turbopuffer/models/vector"
101
101
  require_relative "turbopuffer/models/vector_encoding"
102
102
  require_relative "turbopuffer/models/write_billing"
103
+ require_relative "turbopuffer/models/write_performance"
103
104
  require_relative "turbopuffer/models"
104
105
  require_relative "turbopuffer/resources/namespaces"
105
106
  require_relative "turbopuffer/namespace"
@@ -6,7 +6,7 @@ module Turbopuffer
6
6
 
7
7
  DEFAULT_TIMEOUT_IN_SECONDS = T.let(60.0, Float)
8
8
 
9
- DEFAULT_INITIAL_RETRY_DELAY = T.let(0.3, Float)
9
+ DEFAULT_INITIAL_RETRY_DELAY = T.let(0.25, Float)
10
10
 
11
11
  DEFAULT_MAX_RETRY_DELAY = T.let(8.0, Float)
12
12
 
@@ -20,6 +20,13 @@ module Turbopuffer
20
20
  sig { params(namespace: String).void }
21
21
  attr_writer :namespace
22
22
 
23
+ # The namespace to create an instant, copy-on-write clone of.
24
+ sig { returns(T.nilable(String)) }
25
+ attr_reader :branch_from_namespace
26
+
27
+ sig { params(branch_from_namespace: String).void }
28
+ attr_writer :branch_from_namespace
29
+
23
30
  # The namespace to copy documents from.
24
31
  sig do
25
32
  returns(
@@ -197,6 +204,7 @@ module Turbopuffer
197
204
  sig do
198
205
  params(
199
206
  namespace: String,
207
+ branch_from_namespace: String,
200
208
  copy_from_namespace:
201
209
  T.any(
202
210
  String,
@@ -229,6 +237,8 @@ module Turbopuffer
229
237
  end
230
238
  def self.new(
231
239
  namespace: nil,
240
+ # The namespace to create an instant, copy-on-write clone of.
241
+ branch_from_namespace: nil,
232
242
  # The namespace to copy documents from.
233
243
  copy_from_namespace: nil,
234
244
  # The filter specifying which documents to delete.
@@ -277,6 +287,7 @@ module Turbopuffer
277
287
  override.returns(
278
288
  {
279
289
  namespace: String,
290
+ branch_from_namespace: String,
280
291
  copy_from_namespace:
281
292
  T.any(
282
293
  String,
@@ -46,6 +46,13 @@ module Turbopuffer
46
46
  sig { params(patched_ids: T::Array[Turbopuffer::ID::Variants]).void }
47
47
  attr_writer :patched_ids
48
48
 
49
+ # The performance information for a write request.
50
+ sig { returns(T.nilable(Turbopuffer::WritePerformance)) }
51
+ attr_reader :performance
52
+
53
+ sig { params(performance: Turbopuffer::WritePerformance::OrHash).void }
54
+ attr_writer :performance
55
+
49
56
  # The number of rows deleted by the write request.
50
57
  sig { returns(T.nilable(Integer)) }
51
58
  attr_reader :rows_deleted
@@ -90,6 +97,7 @@ module Turbopuffer
90
97
  rows_affected: Integer,
91
98
  deleted_ids: T::Array[Turbopuffer::ID::Variants],
92
99
  patched_ids: T::Array[Turbopuffer::ID::Variants],
100
+ performance: Turbopuffer::WritePerformance::OrHash,
93
101
  rows_deleted: Integer,
94
102
  rows_patched: Integer,
95
103
  rows_remaining: T::Boolean,
@@ -111,6 +119,8 @@ module Turbopuffer
111
119
  # The IDs of documents that were patched. Only included when `return_affected_ids`
112
120
  # is true and at least one document was patched.
113
121
  patched_ids: nil,
122
+ # The performance information for a write request.
123
+ performance: nil,
114
124
  # The number of rows deleted by the write request.
115
125
  rows_deleted: nil,
116
126
  # The number of rows patched by the write request.
@@ -136,6 +146,7 @@ module Turbopuffer
136
146
  status: Symbol,
137
147
  deleted_ids: T::Array[Turbopuffer::ID::Variants],
138
148
  patched_ids: T::Array[Turbopuffer::ID::Variants],
149
+ performance: Turbopuffer::WritePerformance,
139
150
  rows_deleted: Integer,
140
151
  rows_patched: Integer,
141
152
  rows_remaining: T::Boolean,
@@ -0,0 +1,28 @@
1
+ # typed: strong
2
+
3
+ module Turbopuffer
4
+ module Models
5
+ class WritePerformance < Turbopuffer::Internal::Type::BaseModel
6
+ OrHash =
7
+ T.type_alias do
8
+ T.any(Turbopuffer::WritePerformance, Turbopuffer::Internal::AnyHash)
9
+ end
10
+
11
+ # Request time measured on the server, in milliseconds.
12
+ sig { returns(Integer) }
13
+ attr_accessor :server_total_ms
14
+
15
+ # The performance information for a write request.
16
+ sig { params(server_total_ms: Integer).returns(T.attached_class) }
17
+ def self.new(
18
+ # Request time measured on the server, in milliseconds.
19
+ server_total_ms:
20
+ )
21
+ end
22
+
23
+ sig { override.returns({ server_total_ms: Integer }) }
24
+ def to_hash
25
+ end
26
+ end
27
+ end
28
+ end
@@ -83,4 +83,6 @@ module Turbopuffer
83
83
  VectorEncoding = Turbopuffer::Models::VectorEncoding
84
84
 
85
85
  WriteBilling = Turbopuffer::Models::WriteBilling
86
+
87
+ WritePerformance = Turbopuffer::Models::WritePerformance
86
88
  end
@@ -238,6 +238,7 @@ module Turbopuffer
238
238
  sig do
239
239
  params(
240
240
  namespace: String,
241
+ branch_from_namespace: String,
241
242
  copy_from_namespace:
242
243
  T.any(
243
244
  String,
@@ -271,6 +272,8 @@ module Turbopuffer
271
272
  def write(
272
273
  # Path param: The name of the namespace.
273
274
  namespace: nil,
275
+ # Body param: The namespace to create an instant, copy-on-write clone of.
276
+ branch_from_namespace: nil,
274
277
  # Body param: The namespace to copy documents from.
275
278
  copy_from_namespace: nil,
276
279
  # Body param: The filter specifying which documents to delete.
@@ -3,6 +3,7 @@ module Turbopuffer
3
3
  type namespace_write_params =
4
4
  {
5
5
  namespace: String,
6
+ branch_from_namespace: String,
6
7
  copy_from_namespace: Turbopuffer::Models::NamespaceWriteParams::copy_from_namespace,
7
8
  delete_by_filter: top,
8
9
  delete_by_filter_allow_partial: bool,
@@ -32,6 +33,10 @@ module Turbopuffer
32
33
 
33
34
  def namespace=: (String) -> String
34
35
 
36
+ attr_reader branch_from_namespace: String?
37
+
38
+ def branch_from_namespace=: (String) -> String
39
+
35
40
  attr_reader copy_from_namespace: Turbopuffer::Models::NamespaceWriteParams::copy_from_namespace?
36
41
 
37
42
  def copy_from_namespace=: (
@@ -118,6 +123,7 @@ module Turbopuffer
118
123
 
119
124
  def initialize: (
120
125
  ?namespace: String,
126
+ ?branch_from_namespace: String,
121
127
  ?copy_from_namespace: Turbopuffer::Models::NamespaceWriteParams::copy_from_namespace,
122
128
  ?delete_by_filter: top,
123
129
  ?delete_by_filter_allow_partial: bool,
@@ -141,6 +147,7 @@ module Turbopuffer
141
147
 
142
148
  def to_hash: -> {
143
149
  namespace: String,
150
+ branch_from_namespace: String,
144
151
  copy_from_namespace: Turbopuffer::Models::NamespaceWriteParams::copy_from_namespace,
145
152
  delete_by_filter: top,
146
153
  delete_by_filter_allow_partial: bool,
@@ -8,6 +8,7 @@ module Turbopuffer
8
8
  status: :OK,
9
9
  deleted_ids: ::Array[Turbopuffer::Models::id],
10
10
  patched_ids: ::Array[Turbopuffer::Models::id],
11
+ performance: Turbopuffer::WritePerformance,
11
12
  rows_deleted: Integer,
12
13
  rows_patched: Integer,
13
14
  rows_remaining: bool,
@@ -36,6 +37,12 @@ module Turbopuffer
36
37
  ::Array[Turbopuffer::Models::id]
37
38
  ) -> ::Array[Turbopuffer::Models::id]
38
39
 
40
+ attr_reader performance: Turbopuffer::WritePerformance?
41
+
42
+ def performance=: (
43
+ Turbopuffer::WritePerformance
44
+ ) -> Turbopuffer::WritePerformance
45
+
39
46
  attr_reader rows_deleted: Integer?
40
47
 
41
48
  def rows_deleted=: (Integer) -> Integer
@@ -64,6 +71,7 @@ module Turbopuffer
64
71
  rows_affected: Integer,
65
72
  ?deleted_ids: ::Array[Turbopuffer::Models::id],
66
73
  ?patched_ids: ::Array[Turbopuffer::Models::id],
74
+ ?performance: Turbopuffer::WritePerformance,
67
75
  ?rows_deleted: Integer,
68
76
  ?rows_patched: Integer,
69
77
  ?rows_remaining: bool,
@@ -79,6 +87,7 @@ module Turbopuffer
79
87
  status: :OK,
80
88
  deleted_ids: ::Array[Turbopuffer::Models::id],
81
89
  patched_ids: ::Array[Turbopuffer::Models::id],
90
+ performance: Turbopuffer::WritePerformance,
82
91
  rows_deleted: Integer,
83
92
  rows_patched: Integer,
84
93
  rows_remaining: bool,
@@ -0,0 +1,13 @@
1
+ module Turbopuffer
2
+ module Models
3
+ type write_performance = { server_total_ms: Integer }
4
+
5
+ class WritePerformance < Turbopuffer::Internal::Type::BaseModel
6
+ attr_accessor server_total_ms: Integer
7
+
8
+ def initialize: (server_total_ms: Integer) -> void
9
+
10
+ def to_hash: -> { server_total_ms: Integer }
11
+ end
12
+ end
13
+ end
@@ -74,4 +74,6 @@ module Turbopuffer
74
74
  module VectorEncoding = Turbopuffer::Models::VectorEncoding
75
75
 
76
76
  class WriteBilling = Turbopuffer::Models::WriteBilling
77
+
78
+ class WritePerformance = Turbopuffer::Models::WritePerformance
77
79
  end
@@ -78,6 +78,7 @@ module Turbopuffer
78
78
 
79
79
  def write: (
80
80
  ?namespace: String,
81
+ ?branch_from_namespace: String,
81
82
  ?copy_from_namespace: Turbopuffer::Models::NamespaceWriteParams::copy_from_namespace,
82
83
  ?delete_by_filter: top,
83
84
  ?delete_by_filter_allow_partial: bool,
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: turbopuffer
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.16.0
4
+ version: 1.17.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Turbopuffer
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-03-16 00:00:00.000000000 Z
11
+ date: 2026-03-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: cgi
@@ -117,6 +117,7 @@ files:
117
117
  - lib/turbopuffer/models/vector.rb
118
118
  - lib/turbopuffer/models/vector_encoding.rb
119
119
  - lib/turbopuffer/models/write_billing.rb
120
+ - lib/turbopuffer/models/write_performance.rb
120
121
  - lib/turbopuffer/namespace.rb
121
122
  - lib/turbopuffer/request_options.rb
122
123
  - lib/turbopuffer/resources/namespaces.rb
@@ -189,6 +190,7 @@ files:
189
190
  - rbi/turbopuffer/models/vector.rbi
190
191
  - rbi/turbopuffer/models/vector_encoding.rbi
191
192
  - rbi/turbopuffer/models/write_billing.rbi
193
+ - rbi/turbopuffer/models/write_performance.rbi
192
194
  - rbi/turbopuffer/namespace.rbi
193
195
  - rbi/turbopuffer/request_options.rbi
194
196
  - rbi/turbopuffer/resources/namespaces.rbi
@@ -260,6 +262,7 @@ files:
260
262
  - sig/turbopuffer/models/vector.rbs
261
263
  - sig/turbopuffer/models/vector_encoding.rbs
262
264
  - sig/turbopuffer/models/write_billing.rbs
265
+ - sig/turbopuffer/models/write_performance.rbs
263
266
  - sig/turbopuffer/namespace.rbs
264
267
  - sig/turbopuffer/request_options.rbs
265
268
  - sig/turbopuffer/resources/namespaces.rbs