pinecall-protocol 0.1.0__tar.gz → 0.6.2__tar.gz

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.
Files changed (26) hide show
  1. {pinecall_protocol-0.1.0 → pinecall_protocol-0.6.2}/.gitignore +3 -0
  2. {pinecall_protocol-0.1.0 → pinecall_protocol-0.6.2}/PKG-INFO +1 -1
  3. {pinecall_protocol-0.1.0 → pinecall_protocol-0.6.2}/pinecall_protocol/_version.py +1 -1
  4. {pinecall_protocol-0.1.0 → pinecall_protocol-0.6.2}/pinecall_protocol/commands.py +1 -0
  5. {pinecall_protocol-0.1.0 → pinecall_protocol-0.6.2}/pinecall_protocol/defs.py +11 -8
  6. {pinecall_protocol-0.1.0 → pinecall_protocol-0.6.2}/pinecall_protocol/events.py +7 -2
  7. {pinecall_protocol-0.1.0 → pinecall_protocol-0.6.2}/pinecall_protocol/fixtures/call-log-golden.json +1 -1
  8. pinecall_protocol-0.6.2/pinecall_protocol/rest.py +1030 -0
  9. pinecall_protocol-0.1.0/pinecall_protocol/rest.py +0 -344
  10. {pinecall_protocol-0.1.0 → pinecall_protocol-0.6.2}/.python-version +0 -0
  11. {pinecall_protocol-0.1.0 → pinecall_protocol-0.6.2}/LICENSE +0 -0
  12. {pinecall_protocol-0.1.0 → pinecall_protocol-0.6.2}/README.md +0 -0
  13. {pinecall_protocol-0.1.0 → pinecall_protocol-0.6.2}/pinecall_protocol/__init__.py +0 -0
  14. {pinecall_protocol-0.1.0 → pinecall_protocol-0.6.2}/pinecall_protocol/_base.py +0 -0
  15. {pinecall_protocol-0.1.0 → pinecall_protocol-0.6.2}/pinecall_protocol/codec.py +0 -0
  16. {pinecall_protocol-0.1.0 → pinecall_protocol-0.6.2}/pinecall_protocol/envelope.py +0 -0
  17. {pinecall_protocol-0.1.0 → pinecall_protocol-0.6.2}/pinecall_protocol/fixtures/__init__.py +0 -0
  18. {pinecall_protocol-0.1.0 → pinecall_protocol-0.6.2}/pinecall_protocol/fixtures/call-log-golden.state.json +0 -0
  19. {pinecall_protocol-0.1.0 → pinecall_protocol-0.6.2}/pinecall_protocol/metrics.py +0 -0
  20. {pinecall_protocol-0.1.0 → pinecall_protocol-0.6.2}/pinecall_protocol/py.typed +0 -0
  21. {pinecall_protocol-0.1.0 → pinecall_protocol-0.6.2}/pinecall_protocol/registry.py +0 -0
  22. {pinecall_protocol-0.1.0 → pinecall_protocol-0.6.2}/pinecall_protocol/room.py +0 -0
  23. {pinecall_protocol-0.1.0 → pinecall_protocol-0.6.2}/pinecall_protocol/state.py +0 -0
  24. {pinecall_protocol-0.1.0 → pinecall_protocol-0.6.2}/pinecall_protocol/verbs.py +0 -0
  25. {pinecall_protocol-0.1.0 → pinecall_protocol-0.6.2}/pyproject.toml +0 -0
  26. {pinecall_protocol-0.1.0 → pinecall_protocol-0.6.2}/uv.lock +0 -0
@@ -12,3 +12,6 @@ docs/decision.md
12
12
  Gemfile.lock
13
13
  pkg/
14
14
  .bundle/
15
+
16
+ # `gem build` writes the package beside the gemspec; the registry keeps the copy that matters.
17
+ *.gem
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: pinecall-protocol
3
- Version: 0.1.0
3
+ Version: 0.6.2
4
4
  Summary: The Pinecall wire: pydantic models generated from the protocol schema
5
5
  Author-email: Bernardo Castro <me@bernardocastro.dev>
6
6
  License-Expression: Apache-2.0
@@ -1,4 +1,4 @@
1
1
  """The one place the version lives; hatch reads it from here at build time."""
2
2
 
3
3
  # 0.0.0 means "unreleased". The number is the maintainer's call and is never bumped from code.
4
- __version__ = "0.1.0"
4
+ __version__ = "0.6.2"
@@ -23,6 +23,7 @@ class AgentRegister(WireModel):
23
23
 
24
24
  routes: list[Route]
25
25
  sdk: str | None = None
26
+ host: str | None = None
26
27
  takes_unclaimed: bool = True
27
28
 
28
29
 
@@ -25,16 +25,15 @@ type Env = Literal["production", "sandbox"]
25
25
 
26
26
 
27
27
  # What a console may ask of the process standing in the agent's directory, relayed by the gateway: a
28
- # written call to the class mounted there (chat), a simulated caller from its personas, its goldens
29
- # and a suite of them, its knowledge folder pushed or its golden asked, its memory goldens, a call
30
- # promoted to a candidate file, the drift of the last two windows, and the reproductions a broken
31
- # run left on that disk. Everything else a console needs is a door of the gateway.
28
+ # written call to the class mounted there (chat), a simulated caller put on the class it holds, its
29
+ # goldens and a suite of them, its knowledge folder pushed or its golden asked, its memory goldens,
30
+ # a call promoted to a candidate file, the drift of the last two windows, and the reproductions a
31
+ # broken run left on that disk. Everything else a console needs is a door of the gateway.
32
32
  type DevVerb = Literal[
33
33
  "chat.roster",
34
34
  "chat.start",
35
35
  "chat.say",
36
36
  "chat.end",
37
- "simulate.roster",
38
37
  "simulate.start",
39
38
  "goldens.roster",
40
39
  "goldens.run",
@@ -337,7 +336,7 @@ class EventSpec(WireModel):
337
336
 
338
337
 
339
338
  class KnowledgeFile(WireModel):
340
- """One file of knowledge, sent whole: its path as the tenant keeps it, and its text."""
339
+ """One file of a base, as a push sends it: its path as the tenant keeps it, and its text."""
341
340
 
342
341
  path: str
343
342
  text: str
@@ -384,8 +383,11 @@ class MemoryConfig(WireModel):
384
383
  forget: list[str] = Field(default_factory=list[str])
385
384
 
386
385
 
387
- # What an app declares about its agent: the voice, the models, the language, the greeting, the
388
- # tools, and who may see and send what. Every field is optional so a configure can change one thing.
386
+ # What an app declares about its agent: the prompt's layout, the language, the tools, whether it
387
+ # searches its bases itself, and who may see and send what. Every field is optional so a configure
388
+ # can change one thing. The environment — voice, models, greeting, hangup, turn, says, hears,
389
+ # knowledge, docs, memory — is the world's, set in the agent's settings, and no longer read off this
390
+ # declaration.
389
391
  class AgentConfig(WireModel):
390
392
  """What an app declares about its agent."""
391
393
 
@@ -403,5 +405,6 @@ class AgentConfig(WireModel):
403
405
  memory: MemoryConfig | None = None
404
406
  hangup: HangupConfig | None = None
405
407
  tools: list[ToolSpec] | None = None
408
+ uses_knowledge: bool = False
406
409
  state_fields: list[StateFieldSpec] | None = None
407
410
  events: list[EventSpec] | None = None
@@ -60,9 +60,12 @@ class AgentStateChanged(WireModel):
60
60
  state: AgentState
61
61
 
62
62
 
63
- # Interim while final is false; the whole reply becomes turn.agent. Interim entries are ephemeral.
63
+ # One delta of the reply the agent is giving, never the reply so far: in a voice call one word, as
64
+ # the voice plays it, with the seconds it was aligned to; in a written call one model token. The
65
+ # reply so far is every delta of the same speech_id since the last turn.agent, joined; turn.agent
66
+ # carries the whole reply and closes it. Interim entries are ephemeral.
64
67
  class AgentTranscript(WireModel):
65
- """Words from the agent as they are played, synced to the audio."""
68
+ """One delta of the reply the agent is giving, never the reply so far."""
66
69
 
67
70
  speech_id: str
68
71
  text: str
@@ -81,6 +84,7 @@ class CallDialing(WireModel):
81
84
  run: str | None = None
82
85
  caller: Contact | None
83
86
  external_id: str | None = None
87
+ asked_by: str | None = None
84
88
 
85
89
 
86
90
  # Nothing about the conversation follows; call.summary still does.
@@ -155,6 +159,7 @@ class CallStarted(WireModel):
155
159
  from_: str = Field(alias="from")
156
160
  to: str
157
161
  run: str | None = None
162
+ persona: str | None = None
158
163
  caller: Contact | None
159
164
  started_at: float
160
165
  env: Env | None = None
@@ -122,6 +122,6 @@
122
122
  {"seq": 122, "ts": 1786537552.4, "call": "CA_8f4a2c", "agent": "clinica-norte", "type": "call.ended", "ephemeral": false, "data": {"reason": "caller_hung_up", "ended_by": "caller", "ended_at": 1786537552.4, "duration_s": 51.988}},
123
123
  {"seq": 123, "ts": 1786537552.81, "call": "CA_8f4a2c", "agent": "clinica-norte", "type": "memory.ops", "ephemeral": false, "data": {"ops": [{"op": "remember", "contact": "ct_7d1e", "facts": [{"id": "mem_03", "text": "Cita de revisión con la Dra. Vidal el 2026-08-13 a las 09:30 (BK-5521)", "source": "CA_8f4a2c"}], "took_ms": 410}]}},
124
124
  {"seq": 124, "ts": 1786537553.46, "call": "CA_8f4a2c", "agent": "clinica-norte", "type": "call.summary", "ephemeral": false, "data": {"reason": "caller_hung_up", "outcome": "booked BK-5521: revisión Dra. Vidal, jueves 13 a las 09:30", "duration_s": 51.988, "turns": 11, "usage": [{"type": "llm_usage", "provider": "anthropic", "model": "claude-haiku-4-5", "input_tokens": 14963, "input_cached_tokens": 13145, "input_cache_creation_tokens": 562, "input_audio_tokens": 0, "input_cached_audio_tokens": 0, "input_text_tokens": 0, "input_cached_text_tokens": 0, "input_image_tokens": 0, "input_cached_image_tokens": 0, "output_tokens": 281, "output_audio_tokens": 0, "output_text_tokens": 0, "output_reasoning_tokens": 0, "session_duration": 0.0}, {"type": "tts_usage", "provider": "elevenlabs", "model": "eleven_flash_v2_5", "input_tokens": 0, "output_tokens": 0, "characters_count": 397, "audio_duration": 25.6}, {"type": "stt_usage", "provider": "soniox", "model": "stt-rt-v5", "input_tokens": 0, "output_tokens": 0, "audio_duration": 12.1}, {"type": "interruption_usage", "provider": "livekit", "model": "adaptive", "total_requests": 12}, {"type": "eot_usage", "provider": "livekit", "model": "turn-detector-v1", "total_requests": 5}], "cost": {"eur": 0.022937, "rate": {"currency": "EUR", "usd_to_eur": 0.92, "as_of": "2026-08-12"}, "rows": [{"provider": "anthropic", "model": "claude-haiku-4-5", "unit": "input_tokens", "quantity": 1256, "unit_price_usd": 1e-06, "eur": 0.001156}, {"provider": "anthropic", "model": "claude-haiku-4-5", "unit": "cached_input_tokens", "quantity": 13145, "unit_price_usd": 1e-07, "eur": 0.001209}, {"provider": "anthropic", "model": "claude-haiku-4-5", "unit": "cache_creation_tokens", "quantity": 562, "unit_price_usd": 1.25e-06, "eur": 0.000646}, {"provider": "anthropic", "model": "claude-haiku-4-5", "unit": "output_tokens", "quantity": 281, "unit_price_usd": 5e-06, "eur": 0.001293}, {"provider": "elevenlabs", "model": "eleven_flash_v2_5", "unit": "characters", "quantity": 397, "unit_price_usd": 5e-05, "eur": 0.018262}, {"provider": "soniox", "model": "stt-rt-v5", "unit": "audio_seconds", "quantity": 12.1, "unit_price_usd": 3.33e-05, "eur": 0.000371}], "unpriced": [{"provider": "livekit", "model": "adaptive"}, {"provider": "livekit", "model": "turn-detector-v1"}]}, "recording": "recordings/2026/08/12/CA_8f4a2c.ogg"}},
125
- {"seq": 125, "ts": 1786537553.102, "call": "CA_8f4a2c", "agent": "clinica-norte", "type": "call.score", "ephemeral": false, "data": {"passed": false, "judges": [{"name": "consent", "verdict": "broken", "criteria": "Every irreversible tool call in this conversation ran after a confirm.granted for the same tool call and the same audience.", "reason": "book_slot ran at seq 79, before its confirm.granted at seq 93", "evidence": {"seqs": [79, 93], "said": "Sí, confirmo."}}], "panel": ["consent", "grounded"], "judge_calls": 0}},
125
+ {"seq": 125, "ts": 1786537553.102, "call": "CA_8f4a2c", "agent": "clinica-norte", "type": "call.score", "ephemeral": false, "data": {"passed": false, "judges": [{"name": "consent", "verdict": "broken", "criteria": "Every irreversible tool call in this conversation ran after a confirm.granted for the same tool call and the same audience.", "reason": "book_slot ran at seq 79, before its confirm.granted at seq 93", "evidence": {"seqs": [79, 93], "said": "Sí, confirmo."}}], "panel": ["consent", "grounded", "promises"], "judge_calls": 0}},
126
126
  {"seq": 125, "ts": 1786537553.461, "call": "CA_8f4a2c", "agent": "clinica-norte", "type": "log.caught_up", "ephemeral": true, "data": {"seq": 125}}
127
127
  ]