pinecall 0.0.1 → 0.0.2

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: ab6b509c4c3b476fdf67322bdef9e0c37d86893204ca487b5bb369aa0f7490eb
4
- data.tar.gz: 05b84996a5e4b1deb8f73e254d539b51f0768f84dde7654ed35bb9b7dac95967
3
+ metadata.gz: 4205f3b294e177f7c8a8f20cebd3328905325b641ad75cd599b85df123d936bb
4
+ data.tar.gz: 755d0797bdea90ec719041d361dbee4303f94a90397fff5a436fb7bcd3b94aaf
5
5
  SHA512:
6
- metadata.gz: '07945d49d0bcc224e39f5f6976e34ed9ff9cbf6cec56b0b1d8151ac7d0f538561fadaff755a8d0d52cf9d9b8ac5e0c323dcaff8267a28092776ff9677db5c61e'
7
- data.tar.gz: 04d24ebd3800a149e3958fb34719b7daae2be9d6405c236cb3a297ba44e120ea7f168ba181a7291a9a4cdc002739d83889b3a97aa24476e4350d8a4529888ef2
6
+ metadata.gz: 3e15725d85b5b9c5c333c117885e7473e357505482beb8b174444832cd553dcb6d5872b98efd97b5b3ee125efb83fc817c1c30801d153c5580e3d546c6ec869d
7
+ data.tar.gz: 739b4d2818d539d9055631e37eb49ea9c9e2f5c68319d4fc73a449f5ede5027d80af84c9246096428f914fed381d51103a3525c7babc2f0f794df4e4b1e27eef
data/CHANGELOG.md CHANGED
@@ -6,6 +6,12 @@ version number is the human's call.
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
+ ## [0.0.2] — A refused registration is a sentence (2026-10-09)
10
+
11
+ ### Fixed
12
+ - **A registration the gateway refuses is one sentence and exit 2** from the serve entry — a slug that
13
+ belongs to another org, a key it does not take — instead of a stack trace and exit 1.
14
+
9
15
  ## [0.0.1] — The first release: an agent as a Ruby class (2026-10-09)
10
16
 
11
17
  ### Fixed
data/README.md CHANGED
@@ -7,24 +7,24 @@ the part of the prompt that changes during the call.
7
7
  ```ruby
8
8
  require "pinecall"
9
9
 
10
- # Eres la recepción de Clínica Norte. Hablas de usted, con frases cortas.
10
+ # You are the front desk of Clínica Norte. Formal, short sentences.
11
11
  class ClinicaNorte < Pinecall::Agent
12
12
  stage :identify, :book
13
13
  state :patient, visibility: :pii
14
14
  state :slots, []
15
15
 
16
- # Busca al paciente por nombre y teléfono. Pide los dos antes de llamarla.
16
+ # Finds the patient by name and phone. Ask for both before calling it.
17
17
  tool stage: :identify, pii: %i[name phone]
18
18
  def find_patient(name:, phone:)
19
- self.patient = Agenda.buscar(name, phone)
19
+ self.patient = Agenda.find(name, phone)
20
20
  self.stage = :book if patient
21
21
  patient
22
22
  end
23
23
 
24
- # Horas libres de un día.
24
+ # Free slots on one day.
25
25
  tool stage: :book, preview: 2
26
26
  def free_slots(day:)
27
- self.slots = Agenda.libres(day)
27
+ self.slots = Agenda.free(day)
28
28
  end
29
29
  end
30
30
  ```
@@ -33,18 +33,18 @@ end
33
33
 
34
34
  ```erb
35
35
  <% if stage == :identify -%>
36
- Saluda y pide nombre y teléfono. Nada más hasta identificar al paciente.
36
+ Greet the caller and ask for their name and phone. Nothing else until the patient is identified.
37
37
  <% end -%>
38
38
 
39
- <% if remembers?("médico habitual") -%>
40
- Ofrece primero las horas de su médico habitual.
39
+ <% if remembers?("usual doctor") -%>
40
+ Offer their usual doctor's slots first.
41
41
  <% end -%>
42
42
 
43
43
  <% if slots.any? -%>
44
- ## Horas libres, en orden
44
+ ## Free slots, in order
45
45
 
46
- <% slots.each do |hueco| -%>
47
- <%= hueco.cuando %> con <%= hueco.doctor %>
46
+ <% slots.each do |slot| -%>
47
+ <%= slot.when %> with <%= slot.doctor %>
48
48
  <% end -%>
49
49
  <% end -%>
50
50
  ```
@@ -55,7 +55,7 @@ its text changes.
55
55
 
56
56
  Memory and knowledge-base results never enter the prompt. The platform runs `recall` and `search`
57
57
  and returns their results to the model as tool results, so retrieved text is treated as data, not
58
- instructions. A view can ask `remembers?("médico habitual")` and write its own sentence about the
58
+ instructions. A view can ask `remembers?("usual doctor")` and write its own sentence about the
59
59
  answer.
60
60
 
61
61
  ## Five minutes
@@ -95,7 +95,7 @@ held to the runtime's golden call log. Tools are the only code that may change s
95
95
  ```ruby
96
96
  pc = Pinecall::Client.new(url: "https://cloud.pinecall.io", api_key: ENV.fetch("PINECALL_KEY"))
97
97
  agent = pc.agent("clinica-norte", tools: [])
98
- agent.on("turn.user") { |data, call| call.say("Le he oído: #{data[:text]}") }
98
+ agent.on("turn.user") { |data, call| call.say("I heard: #{data[:text]}") }
99
99
  pc.connect
100
100
  ```
101
101
 
@@ -110,9 +110,9 @@ gateway = Pinecall::Testing::Gateway.new
110
110
  Pinecall.mount(ClinicaNorte, client: gateway)
111
111
 
112
112
  call = gateway.call_started(from: "+34600123456")
113
- call.tool("free_slots", day: "martes")
113
+ call.tool("free_slots", day: "Tuesday")
114
114
 
115
- assert_includes call.prompt, "el martes a las diez"
115
+ assert_includes call.prompt, "Tuesday at ten"
116
116
  assert_equal %w[propose], call.tools
117
117
  ```
118
118
 
@@ -31,7 +31,7 @@ module Pinecall
31
31
  when "prompt" then prompt(Loading.parse(rest), out:)
32
32
  else err.puts(USAGE) || 2
33
33
  end
34
- rescue CannotServe, NotConnected => e
34
+ rescue CannotServe, NotConnected, Refused => e
35
35
  err.puts(e.message)
36
36
  2
37
37
  end
@@ -2,5 +2,5 @@
2
2
 
3
3
  module Pinecall
4
4
  # Set by the maintainer at release time.
5
- VERSION = "0.0.1"
5
+ VERSION = "0.0.2"
6
6
  end
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pinecall
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pinecall
8
- autorequire:
9
8
  bindir: bin
10
9
  cert_chain: []
11
- date: 2026-10-09 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
13
  name: websocket-driver
@@ -96,7 +95,6 @@ metadata:
96
95
  source_code_uri: https://github.com/pinecall/ruby
97
96
  changelog_uri: https://github.com/pinecall/ruby/blob/main/CHANGELOG.md
98
97
  rubygems_mfa_required: 'true'
99
- post_install_message:
100
98
  rdoc_options: []
101
99
  require_paths:
102
100
  - lib
@@ -111,8 +109,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
111
109
  - !ruby/object:Gem::Version
112
110
  version: '0'
113
111
  requirements: []
114
- rubygems_version: 3.4.19
115
- signing_key:
112
+ rubygems_version: 3.6.9
116
113
  specification_version: 4
117
114
  summary: 'Write a voice agent as a Ruby class: fields are state, tools are verbs,
118
115
  the view is the prompt'