pinecall 0.11.14 → 0.11.15
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/CHANGELOG.md +6 -0
- data/lib/pinecall/client/agent.rb +1 -1
- data/lib/pinecall/client.rb +3 -0
- data/lib/pinecall/serve.rb +4 -1
- data/lib/pinecall/testing.rb +3 -0
- data/lib/pinecall/version.rb +1 -1
- data/sig/pinecall.rbs +1 -0
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: c6727cfbb2707b2f5cf900d478f0c265fdbe80037e10173c0b47a03eff1510b6
|
|
4
|
+
data.tar.gz: 299138c0f885c4950b627368843fa3a914875ddb5307d7a9145d8a2747de7513
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: e7cfbc4d38f59b964a462073c6043a626bc127891242e3be99ff8f2b6a4d06642578ef2a7175e0b1ae477a708c2cc88636b27c6256256b3784d4fb38b9f942dd
|
|
7
|
+
data.tar.gz: 14815aa1741f66959fed0ff2b5bebf596afaead455762529e8d195a86479bc079c0eff481698470df0fc8abc279001bb9ac5ae21d516e0a47aa5462f289731c6
|
data/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,12 @@ Every change a person using this gem would notice. The format is
|
|
|
4
4
|
[Keep a Changelog](https://keepachangelog.com/en/1.1.0/); version numbers and tags are the
|
|
5
5
|
maintainer's call.
|
|
6
6
|
|
|
7
|
+
## [0.11.15] — the serve entry registers as its host (2026-10-23)
|
|
8
|
+
|
|
9
|
+
- **The serve entry registers as `PINECALL_HOST` when it is set**, else as this machine's
|
|
10
|
+
hostname (`Client#host`). A hosted app's runner names each host, and the gateway knows a release
|
|
11
|
+
is serving by it, on a machine that runs several.
|
|
12
|
+
|
|
7
13
|
## [0.11.14] — the wire knows `KnowledgePushed.kept` (2026-10-23)
|
|
8
14
|
|
|
9
15
|
- **`KnowledgePushed.kept`**: the files of the base a push did not name and kept.
|
|
@@ -61,7 +61,7 @@ module Pinecall
|
|
|
61
61
|
# Register the slug and send the config. Runs on every reconnect.
|
|
62
62
|
def open
|
|
63
63
|
registered = ask("agent.register", lands_as: "agent.registered", data: {
|
|
64
|
-
routes: @routes, sdk: @client.sdk, host:
|
|
64
|
+
routes: @routes, sdk: @client.sdk, host: @client.host,
|
|
65
65
|
takes_unclaimed: @takes_unclaimed
|
|
66
66
|
})
|
|
67
67
|
# Each connection gets a new app id.
|
data/lib/pinecall/client.rb
CHANGED
|
@@ -44,6 +44,8 @@ module Pinecall
|
|
|
44
44
|
Drained = Data.define(:handed, :parked, :tools, :finished)
|
|
45
45
|
|
|
46
46
|
attr_reader :url, :api_key, :env
|
|
47
|
+
# The machine it says it runs on: a hosted app's is the name its runner gave it.
|
|
48
|
+
attr_accessor :host
|
|
47
49
|
|
|
48
50
|
def initialize(url:, api_key:, env: nil, ping_every: Connection::PINGS_EVERY_S, backoff: {})
|
|
49
51
|
raise ArgumentError, "Pinecall::Client.new(url:, api_key:): one of the two was not given" if url.nil? || api_key.nil?
|
|
@@ -51,6 +53,7 @@ module Pinecall
|
|
|
51
53
|
@url = url
|
|
52
54
|
@api_key = api_key
|
|
53
55
|
@env = env
|
|
56
|
+
@host = Socket.gethostname
|
|
54
57
|
@agents = {}
|
|
55
58
|
@errors = []
|
|
56
59
|
@entries = []
|
data/lib/pinecall/serve.rb
CHANGED
|
@@ -115,7 +115,10 @@ module Pinecall
|
|
|
115
115
|
world = nil if world.to_s.empty?
|
|
116
116
|
raise CannotServe, "PINECALL_ENV is sandbox or production, not #{world}" unless world.nil? || WORLDS.include?(world)
|
|
117
117
|
|
|
118
|
-
Client.new(url:, api_key: key, env: world)
|
|
118
|
+
client = Client.new(url:, api_key: key, env: world)
|
|
119
|
+
# The name a hosted app's runner gave it: the gateway knows the release by it.
|
|
120
|
+
client.host = env["PINECALL_HOST"] unless env["PINECALL_HOST"].to_s.empty?
|
|
121
|
+
client
|
|
119
122
|
end
|
|
120
123
|
|
|
121
124
|
# Listening starts before connect, so `agent.registered` is the first line of a pipe. A pipe's
|
data/lib/pinecall/testing.rb
CHANGED
|
@@ -104,6 +104,9 @@ module Pinecall
|
|
|
104
104
|
|
|
105
105
|
def sdk = "pinecall-ruby-testing/#{VERSION}"
|
|
106
106
|
|
|
107
|
+
# Same as `Pinecall::Client#host`: the machine it says it runs on.
|
|
108
|
+
def host = Socket.gethostname
|
|
109
|
+
|
|
107
110
|
# Same signature as `Pinecall::Client#agent`.
|
|
108
111
|
def agent(slug, **options)
|
|
109
112
|
@agents[slug] = Client::Agent.new(slug, options, self)
|
data/lib/pinecall/version.rb
CHANGED
data/sig/pinecall.rbs
CHANGED
|
@@ -266,6 +266,7 @@ module Pinecall
|
|
|
266
266
|
end
|
|
267
267
|
|
|
268
268
|
attr_reader env: String?
|
|
269
|
+
attr_accessor host: String
|
|
269
270
|
def initialize: (url: String, api_key: String, ?env: String?, ?ping_every: Numeric, ?backoff: Hash[Symbol, Numeric]) -> void
|
|
270
271
|
def drain: (?answer_s: Numeric, ?tools_s: Numeric) -> Drained
|
|
271
272
|
def on_entries: () { (untyped) -> void } -> ^() -> void
|