knoxcall 1.0.0 → 1.1.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: 78a17cfe7bcdbb2f1a56bc7f115d6f75cd4e9d56cde413e27808c9d9bb948fd0
4
- data.tar.gz: 06ed43b2bd4f26379b89c0aea34c6d057f39a5cc7e5c52b4d9b57deccbb14121
3
+ metadata.gz: 49f6a41e489aed8ee46bf9c79d3de82b051976ff5ab93498226c5b43910fbf69
4
+ data.tar.gz: 588c26bb6360646157c8bf3cc9faca0f6411c49a43f71f76cca53264d800b73f
5
5
  SHA512:
6
- metadata.gz: 5e247d3e650af82c5ee9df3ac668a8736219769a91575facd8a62d397c3316c9a49088c95c36818775df8ef829c026c940147ffb9f512df3bb626cc4be7b65c9
7
- data.tar.gz: fd40ea3558e70ed9a1d9dd9fdf3ac560c90606582849124c4a02d0ba9c6d35fed8f80a3b216e8f9955f5abac97714625a85d9deb7501d6c1ed0fab13bfefe967
6
+ metadata.gz: '09c943913528159030bebd7c2815ea7dcb0fa9196949648d68d9e9f81c94191e0cec45814b3e4ac6fff570f16113d4e07c0dc6345bf1c28bb1ba61271df56629'
7
+ data.tar.gz: abad6a5c64b9eb924ce7212731705cc41ad1c7df11f8039f0be4b5a94acd6820769e101fde464f848fe7627aefcb91f696f9135ca8c8f9969c7d94957af03061
data/README.md CHANGED
@@ -4,7 +4,10 @@ Official KnoxCall API client for Ruby. Standards-based OAuth 2.1 + DPoP (RFC 944
4
4
 
5
5
  ## Install
6
6
 
7
- Not yet published — install from the monorepo path (`gem "knoxcall", path: "../knoxcall-ruby"` in your Gemfile) or via a git checkout (`gem "knoxcall", git: "...", glob: "sdk/knoxcall-ruby/*.gemspec"`).
7
+ ```ruby
8
+ # Gemfile
9
+ gem "knoxcall", "~> 1.0"
10
+ ```
8
11
 
9
12
  ## Quickstart
10
13
 
@@ -995,7 +995,10 @@ module KnoxCall
995
995
  end
996
996
 
997
997
  def retry_delay(err, attempt)
998
- if err.is_a?(RateLimitError) && err.retry_after
998
+ # A 429's Retry-After, and a 503's (+dependency_unavailable+ — the server
999
+ # says how long the dependency needs). Both capped: beyond the cap the
1000
+ # caller's own scheduling beats a blocked thread.
1001
+ if (err.is_a?(RateLimitError) || err.is_a?(ServerError)) && err.retry_after
999
1002
  return [err.retry_after, RETRY_AFTER_CAP_SECONDS].min
1000
1003
  end
1001
1004
  backoff_delay(attempt)
@@ -78,7 +78,18 @@ module KnoxCall
78
78
  end
79
79
  end
80
80
 
81
- class ServerError < APIError; end
81
+ # 5xx. #retry_after is whole seconds from +Retry-After+ when the server sent
82
+ # one: a 503 +dependency_unavailable+ — KnoxCall could not reach one of its
83
+ # own dependencies in time and did not serve the request — does, and the
84
+ # retry loop honours it exactly as a 429's (PARITY §4). +nil+ when absent: a
85
+ # plain 5xx keeps the jittered backoff. Digits only — an HTTP-date is legal
86
+ # but is not delta-seconds.
87
+ class ServerError < APIError
88
+ def retry_after
89
+ v = @headers["retry-after"]
90
+ v.is_a?(String) && v.strip.match?(/\A\d+\z/) ? v.strip.to_f : nil
91
+ end
92
+ end
82
93
 
83
94
  # A refusal from the AI *data plane* (+POST {agent_url}/…+), typed.
84
95
  #
data/lib/knoxcall.rb CHANGED
@@ -38,7 +38,7 @@ require "knoxcall/resources/wrap"
38
38
  require "knoxcall/resources/opportunities"
39
39
 
40
40
  module KnoxCall
41
- VERSION = "0.1.0"
41
+ VERSION = "1.1.0"
42
42
  SDK_VERSION = "knoxcall-ruby/#{VERSION}"
43
43
  DEFAULT_API_BASE = "https://api.knoxcall.com"
44
44
  DEFAULT_CLOUD_HOST = "knoxcall.com"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: knoxcall
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - KnoxCall
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2026-09-27 00:00:00.000000000 Z
11
+ date: 2026-10-02 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: 'Ruby client for the KnoxCall multi-tenant API gateway and secrets platform:
14
14
  OAuth 2.1 + DPoP auth, route proxying, secrets, vaults, PKI, crypto, AI Gateway,