pinecall 0.0.2 → 0.0.3

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: 4205f3b294e177f7c8a8f20cebd3328905325b641ad75cd599b85df123d936bb
4
- data.tar.gz: 755d0797bdea90ec719041d361dbee4303f94a90397fff5a436fb7bcd3b94aaf
3
+ metadata.gz: 04f9fe8b027ddfb4111005c3f5786ecad1960112ba98acf22ee35a0e290bc0d5
4
+ data.tar.gz: 18d4266d58e43fdc882f3543cf03b91c4b8993ec6f1e8a49289cc9cc7cd88123
5
5
  SHA512:
6
- metadata.gz: 3e15725d85b5b9c5c333c117885e7473e357505482beb8b174444832cd553dcb6d5872b98efd97b5b3ee125efb83fc817c1c30801d153c5580e3d546c6ec869d
7
- data.tar.gz: 739b4d2818d539d9055631e37eb49ea9c9e2f5c68319d4fc73a449f5ede5027d80af84c9246096428f914fed381d51103a3525c7babc2f0f794df4e4b1e27eef
6
+ metadata.gz: 3aecdcec9052a35ed955dfcf49e54bbdf599b42d6fd7774ccb9680174ca266cdf804c58db3724957c0cba9b8a1960420925f96ebd9a055750cfb29e72116540b
7
+ data.tar.gz: bb117dcb1db5aabd7814ce055c9aadc67acc7e6fe954d62f5b299b8272ff47d9e0bcbf86ee59612801f7f171c17593373c484f3572713bfa1d32ca0a41f3e47a
data/CHANGELOG.md CHANGED
@@ -6,6 +6,13 @@ version number is the human's call.
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
+ ## [0.0.3] — A call runs on the day a golden pinned (2026-10-09)
10
+
11
+ ### Added
12
+ - **`call.today` is the day `call.started` names when a golden pinned one** (`today`), so an agent
13
+ resolves "on Monday" against the golden's day, as the model does; the day the call opened
14
+ otherwise, as before. Needs runtime 0.1.10. `Pinecall::Testing`'s `call_started` takes `today:`.
15
+
9
16
  ## [0.0.2] — A refused registration is a sentence (2026-10-09)
10
17
 
11
18
  ### Fixed
@@ -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)
@@ -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
- def call_started(id: nil, channel: "web", from: "+34600000000", to: "+34910000000", caller: nil, state: nil)
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
- deliver("call.started", state.nil? ? started : started.merge(state:), call: id)
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
@@ -2,5 +2,5 @@
2
2
 
3
3
  module Pinecall
4
4
  # Set by the maintainer at release time.
5
- VERSION = "0.0.2"
5
+ VERSION = "0.0.3"
6
6
  end
@@ -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 },
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.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pinecall