pinecall 0.11.13 → 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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 13a76b616d508b0e37155af353923f7c55d8f7ea7cff2df52743c021855005e5
4
- data.tar.gz: 113a14c12ab48087df8234707835f58e576e168ef8f8ce26dd2e8c6aad70b26f
3
+ metadata.gz: c6727cfbb2707b2f5cf900d478f0c265fdbe80037e10173c0b47a03eff1510b6
4
+ data.tar.gz: 299138c0f885c4950b627368843fa3a914875ddb5307d7a9145d8a2747de7513
5
5
  SHA512:
6
- metadata.gz: 881b714db68c97e490a30c921d7906ad97aef635bc37717be1c73eb3e1d86ee38bdd81aa4f15376974b2849035bf32e9a030a8cc2c8d6e7b71eccaa60fc0eef2
7
- data.tar.gz: a5e61080bb5e457addcd5e14ce47b14e69fc90aa945d3c76e178aeda4fb8103b156bb059bbf7365738e0ba6a7e505659a547202b040a53d7ec975e6fee2143f7
6
+ metadata.gz: e7cfbc4d38f59b964a462073c6043a626bc127891242e3be99ff8f2b6a4d06642578ef2a7175e0b1ae477a708c2cc88636b27c6256256b3784d4fb38b9f942dd
7
+ data.tar.gz: 14815aa1741f66959fed0ff2b5bebf596afaead455762529e8d195a86479bc079c0eff481698470df0fc8abc279001bb9ac5ae21d516e0a47aa5462f289731c6
data/CHANGELOG.md CHANGED
@@ -4,6 +4,16 @@ 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
+
13
+ ## [0.11.14] — the wire knows `KnowledgePushed.kept` (2026-10-23)
14
+
15
+ - **`KnowledgePushed.kept`**: the files of the base a push did not name and kept.
16
+
7
17
  ## [0.11.13] — the wire knows `app.failed` (2026-10-23)
8
18
 
9
19
  - **The wire knows `app.failed`, a feed event.** A hosted app that did not build, start or stay up: the org's alert, read by
@@ -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: Socket.gethostname,
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.
@@ -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 = []
@@ -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
@@ -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)
@@ -2,5 +2,5 @@
2
2
 
3
3
  module Pinecall
4
4
  # Set by the maintainer at release time.
5
- VERSION = "0.11.13"
5
+ VERSION = "0.11.15"
6
6
  end
@@ -60,7 +60,8 @@ module Pinecall
60
60
  base: { kind: :str, required: true },
61
61
  chunks: { kind: :int, required: true },
62
62
  language: { kind: :str, required: true },
63
- took_ms: { kind: :float, required: true }
63
+ took_ms: { kind: :float, required: true },
64
+ kept: { kind: :int, required: true }
64
65
  }.freeze,
65
66
  "KnowledgeList" => {
66
67
  bases: { kind: :list, items: { kind: :ref, ref: "KnowledgeBase" }, required: true }
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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pinecall
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.11.13
4
+ version: 0.11.15
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pinecall