pinecall 0.11.37 → 0.11.39

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: af6e085fb2086346c8fb4b98ca67a51e1b22a5d7f763e09b97d09fea2622e08c
4
- data.tar.gz: ddd794b98669f894ab8cdc2c6d76e0a13a85f71722477eb3bae0f0a8c04edab9
3
+ metadata.gz: 0f05e874f34337f0eba7aaed19afb3f41c43bb4e4c74a0b317f2cea82547b68b
4
+ data.tar.gz: 9a3568be1261c90a5fd891c04bdca4abfda0af3922a0d41486b563001a923f7f
5
5
  SHA512:
6
- metadata.gz: 40c8d8aed8561a8e5f4b78a9328afe12d56e2c21cb6e98309d397087114e015ff5a43557b3a39117f01a130e8aaf4a728902182b50d3d76932f3067821fbd585
7
- data.tar.gz: ca9d42659f5571d0ce33656a74012e261c16ae6368a6ed7d6765b4922911bf3f4db8f19408a72a5476bfddecee9d5540c48eb28439580be6245691099a602736
6
+ metadata.gz: 23eb3c576ea0e2165aeedb9352a613de5fb7b5a953e49a8d6e4be70136d972744667ab89536482418840164052f2d26bb12493c6b802ef2441b447b904be5de7
7
+ data.tar.gz: 63dfa8b6d45212db5b32a51f4e2818c7e3c26247f8fd95211176d0e5e3e576b44313ea76cf289120ac62e2bdfe890132f9e19825f73bc45c7fd53cf16e1f6bd7
data/CHANGELOG.md CHANGED
@@ -4,6 +4,16 @@ 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
+ ## [0.11.39] — a terminal signs in again, a phone put down ends its call, and the console's call list is one row per call (2026-11-13)
8
+
9
+ - Released with the runtime: nothing of this package changed.
10
+
11
+ ## [0.11.38] — a page's chat is written, a visitor keeps the conversation from page to page, and an app of one agent is one row (2026-11-13)
12
+
13
+ - **A page may be one environment's alone.** `APP.page("site", only: "sandbox")` keeps a guide or a
14
+ demo to the sandbox: a deploy to production sends the app alone. `pinecall start` follows the same
15
+ rule, and anything but `sandbox` or `production` is refused as the app is declared.
16
+
7
17
  ## [0.11.37] — an app's own page dictates, the widget's header is a menu, and a page going away ends its call (2026-11-13)
8
18
 
9
19
  - **An app's page dictates on this machine too.** `pinecall start` answers `POST /pinecall/dictation` beside the
@@ -58,6 +58,7 @@ module Pinecall
58
58
  raise CannotServe, "#{app.name}'s page reaches #{app.paged.answers}, which no agent is" if served.nil?
59
59
 
60
60
  page = { dir: app.paged.dir, agent: served.slug }
61
+ page[:only] = app.paged.only unless app.paged.only.nil?
61
62
  end
62
63
  out.puts(JSON.generate({ name: app.name, page: }))
63
64
  0
@@ -92,6 +93,8 @@ module Pinecall
92
93
  paged = app.paged
93
94
  agent = paged && slugs[paged.answers]
94
95
  return nil if agent.nil? || !env["PINECALL_HOST"].to_s.empty?
96
+ # A page of one environment is not this one's: `pinecall start --prod` holds the app alone.
97
+ return nil if paged.only && client.env && paged.only != client.env.to_s
95
98
 
96
99
  port = Integer(env["PINECALL_PAGE_PORT"] || Paged::PORT)
97
100
  page = Paged.new(folder: File.join(File.dirname(File.expand_path(file)), paged.dir), agent:, url: client.url,
@@ -2,5 +2,5 @@
2
2
 
3
3
  module Pinecall
4
4
  # Set by the maintainer at release time.
5
- VERSION = "0.11.37"
5
+ VERSION = "0.11.39"
6
6
  end
@@ -18,7 +18,10 @@ module Pinecall
18
18
  # One number of the app and who answers it.
19
19
  Line = Data.define(:number, :answers, :team, :greeting, :chooses)
20
20
  # The app's page: the built folder the platform serves, and the agent a visitor reaches.
21
- Page = Data.define(:dir, :answers)
21
+ # `only` is the one environment the page is served in ("sandbox" or "production"); both when nil.
22
+ Page = Data.define(:dir, :answers, :only)
23
+ WORLDS = %w[sandbox production].freeze
24
+ NOT_A_PAGE_ENV = "a page is served in both environments, or in one: app.page(dir, only: \"sandbox\") or only: \"production\""
22
25
  # The call an entry belongs to, as a handler is told it; `id` is nil for an entry of no call.
23
26
  Heard = Data.define(:id, :agent)
24
27
 
@@ -95,8 +98,9 @@ module Pinecall
95
98
  self
96
99
  end
97
100
 
98
- # The app's page: `app.page("ui/dist")`, served by the platform at the app's own name.
99
- def page(dir, answers: nil)
101
+ # The app's page: `app.page("ui/dist")`, served by the platform at the app's own name;
102
+ # `only: "sandbox"` keeps it out of production, whose deploy sends the app alone.
103
+ def page(dir, answers: nil, only: nil)
100
104
  folder = dir.to_s.delete_prefix("./").chomp("/")
101
105
  raise DeclarationRefused, NOT_A_PAGE if folder.empty? || folder.start_with?("/") || folder.split("/").include?("..")
102
106
  raise DeclarationRefused, "#{@name} has its page already, #{@paged.dir}: an app has one" unless @paged.nil?
@@ -104,7 +108,9 @@ module Pinecall
104
108
  reached = answers || @lines.first&.answers
105
109
  raise DeclarationRefused, "a page's visitors reach an agent: write a line before the page, or name one with page(dir, answers: FrontDesk)" unless agent?(reached)
106
110
 
107
- @paged = Page.new(dir: folder, answers: reached)
111
+ raise DeclarationRefused, NOT_A_PAGE_ENV unless only.nil? || WORLDS.include?(only.to_s)
112
+
113
+ @paged = Page.new(dir: folder, answers: reached, only: only&.to_s)
108
114
  self
109
115
  end
110
116
 
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.37
4
+ version: 0.11.39
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pinecall