pipecatcloud 1.6.0__tar.gz → 1.7.0__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.7.0/.claude/settings.json +16 -0
- {pipecatcloud-1.6.0 → pipecatcloud-1.7.0}/.github/workflows/format.yml +3 -0
- pipecatcloud-1.7.0/.github/workflows/generate-changelog.yml +127 -0
- {pipecatcloud-1.6.0 → pipecatcloud-1.7.0}/.github/workflows/tests.yml +25 -0
- {pipecatcloud-1.6.0 → pipecatcloud-1.7.0}/CHANGELOG.md +38 -0
- {pipecatcloud-1.6.0 → pipecatcloud-1.7.0}/CLAUDE.md +23 -6
- {pipecatcloud-1.6.0/src/pipecatcloud.egg-info → pipecatcloud-1.7.0}/PKG-INFO +1 -1
- pipecatcloud-1.7.0/changelog/_template.md.j2 +16 -0
- {pipecatcloud-1.6.0 → pipecatcloud-1.7.0}/pyproject.toml +54 -0
- pipecatcloud-1.7.0/scripts/check-changelog-fragments.py +56 -0
- {pipecatcloud-1.6.0 → pipecatcloud-1.7.0}/src/pipecatcloud/_utils/build_utils.py +14 -3
- {pipecatcloud-1.6.0 → pipecatcloud-1.7.0}/src/pipecatcloud/_utils/console_utils.py +2 -1
- {pipecatcloud-1.6.0 → pipecatcloud-1.7.0}/src/pipecatcloud/_utils/deploy_utils.py +89 -3
- {pipecatcloud-1.6.0 → pipecatcloud-1.7.0}/src/pipecatcloud/api.py +6 -1
- pipecatcloud-1.7.0/src/pipecatcloud/cli/__init__.py +28 -0
- {pipecatcloud-1.6.0 → pipecatcloud-1.7.0}/src/pipecatcloud/cli/commands/deploy.py +76 -12
- {pipecatcloud-1.6.0 → pipecatcloud-1.7.0}/src/pipecatcloud/cli/commands/docker.py +10 -2
- {pipecatcloud-1.6.0 → pipecatcloud-1.7.0}/src/pipecatcloud/cli/commands/secrets.py +1 -1
- {pipecatcloud-1.6.0 → pipecatcloud-1.7.0}/src/pipecatcloud/cli/config.py +2 -2
- {pipecatcloud-1.6.0 → pipecatcloud-1.7.0}/src/pipecatcloud/cli/entry_point.py +42 -2
- {pipecatcloud-1.6.0 → pipecatcloud-1.7.0}/src/pipecatcloud/config.py +3 -1
- {pipecatcloud-1.6.0 → pipecatcloud-1.7.0/src/pipecatcloud.egg-info}/PKG-INFO +1 -1
- {pipecatcloud-1.6.0 → pipecatcloud-1.7.0}/src/pipecatcloud.egg-info/SOURCES.txt +9 -1
- {pipecatcloud-1.6.0 → pipecatcloud-1.7.0}/src/pipecatcloud.egg-info/scm_file_list.json +8 -0
- pipecatcloud-1.7.0/src/pipecatcloud.egg-info/scm_version.json +8 -0
- {pipecatcloud-1.6.0 → pipecatcloud-1.7.0}/tests/test_api_client.py +18 -1
- {pipecatcloud-1.6.0 → pipecatcloud-1.7.0}/tests/test_build_utils.py +40 -0
- {pipecatcloud-1.6.0 → pipecatcloud-1.7.0}/tests/test_config_file.py +7 -7
- pipecatcloud-1.7.0/tests/test_deploy_git_sandbox_hint.py +94 -0
- pipecatcloud-1.7.0/tests/test_deploy_sandbox_hint.py +66 -0
- pipecatcloud-1.7.0/tests/test_deploy_utils.py +66 -0
- pipecatcloud-1.7.0/tests/test_entry_point.py +65 -0
- {pipecatcloud-1.6.0 → pipecatcloud-1.7.0}/tests/test_exit_codes.py +1 -1
- {pipecatcloud-1.6.0 → pipecatcloud-1.7.0}/tests/test_log_redaction.py +1 -1
- {pipecatcloud-1.6.0 → pipecatcloud-1.7.0}/tests/test_output_modes.py +2 -1
- pipecatcloud-1.7.0/tests/test_whatsapp_auth.py +379 -0
- {pipecatcloud-1.6.0 → pipecatcloud-1.7.0}/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.7.0}/.claude/skills/update-docs/SOURCE_DOC_MAPPING.md +0 -0
- {pipecatcloud-1.6.0 → pipecatcloud-1.7.0}/.github/workflows/publish-pypi.yml +0 -0
- {pipecatcloud-1.6.0 → pipecatcloud-1.7.0}/.github/workflows/publish-test.yml +0 -0
- {pipecatcloud-1.6.0 → pipecatcloud-1.7.0}/.github/workflows/python-compatibility.yml +0 -0
- {pipecatcloud-1.6.0 → pipecatcloud-1.7.0}/.github/workflows/update-docs.yml +0 -0
- {pipecatcloud-1.6.0 → pipecatcloud-1.7.0}/.gitignore +0 -0
- {pipecatcloud-1.6.0 → pipecatcloud-1.7.0}/.pre-commit-config.yaml +0 -0
- {pipecatcloud-1.6.0 → pipecatcloud-1.7.0}/LICENSE +0 -0
- {pipecatcloud-1.6.0 → pipecatcloud-1.7.0}/README.md +0 -0
- {pipecatcloud-1.6.0 → pipecatcloud-1.7.0}/pipecat-cloud.png +0 -0
- {pipecatcloud-1.6.0 → pipecatcloud-1.7.0}/pytest.ini +0 -0
- {pipecatcloud-1.6.0 → pipecatcloud-1.7.0}/scripts/fix-ruff.sh +0 -0
- {pipecatcloud-1.6.0 → pipecatcloud-1.7.0}/scripts/release-changelog.py +0 -0
- {pipecatcloud-1.6.0 → pipecatcloud-1.7.0}/setup.cfg +0 -0
- {pipecatcloud-1.6.0 → pipecatcloud-1.7.0}/src/pipecatcloud/__init__.py +0 -0
- {pipecatcloud-1.6.0 → pipecatcloud-1.7.0}/src/pipecatcloud/__version__.py +0 -0
- {pipecatcloud-1.6.0 → pipecatcloud-1.7.0}/src/pipecatcloud/_utils/__init__.py +0 -0
- {pipecatcloud-1.6.0 → pipecatcloud-1.7.0}/src/pipecatcloud/_utils/async_utils.py +0 -0
- {pipecatcloud-1.6.0 → pipecatcloud-1.7.0}/src/pipecatcloud/_utils/auth_utils.py +0 -0
- {pipecatcloud-1.6.0 → pipecatcloud-1.7.0}/src/pipecatcloud/_utils/base_image.py +0 -0
- {pipecatcloud-1.6.0 → pipecatcloud-1.7.0}/src/pipecatcloud/_utils/environment_utils.py +0 -0
- {pipecatcloud-1.6.0 → pipecatcloud-1.7.0}/src/pipecatcloud/_utils/github_utils.py +0 -0
- {pipecatcloud-1.6.0 → pipecatcloud-1.7.0}/src/pipecatcloud/_utils/log_utils.py +0 -0
- {pipecatcloud-1.6.0 → pipecatcloud-1.7.0}/src/pipecatcloud/_utils/regions.py +0 -0
- {pipecatcloud-1.6.0 → pipecatcloud-1.7.0}/src/pipecatcloud/agent.py +0 -0
- {pipecatcloud-1.6.0 → pipecatcloud-1.7.0}/src/pipecatcloud/cli/api.py +0 -0
- {pipecatcloud-1.6.0 → pipecatcloud-1.7.0}/src/pipecatcloud/cli/commands/__init__.py +0 -0
- {pipecatcloud-1.6.0 → pipecatcloud-1.7.0}/src/pipecatcloud/cli/commands/agent.py +0 -0
- {pipecatcloud-1.6.0 → pipecatcloud-1.7.0}/src/pipecatcloud/cli/commands/agent_profiles.py +0 -0
- {pipecatcloud-1.6.0 → pipecatcloud-1.7.0}/src/pipecatcloud/cli/commands/auth.py +0 -0
- {pipecatcloud-1.6.0 → pipecatcloud-1.7.0}/src/pipecatcloud/cli/commands/build.py +0 -0
- {pipecatcloud-1.6.0 → pipecatcloud-1.7.0}/src/pipecatcloud/cli/commands/github.py +0 -0
- {pipecatcloud-1.6.0 → pipecatcloud-1.7.0}/src/pipecatcloud/cli/commands/organizations.py +0 -0
- {pipecatcloud-1.6.0 → pipecatcloud-1.7.0}/src/pipecatcloud/cli/commands/project.py +0 -0
- {pipecatcloud-1.6.0 → pipecatcloud-1.7.0}/src/pipecatcloud/cli/commands/project_group.py +0 -0
- {pipecatcloud-1.6.0 → pipecatcloud-1.7.0}/src/pipecatcloud/cli/commands/regions.py +0 -0
- {pipecatcloud-1.6.0 → pipecatcloud-1.7.0}/src/pipecatcloud/cli/commands/registry_keys.py +0 -0
- {pipecatcloud-1.6.0 → pipecatcloud-1.7.0}/src/pipecatcloud/cli/commands/spend_limit.py +0 -0
- {pipecatcloud-1.6.0 → pipecatcloud-1.7.0}/src/pipecatcloud/constants.py +0 -0
- {pipecatcloud-1.6.0 → pipecatcloud-1.7.0}/src/pipecatcloud/exception.py +0 -0
- {pipecatcloud-1.6.0 → pipecatcloud-1.7.0}/src/pipecatcloud/py.typed +0 -0
- {pipecatcloud-1.6.0 → pipecatcloud-1.7.0}/src/pipecatcloud/session.py +0 -0
- {pipecatcloud-1.6.0 → pipecatcloud-1.7.0}/src/pipecatcloud/smallwebrtc/session_manager.py +0 -0
- {pipecatcloud-1.6.0 → pipecatcloud-1.7.0}/src/pipecatcloud.egg-info/dependency_links.txt +0 -0
- {pipecatcloud-1.6.0 → pipecatcloud-1.7.0}/src/pipecatcloud.egg-info/entry_points.txt +0 -0
- {pipecatcloud-1.6.0 → pipecatcloud-1.7.0}/src/pipecatcloud.egg-info/requires.txt +0 -0
- {pipecatcloud-1.6.0 → pipecatcloud-1.7.0}/src/pipecatcloud.egg-info/top_level.txt +0 -0
- {pipecatcloud-1.6.0 → pipecatcloud-1.7.0}/tests/__init__.py +0 -0
- {pipecatcloud-1.6.0 → pipecatcloud-1.7.0}/tests/conftest.py +0 -0
- {pipecatcloud-1.6.0 → pipecatcloud-1.7.0}/tests/test_agent_args.py +0 -0
- {pipecatcloud-1.6.0 → pipecatcloud-1.7.0}/tests/test_agent_profiles_and_resources.py +0 -0
- {pipecatcloud-1.6.0 → pipecatcloud-1.7.0}/tests/test_agent_sessions.py +0 -0
- {pipecatcloud-1.6.0 → pipecatcloud-1.7.0}/tests/test_agent_status_output.py +0 -0
- {pipecatcloud-1.6.0 → pipecatcloud-1.7.0}/tests/test_agent_stop.py +0 -0
- {pipecatcloud-1.6.0 → pipecatcloud-1.7.0}/tests/test_auth.py +0 -0
- {pipecatcloud-1.6.0 → pipecatcloud-1.7.0}/tests/test_base_image.py +0 -0
- {pipecatcloud-1.6.0 → pipecatcloud-1.7.0}/tests/test_build_id_display.py +0 -0
- {pipecatcloud-1.6.0 → pipecatcloud-1.7.0}/tests/test_deploy_architecture.py +0 -0
- {pipecatcloud-1.6.0 → pipecatcloud-1.7.0}/tests/test_deploy_image_pull_secret.py +0 -0
- {pipecatcloud-1.6.0 → pipecatcloud-1.7.0}/tests/test_deploy_poll.py +0 -0
- {pipecatcloud-1.6.0 → pipecatcloud-1.7.0}/tests/test_deploy_referenced_secret_set.py +0 -0
- {pipecatcloud-1.6.0 → pipecatcloud-1.7.0}/tests/test_deployment_status.py +0 -0
- {pipecatcloud-1.6.0 → pipecatcloud-1.7.0}/tests/test_docker_commands.py +0 -0
- {pipecatcloud-1.6.0 → pipecatcloud-1.7.0}/tests/test_github_integration.py +0 -0
- {pipecatcloud-1.6.0 → pipecatcloud-1.7.0}/tests/test_json_output.py +0 -0
- {pipecatcloud-1.6.0 → pipecatcloud-1.7.0}/tests/test_krisp_viva.py +0 -0
- {pipecatcloud-1.6.0 → pipecatcloud-1.7.0}/tests/test_max_session_duration.py +0 -0
- {pipecatcloud-1.6.0 → pipecatcloud-1.7.0}/tests/test_organizations.py +0 -0
- {pipecatcloud-1.6.0 → pipecatcloud-1.7.0}/tests/test_pat_auth.py +0 -0
- {pipecatcloud-1.6.0 → pipecatcloud-1.7.0}/tests/test_projects.py +0 -0
- {pipecatcloud-1.6.0 → pipecatcloud-1.7.0}/tests/test_regions.py +0 -0
- {pipecatcloud-1.6.0 → pipecatcloud-1.7.0}/tests/test_regions_lifecycle.py +0 -0
- {pipecatcloud-1.6.0 → pipecatcloud-1.7.0}/tests/test_secrets_bulk_write.py +0 -0
- {pipecatcloud-1.6.0 → pipecatcloud-1.7.0}/tests/test_secrets_keys.py +0 -0
- {pipecatcloud-1.6.0 → pipecatcloud-1.7.0}/tests/test_secrets_reference.py +0 -0
- {pipecatcloud-1.6.0 → pipecatcloud-1.7.0}/tests/test_secrets_retry.py +0 -0
- {pipecatcloud-1.6.0 → pipecatcloud-1.7.0}/tests/test_secrets_set_referenced.py +0 -0
- {pipecatcloud-1.6.0 → pipecatcloud-1.7.0}/tests/test_spend_limit.py +0 -0
- {pipecatcloud-1.6.0 → pipecatcloud-1.7.0}/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,44 @@ 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.7.0] - 2026-12-03
|
|
11
|
+
|
|
12
|
+
### Added
|
|
13
|
+
|
|
14
|
+
- `pcc-deploy.toml` accepts `whatsapp_auth` (`"none"` or `"token"`). With `"token"`, the agent's WhatsApp webhook requires your organization's public API key. The CLI warns when the API doesn't confirm the setting.
|
|
15
|
+
(PR [#232](https://github.com/daily-co/pipecat-cloud/pull/232))
|
|
16
|
+
|
|
17
|
+
- Redeploying an agent that has `whatsapp_auth` or `websocket_auth` set to `"token"` from a `pcc-deploy.toml` without that key resets it to `"none"`, as before. The CLI now warns about this before you confirm the deploy.
|
|
18
|
+
(PR [#232](https://github.com/daily-co/pipecat-cloud/pull/232))
|
|
19
|
+
|
|
20
|
+
- After a successful deploy, `pipecat cloud deploy` prints a link to the agent's Sandbox page in the dashboard, so you can talk to your agent in the browser right away. With `--json`, the result includes a `sandboxUrl` field (`null` if the deployment isn't ready).
|
|
21
|
+
(PR [#233](https://github.com/daily-co/pipecat-cloud/pull/233))
|
|
22
|
+
|
|
23
|
+
### Changed
|
|
24
|
+
|
|
25
|
+
- The deploy success panel no longer suggests `pipecat cloud project start`, which starts a session with no client attached. It now points to the Sandbox. The public API key note appears only when your organization has no public key (it used to depend on a default key in your local config), and it now appears above the Sandbox link.
|
|
26
|
+
(PR [#233](https://github.com/daily-co/pipecat-cloud/pull/233))
|
|
27
|
+
|
|
28
|
+
## [1.6.1] - 2026-11-17
|
|
29
|
+
|
|
30
|
+
### Changed
|
|
31
|
+
|
|
32
|
+
- `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.
|
|
33
|
+
(PR [#229](https://github.com/daily-co/pipecat-cloud/pull/229))
|
|
34
|
+
|
|
35
|
+
### Fixed
|
|
36
|
+
|
|
37
|
+
- `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.
|
|
38
|
+
(PR [#229](https://github.com/daily-co/pipecat-cloud/pull/229))
|
|
39
|
+
|
|
40
|
+
- 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.
|
|
41
|
+
(PR [#229](https://github.com/daily-co/pipecat-cloud/pull/229))
|
|
42
|
+
|
|
43
|
+
- `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.
|
|
44
|
+
(PR [#229](https://github.com/daily-co/pipecat-cloud/pull/229))
|
|
45
|
+
|
|
8
46
|
## [1.6.0] - 2026-11-12
|
|
9
47
|
|
|
10
48
|
### 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:
|
|
@@ -14,6 +14,7 @@ from rich.console import Console
|
|
|
14
14
|
from rich.panel import Panel
|
|
15
15
|
|
|
16
16
|
from pipecatcloud.cli import PANEL_TITLE_ERROR, PANEL_TITLE_SUCCESS, PIPECAT_CLI_NAME
|
|
17
|
+
from pipecatcloud.config import DEFAULT_DASHBOARD_HOST
|
|
17
18
|
|
|
18
19
|
|
|
19
20
|
class OutputMode(str, Enum):
|
|
@@ -332,7 +333,7 @@ class PipecatConsole(Console):
|
|
|
332
333
|
|
|
333
334
|
# Fall back to the documented default if the host is unset or empty,
|
|
334
335
|
# so the rendered link is never `[link=][/link]` or `[link=None]None[/link]`.
|
|
335
|
-
dashboard = base_config.get("dashboard_host") or
|
|
336
|
+
dashboard = base_config.get("dashboard_host") or DEFAULT_DASHBOARD_HOST
|
|
336
337
|
body = (
|
|
337
338
|
f"{usage_line}\n"
|
|
338
339
|
"New sessions are being rejected. In-flight sessions continue to run.\n\n"
|
|
@@ -11,6 +11,7 @@ import time
|
|
|
11
11
|
from collections.abc import Callable
|
|
12
12
|
from datetime import UTC, datetime
|
|
13
13
|
from enum import Enum
|
|
14
|
+
from urllib.parse import quote
|
|
14
15
|
|
|
15
16
|
import toml
|
|
16
17
|
import typer
|
|
@@ -19,9 +20,13 @@ from loguru import logger
|
|
|
19
20
|
|
|
20
21
|
from pipecatcloud._utils.log_utils import describe_exception
|
|
21
22
|
from pipecatcloud.cli import PIPECAT_DEPLOY_CONFIG_PATH
|
|
23
|
+
from pipecatcloud.config import DEFAULT_DASHBOARD_HOST
|
|
22
24
|
from pipecatcloud.constants import KRISP_VIVA_MODELS, KrispVivaAudioFilter
|
|
23
25
|
from pipecatcloud.exception import ConfigFileError
|
|
24
26
|
|
|
27
|
+
# The values the API accepts for an agent's WhatsApp webhook authentication.
|
|
28
|
+
WHATSAPP_AUTH_MODES = ("none", "token")
|
|
29
|
+
|
|
25
30
|
DEPLOY_STATUS_MAP = {
|
|
26
31
|
"Unknown": "[dim]Waiting[/dim]",
|
|
27
32
|
"True": "[green]Ready[/green]",
|
|
@@ -339,6 +344,15 @@ class ResourcesConfig:
|
|
|
339
344
|
return {"cpu": self.cpu, "memory": self.memory}
|
|
340
345
|
|
|
341
346
|
|
|
347
|
+
def sandbox_url(dashboard_host: str | None, org: str, agent_name: str) -> str:
|
|
348
|
+
"""Return the dashboard Sandbox URL for an agent.
|
|
349
|
+
|
|
350
|
+
Falls back to the default dashboard host if the setting is unset or empty.
|
|
351
|
+
"""
|
|
352
|
+
host = (dashboard_host or DEFAULT_DASHBOARD_HOST).rstrip("/")
|
|
353
|
+
return f"{host}/{quote(org, safe='')}/agents/{quote(agent_name, safe='')}/sandbox"
|
|
354
|
+
|
|
355
|
+
|
|
342
356
|
def parse_resources_option(value: str) -> "ResourcesConfig":
|
|
343
357
|
"""Parse the --resources CLI value ("cpu=2,memory=4Gi") into a ResourcesConfig.
|
|
344
358
|
|
|
@@ -451,6 +465,11 @@ class DeployConfigParams:
|
|
|
451
465
|
git: GitSourceConfig = field(factory=GitSourceConfig)
|
|
452
466
|
force_redeploy: bool = False
|
|
453
467
|
websocket_auth: str | None = None
|
|
468
|
+
# How the agent's WhatsApp webhook authenticates callers: "none" or "token"
|
|
469
|
+
# (the org's public API key). None keeps the field out of the request, and
|
|
470
|
+
# the API then applies its default, "none". On a deploy of an existing agent
|
|
471
|
+
# that replaces a stored "token"; see auth_settings_turned_off.
|
|
472
|
+
whatsapp_auth: str | None = None
|
|
454
473
|
max_session_duration: int | None = None
|
|
455
474
|
# CPU architecture the agent image requires (PCC-1105). Exactly the
|
|
456
475
|
# kubernetes.io/arch vocabulary; omitted = the region's default.
|
|
@@ -475,6 +494,11 @@ class DeployConfigParams:
|
|
|
475
494
|
raise ValueError("Cannot specify both 'agent_profile' and 'resources'")
|
|
476
495
|
if self.architecture is not None and self.architecture not in ("amd64", "arm64"):
|
|
477
496
|
raise ValueError("architecture must be 'amd64' or 'arm64'")
|
|
497
|
+
if self.whatsapp_auth is not None and self.whatsapp_auth not in WHATSAPP_AUTH_MODES:
|
|
498
|
+
raise ValueError(
|
|
499
|
+
f"whatsapp_auth must be one of: {', '.join(WHATSAPP_AUTH_MODES)} "
|
|
500
|
+
f"(got {self.whatsapp_auth!r})"
|
|
501
|
+
)
|
|
478
502
|
|
|
479
503
|
def to_dict(self):
|
|
480
504
|
return {
|
|
@@ -492,11 +516,56 @@ class DeployConfigParams:
|
|
|
492
516
|
"krisp_viva": self.krisp_viva.to_dict() if self.krisp_viva else None,
|
|
493
517
|
"git": self.git.to_dict() if self.git.is_set() else None,
|
|
494
518
|
"websocket_auth": self.websocket_auth,
|
|
519
|
+
"whatsapp_auth": self.whatsapp_auth,
|
|
495
520
|
"max_session_duration": self.max_session_duration,
|
|
496
521
|
"architecture": self.architecture,
|
|
497
522
|
}
|
|
498
523
|
|
|
499
524
|
|
|
525
|
+
def whatsapp_auth_unconfirmed(requested: str | None, deploy_response: dict | None) -> bool:
|
|
526
|
+
"""Whether a deploy asked for WhatsApp token auth that the API did not confirm.
|
|
527
|
+
|
|
528
|
+
The API answers a deploy with the saved agent under `service`, and an API
|
|
529
|
+
that has the feature reports `whatsappAuth` there. An API without it
|
|
530
|
+
accepts the field and drops it without complaint, so its response has no
|
|
531
|
+
`whatsappAuth` at all. Only "token" is checked: "none" is what an API
|
|
532
|
+
without the feature behaves like anyway, so a missing echo costs nothing.
|
|
533
|
+
A null value (the API could not read the setting back) is not a
|
|
534
|
+
confirmation either.
|
|
535
|
+
"""
|
|
536
|
+
if requested != "token":
|
|
537
|
+
return False
|
|
538
|
+
service = (deploy_response or {}).get("service")
|
|
539
|
+
confirmed = service.get("whatsappAuth") if isinstance(service, dict) else None
|
|
540
|
+
return confirmed != "token"
|
|
541
|
+
|
|
542
|
+
|
|
543
|
+
# The auth settings a deploy replaces: each pcc-deploy.toml key and the field
|
|
544
|
+
# the API reports it as on an agent.
|
|
545
|
+
_AUTH_SETTINGS = (
|
|
546
|
+
("websocket_auth", "websocketAuth"),
|
|
547
|
+
("whatsapp_auth", "whatsappAuth"),
|
|
548
|
+
)
|
|
549
|
+
|
|
550
|
+
|
|
551
|
+
def auth_settings_turned_off(params: DeployConfigParams, agent: dict | None) -> list[str]:
|
|
552
|
+
"""The pcc-deploy.toml keys whose "token" auth this deploy turns off.
|
|
553
|
+
|
|
554
|
+
A deploy of an existing agent replaces its settings, and the API gives a
|
|
555
|
+
setting the deploy leaves out its default, "none". So an agent that
|
|
556
|
+
requires a token stops requiring it once it is deployed from a
|
|
557
|
+
pcc-deploy.toml without the key. An agent read that doesn't report a
|
|
558
|
+
setting (an API without it) has nothing to turn off.
|
|
559
|
+
"""
|
|
560
|
+
if not agent:
|
|
561
|
+
return []
|
|
562
|
+
return [
|
|
563
|
+
key
|
|
564
|
+
for key, field in _AUTH_SETTINGS
|
|
565
|
+
if getattr(params, key) is None and agent.get(field) == "token"
|
|
566
|
+
]
|
|
567
|
+
|
|
568
|
+
|
|
500
569
|
def validate_git_source_combination(config: DeployConfigParams) -> str | None:
|
|
501
570
|
"""What a GitHub source cannot be combined with, or None when it is fine.
|
|
502
571
|
|
|
@@ -528,10 +597,18 @@ def load_deploy_config_file() -> DeployConfigParams | None:
|
|
|
528
597
|
logger.debug(f"Deploy config path: {deploy_config_path}")
|
|
529
598
|
logger.debug(f"Deploy config path exists: {os.path.exists(deploy_config_path)}")
|
|
530
599
|
|
|
600
|
+
# A missing file means no config. A file that can't be read as UTF-8 TOML is an
|
|
601
|
+
# error: returning None would run the command on defaults without saying so.
|
|
531
602
|
try:
|
|
532
|
-
with open(deploy_config_path) as f:
|
|
603
|
+
with open(deploy_config_path, encoding="utf-8") as f:
|
|
533
604
|
config_data = toml.load(f)
|
|
534
|
-
except
|
|
605
|
+
except UnicodeDecodeError:
|
|
606
|
+
raise ConfigFileError(
|
|
607
|
+
f"{deploy_config_path} is not valid UTF-8. Save it with UTF-8 encoding."
|
|
608
|
+
)
|
|
609
|
+
except toml.TomlDecodeError as e:
|
|
610
|
+
raise ConfigFileError(f"{deploy_config_path} is not valid TOML: {e}")
|
|
611
|
+
except OSError:
|
|
535
612
|
return None
|
|
536
613
|
|
|
537
614
|
try:
|
|
@@ -579,6 +656,7 @@ def load_deploy_config_file() -> DeployConfigParams | None:
|
|
|
579
656
|
"krisp_viva",
|
|
580
657
|
"git",
|
|
581
658
|
"websocket_auth",
|
|
659
|
+
"whatsapp_auth",
|
|
582
660
|
"max_session_duration",
|
|
583
661
|
"resources",
|
|
584
662
|
"architecture",
|
|
@@ -686,6 +764,14 @@ class GitDeployResult:
|
|
|
686
764
|
superseded_by: str | None = None
|
|
687
765
|
|
|
688
766
|
|
|
767
|
+
def git_deploy_succeeded(result: GitDeployResult) -> bool:
|
|
768
|
+
"""Whether the followed deploy attempt finished and succeeded."""
|
|
769
|
+
return (
|
|
770
|
+
result.outcome is GitDeployWait.TERMINAL
|
|
771
|
+
and (result.deploy or {}).get("status") == "succeeded"
|
|
772
|
+
)
|
|
773
|
+
|
|
774
|
+
|
|
689
775
|
async def follow_git_deploy(agent_name: str, org: str | None, commit_sha: str) -> GitDeployResult:
|
|
690
776
|
"""Poll an agent's latest deploy attempt until it resolves.
|
|
691
777
|
|
|
@@ -771,7 +857,7 @@ def report_git_deploy_result(
|
|
|
771
857
|
deploy = result.deploy or {}
|
|
772
858
|
status_value = deploy.get("status")
|
|
773
859
|
commit = deploy.get("commitSha")
|
|
774
|
-
if
|
|
860
|
+
if git_deploy_succeeded(result):
|
|
775
861
|
console.success(
|
|
776
862
|
f"Deployed '{agent_name}'" + (f" from commit {short_sha(commit)}" if commit else "")
|
|
777
863
|
)
|