pinecall 0.11.29 → 0.11.30

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: dd070aadaaa648db1194737d2157220c0bbb53665a78bdd355580b7e0c4eb696
4
- data.tar.gz: 72aa87f88004cdd0e6eb19683ce1d7f249d9976cc2498165190d8cfcaba58db5
3
+ metadata.gz: cd828c619164baace761c5df07a94fc7d61b5b29fc95e69f3b94fa099b752bec
4
+ data.tar.gz: 1fb669bf22529d766bb8c440c6ad9845f68d26730977b47bdce2ec305839393a
5
5
  SHA512:
6
- metadata.gz: 5fd2137d5fd875b8f3f64f50b6e97f88939d8bba12a4548a86b4736527775b41c7de6819ae117596f8a3e50a2be43a3849e2ae970ccc00d70c2a37f3ccf4de47
7
- data.tar.gz: 5ade6aba559807582977768966556fa177ba7382c016c171d36e9a218b6e10371b0005843912850351e518999876f3b0409620b39071df98881495e7e2798e79
6
+ metadata.gz: df6967872c887c111f970a349515ed23a7a9eaa165ff6daae0e1a2121e3c97be8f5e11cc8f62d8c64563976c7e4b1c3fae84258261faae34b0f561441dd1a67d
7
+ data.tar.gz: 05305b00cb25c66ca9f8c70e505667b19715d57d1ecce94af5d4af527ff6594f52d96111061102d2da4d9e269a50ad3b3a09dc47a0b1d792c744c66a4e0e41c8
data/CHANGELOG.md CHANGED
@@ -6,6 +6,16 @@ maintainer's call.
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
+ ## [0.11.30] — an app is written whole in its class (2026-11-09)
10
+
11
+ - **A class declares its monitors:** `monitors`, each a number of its calls and the line it fires across.
12
+
13
+ - **A tool may be `quiet`:** a move on the caller's screen that runs as the model calls it and asks for no answer, as in TypeScript.
14
+
15
+ - **A class may declare several knowledge bases:** `bases`, in place of `docs`.
16
+
17
+ - **A tool says more:** `tool` says `delayed:` (with `delayed_after:`) and `failed:`, as a Studio tool does.
18
+
9
19
  ## [0.11.29] — an agent may bear silence, leave a voicemail, and name its own fallbacks (2026-11-09)
10
20
 
11
21
  - **A class declares the quiet, a machine and its fallbacks:** `silence_timeout`, `idle`, `voicemail`,
@@ -14,7 +14,7 @@ module Pinecall
14
14
 
15
15
  # The settings a class may declare. Must match the TypeScript package's `ENVIRONMENT`.
16
16
  ENVIRONMENT = %i[language voice llm realtime stt judge greeting hangup turn says hears knowledge docs memory record judges
17
- personas widget idle voicemail stt_fallbacks tts_fallbacks].freeze
17
+ personas widget idle voicemail stt_fallbacks tts_fallbacks bases monitors].freeze
18
18
 
19
19
  # The ones written as the wire's own fields, keyword by keyword: `docs base: "…"`, `judges on: [...]`.
20
20
  AS_KEYWORDS = %i[turn knowledge docs memory judges personas widget idle].freeze
@@ -142,8 +142,8 @@ module Pinecall
142
142
  environment[:hangup] = Config.hangup_of(ending)
143
143
  end
144
144
 
145
- # `language "es"`, `says [{ word: "GSA", spoken: "ge ese a" }]`, `record false`.
146
- %i[language says record].each do |field|
145
+ # `language "es"`, `says [{ word: "GSA", spoken: "ge ese a" }]`, `record false`, `bases [{ base: "faq" }, { base: "prices" }]`.
146
+ %i[language says record bases monitors].each do |field|
147
147
  define_method(field) do |value = NOTHING|
148
148
  return environment[field] if value.equal?(NOTHING)
149
149
 
@@ -37,6 +37,10 @@ module Pinecall
37
37
  }
38
38
  spec[:confirm] = options[:confirm] if options[:confirm]
39
39
  spec[:announce] = options[:announce] if options[:announce]
40
+ spec[:delayed] = options[:delayed] if options[:delayed]
41
+ spec[:delayed_after_s] = options[:delayed_after].to_f if options[:delayed_after]
42
+ spec[:failed] = options[:failed] if options[:failed]
43
+ spec[:quiet] = true if options[:quiet]
40
44
  spec[:pii] = pii!(options, spec) if options[:pii]
41
45
  spec[:timeout_s] = options[:timeout].to_f if options[:timeout]
42
46
  Wire::Validate.call!("ToolSpec", spec, where: "tool #{name}")
@@ -18,12 +18,18 @@ module Pinecall
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
20
  # @param announce [String] what the agent says as the tool starts, when its turn said nothing
21
+ # @param delayed [String] what the agent says when the wait has grown long
22
+ # @param delayed_after [Numeric] seconds before it says it, 5 unless set
23
+ # @param failed [String] what the agent says when the tool failed, before the model reads why
24
+ # @param quiet [Boolean] a move on the caller's screen: runs as the model calls it, asks for no answer
21
25
  # @param preview [Integer] rows of a list result the model sees
22
26
  # @param pii [Array<Symbol>] parameters with personal data, masked in the log
23
27
  # @param timeout [Numeric] seconds the platform waits for the method
24
28
  # @param params [Hash{Symbol=>Object}] parameter types, e.g. `{ day: String, how_many: Integer }`
25
29
  def tool(**options)
26
- unknown = options.keys - %i[when stage confirm announce preview pii timeout params doc]
30
+ unknown = options.keys - %i[
31
+ when stage confirm announce delayed delayed_after failed quiet preview pii timeout params doc
32
+ ]
27
33
  raise DeclarationRefused, "tool takes no #{unknown.join(", ")}" unless unknown.empty?
28
34
 
29
35
  @pending_tool = options
@@ -2,5 +2,5 @@
2
2
 
3
3
  module Pinecall
4
4
  # Set by the maintainer at release time.
5
- VERSION = "0.11.29"
5
+ VERSION = "0.11.30"
6
6
  end
@@ -95,6 +95,14 @@ module Pinecall
95
95
  "VoicemailConfig" => {
96
96
  message: { kind: :str }
97
97
  }.freeze,
98
+ "MonitorDeclared" => {
99
+ name: { kind: :str, required: true },
100
+ metric: { kind: :enum, required: true,
101
+ values: %w[e2e_median_s llm_median_s held_rate escalated_rate tool_failure_rate spend_usd calls] },
102
+ above: { kind: :bool, required: true },
103
+ threshold: { kind: :float, required: true },
104
+ window_days: { kind: :int }
105
+ }.freeze,
98
106
  "Pronunciation" => {
99
107
  word: { kind: :str, required: true },
100
108
  spoken: { kind: :str, required: true }
@@ -13,6 +13,10 @@ module Pinecall
13
13
  side_effect: { kind: :enum, values: %w[read write irreversible], default: "read" },
14
14
  confirm: { kind: :str },
15
15
  announce: { kind: :str },
16
+ delayed: { kind: :str },
17
+ delayed_after_s: { kind: :float },
18
+ failed: { kind: :str },
19
+ quiet: { kind: :bool },
16
20
  pii: { kind: :list, items: { kind: :str } },
17
21
  timeout_s: { kind: :float }
18
22
  }.freeze,
@@ -30,6 +34,7 @@ module Pinecall
30
34
  hears: { kind: :list, items: { kind: :str } },
31
35
  knowledge: { kind: :ref, ref: "KnowledgeFile" },
32
36
  docs: { kind: :ref, ref: "DocsConfig" },
37
+ bases: { kind: :list, items: { kind: :ref, ref: "DocsConfig" } },
33
38
  memory: { kind: :ref, ref: "MemoryConfig" },
34
39
  hangup: { kind: :ref, ref: "HangupConfig" },
35
40
  record: { kind: :bool, default: true },
@@ -45,6 +50,7 @@ module Pinecall
45
50
  state_fields: { kind: :list, items: { kind: :ref, ref: "StateFieldSpec" } },
46
51
  view: { kind: :ref, ref: "ViewSpec" },
47
52
  events: { kind: :list, items: { kind: :ref, ref: "EventSpec" } },
53
+ monitors: { kind: :list, items: { kind: :ref, ref: "MonitorDeclared" } },
48
54
  judges: { kind: :ref, ref: "JudgesDeclared" },
49
55
  personas: { kind: :ref, ref: "PersonasDeclared" },
50
56
  hold: { kind: :ref, ref: "HoldConfig" },
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.29
4
+ version: 0.11.30
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pinecall