pinecall 0.0.2 → 0.0.4
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 +14 -0
- data/lib/pinecall/agent/spec.rb +1 -0
- data/lib/pinecall/agent/tools.rb +2 -1
- data/lib/pinecall/client/call.rb +3 -1
- data/lib/pinecall/testing.rb +7 -3
- data/lib/pinecall/version.rb +1 -1
- data/lib/pinecall/wire/shapes_call_events.rb +2 -1
- data/lib/pinecall/wire/shapes_doors.rb +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: a2a10f0e074b767542af49bb9d9d6ae3251e230b371debee5d5e5628c92f67b2
|
|
4
|
+
data.tar.gz: 81be17cb2c53a7c5c6fc3d188f7b38abd16f265afafc8c3d0a089933fb126809
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: f7baea4bcf9f7b72c71d24e24ddf698e3afa5d06863d60dbd32943b8648705857e8b209b43130fc1c9e435673f03666f50a9ee7694f970c19f6ca2eb868e4ef9
|
|
7
|
+
data.tar.gz: e966301764b4ce05390cae2821339012f95106dea20593fc0e1ffc00106c48d348ef6e1f56ab46ca5ad6ce0f67fb1bb5072f071334f2d0ac59fdc8309269bdb3
|
data/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,20 @@ version number is the human's call.
|
|
|
6
6
|
|
|
7
7
|
## [Unreleased]
|
|
8
8
|
|
|
9
|
+
## [0.0.4] — A tool announces itself (2026-10-09)
|
|
10
|
+
|
|
11
|
+
### Added
|
|
12
|
+
- **`tool announce: "Let me check the agenda."`**: what the agent says as the tool starts, when the
|
|
13
|
+
model's turn said nothing itself; a turn that spoke and then called the tool is not announced
|
|
14
|
+
twice. Needs runtime 0.1.11.
|
|
15
|
+
|
|
16
|
+
## [0.0.3] — A call runs on the day a golden pinned (2026-10-09)
|
|
17
|
+
|
|
18
|
+
### Added
|
|
19
|
+
- **`call.today` is the day `call.started` names when a golden pinned one** (`today`), so an agent
|
|
20
|
+
resolves "on Monday" against the golden's day, as the model does; the day the call opened
|
|
21
|
+
otherwise, as before. Needs runtime 0.1.10. `Pinecall::Testing`'s `call_started` takes `today:`.
|
|
22
|
+
|
|
9
23
|
## [0.0.2] — A refused registration is a sentence (2026-10-09)
|
|
10
24
|
|
|
11
25
|
### Fixed
|
data/lib/pinecall/agent/spec.rb
CHANGED
|
@@ -36,6 +36,7 @@ module Pinecall
|
|
|
36
36
|
side_effect: options[:confirm] ? "irreversible" : "read"
|
|
37
37
|
}
|
|
38
38
|
spec[:confirm] = options[:confirm] if options[:confirm]
|
|
39
|
+
spec[:announce] = options[:announce] if options[:announce]
|
|
39
40
|
spec[:pii] = pii!(options, spec) if options[:pii]
|
|
40
41
|
spec[:timeout_s] = options[:timeout].to_f if options[:timeout]
|
|
41
42
|
Wire::Validate.call!("ToolSpec", spec, where: "tool #{name}")
|
data/lib/pinecall/agent/tools.rb
CHANGED
|
@@ -17,12 +17,13 @@ module Pinecall
|
|
|
17
17
|
# @param when [Proc] visibility predicate, evaluated against the state
|
|
18
18
|
# @param stage [Symbol, Array<Symbol>] shorthand for a `when` on the stage field
|
|
19
19
|
# @param confirm [String] read-back spoken before running; marks the tool irreversible
|
|
20
|
+
# @param announce [String] what the agent says as the tool starts, when its turn said nothing
|
|
20
21
|
# @param preview [Integer] rows of a list result the model sees
|
|
21
22
|
# @param pii [Array<Symbol>] parameters with personal data, masked in the log
|
|
22
23
|
# @param timeout [Numeric] seconds the platform waits for the method
|
|
23
24
|
# @param params [Hash{Symbol=>Object}] parameter types, e.g. `{ day: String, how_many: Integer }`
|
|
24
25
|
def tool(**options)
|
|
25
|
-
unknown = options.keys - %i[when stage confirm preview pii timeout params doc]
|
|
26
|
+
unknown = options.keys - %i[when stage confirm announce preview pii timeout params doc]
|
|
26
27
|
raise DeclarationRefused, "@tool takes no #{unknown.join(", ")}" unless unknown.empty?
|
|
27
28
|
|
|
28
29
|
@pending_tool = options
|
data/lib/pinecall/client/call.rb
CHANGED
|
@@ -97,13 +97,15 @@ module Pinecall
|
|
|
97
97
|
line = data[:started]
|
|
98
98
|
started(line)
|
|
99
99
|
@state = data[:state].dup
|
|
100
|
-
@today = Time.at(line[:started_at]).strftime("%Y-%m-%d")
|
|
100
|
+
@today = line[:today] || Time.at(line[:started_at]).strftime("%Y-%m-%d")
|
|
101
101
|
@claimed = data[:claimed]
|
|
102
102
|
end
|
|
103
103
|
|
|
104
104
|
def started(line)
|
|
105
105
|
the_line(line, "active")
|
|
106
106
|
@medium = line[:medium]
|
|
107
|
+
# A run's call says its day, which a golden may have pinned; a person's runs on the clock's.
|
|
108
|
+
@today = line[:today] if line[:today]
|
|
107
109
|
end
|
|
108
110
|
|
|
109
111
|
def the_line(line, status)
|
data/lib/pinecall/testing.rb
CHANGED
|
@@ -127,11 +127,15 @@ module Pinecall
|
|
|
127
127
|
# Unhandled errors, for assertions.
|
|
128
128
|
attr_reader :errors
|
|
129
129
|
|
|
130
|
-
# Start a call and return its `Fake` handle; `state:` is the state its opener asked for
|
|
131
|
-
|
|
130
|
+
# Start a call and return its `Fake` handle; `state:` is the state its opener asked for,
|
|
131
|
+
# `today:` the day a golden pinned (YYYY-MM-DD).
|
|
132
|
+
def call_started(id: nil, channel: "web", from: "+34600000000", to: "+34910000000", caller: nil, state: nil,
|
|
133
|
+
today: nil)
|
|
132
134
|
id ||= "CA_#{next_seq}"
|
|
133
135
|
started = { channel:, direction: "inbound", from:, to:, caller:, started_at: Time.now.to_f }
|
|
134
|
-
|
|
136
|
+
started = started.merge(state:) unless state.nil?
|
|
137
|
+
started = started.merge(today:) unless today.nil?
|
|
138
|
+
deliver("call.started", started, call: id)
|
|
135
139
|
settle
|
|
136
140
|
Fake.new(self, id)
|
|
137
141
|
end
|
data/lib/pinecall/version.rb
CHANGED
|
@@ -98,7 +98,8 @@ module Pinecall
|
|
|
98
98
|
env: { kind: :ref, ref: "Env" },
|
|
99
99
|
worker: { kind: :str, null: true },
|
|
100
100
|
medium: { kind: :ref, ref: "Medium", null: true },
|
|
101
|
-
state: { kind: :json }
|
|
101
|
+
state: { kind: :json },
|
|
102
|
+
today: { kind: :str, null: true }
|
|
102
103
|
}.freeze,
|
|
103
104
|
"CallSummary" => {
|
|
104
105
|
reason: { kind: :ref, ref: "EndReason", required: true },
|
|
@@ -12,6 +12,7 @@ module Pinecall
|
|
|
12
12
|
parameters: { kind: :json, required: true },
|
|
13
13
|
side_effect: { kind: :enum, values: %w[read write irreversible], default: "read" },
|
|
14
14
|
confirm: { kind: :str },
|
|
15
|
+
announce: { kind: :str },
|
|
15
16
|
pii: { kind: :list, items: { kind: :str } },
|
|
16
17
|
timeout_s: { kind: :float }
|
|
17
18
|
}.freeze,
|