pipecatcloud 0.1.4__tar.gz → 0.1.5__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.
- {pipecatcloud-0.1.4 → pipecatcloud-0.1.5}/CHANGELOG.md +16 -0
- {pipecatcloud-0.1.4/src/pipecatcloud.egg-info → pipecatcloud-0.1.5}/PKG-INFO +1 -1
- {pipecatcloud-0.1.4 → pipecatcloud-0.1.5}/pyproject.toml +1 -1
- {pipecatcloud-0.1.4 → pipecatcloud-0.1.5}/src/pipecatcloud/_utils/deploy_utils.py +9 -1
- {pipecatcloud-0.1.4 → pipecatcloud-0.1.5}/src/pipecatcloud/api.py +25 -12
- {pipecatcloud-0.1.4 → pipecatcloud-0.1.5}/src/pipecatcloud/cli/api.py +1 -1
- {pipecatcloud-0.1.4 → pipecatcloud-0.1.5}/src/pipecatcloud/cli/commands/agent.py +24 -7
- {pipecatcloud-0.1.4 → pipecatcloud-0.1.5}/src/pipecatcloud/cli/commands/deploy.py +9 -0
- {pipecatcloud-0.1.4 → pipecatcloud-0.1.5/src/pipecatcloud.egg-info}/PKG-INFO +1 -1
- {pipecatcloud-0.1.4 → pipecatcloud-0.1.5}/.github/workflows/publish-pypi.yml +0 -0
- {pipecatcloud-0.1.4 → pipecatcloud-0.1.5}/.github/workflows/publish-test.yml +0 -0
- {pipecatcloud-0.1.4 → pipecatcloud-0.1.5}/.github/workflows/python-publish.yml +0 -0
- {pipecatcloud-0.1.4 → pipecatcloud-0.1.5}/.gitignore +0 -0
- {pipecatcloud-0.1.4 → pipecatcloud-0.1.5}/LICENSE +0 -0
- {pipecatcloud-0.1.4 → pipecatcloud-0.1.5}/README.md +0 -0
- {pipecatcloud-0.1.4 → pipecatcloud-0.1.5}/dev-requirements.txt +0 -0
- {pipecatcloud-0.1.4 → pipecatcloud-0.1.5}/pipecat-cloud.png +0 -0
- {pipecatcloud-0.1.4 → pipecatcloud-0.1.5}/setup.cfg +0 -0
- {pipecatcloud-0.1.4 → pipecatcloud-0.1.5}/src/pipecatcloud/__init__.py +0 -0
- {pipecatcloud-0.1.4 → pipecatcloud-0.1.5}/src/pipecatcloud/__main__.py +0 -0
- {pipecatcloud-0.1.4 → pipecatcloud-0.1.5}/src/pipecatcloud/__version__.py +0 -0
- {pipecatcloud-0.1.4 → pipecatcloud-0.1.5}/src/pipecatcloud/_utils/__init__.py +0 -0
- {pipecatcloud-0.1.4 → pipecatcloud-0.1.5}/src/pipecatcloud/_utils/async_utils.py +0 -0
- {pipecatcloud-0.1.4 → pipecatcloud-0.1.5}/src/pipecatcloud/_utils/auth_utils.py +0 -0
- {pipecatcloud-0.1.4 → pipecatcloud-0.1.5}/src/pipecatcloud/_utils/console_utils.py +0 -0
- {pipecatcloud-0.1.4 → pipecatcloud-0.1.5}/src/pipecatcloud/_utils/local_runner.py +0 -0
- {pipecatcloud-0.1.4 → pipecatcloud-0.1.5}/src/pipecatcloud/agent.py +0 -0
- {pipecatcloud-0.1.4 → pipecatcloud-0.1.5}/src/pipecatcloud/cli/__init__.py +0 -0
- {pipecatcloud-0.1.4 → pipecatcloud-0.1.5}/src/pipecatcloud/cli/commands/__init__.py +0 -0
- {pipecatcloud-0.1.4 → pipecatcloud-0.1.5}/src/pipecatcloud/cli/commands/auth.py +0 -0
- {pipecatcloud-0.1.4 → pipecatcloud-0.1.5}/src/pipecatcloud/cli/commands/init.py +0 -0
- {pipecatcloud-0.1.4 → pipecatcloud-0.1.5}/src/pipecatcloud/cli/commands/organizations.py +0 -0
- {pipecatcloud-0.1.4 → pipecatcloud-0.1.5}/src/pipecatcloud/cli/commands/run.py +0 -0
- {pipecatcloud-0.1.4 → pipecatcloud-0.1.5}/src/pipecatcloud/cli/commands/secrets.py +0 -0
- {pipecatcloud-0.1.4 → pipecatcloud-0.1.5}/src/pipecatcloud/cli/config.py +0 -0
- {pipecatcloud-0.1.4 → pipecatcloud-0.1.5}/src/pipecatcloud/cli/entry_point.py +0 -0
- {pipecatcloud-0.1.4 → pipecatcloud-0.1.5}/src/pipecatcloud/config.py +0 -0
- {pipecatcloud-0.1.4 → pipecatcloud-0.1.5}/src/pipecatcloud/exception.py +0 -0
- {pipecatcloud-0.1.4 → pipecatcloud-0.1.5}/src/pipecatcloud/session.py +0 -0
- {pipecatcloud-0.1.4 → pipecatcloud-0.1.5}/src/pipecatcloud.egg-info/SOURCES.txt +0 -0
- {pipecatcloud-0.1.4 → pipecatcloud-0.1.5}/src/pipecatcloud.egg-info/dependency_links.txt +0 -0
- {pipecatcloud-0.1.4 → pipecatcloud-0.1.5}/src/pipecatcloud.egg-info/entry_points.txt +0 -0
- {pipecatcloud-0.1.4 → pipecatcloud-0.1.5}/src/pipecatcloud.egg-info/requires.txt +0 -0
- {pipecatcloud-0.1.4 → pipecatcloud-0.1.5}/src/pipecatcloud.egg-info/top_level.txt +0 -0
|
@@ -7,6 +7,22 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [0.1.5] - 2025-04-09
|
|
11
|
+
|
|
12
|
+
# Added
|
|
13
|
+
|
|
14
|
+
- `deploy` command now accepts a `--enable-krisp / -krisp` which enables Krisp integration for your pipeline.
|
|
15
|
+
|
|
16
|
+
# Changed
|
|
17
|
+
|
|
18
|
+
- `start` command now takes agent name from `pcc-deploy.toml` where applicable
|
|
19
|
+
- API error handling now checks `response.ok` and properly checks for error codes for all non-ok responses
|
|
20
|
+
|
|
21
|
+
# Fixed
|
|
22
|
+
|
|
23
|
+
- REST and cURL requests now render errors correctly
|
|
24
|
+
|
|
25
|
+
|
|
10
26
|
## [0.1.4] - 2025-03-28
|
|
11
27
|
|
|
12
28
|
### Changed
|
|
@@ -48,6 +48,7 @@ class DeployConfigParams:
|
|
|
48
48
|
image_credentials: Optional[str] = None
|
|
49
49
|
secret_set: Optional[str] = None
|
|
50
50
|
scaling: ScalingParams = ScalingParams()
|
|
51
|
+
enable_krisp: bool = False
|
|
51
52
|
|
|
52
53
|
def __attrs_post_init__(self):
|
|
53
54
|
if self.image is not None and ":" not in self.image:
|
|
@@ -60,6 +61,7 @@ class DeployConfigParams:
|
|
|
60
61
|
"image_credentials": self.image_credentials,
|
|
61
62
|
"secret_set": self.secret_set,
|
|
62
63
|
"scaling": self.scaling.to_dict() if self.scaling else None,
|
|
64
|
+
"enable_krisp": self.enable_krisp,
|
|
63
65
|
}
|
|
64
66
|
|
|
65
67
|
|
|
@@ -87,7 +89,13 @@ def load_deploy_config_file() -> Optional[DeployConfigParams]:
|
|
|
87
89
|
)
|
|
88
90
|
|
|
89
91
|
# Check for unexpected keys
|
|
90
|
-
expected_keys = {
|
|
92
|
+
expected_keys = {
|
|
93
|
+
"agent_name",
|
|
94
|
+
"image",
|
|
95
|
+
"image_credentials",
|
|
96
|
+
"secret_set",
|
|
97
|
+
"scaling",
|
|
98
|
+
"enable_krisp"}
|
|
91
99
|
unexpected_keys = set(config_data.keys()) - expected_keys
|
|
92
100
|
if unexpected_keys:
|
|
93
101
|
raise ConfigFileError(f"Unexpected keys in config file: {unexpected_keys}")
|
|
@@ -13,6 +13,7 @@ from loguru import logger
|
|
|
13
13
|
|
|
14
14
|
from pipecatcloud._utils.deploy_utils import DeployConfigParams
|
|
15
15
|
from pipecatcloud.config import config
|
|
16
|
+
from pipecatcloud.exception import AgentStartError
|
|
16
17
|
|
|
17
18
|
|
|
18
19
|
def api_method(func):
|
|
@@ -30,10 +31,11 @@ def api_method(func):
|
|
|
30
31
|
|
|
31
32
|
|
|
32
33
|
class _API:
|
|
33
|
-
def __init__(self, token: Optional[str] = None):
|
|
34
|
+
def __init__(self, token: Optional[str] = None, is_cli: bool = False):
|
|
34
35
|
self.token = token
|
|
35
36
|
self.error = None
|
|
36
37
|
self.bubble_next = False
|
|
38
|
+
self.is_cli = is_cli
|
|
37
39
|
|
|
38
40
|
@staticmethod
|
|
39
41
|
def construct_api_url(path: str) -> str:
|
|
@@ -60,6 +62,8 @@ class _API:
|
|
|
60
62
|
override_token: Optional[str] = None,
|
|
61
63
|
) -> Optional[dict]:
|
|
62
64
|
async with aiohttp.ClientSession() as session:
|
|
65
|
+
logger.debug(f"Request: {method} {url} {params} {json}")
|
|
66
|
+
|
|
63
67
|
response = await session.request(
|
|
64
68
|
method=method,
|
|
65
69
|
url=url,
|
|
@@ -67,21 +71,23 @@ class _API:
|
|
|
67
71
|
params=params,
|
|
68
72
|
json=json,
|
|
69
73
|
)
|
|
74
|
+
|
|
70
75
|
if not response.ok:
|
|
71
|
-
|
|
76
|
+
logger.debug(f"Response not ok: {response.status} {response.reason}")
|
|
77
|
+
if self.is_cli and not_found_is_empty and response.status == 404:
|
|
72
78
|
return None
|
|
73
79
|
|
|
74
80
|
# Extract PCC error code, where applicable
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
81
|
+
try:
|
|
82
|
+
# Try to parse the error as JSON
|
|
83
|
+
error_data = await response.json()
|
|
84
|
+
self.error = error_data
|
|
85
|
+
except Exception:
|
|
86
|
+
# Fallback structure matching API format
|
|
87
|
+
self.error = {
|
|
88
|
+
"error": response.reason or "Bad Request",
|
|
89
|
+
"code": str(
|
|
90
|
+
response.status)}
|
|
85
91
|
response.raise_for_status()
|
|
86
92
|
|
|
87
93
|
return await response.json()
|
|
@@ -100,6 +106,12 @@ class _API:
|
|
|
100
106
|
if live and not self.bubble_next:
|
|
101
107
|
live.stop()
|
|
102
108
|
|
|
109
|
+
if not self.is_cli and self.error and not self.bubble_next:
|
|
110
|
+
if isinstance(self.error, dict) and self.error.get("status", "429"):
|
|
111
|
+
raise AgentStartError(self.error)
|
|
112
|
+
else:
|
|
113
|
+
raise e
|
|
114
|
+
|
|
103
115
|
if self.error and not self.bubble_next:
|
|
104
116
|
logger.debug(e)
|
|
105
117
|
self.print_error()
|
|
@@ -308,6 +320,7 @@ class _API:
|
|
|
308
320
|
"minReplicas": deploy_config.scaling.min_instances,
|
|
309
321
|
"maxReplicas": deploy_config.scaling.max_instances,
|
|
310
322
|
},
|
|
323
|
+
"enableKrisp": deploy_config.enable_krisp,
|
|
311
324
|
}
|
|
312
325
|
|
|
313
326
|
# Remove None values recursively
|
|
@@ -25,6 +25,7 @@ from pipecatcloud._utils.console_utils import console, format_timestamp
|
|
|
25
25
|
from pipecatcloud.cli import PIPECAT_CLI_NAME
|
|
26
26
|
from pipecatcloud.cli.api import API
|
|
27
27
|
from pipecatcloud.cli.config import config
|
|
28
|
+
from pipecatcloud._utils.deploy_utils import load_deploy_config_file, DeployConfigParams
|
|
28
29
|
|
|
29
30
|
agent_cli = typer.Typer(name="agent", help="Agent management", no_args_is_help=True)
|
|
30
31
|
|
|
@@ -53,8 +54,7 @@ async def list(
|
|
|
53
54
|
if not data or len(data) == 0:
|
|
54
55
|
console.error(
|
|
55
56
|
f"[red]No agents found for namespace / organization '{org}'[/red]\n\n"
|
|
56
|
-
f"[dim]Please deploy an agent first using[/dim] [bold cyan]{PIPECAT_CLI_NAME} deploy[/bold cyan]"
|
|
57
|
-
)
|
|
57
|
+
f"[dim]Please deploy an agent first using[/dim] [bold cyan]{PIPECAT_CLI_NAME} deploy[/bold cyan]")
|
|
58
58
|
return typer.Exit(1)
|
|
59
59
|
|
|
60
60
|
else:
|
|
@@ -444,7 +444,7 @@ async def deployments(
|
|
|
444
444
|
@synchronizer.create_blocking
|
|
445
445
|
@requires_login
|
|
446
446
|
async def start(
|
|
447
|
-
agent_name: str = typer.Argument(help="Name of the agent to start e.g. 'my-agent'"),
|
|
447
|
+
agent_name: str = typer.Argument(None, help="Name of the agent to start e.g. 'my-agent'"),
|
|
448
448
|
force: bool = typer.Option(
|
|
449
449
|
False,
|
|
450
450
|
"--force",
|
|
@@ -494,6 +494,25 @@ async def start(
|
|
|
494
494
|
"CLI provided" if api_key else config.get("default_public_key_name")
|
|
495
495
|
)
|
|
496
496
|
|
|
497
|
+
# Load values from deployment config file (if one exists)
|
|
498
|
+
partial_config = DeployConfigParams()
|
|
499
|
+
try:
|
|
500
|
+
if deploy_config := load_deploy_config_file():
|
|
501
|
+
partial_config = deploy_config
|
|
502
|
+
except Exception as e:
|
|
503
|
+
console.error(str(e))
|
|
504
|
+
return typer.Exit()
|
|
505
|
+
|
|
506
|
+
# Get agent name from pcc-deploy.toml if not provided
|
|
507
|
+
if not agent_name:
|
|
508
|
+
default_agent_name = partial_config.agent_name
|
|
509
|
+
|
|
510
|
+
if not default_agent_name:
|
|
511
|
+
console.error("No agent name provided and no default agent name found in pcc-deploy.toml")
|
|
512
|
+
return typer.Exit(1)
|
|
513
|
+
|
|
514
|
+
agent_name = default_agent_name
|
|
515
|
+
|
|
497
516
|
if not default_public_api_key:
|
|
498
517
|
console.print(
|
|
499
518
|
Panel(
|
|
@@ -502,8 +521,7 @@ async def start(
|
|
|
502
521
|
title="Public API Key Required",
|
|
503
522
|
title_align="left",
|
|
504
523
|
border_style="yellow",
|
|
505
|
-
)
|
|
506
|
-
)
|
|
524
|
+
))
|
|
507
525
|
|
|
508
526
|
return typer.Exit(1)
|
|
509
527
|
|
|
@@ -533,8 +551,7 @@ async def start(
|
|
|
533
551
|
title=f"[bold]Start Request for agent: {agent_name}[/bold]",
|
|
534
552
|
title_align="left",
|
|
535
553
|
border_style="yellow",
|
|
536
|
-
)
|
|
537
|
-
)
|
|
554
|
+
))
|
|
538
555
|
if not await questionary.confirm(
|
|
539
556
|
"Are you sure you want to start an active session for this agent?"
|
|
540
557
|
).ask_async():
|
|
@@ -268,6 +268,13 @@ def create_deploy_command(app: typer.Typer):
|
|
|
268
268
|
help="Image pull secret to use for deployment",
|
|
269
269
|
rich_help_panel="Deployment Configuration",
|
|
270
270
|
),
|
|
271
|
+
krisp: bool = typer.Option(
|
|
272
|
+
False,
|
|
273
|
+
"--enable-krisp",
|
|
274
|
+
"-krisp",
|
|
275
|
+
help="Enable Krisp integration for this deployment",
|
|
276
|
+
rich_help_panel="Deployment Configuration",
|
|
277
|
+
),
|
|
271
278
|
skip_confirm: bool = typer.Option(
|
|
272
279
|
False,
|
|
273
280
|
"--force",
|
|
@@ -306,6 +313,7 @@ def create_deploy_command(app: typer.Typer):
|
|
|
306
313
|
if max_instances is not None
|
|
307
314
|
else partial_config.scaling.max_instances,
|
|
308
315
|
)
|
|
316
|
+
partial_config.enable_krisp = krisp or partial_config.enable_krisp
|
|
309
317
|
|
|
310
318
|
# Assert agent name and image are provided
|
|
311
319
|
if not partial_config.agent_name:
|
|
@@ -329,6 +337,7 @@ def create_deploy_command(app: typer.Typer):
|
|
|
329
337
|
(f"[bold white]Organization:[/bold white] [green]{org}[/green]"),
|
|
330
338
|
(f"[bold white]Secret set:[/bold white] {'[dim]None[/dim]' if not partial_config.secret_set else '[green] '+ partial_config.secret_set + '[/green]'}"),
|
|
331
339
|
(f"[bold white]Image pull secret:[/bold white] {'[dim]None[/dim]' if not partial_config.image_credentials else '[green]' + partial_config.image_credentials + '[/green]'}"),
|
|
340
|
+
(f"[bold white]Krisp:[/bold white] {'[dim]Disabled[/dim]' if not partial_config.enable_krisp else '[green]Enabled[/green]'}"),
|
|
332
341
|
"\n[dim]Scaling configuration:[/dim]",
|
|
333
342
|
table,
|
|
334
343
|
*
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|