pipecatcloud 1.6.0__tar.gz → 1.6.1__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-1.6.1/.claude/settings.json +16 -0
- {pipecatcloud-1.6.0 → pipecatcloud-1.6.1}/.github/workflows/format.yml +3 -0
- pipecatcloud-1.6.1/.github/workflows/generate-changelog.yml +127 -0
- {pipecatcloud-1.6.0 → pipecatcloud-1.6.1}/.github/workflows/tests.yml +25 -0
- {pipecatcloud-1.6.0 → pipecatcloud-1.6.1}/CHANGELOG.md +20 -0
- {pipecatcloud-1.6.0 → pipecatcloud-1.6.1}/CLAUDE.md +23 -6
- {pipecatcloud-1.6.0/src/pipecatcloud.egg-info → pipecatcloud-1.6.1}/PKG-INFO +1 -1
- pipecatcloud-1.6.1/changelog/_template.md.j2 +16 -0
- {pipecatcloud-1.6.0 → pipecatcloud-1.6.1}/pyproject.toml +54 -0
- pipecatcloud-1.6.1/scripts/check-changelog-fragments.py +56 -0
- {pipecatcloud-1.6.0 → pipecatcloud-1.6.1}/src/pipecatcloud/_utils/build_utils.py +14 -3
- {pipecatcloud-1.6.0 → pipecatcloud-1.6.1}/src/pipecatcloud/_utils/deploy_utils.py +10 -2
- {pipecatcloud-1.6.0 → pipecatcloud-1.6.1}/src/pipecatcloud/api.py +3 -1
- pipecatcloud-1.6.1/src/pipecatcloud/cli/__init__.py +28 -0
- {pipecatcloud-1.6.0 → pipecatcloud-1.6.1}/src/pipecatcloud/cli/commands/docker.py +10 -2
- {pipecatcloud-1.6.0 → pipecatcloud-1.6.1}/src/pipecatcloud/cli/commands/secrets.py +1 -1
- {pipecatcloud-1.6.0 → pipecatcloud-1.6.1}/src/pipecatcloud/cli/config.py +2 -2
- {pipecatcloud-1.6.0 → pipecatcloud-1.6.1}/src/pipecatcloud/cli/entry_point.py +42 -2
- {pipecatcloud-1.6.0 → pipecatcloud-1.6.1/src/pipecatcloud.egg-info}/PKG-INFO +1 -1
- {pipecatcloud-1.6.0 → pipecatcloud-1.6.1}/src/pipecatcloud.egg-info/SOURCES.txt +5 -0
- {pipecatcloud-1.6.0 → pipecatcloud-1.6.1}/src/pipecatcloud.egg-info/scm_file_list.json +5 -0
- pipecatcloud-1.6.1/src/pipecatcloud.egg-info/scm_version.json +8 -0
- {pipecatcloud-1.6.0 → pipecatcloud-1.6.1}/tests/test_api_client.py +18 -1
- {pipecatcloud-1.6.0 → pipecatcloud-1.6.1}/tests/test_build_utils.py +40 -0
- {pipecatcloud-1.6.0 → pipecatcloud-1.6.1}/tests/test_config_file.py +7 -7
- pipecatcloud-1.6.1/tests/test_deploy_utils.py +45 -0
- pipecatcloud-1.6.1/tests/test_entry_point.py +65 -0
- {pipecatcloud-1.6.0 → pipecatcloud-1.6.1}/tests/test_exit_codes.py +1 -1
- {pipecatcloud-1.6.0 → pipecatcloud-1.6.1}/tests/test_log_redaction.py +1 -1
- {pipecatcloud-1.6.0 → pipecatcloud-1.6.1}/tests/test_output_modes.py +2 -1
- {pipecatcloud-1.6.0 → pipecatcloud-1.6.1}/uv.lock +155 -0
- pipecatcloud-1.6.0/.claude/settings.json +0 -5
- pipecatcloud-1.6.0/src/pipecatcloud/cli/__init__.py +0 -13
- pipecatcloud-1.6.0/src/pipecatcloud.egg-info/scm_version.json +0 -8
- {pipecatcloud-1.6.0 → pipecatcloud-1.6.1}/.claude/skills/update-docs/SOURCE_DOC_MAPPING.md +0 -0
- {pipecatcloud-1.6.0 → pipecatcloud-1.6.1}/.github/workflows/publish-pypi.yml +0 -0
- {pipecatcloud-1.6.0 → pipecatcloud-1.6.1}/.github/workflows/publish-test.yml +0 -0
- {pipecatcloud-1.6.0 → pipecatcloud-1.6.1}/.github/workflows/python-compatibility.yml +0 -0
- {pipecatcloud-1.6.0 → pipecatcloud-1.6.1}/.github/workflows/update-docs.yml +0 -0
- {pipecatcloud-1.6.0 → pipecatcloud-1.6.1}/.gitignore +0 -0
- {pipecatcloud-1.6.0 → pipecatcloud-1.6.1}/.pre-commit-config.yaml +0 -0
- {pipecatcloud-1.6.0 → pipecatcloud-1.6.1}/LICENSE +0 -0
- {pipecatcloud-1.6.0 → pipecatcloud-1.6.1}/README.md +0 -0
- {pipecatcloud-1.6.0 → pipecatcloud-1.6.1}/pipecat-cloud.png +0 -0
- {pipecatcloud-1.6.0 → pipecatcloud-1.6.1}/pytest.ini +0 -0
- {pipecatcloud-1.6.0 → pipecatcloud-1.6.1}/scripts/fix-ruff.sh +0 -0
- {pipecatcloud-1.6.0 → pipecatcloud-1.6.1}/scripts/release-changelog.py +0 -0
- {pipecatcloud-1.6.0 → pipecatcloud-1.6.1}/setup.cfg +0 -0
- {pipecatcloud-1.6.0 → pipecatcloud-1.6.1}/src/pipecatcloud/__init__.py +0 -0
- {pipecatcloud-1.6.0 → pipecatcloud-1.6.1}/src/pipecatcloud/__version__.py +0 -0
- {pipecatcloud-1.6.0 → pipecatcloud-1.6.1}/src/pipecatcloud/_utils/__init__.py +0 -0
- {pipecatcloud-1.6.0 → pipecatcloud-1.6.1}/src/pipecatcloud/_utils/async_utils.py +0 -0
- {pipecatcloud-1.6.0 → pipecatcloud-1.6.1}/src/pipecatcloud/_utils/auth_utils.py +0 -0
- {pipecatcloud-1.6.0 → pipecatcloud-1.6.1}/src/pipecatcloud/_utils/base_image.py +0 -0
- {pipecatcloud-1.6.0 → pipecatcloud-1.6.1}/src/pipecatcloud/_utils/console_utils.py +0 -0
- {pipecatcloud-1.6.0 → pipecatcloud-1.6.1}/src/pipecatcloud/_utils/environment_utils.py +0 -0
- {pipecatcloud-1.6.0 → pipecatcloud-1.6.1}/src/pipecatcloud/_utils/github_utils.py +0 -0
- {pipecatcloud-1.6.0 → pipecatcloud-1.6.1}/src/pipecatcloud/_utils/log_utils.py +0 -0
- {pipecatcloud-1.6.0 → pipecatcloud-1.6.1}/src/pipecatcloud/_utils/regions.py +0 -0
- {pipecatcloud-1.6.0 → pipecatcloud-1.6.1}/src/pipecatcloud/agent.py +0 -0
- {pipecatcloud-1.6.0 → pipecatcloud-1.6.1}/src/pipecatcloud/cli/api.py +0 -0
- {pipecatcloud-1.6.0 → pipecatcloud-1.6.1}/src/pipecatcloud/cli/commands/__init__.py +0 -0
- {pipecatcloud-1.6.0 → pipecatcloud-1.6.1}/src/pipecatcloud/cli/commands/agent.py +0 -0
- {pipecatcloud-1.6.0 → pipecatcloud-1.6.1}/src/pipecatcloud/cli/commands/agent_profiles.py +0 -0
- {pipecatcloud-1.6.0 → pipecatcloud-1.6.1}/src/pipecatcloud/cli/commands/auth.py +0 -0
- {pipecatcloud-1.6.0 → pipecatcloud-1.6.1}/src/pipecatcloud/cli/commands/build.py +0 -0
- {pipecatcloud-1.6.0 → pipecatcloud-1.6.1}/src/pipecatcloud/cli/commands/deploy.py +0 -0
- {pipecatcloud-1.6.0 → pipecatcloud-1.6.1}/src/pipecatcloud/cli/commands/github.py +0 -0
- {pipecatcloud-1.6.0 → pipecatcloud-1.6.1}/src/pipecatcloud/cli/commands/organizations.py +0 -0
- {pipecatcloud-1.6.0 → pipecatcloud-1.6.1}/src/pipecatcloud/cli/commands/project.py +0 -0
- {pipecatcloud-1.6.0 → pipecatcloud-1.6.1}/src/pipecatcloud/cli/commands/project_group.py +0 -0
- {pipecatcloud-1.6.0 → pipecatcloud-1.6.1}/src/pipecatcloud/cli/commands/regions.py +0 -0
- {pipecatcloud-1.6.0 → pipecatcloud-1.6.1}/src/pipecatcloud/cli/commands/registry_keys.py +0 -0
- {pipecatcloud-1.6.0 → pipecatcloud-1.6.1}/src/pipecatcloud/cli/commands/spend_limit.py +0 -0
- {pipecatcloud-1.6.0 → pipecatcloud-1.6.1}/src/pipecatcloud/config.py +0 -0
- {pipecatcloud-1.6.0 → pipecatcloud-1.6.1}/src/pipecatcloud/constants.py +0 -0
- {pipecatcloud-1.6.0 → pipecatcloud-1.6.1}/src/pipecatcloud/exception.py +0 -0
- {pipecatcloud-1.6.0 → pipecatcloud-1.6.1}/src/pipecatcloud/py.typed +0 -0
- {pipecatcloud-1.6.0 → pipecatcloud-1.6.1}/src/pipecatcloud/session.py +0 -0
- {pipecatcloud-1.6.0 → pipecatcloud-1.6.1}/src/pipecatcloud/smallwebrtc/session_manager.py +0 -0
- {pipecatcloud-1.6.0 → pipecatcloud-1.6.1}/src/pipecatcloud.egg-info/dependency_links.txt +0 -0
- {pipecatcloud-1.6.0 → pipecatcloud-1.6.1}/src/pipecatcloud.egg-info/entry_points.txt +0 -0
- {pipecatcloud-1.6.0 → pipecatcloud-1.6.1}/src/pipecatcloud.egg-info/requires.txt +0 -0
- {pipecatcloud-1.6.0 → pipecatcloud-1.6.1}/src/pipecatcloud.egg-info/top_level.txt +0 -0
- {pipecatcloud-1.6.0 → pipecatcloud-1.6.1}/tests/__init__.py +0 -0
- {pipecatcloud-1.6.0 → pipecatcloud-1.6.1}/tests/conftest.py +0 -0
- {pipecatcloud-1.6.0 → pipecatcloud-1.6.1}/tests/test_agent_args.py +0 -0
- {pipecatcloud-1.6.0 → pipecatcloud-1.6.1}/tests/test_agent_profiles_and_resources.py +0 -0
- {pipecatcloud-1.6.0 → pipecatcloud-1.6.1}/tests/test_agent_sessions.py +0 -0
- {pipecatcloud-1.6.0 → pipecatcloud-1.6.1}/tests/test_agent_status_output.py +0 -0
- {pipecatcloud-1.6.0 → pipecatcloud-1.6.1}/tests/test_agent_stop.py +0 -0
- {pipecatcloud-1.6.0 → pipecatcloud-1.6.1}/tests/test_auth.py +0 -0
- {pipecatcloud-1.6.0 → pipecatcloud-1.6.1}/tests/test_base_image.py +0 -0
- {pipecatcloud-1.6.0 → pipecatcloud-1.6.1}/tests/test_build_id_display.py +0 -0
- {pipecatcloud-1.6.0 → pipecatcloud-1.6.1}/tests/test_deploy_architecture.py +0 -0
- {pipecatcloud-1.6.0 → pipecatcloud-1.6.1}/tests/test_deploy_image_pull_secret.py +0 -0
- {pipecatcloud-1.6.0 → pipecatcloud-1.6.1}/tests/test_deploy_poll.py +0 -0
- {pipecatcloud-1.6.0 → pipecatcloud-1.6.1}/tests/test_deploy_referenced_secret_set.py +0 -0
- {pipecatcloud-1.6.0 → pipecatcloud-1.6.1}/tests/test_deployment_status.py +0 -0
- {pipecatcloud-1.6.0 → pipecatcloud-1.6.1}/tests/test_docker_commands.py +0 -0
- {pipecatcloud-1.6.0 → pipecatcloud-1.6.1}/tests/test_github_integration.py +0 -0
- {pipecatcloud-1.6.0 → pipecatcloud-1.6.1}/tests/test_json_output.py +0 -0
- {pipecatcloud-1.6.0 → pipecatcloud-1.6.1}/tests/test_krisp_viva.py +0 -0
- {pipecatcloud-1.6.0 → pipecatcloud-1.6.1}/tests/test_max_session_duration.py +0 -0
- {pipecatcloud-1.6.0 → pipecatcloud-1.6.1}/tests/test_organizations.py +0 -0
- {pipecatcloud-1.6.0 → pipecatcloud-1.6.1}/tests/test_pat_auth.py +0 -0
- {pipecatcloud-1.6.0 → pipecatcloud-1.6.1}/tests/test_projects.py +0 -0
- {pipecatcloud-1.6.0 → pipecatcloud-1.6.1}/tests/test_regions.py +0 -0
- {pipecatcloud-1.6.0 → pipecatcloud-1.6.1}/tests/test_regions_lifecycle.py +0 -0
- {pipecatcloud-1.6.0 → pipecatcloud-1.6.1}/tests/test_secrets_bulk_write.py +0 -0
- {pipecatcloud-1.6.0 → pipecatcloud-1.6.1}/tests/test_secrets_keys.py +0 -0
- {pipecatcloud-1.6.0 → pipecatcloud-1.6.1}/tests/test_secrets_reference.py +0 -0
- {pipecatcloud-1.6.0 → pipecatcloud-1.6.1}/tests/test_secrets_retry.py +0 -0
- {pipecatcloud-1.6.0 → pipecatcloud-1.6.1}/tests/test_secrets_set_referenced.py +0 -0
- {pipecatcloud-1.6.0 → pipecatcloud-1.6.1}/tests/test_spend_limit.py +0 -0
- {pipecatcloud-1.6.0 → pipecatcloud-1.6.1}/tests/test_unread_answers.py +0 -0
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"attribution": {
|
|
3
|
+
"commit": ""
|
|
4
|
+
},
|
|
5
|
+
"extraKnownMarketplaces": {
|
|
6
|
+
"pipecat-dev-skills": {
|
|
7
|
+
"source": {
|
|
8
|
+
"source": "github",
|
|
9
|
+
"repo": "pipecat-ai/pipecat"
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
},
|
|
13
|
+
"enabledPlugins": {
|
|
14
|
+
"pipecat-dev@pipecat-dev-skills": true
|
|
15
|
+
}
|
|
16
|
+
}
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
name: Generate Changelog for Release
|
|
2
|
+
|
|
3
|
+
# Assembles the changelog/ fragments into a CHANGELOG.md section for the given
|
|
4
|
+
# version, deletes them, and opens a release PR. After it merges, tag the merge
|
|
5
|
+
# commit and run publish-pypi.yml with that tag.
|
|
6
|
+
|
|
7
|
+
on:
|
|
8
|
+
workflow_dispatch:
|
|
9
|
+
inputs:
|
|
10
|
+
version:
|
|
11
|
+
description: "Release version (e.g., 1.7.0)"
|
|
12
|
+
required: true
|
|
13
|
+
type: string
|
|
14
|
+
date:
|
|
15
|
+
description: "Release date (YYYY-MM-DD format, defaults to today)"
|
|
16
|
+
required: false
|
|
17
|
+
type: string
|
|
18
|
+
default: ""
|
|
19
|
+
|
|
20
|
+
permissions:
|
|
21
|
+
contents: write
|
|
22
|
+
pull-requests: write
|
|
23
|
+
|
|
24
|
+
jobs:
|
|
25
|
+
generate-changelog:
|
|
26
|
+
runs-on: ubuntu-latest
|
|
27
|
+
steps:
|
|
28
|
+
- name: Checkout repository
|
|
29
|
+
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
30
|
+
with:
|
|
31
|
+
fetch-depth: 0
|
|
32
|
+
|
|
33
|
+
- name: Install uv
|
|
34
|
+
uses: astral-sh/setup-uv@68559e99cc807c1eb7e9238fd43a15bba460eec2 # v10.3.3
|
|
35
|
+
with:
|
|
36
|
+
enable-cache: true
|
|
37
|
+
|
|
38
|
+
- name: Install dependencies
|
|
39
|
+
run: uv sync --group dev
|
|
40
|
+
|
|
41
|
+
- name: Validate inputs
|
|
42
|
+
id: inputs
|
|
43
|
+
env:
|
|
44
|
+
VERSION: ${{ inputs.version }}
|
|
45
|
+
DATE: ${{ inputs.date }}
|
|
46
|
+
run: |
|
|
47
|
+
if ! [[ "$VERSION" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
|
|
48
|
+
echo "Error: version must be X.Y.Z with no leading v (e.g., 1.7.0)"
|
|
49
|
+
exit 1
|
|
50
|
+
fi
|
|
51
|
+
if git rev-parse -q --verify "refs/tags/v$VERSION" >/dev/null; then
|
|
52
|
+
echo "Error: tag v$VERSION already exists"
|
|
53
|
+
exit 1
|
|
54
|
+
fi
|
|
55
|
+
if grep -q "^## \[$VERSION\]" CHANGELOG.md; then
|
|
56
|
+
echo "Error: CHANGELOG.md already has a section for $VERSION"
|
|
57
|
+
exit 1
|
|
58
|
+
fi
|
|
59
|
+
if [ -z "$DATE" ]; then
|
|
60
|
+
DATE=$(date +%Y-%m-%d)
|
|
61
|
+
elif ! date -d "$DATE" >/dev/null 2>&1 || ! [[ "$DATE" =~ ^[0-9]{4}-[0-9]{2}-[0-9]{2}$ ]]; then
|
|
62
|
+
echo "Error: date must be YYYY-MM-DD (e.g., 2026-12-01)"
|
|
63
|
+
exit 1
|
|
64
|
+
fi
|
|
65
|
+
echo "Release $VERSION dated $DATE"
|
|
66
|
+
echo "release_date=$DATE" >> "$GITHUB_OUTPUT"
|
|
67
|
+
|
|
68
|
+
- name: Check changelog fragments
|
|
69
|
+
id: fragments
|
|
70
|
+
run: |
|
|
71
|
+
# Also runs on every PR in format.yml, so a misnamed fragment should
|
|
72
|
+
# never get this far.
|
|
73
|
+
uv run python scripts/check-changelog-fragments.py
|
|
74
|
+
|
|
75
|
+
COUNT=$(find changelog -maxdepth 1 -type f -name '*.md' | wc -l | tr -d ' ')
|
|
76
|
+
if [ "$COUNT" -eq 0 ]; then
|
|
77
|
+
echo "Error: no changelog fragments in changelog/. Nothing to release."
|
|
78
|
+
exit 1
|
|
79
|
+
fi
|
|
80
|
+
echo "Found $COUNT changelog fragment(s)"
|
|
81
|
+
echo "count=$COUNT" >> "$GITHUB_OUTPUT"
|
|
82
|
+
|
|
83
|
+
- name: Build changelog
|
|
84
|
+
env:
|
|
85
|
+
VERSION: ${{ inputs.version }}
|
|
86
|
+
DATE: ${{ steps.inputs.outputs.release_date }}
|
|
87
|
+
run: uv run towncrier build --version "$VERSION" --date "$DATE" --yes
|
|
88
|
+
|
|
89
|
+
- name: Preview release notes
|
|
90
|
+
id: notes
|
|
91
|
+
env:
|
|
92
|
+
VERSION: ${{ inputs.version }}
|
|
93
|
+
run: |
|
|
94
|
+
uv run python scripts/release-changelog.py --no-heading "$VERSION" > "$RUNNER_TEMP/notes.md"
|
|
95
|
+
cat "$RUNNER_TEMP/notes.md" >> "$GITHUB_STEP_SUMMARY"
|
|
96
|
+
{
|
|
97
|
+
echo "body<<RELEASE_NOTES_EOF"
|
|
98
|
+
cat "$RUNNER_TEMP/notes.md"
|
|
99
|
+
echo "RELEASE_NOTES_EOF"
|
|
100
|
+
} >> "$GITHUB_OUTPUT"
|
|
101
|
+
|
|
102
|
+
- name: Create pull request
|
|
103
|
+
uses: peter-evans/create-pull-request@5f6978faf089d4d20b00c7766989d076bb2fc7f1 # v8.1.1
|
|
104
|
+
with:
|
|
105
|
+
token: ${{ secrets.GITHUB_TOKEN }}
|
|
106
|
+
commit-message: "Release ${{ inputs.version }}"
|
|
107
|
+
title: "Release ${{ inputs.version }}"
|
|
108
|
+
body: |
|
|
109
|
+
Assembles the CHANGELOG.md section for **${{ inputs.version }}** (${{ steps.inputs.outputs.release_date }}) from ${{ steps.fragments.outputs.count }} changelog fragment(s) and deletes them.
|
|
110
|
+
|
|
111
|
+
Edit `CHANGELOG.md` on this branch to fix wording before merging: the GitHub Release notes are generated from it.
|
|
112
|
+
|
|
113
|
+
After merging:
|
|
114
|
+
|
|
115
|
+
1. Tag the merge commit: `git tag -a v${{ inputs.version }} -m v${{ inputs.version }} && git push origin v${{ inputs.version }}`
|
|
116
|
+
2. Run `publish-pypi.yml` with `v${{ inputs.version }}`. It publishes to PyPI and creates the GitHub Release.
|
|
117
|
+
|
|
118
|
+
<details>
|
|
119
|
+
<summary>Release notes preview</summary>
|
|
120
|
+
|
|
121
|
+
${{ steps.notes.outputs.body }}
|
|
122
|
+
|
|
123
|
+
</details>
|
|
124
|
+
branch: release-${{ inputs.version }}
|
|
125
|
+
delete-branch: true
|
|
126
|
+
labels: |
|
|
127
|
+
release
|
|
@@ -37,6 +37,31 @@ jobs:
|
|
|
37
37
|
run: |
|
|
38
38
|
uv run pytest -v
|
|
39
39
|
|
|
40
|
+
# Paths, file encodings and console output all differ on Windows, and many
|
|
41
|
+
# users deploy from there. A separate job keeps the "Unit Tests" check name.
|
|
42
|
+
test-windows:
|
|
43
|
+
name: 'Unit Tests (Windows)'
|
|
44
|
+
runs-on: windows-latest
|
|
45
|
+
steps:
|
|
46
|
+
- name: Checkout repo
|
|
47
|
+
uses: actions/checkout@v4
|
|
48
|
+
|
|
49
|
+
- name: Install uv
|
|
50
|
+
uses: astral-sh/setup-uv@v3
|
|
51
|
+
with:
|
|
52
|
+
version: 'latest'
|
|
53
|
+
|
|
54
|
+
- name: Set up Python
|
|
55
|
+
run: uv python install 3.12
|
|
56
|
+
|
|
57
|
+
- name: Install dependencies
|
|
58
|
+
run: |
|
|
59
|
+
uv sync --group dev
|
|
60
|
+
|
|
61
|
+
- name: Run tests
|
|
62
|
+
run: |
|
|
63
|
+
uv run pytest -v
|
|
64
|
+
|
|
40
65
|
# The job above runs the agent session-argument types against the pipecat-ai
|
|
41
66
|
# in uv.lock. These legs run them against releases before MOQRunnerArguments
|
|
42
67
|
# gained relay_url, where pipecatcloud.agent must still import and refuse only
|
|
@@ -5,6 +5,26 @@ All notable changes to **Pipecat Cloud** will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
<!-- towncrier release notes start -->
|
|
9
|
+
|
|
10
|
+
## [1.6.1] - 2026-11-17
|
|
11
|
+
|
|
12
|
+
### Changed
|
|
13
|
+
|
|
14
|
+
- `pipecat cloud deploy`, `docker build-push` and the `agent` commands that read `pcc-deploy.toml` now fail with an error when it is not valid TOML or not UTF-8. Before, they ignored the file and ran on defaults.
|
|
15
|
+
(PR [#229](https://github.com/daily-co/pipecat-cloud/pull/229))
|
|
16
|
+
|
|
17
|
+
### Fixed
|
|
18
|
+
|
|
19
|
+
- `pipecat cloud` no longer crashes with `UnicodeEncodeError` when stdout's encoding is cp1252, as with piped or redirected output and Git Bash on Windows. Characters the output cannot show print as `?`, and the ᓚᘏᗢ mascot is left out.
|
|
20
|
+
(PR [#229](https://github.com/daily-co/pipecat-cloud/pull/229))
|
|
21
|
+
|
|
22
|
+
- On Windows, `pcc-deploy.toml`, `.dockerignore`, `pipecat cloud secrets set --file` files and the credentials file are read as UTF-8 instead of the system code page, and `pipecat cloud docker` decodes Docker's output as UTF-8.
|
|
23
|
+
(PR [#229](https://github.com/daily-co/pipecat-cloud/pull/229))
|
|
24
|
+
|
|
25
|
+
- `pipecat cloud deploy` cloud builds work on Windows. Files in subfolders were packed with backslash names, and a `--dockerfile` path in a subfolder was sent with backslashes, so the build could not find them.
|
|
26
|
+
(PR [#229](https://github.com/daily-co/pipecat-cloud/pull/229))
|
|
27
|
+
|
|
8
28
|
## [1.6.0] - 2026-11-12
|
|
9
29
|
|
|
10
30
|
### Added
|
|
@@ -72,7 +72,9 @@ src/pipecatcloud/
|
|
|
72
72
|
smallwebrtc/
|
|
73
73
|
session_manager.py SmallWebRTC support for non-Pipecat agents
|
|
74
74
|
tests/ Pytest suite, parallel to src/
|
|
75
|
-
|
|
75
|
+
changelog/ Changelog fragments for the next release, and towncrier's template
|
|
76
|
+
scripts/ Ruff fix-up, changelog fragment check, release-notes extraction
|
|
77
|
+
.github/workflows/ CI, release and docs workflows (see CI below)
|
|
76
78
|
pcc-deploy.toml Example deployment config consumed by `pipecat cloud deploy`
|
|
77
79
|
```
|
|
78
80
|
|
|
@@ -86,8 +88,11 @@ pcc-deploy.toml Example deployment config consumed by `pipecat cloud de
|
|
|
86
88
|
## CI
|
|
87
89
|
|
|
88
90
|
- `tests.yml` runs the full suite (`uv run pytest -v`) on push to main and PRs, and runs `tests/test_agent_args.py` again with pipecat-ai 1.11.0 and 1.5.0 layered over the lock (`uv run --with ... python -m pytest`, with `PCC_EXPECTED_PIPECAT_AI` so the tests confirm the version they run on).
|
|
89
|
-
- `format.yml` runs `ruff format --diff` and `
|
|
91
|
+
- `format.yml` runs `ruff format --diff`, `ruff check` and `scripts/check-changelog-fragments.py`. All three must pass.
|
|
92
|
+
- `python-compatibility.yml` checks that the CLI imports on Python 3.11 through 3.14.
|
|
93
|
+
- `generate-changelog.yml` is a manual dispatch that assembles the changelog fragments and opens the release PR (see Release flow).
|
|
90
94
|
- `publish-pypi.yml` and `publish-test.yml` are manual dispatches that build and publish a specific git tag.
|
|
95
|
+
- `update-docs.yml` opens a docs PR against `pipecat-ai/docs` when a change under `src/pipecatcloud/` merges. It needs repository secrets that aren't set yet, so it fails at its first step until they are.
|
|
91
96
|
|
|
92
97
|
## Config and environment
|
|
93
98
|
|
|
@@ -105,13 +110,25 @@ pcc-deploy.toml Example deployment config consumed by `pipecat cloud de
|
|
|
105
110
|
- Krisp VIVA audio filter names are `Literal["tel", "pro"]` in `constants.py`. These must match the server-side ConfigMap, so coordinate changes with the backend.
|
|
106
111
|
- Never log a request or response body, a header, or an exception's text: they can hold secret values and tokens. Use `_utils/log_utils.py`. `tests/test_log_redaction.py` fails on a log call that reads a name or attribute it knows can hold one, however it is formatted, or that uses `logger.opt`, `logger.exception` or `logger.catch`. Only `describe_*` and `len` calls are exempt.
|
|
107
112
|
|
|
113
|
+
## Changelog entries
|
|
114
|
+
|
|
115
|
+
Don't edit `CHANGELOG.md` in a feature PR. Each PR with a user-facing change adds **changelog fragments** to `changelog/`, which towncrier assembles at release time, so parallel PRs never conflict on the changelog.
|
|
116
|
+
|
|
117
|
+
Open PRs with `/pipecat-dev:pr-submit`. It runs `/pipecat-dev:prose-review` on the branch, opens the PR, writes its fragments with `/pipecat-dev:changelog <PR number>`, and fills in the description with `/pipecat-dev:pr-description`. For a PR that's already open, run `/pipecat-dev:changelog <PR number>` on its own. These skills come from the `pipecat-dev` plugin in the Pipecat repo, which `.claude/settings.json` enables for this repo.
|
|
118
|
+
|
|
119
|
+
- Name a fragment `<PR number>.<type>.md`, with type one of `added`, `changed`, `deprecated`, `removed`, `fixed`, `performance`, `security`, `other`. A second entry of the same type is `<PR number>.<type>.2.md`. The types come from `[tool.towncrier]` in `pyproject.toml`. `uv run python scripts/check-changelog-fragments.py` checks the names, and CI runs it on every PR.
|
|
120
|
+
- The content is one `- ` bullet on a single line, no wrapping, starting with ⚠️ for a breaking change. Code blocks and sub-bullets go below it, indented two spaces. The release section links each entry to its PR.
|
|
121
|
+
- Skip a fragment for docs, tests, CI, internal refactors, and fixes to changes that haven't shipped (edit that change's fragment instead).
|
|
122
|
+
- Preview the next section with `uv run towncrier build --draft --version X.Y.Z`. Don't run it without `--draft`: it rewrites `CHANGELOG.md`, deletes the fragments and stages both.
|
|
123
|
+
|
|
108
124
|
## Release flow
|
|
109
125
|
|
|
110
|
-
1.
|
|
111
|
-
2.
|
|
112
|
-
3.
|
|
126
|
+
1. Pick the version by semantic versioning from the pending fragments: a breaking change (its entry starts with ⚠️) bumps major, `added` or `deprecated` bumps minor, otherwise patch. A `removed` entry is not breaking by itself: 1.4.0 and 1.6.0 removed things that never worked.
|
|
127
|
+
2. Run the **Generate Changelog for Release** workflow (`generate-changelog.yml`) with the version. It builds the `CHANGELOG.md` section, deletes the fragments and opens a `Release X.Y.Z` PR with a preview of the release notes. Fix wording on that branch, then merge it.
|
|
128
|
+
3. Tag the merge commit with `v<MAJOR>.<MINOR>.<PATCH>` and push the tag.
|
|
129
|
+
4. Trigger `publish-pypi.yml` manually with that tag. `setuptools_scm` picks up the version from the tag.
|
|
113
130
|
|
|
114
|
-
After publishing to PyPI, the workflow creates (or updates) the GitHub Release for the tag. Its notes are the tag's `CHANGELOG.md` section, reformatted by `scripts/release-changelog.py`, so fix release-note wording in the changelog rather than on GitHub: a re-run overwrites edits made there. Preview the notes locally with `python scripts/release-changelog.py --no-heading 1.3.0`.
|
|
131
|
+
After publishing to PyPI, the workflow creates (or updates) the GitHub Release for the tag. Its notes are the tag's `CHANGELOG.md` section, reformatted by `scripts/release-changelog.py`, so fix release-note wording in the changelog rather than on GitHub: a re-run overwrites edits made there. Preview the notes locally with `uv run python scripts/release-changelog.py --no-heading 1.3.0`.
|
|
115
132
|
|
|
116
133
|
## Writing style for generated content in this repo
|
|
117
134
|
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{% for section, _ in sections.items() %}
|
|
2
|
+
{% if sections[section] %}
|
|
3
|
+
{% for category, val in definitions.items() if category in sections[section]%}
|
|
4
|
+
### {{ definitions[category]['name'] }}
|
|
5
|
+
|
|
6
|
+
{% for text, values in sections[section][category].items() %}
|
|
7
|
+
{{ text }}
|
|
8
|
+
(PR {{ values|join(', ') }})
|
|
9
|
+
|
|
10
|
+
{% endfor %}
|
|
11
|
+
{% endfor %}
|
|
12
|
+
{% else %}
|
|
13
|
+
No significant changes.
|
|
14
|
+
|
|
15
|
+
{% endif %}
|
|
16
|
+
{% endfor %}
|
|
@@ -47,6 +47,7 @@ dev = [
|
|
|
47
47
|
"packaging>=25.0",
|
|
48
48
|
# Needed to import/test pipecatcloud.agent (the optional pipecat surface).
|
|
49
49
|
"pipecat-ai>=1.0.0",
|
|
50
|
+
"towncrier~=25.8.0",
|
|
50
51
|
]
|
|
51
52
|
|
|
52
53
|
[project.entry-points."pipecat_cli.extensions"]
|
|
@@ -84,3 +85,56 @@ Website = "https://docs.pipecat.ai/pipecat-cloud"
|
|
|
84
85
|
[tool.setuptools_scm]
|
|
85
86
|
local_scheme = "no-local-version"
|
|
86
87
|
fallback_version = "0.0.0-dev"
|
|
88
|
+
|
|
89
|
+
# Changelog fragments: each PR adds changelog/<PR>.<type>.md, and the
|
|
90
|
+
# generate-changelog workflow assembles them into CHANGELOG.md at release time.
|
|
91
|
+
[tool.towncrier]
|
|
92
|
+
name = "pipecatcloud"
|
|
93
|
+
filename = "CHANGELOG.md"
|
|
94
|
+
directory = "changelog"
|
|
95
|
+
start_string = "<!-- towncrier release notes start -->\n"
|
|
96
|
+
template = "changelog/_template.md.j2"
|
|
97
|
+
title_format = "## [{version}] - {project_date}"
|
|
98
|
+
issue_format = "[#{issue}](https://github.com/daily-co/pipecat-cloud/pull/{issue})"
|
|
99
|
+
underlines = ["", "", ""]
|
|
100
|
+
wrap = false
|
|
101
|
+
|
|
102
|
+
[[tool.towncrier.type]]
|
|
103
|
+
directory = "added"
|
|
104
|
+
name = "Added"
|
|
105
|
+
showcontent = true
|
|
106
|
+
|
|
107
|
+
[[tool.towncrier.type]]
|
|
108
|
+
directory = "changed"
|
|
109
|
+
name = "Changed"
|
|
110
|
+
showcontent = true
|
|
111
|
+
|
|
112
|
+
[[tool.towncrier.type]]
|
|
113
|
+
directory = "deprecated"
|
|
114
|
+
name = "Deprecated"
|
|
115
|
+
showcontent = true
|
|
116
|
+
|
|
117
|
+
[[tool.towncrier.type]]
|
|
118
|
+
directory = "removed"
|
|
119
|
+
name = "Removed"
|
|
120
|
+
showcontent = true
|
|
121
|
+
|
|
122
|
+
[[tool.towncrier.type]]
|
|
123
|
+
directory = "fixed"
|
|
124
|
+
name = "Fixed"
|
|
125
|
+
showcontent = true
|
|
126
|
+
|
|
127
|
+
[[tool.towncrier.type]]
|
|
128
|
+
directory = "performance"
|
|
129
|
+
name = "Performance"
|
|
130
|
+
showcontent = true
|
|
131
|
+
|
|
132
|
+
[[tool.towncrier.type]]
|
|
133
|
+
directory = "security"
|
|
134
|
+
name = "Security"
|
|
135
|
+
showcontent = true
|
|
136
|
+
|
|
137
|
+
[[tool.towncrier.type]]
|
|
138
|
+
directory = "other"
|
|
139
|
+
name = "Other"
|
|
140
|
+
showcontent = true
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
"""Check that every changelog fragment is named so towncrier picks it up.
|
|
3
|
+
|
|
4
|
+
Usage::
|
|
5
|
+
|
|
6
|
+
python scripts/check-changelog-fragments.py
|
|
7
|
+
|
|
8
|
+
A fragment is named ``<PR number>.<type>.md``, or ``<PR number>.<type>.<n>.md``
|
|
9
|
+
for a second entry of the same type. The valid types and the fragments
|
|
10
|
+
directory are read from ``[tool.towncrier]`` in ``pyproject.toml``, so adding a
|
|
11
|
+
type there is the only change needed. The template that config names is
|
|
12
|
+
skipped, as are dotfiles.
|
|
13
|
+
|
|
14
|
+
towncrier silently drops a fragment whose name carries no type it knows, so
|
|
15
|
+
this runs on every PR (``format.yml``) and again before a release
|
|
16
|
+
(``generate-changelog.yml``). Exits 1 and lists the offending files if any are
|
|
17
|
+
misnamed. An empty directory passes.
|
|
18
|
+
"""
|
|
19
|
+
|
|
20
|
+
import re
|
|
21
|
+
import sys
|
|
22
|
+
import tomllib
|
|
23
|
+
from pathlib import Path
|
|
24
|
+
|
|
25
|
+
ROOT = Path(__file__).resolve().parent.parent
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
def main() -> int:
|
|
29
|
+
with open(ROOT / "pyproject.toml", "rb") as f:
|
|
30
|
+
config = tomllib.load(f)["tool"]["towncrier"]
|
|
31
|
+
|
|
32
|
+
types = [t["directory"] for t in config["type"]]
|
|
33
|
+
directory = ROOT / config["directory"]
|
|
34
|
+
template = (ROOT / config["template"]).resolve()
|
|
35
|
+
pattern = re.compile(rf"[0-9]+\.({'|'.join(map(re.escape, types))})(\.[0-9]+)?\.md")
|
|
36
|
+
|
|
37
|
+
invalid = sorted(
|
|
38
|
+
path.name
|
|
39
|
+
for path in directory.iterdir()
|
|
40
|
+
if path.resolve() != template
|
|
41
|
+
and not path.name.startswith(".")
|
|
42
|
+
and not pattern.fullmatch(path.name)
|
|
43
|
+
)
|
|
44
|
+
|
|
45
|
+
if invalid:
|
|
46
|
+
print("Error: badly named changelog fragments:")
|
|
47
|
+
for name in invalid:
|
|
48
|
+
print(f" - {name}")
|
|
49
|
+
print("Name them <PR number>.<type>.md or <PR number>.<type>.<n>.md,")
|
|
50
|
+
print(f"with type one of: {' '.join(types)}")
|
|
51
|
+
return 1
|
|
52
|
+
return 0
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
if __name__ == "__main__":
|
|
56
|
+
sys.exit(main())
|
|
@@ -182,7 +182,9 @@ def load_dockerignore(context_dir: Path) -> set[str] | None:
|
|
|
182
182
|
|
|
183
183
|
patterns = set()
|
|
184
184
|
try:
|
|
185
|
-
|
|
185
|
+
# errors="replace": a byte that isn't UTF-8 (say, a cp1252 comment) costs
|
|
186
|
+
# only the line it's on, not every pattern in the file.
|
|
187
|
+
with open(dockerignore_path, encoding="utf-8", errors="replace") as f:
|
|
186
188
|
for line in f:
|
|
187
189
|
stripped = line.strip()
|
|
188
190
|
# Skip comments and empty lines
|
|
@@ -278,7 +280,10 @@ def create_deterministic_tarball(
|
|
|
278
280
|
file_path = root_path / filename
|
|
279
281
|
if not _should_exclude(file_path, exclusions, base_path):
|
|
280
282
|
rel_path = file_path.relative_to(base_path)
|
|
281
|
-
|
|
283
|
+
# Tar member names always use "/". TarInfo is built by hand below, so
|
|
284
|
+
# tarfile never converts os.sep for us: str() would give "src\bot.py"
|
|
285
|
+
# on Windows, which the Linux builder reads as one file at the root.
|
|
286
|
+
files_to_add.append((file_path, rel_path.as_posix()))
|
|
282
287
|
|
|
283
288
|
# Sort by relative path for determinism
|
|
284
289
|
files_to_add.sort(key=lambda x: x[1])
|
|
@@ -297,7 +302,13 @@ def create_deterministic_tarball(
|
|
|
297
302
|
info.gid = 0
|
|
298
303
|
info.uname = ""
|
|
299
304
|
info.gname = ""
|
|
300
|
-
# Normalize permissions: 0o644 for files, 0o755 for executables
|
|
305
|
+
# Normalize permissions: 0o644 for files, 0o755 for executables.
|
|
306
|
+
# Windows has no executable bit and X_OK holds for every file, so a
|
|
307
|
+
# Windows context packs everything as 0o755. `docker build` from
|
|
308
|
+
# Windows does the same, and it keeps entrypoint scripts runnable.
|
|
309
|
+
# So a Windows context and a Linux one hash differently and don't
|
|
310
|
+
# share cached builds. Most Windows checkouts already differ by line
|
|
311
|
+
# endings (git's core.autocrlf), so 0o644 would rarely buy a hit.
|
|
301
312
|
if os.access(file_path, os.X_OK):
|
|
302
313
|
info.mode = 0o755
|
|
303
314
|
else:
|
|
@@ -528,10 +528,18 @@ def load_deploy_config_file() -> DeployConfigParams | None:
|
|
|
528
528
|
logger.debug(f"Deploy config path: {deploy_config_path}")
|
|
529
529
|
logger.debug(f"Deploy config path exists: {os.path.exists(deploy_config_path)}")
|
|
530
530
|
|
|
531
|
+
# A missing file means no config. A file that can't be read as UTF-8 TOML is an
|
|
532
|
+
# error: returning None would run the command on defaults without saying so.
|
|
531
533
|
try:
|
|
532
|
-
with open(deploy_config_path) as f:
|
|
534
|
+
with open(deploy_config_path, encoding="utf-8") as f:
|
|
533
535
|
config_data = toml.load(f)
|
|
534
|
-
except
|
|
536
|
+
except UnicodeDecodeError:
|
|
537
|
+
raise ConfigFileError(
|
|
538
|
+
f"{deploy_config_path} is not valid UTF-8. Save it with UTF-8 encoding."
|
|
539
|
+
)
|
|
540
|
+
except toml.TomlDecodeError as e:
|
|
541
|
+
raise ConfigFileError(f"{deploy_config_path} is not valid TOML: {e}")
|
|
542
|
+
except OSError:
|
|
535
543
|
return None
|
|
536
544
|
|
|
537
545
|
try:
|
|
@@ -9,6 +9,7 @@ import json
|
|
|
9
9
|
import time
|
|
10
10
|
from collections.abc import Callable
|
|
11
11
|
from functools import wraps
|
|
12
|
+
from pathlib import PurePath
|
|
12
13
|
from urllib.parse import quote
|
|
13
14
|
|
|
14
15
|
import aiohttp
|
|
@@ -1295,7 +1296,8 @@ class _API:
|
|
|
1295
1296
|
url = self.construct_api_url("builds_path").format(org=org)
|
|
1296
1297
|
payload = {
|
|
1297
1298
|
"uploadId": upload_id,
|
|
1298
|
-
"
|
|
1299
|
+
# The builder runs on Linux, and the context's member names use "/".
|
|
1300
|
+
"dockerfilePath": PurePath(dockerfile_path).as_posix(),
|
|
1299
1301
|
}
|
|
1300
1302
|
if region:
|
|
1301
1303
|
payload["region"] = region
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
#
|
|
2
|
+
# Copyright (c) 2025, Daily
|
|
3
|
+
#
|
|
4
|
+
# SPDX-License-Identifier: BSD 2-Clause License
|
|
5
|
+
#
|
|
6
|
+
|
|
7
|
+
import sys
|
|
8
|
+
|
|
9
|
+
PIPECAT_CLI_NAME = "pipecat cloud"
|
|
10
|
+
PIPECAT_CREDENTIALS_PATH = "~/.config/pipecatcloud/pipecatcloud.toml"
|
|
11
|
+
PIPECAT_DEPLOY_CONFIG_PATH = "pcc-deploy.toml"
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
def _mascot() -> str:
|
|
15
|
+
"""Return "ᓚᘏᗢ " for titles, or "" when stdout can't encode it (e.g. cp1252)."""
|
|
16
|
+
mascot = "ᓚᘏᗢ"
|
|
17
|
+
try:
|
|
18
|
+
mascot.encode(getattr(sys.stdout, "encoding", None) or "utf-8")
|
|
19
|
+
except (UnicodeEncodeError, LookupError):
|
|
20
|
+
return ""
|
|
21
|
+
return f"{mascot} "
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
MASCOT = _mascot()
|
|
25
|
+
|
|
26
|
+
PANEL_TITLE_ERROR = f"{MASCOT}Error"
|
|
27
|
+
PANEL_TITLE_SUCCESS = f"{MASCOT}Success"
|
|
28
|
+
PANEL_TITLE_NOT_IMPLEMENTED = f"{MASCOT}Not yet implemented"
|
|
@@ -124,8 +124,9 @@ def run_docker_command(
|
|
|
124
124
|
stdout=subprocess.PIPE,
|
|
125
125
|
stderr=subprocess.STDOUT,
|
|
126
126
|
text=True,
|
|
127
|
+
encoding="utf-8",
|
|
128
|
+
errors="replace",
|
|
127
129
|
bufsize=1,
|
|
128
|
-
universal_newlines=True,
|
|
129
130
|
)
|
|
130
131
|
|
|
131
132
|
# Stream output line by line
|
|
@@ -143,7 +144,14 @@ def run_docker_command(
|
|
|
143
144
|
raise error
|
|
144
145
|
else:
|
|
145
146
|
# Capture output for push commands (less verbose)
|
|
146
|
-
result = subprocess.run(
|
|
147
|
+
result = subprocess.run(
|
|
148
|
+
command,
|
|
149
|
+
capture_output=True,
|
|
150
|
+
text=True,
|
|
151
|
+
encoding="utf-8",
|
|
152
|
+
errors="replace",
|
|
153
|
+
check=True,
|
|
154
|
+
)
|
|
147
155
|
if result.stdout.strip():
|
|
148
156
|
console.print(f"[dim]{result.stdout.strip()}[/dim]")
|
|
149
157
|
|
|
@@ -33,7 +33,7 @@ def _read_user_config():
|
|
|
33
33
|
|
|
34
34
|
if os.path.exists(user_config_path):
|
|
35
35
|
try:
|
|
36
|
-
with open(user_config_path) as f:
|
|
36
|
+
with open(user_config_path, encoding="utf-8") as f:
|
|
37
37
|
config_data = toml.load(f)
|
|
38
38
|
except toml.TomlDecodeError as exc:
|
|
39
39
|
config_problem = f"Invalid TOML syntax in config file: {exc}"
|
|
@@ -90,7 +90,7 @@ def _write_user_config(new_config):
|
|
|
90
90
|
try:
|
|
91
91
|
fd, tmp_path = tempfile.mkstemp(dir=dir_path, prefix=".pipecatcloud_", suffix=".tmp")
|
|
92
92
|
# mkstemp opens with 0o600 by default — restrictive from creation.
|
|
93
|
-
with os.fdopen(fd, "w") as f:
|
|
93
|
+
with os.fdopen(fd, "w", encoding="utf-8") as f:
|
|
94
94
|
fd = None # os.fdopen takes ownership of the fd
|
|
95
95
|
toml.dump(new_config, f)
|
|
96
96
|
f.flush()
|
|
@@ -4,13 +4,17 @@
|
|
|
4
4
|
# SPDX-License-Identifier: BSD 2-Clause License
|
|
5
5
|
#
|
|
6
6
|
|
|
7
|
+
import codecs
|
|
7
8
|
import os
|
|
8
9
|
import sys
|
|
9
10
|
|
|
11
|
+
import click
|
|
10
12
|
import typer
|
|
11
13
|
from loguru import logger
|
|
14
|
+
from typer.core import TyperGroup
|
|
12
15
|
|
|
13
16
|
from pipecatcloud._utils.console_utils import OutputMode, console
|
|
17
|
+
from pipecatcloud.cli import MASCOT
|
|
14
18
|
from pipecatcloud.cli.commands import agent as _agent_commands # noqa: F401 (registers them)
|
|
15
19
|
from pipecatcloud.cli.commands import project as _project_commands # noqa: F401 (registers them)
|
|
16
20
|
from pipecatcloud.cli.commands.agent_profiles import agent_profiles_cli
|
|
@@ -27,6 +31,41 @@ from pipecatcloud.cli.commands.spend_limit import spend_limit_cli
|
|
|
27
31
|
from pipecatcloud.cli.config import config
|
|
28
32
|
from pipecatcloud.exception import ConfigFileError
|
|
29
33
|
|
|
34
|
+
|
|
35
|
+
def _replace_unencodable_stdout() -> None:
|
|
36
|
+
"""Print "?" for characters stdout's encoding can't hold, instead of crashing.
|
|
37
|
+
|
|
38
|
+
On Windows, piped or redirected output (and Git Bash) uses the locale code page,
|
|
39
|
+
usually cp1252. Output with characters it lacks (the sparkline in `agent status`,
|
|
40
|
+
symbols in docker hints, text from the API) raised UnicodeEncodeError. stderr
|
|
41
|
+
already uses errors="backslashreplace", so it needs nothing.
|
|
42
|
+
"""
|
|
43
|
+
reconfigure = getattr(sys.stdout, "reconfigure", None)
|
|
44
|
+
if reconfigure is None:
|
|
45
|
+
return
|
|
46
|
+
try:
|
|
47
|
+
if codecs.lookup(sys.stdout.encoding).name == "utf-8":
|
|
48
|
+
return
|
|
49
|
+
except (LookupError, TypeError):
|
|
50
|
+
pass
|
|
51
|
+
try:
|
|
52
|
+
reconfigure(errors="replace")
|
|
53
|
+
except (ValueError, OSError):
|
|
54
|
+
pass
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
class _CloudGroup(TyperGroup):
|
|
58
|
+
"""Fixes stdout before `pipecat cloud` parses its arguments, `--help` included.
|
|
59
|
+
|
|
60
|
+
The Pipecat CLI imports this module on every `pipecat` run, so doing this at
|
|
61
|
+
import time would change stdout for commands that aren't ours.
|
|
62
|
+
"""
|
|
63
|
+
|
|
64
|
+
def parse_args(self, ctx: click.Context, args: list[str]) -> list[str]:
|
|
65
|
+
_replace_unencodable_stdout()
|
|
66
|
+
return super().parse_args(ctx, args)
|
|
67
|
+
|
|
68
|
+
|
|
30
69
|
logger.remove()
|
|
31
70
|
logger.add(sys.stderr, level=str(config.get("cli_log_level", "INFO")).upper())
|
|
32
71
|
|
|
@@ -42,7 +81,7 @@ def version_callback(value: bool):
|
|
|
42
81
|
from pipecatcloud.__version__ import version
|
|
43
82
|
|
|
44
83
|
typer.echo(
|
|
45
|
-
f"
|
|
84
|
+
f"{MASCOT}Pipecat Cloud Client Version: {typer.style(version, fg=typer.colors.GREEN)}"
|
|
46
85
|
)
|
|
47
86
|
raise typer.Exit()
|
|
48
87
|
|
|
@@ -82,11 +121,12 @@ def show_config_callback(value: bool):
|
|
|
82
121
|
|
|
83
122
|
|
|
84
123
|
entrypoint_cli_typer = typer.Typer(
|
|
124
|
+
cls=_CloudGroup,
|
|
85
125
|
no_args_is_help=True,
|
|
86
126
|
add_completion=False,
|
|
87
127
|
rich_markup_mode="markdown",
|
|
88
128
|
short_help="Deploy and manage bots on Pipecat Cloud",
|
|
89
|
-
help="
|
|
129
|
+
help=f"{MASCOT}Pipecat Cloud CLI. See website at https://pipecat.daily.co",
|
|
90
130
|
)
|
|
91
131
|
|
|
92
132
|
|