pinecall 0.11.20 → 0.11.22
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 +16 -0
- data/lib/pinecall/agent/tools.rb +1 -1
- data/lib/pinecall/bridge.rb +26 -5
- data/lib/pinecall/call_world/room.rb +2 -1
- data/lib/pinecall/reading.rb +2 -1
- data/lib/pinecall/serve.rb +2 -1
- data/lib/pinecall/version.rb +1 -1
- 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: 2e5b3efba68319e7adf59f927ed7745a68a9340e08e67b4b91c491c647e81e4d
|
|
4
|
+
data.tar.gz: fba2ceb9e477d2e0697bca5b847e0d361fc3f1ae89262dcafb00581468bd94a9
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 4cbc53aa2c73f3eec88bd5927fea431c3479f181655c44f3e006774d6ee9cc4f71cf4e02a1b1dd755e6c5c586aef0126892bc8cd6ecb5a774222ad639b03a660
|
|
7
|
+
data.tar.gz: ddc20339b544f1d7ab788bd85007dd792b542157868869dd66a820a6aef54775a901c32b5630408fefbdf322815003ca122d1d0e3fe64fce54bbb6a7fda8beef
|
data/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,22 @@ 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
|
+
## [Unreleased]
|
|
8
|
+
|
|
9
|
+
## [0.11.22] — released with the dot's fix for phones (2026-10-25)
|
|
10
|
+
|
|
11
|
+
## [0.11.21] — released with the tutor's walks (2026-10-25)
|
|
12
|
+
|
|
13
|
+
- **`call.participant(id).mute` works**: it sent a `muted:` field `participant.mute` does not have, and
|
|
14
|
+
the gateway refused every one. The wire has no unmute. (2026-10-24 tools eval, R F5)
|
|
15
|
+
- **A view that names what nothing answers says the name**, in the log and on the terminal, instead of
|
|
16
|
+
Ruby's NameError with the view's context inspected — the state's private values among it. (R F6)
|
|
17
|
+
- **A class refused as it loads is one sentence through `pinecall start` and `prompt`**, exit 2, never a
|
|
18
|
+
backtrace; an option `tool` does not take is refused as `tool takes no …`. (R F19 · R F1)
|
|
19
|
+
- **The view's `resumed` is true on a call handed over mid-conversation**, and `remembers?` matches case
|
|
20
|
+
aside, as in every SDK.
|
|
21
|
+
- `docs/writing-an-agent.md`: every refusal at load, the ones past the table's seven included. (R F1)
|
|
22
|
+
|
|
7
23
|
## [0.11.20] — released with the runtime's live readers (2026-10-24)
|
|
8
24
|
|
|
9
25
|
- Nothing of the gem changed: published at 0.11.20 with every other package.
|
data/lib/pinecall/agent/tools.rb
CHANGED
|
@@ -24,7 +24,7 @@ module Pinecall
|
|
|
24
24
|
# @param params [Hash{Symbol=>Object}] parameter types, e.g. `{ day: String, how_many: Integer }`
|
|
25
25
|
def tool(**options)
|
|
26
26
|
unknown = options.keys - %i[when stage confirm announce preview pii timeout params doc]
|
|
27
|
-
raise DeclarationRefused, "
|
|
27
|
+
raise DeclarationRefused, "tool takes no #{unknown.join(", ")}" unless unknown.empty?
|
|
28
28
|
|
|
29
29
|
@pending_tool = options
|
|
30
30
|
end
|
data/lib/pinecall/bridge.rb
CHANGED
|
@@ -22,8 +22,9 @@ module Pinecall
|
|
|
22
22
|
# One served call: its instance, what was last sent, and a thread running its jobs in order.
|
|
23
23
|
class Live
|
|
24
24
|
attr_reader :agent, :world, :sent, :stops
|
|
25
|
-
# What memory recalled about this caller in this call: what `remembers?` answers from
|
|
26
|
-
|
|
25
|
+
# What memory recalled about this caller in this call: what `remembers?` answers from; and whether
|
|
26
|
+
# the call was handed over mid-conversation, the view's `resumed`.
|
|
27
|
+
attr_accessor :tools_shown, :remembered, :resumed
|
|
27
28
|
|
|
28
29
|
def initialize(agent, world)
|
|
29
30
|
@agent = agent
|
|
@@ -31,6 +32,7 @@ module Pinecall
|
|
|
31
32
|
@sent = {}
|
|
32
33
|
@tools_shown = nil
|
|
33
34
|
@remembered = []
|
|
35
|
+
@resumed = false
|
|
34
36
|
@stops = {}
|
|
35
37
|
@work = Thread::Queue.new
|
|
36
38
|
@thread = Thread.new { work }
|
|
@@ -100,6 +102,7 @@ module Pinecall
|
|
|
100
102
|
instance = klass.new.seal
|
|
101
103
|
instance.reads_last_from(last) unless last.nil?
|
|
102
104
|
serving = Live.new(instance, world_for(call, client))
|
|
105
|
+
serving.resumed = true
|
|
103
106
|
instance.serving(serving.world)
|
|
104
107
|
live[call.id] = serving
|
|
105
108
|
serving.later do
|
|
@@ -250,7 +253,7 @@ module Pinecall
|
|
|
250
253
|
def sync(serving, call)
|
|
251
254
|
line = { channel: call.channel || "web", from: call.from, claimed: serving.world.claimed }
|
|
252
255
|
begin
|
|
253
|
-
rendered = Prompt.render(serving.agent, remembered: serving.remembered, line:)
|
|
256
|
+
rendered = Prompt.render(serving.agent, resumed: serving.resumed, remembered: serving.remembered, line:)
|
|
254
257
|
visible = serving.agent.visible_tools
|
|
255
258
|
rescue StandardError => e
|
|
256
259
|
return failed_to_render(call, e)
|
|
@@ -269,8 +272,26 @@ module Pinecall
|
|
|
269
272
|
|
|
270
273
|
# A view that fails fails its call, never the process: the model keeps the view it had, and the log says why.
|
|
271
274
|
def failed_to_render(call, error)
|
|
272
|
-
|
|
273
|
-
|
|
275
|
+
said = failure_of(error)
|
|
276
|
+
call.log("render.failed", { error: error.class.to_s, message: said })
|
|
277
|
+
warn("pinecall: #{call.id} could not render its view and goes on with the one it had: #{said}")
|
|
278
|
+
end
|
|
279
|
+
|
|
280
|
+
# A NameError's message is Ruby's, with the view's whole context inspected, its state's private values
|
|
281
|
+
# among them (R F6): the name it missed is the sentence, which a person can act on.
|
|
282
|
+
def failure_of(error)
|
|
283
|
+
case error
|
|
284
|
+
when NoMethodError then "the view calls #{error.name} on #{receiver_of(error)}, which does not answer it"
|
|
285
|
+
when NameError then "the view names #{error.name}, which is no field of the state, no call and no method of the class"
|
|
286
|
+
else error.message
|
|
287
|
+
end
|
|
288
|
+
end
|
|
289
|
+
|
|
290
|
+
# The class of what the method was called on (nil, most often): the value itself may be private.
|
|
291
|
+
def receiver_of(error)
|
|
292
|
+
error.receiver.nil? ? "nil" : error.receiver.class.to_s
|
|
293
|
+
rescue ArgumentError
|
|
294
|
+
"something"
|
|
274
295
|
end
|
|
275
296
|
|
|
276
297
|
# A hook that raises fails its call, never the process: the call goes on with what the hook wrote
|
|
@@ -17,7 +17,8 @@ module Pinecall
|
|
|
17
17
|
@send = send
|
|
18
18
|
end
|
|
19
19
|
|
|
20
|
-
|
|
20
|
+
# For the rest of the call: the wire has no unmute (`participant.mute` carries the identity alone).
|
|
21
|
+
def mute = @send.call("participant.mute", { identity: @identity })
|
|
21
22
|
|
|
22
23
|
def remove = @send.call("participant.remove", { identity: @identity })
|
|
23
24
|
end
|
data/lib/pinecall/reading.rb
CHANGED
|
@@ -20,7 +20,8 @@ module Pinecall
|
|
|
20
20
|
|
|
21
21
|
# Whether a remembered fact contains `text`. Views may branch on facts but never print them;
|
|
22
22
|
# facts reach the model only as tool results.
|
|
23
|
-
|
|
23
|
+
# Case aside, as in every SDK: "usual doctor" is in "Usual doctor is Dr. Vidal.".
|
|
24
|
+
def remembers?(text) = @remembered.any? { |fact| fact.to_s.downcase.include?(text.to_s.downcase) }
|
|
24
25
|
|
|
25
26
|
def respond_to_missing?(name, include_private = false)
|
|
26
27
|
@state.key?(name) || super
|
data/lib/pinecall/serve.rb
CHANGED
|
@@ -32,7 +32,8 @@ module Pinecall
|
|
|
32
32
|
when "prompt" then prompt(Loading.parse(rest), out:)
|
|
33
33
|
else err.puts(USAGE) || 2
|
|
34
34
|
end
|
|
35
|
-
|
|
35
|
+
# A class refused as it loads is one sentence too, never a backtrace (R F19).
|
|
36
|
+
rescue CannotServe, NotConnected, Refused, DeclarationRefused => e
|
|
36
37
|
err.puts(e.message)
|
|
37
38
|
2
|
|
38
39
|
end
|
data/lib/pinecall/version.rb
CHANGED