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 +4 -4
- data/README.md +4 -1
- data/lib/knoxcall/client.rb +4 -1
- data/lib/knoxcall/errors.rb +12 -1
- data/lib/knoxcall.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 49f6a41e489aed8ee46bf9c79d3de82b051976ff5ab93498226c5b43910fbf69
|
|
4
|
+
data.tar.gz: 588c26bb6360646157c8bf3cc9faca0f6411c49a43f71f76cca53264d800b73f
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
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
|
-
|
|
7
|
+
```ruby
|
|
8
|
+
# Gemfile
|
|
9
|
+
gem "knoxcall", "~> 1.0"
|
|
10
|
+
```
|
|
8
11
|
|
|
9
12
|
## Quickstart
|
|
10
13
|
|
data/lib/knoxcall/client.rb
CHANGED
|
@@ -995,7 +995,10 @@ module KnoxCall
|
|
|
995
995
|
end
|
|
996
996
|
|
|
997
997
|
def retry_delay(err, attempt)
|
|
998
|
-
|
|
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)
|
data/lib/knoxcall/errors.rb
CHANGED
|
@@ -78,7 +78,18 @@ module KnoxCall
|
|
|
78
78
|
end
|
|
79
79
|
end
|
|
80
80
|
|
|
81
|
-
|
|
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 = "
|
|
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.
|
|
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-
|
|
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,
|