pipecatcloud 1.2.0__tar.gz → 1.3.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.3.0/.claude/skills/update-docs/SOURCE_DOC_MAPPING.md +201 -0
- pipecatcloud-1.3.0/.github/workflows/tests.yml +75 -0
- pipecatcloud-1.3.0/.github/workflows/update-docs.yml +375 -0
- {pipecatcloud-1.2.0 → pipecatcloud-1.3.0}/CHANGELOG.md +90 -0
- {pipecatcloud-1.2.0 → pipecatcloud-1.3.0}/CLAUDE.md +5 -5
- {pipecatcloud-1.2.0 → pipecatcloud-1.3.0}/PKG-INFO +1 -1
- {pipecatcloud-1.2.0 → pipecatcloud-1.3.0}/pyproject.toml +2 -0
- {pipecatcloud-1.2.0 → pipecatcloud-1.3.0}/src/pipecatcloud/__init__.py +4 -1
- {pipecatcloud-1.2.0 → pipecatcloud-1.3.0}/src/pipecatcloud/agent.py +46 -1
- {pipecatcloud-1.2.0 → pipecatcloud-1.3.0}/src/pipecatcloud/api.py +5 -2
- {pipecatcloud-1.2.0 → pipecatcloud-1.3.0}/src/pipecatcloud/cli/commands/agent.py +97 -16
- {pipecatcloud-1.2.0 → pipecatcloud-1.3.0}/src/pipecatcloud/cli/commands/regions.py +4 -1
- {pipecatcloud-1.2.0 → pipecatcloud-1.3.0}/src/pipecatcloud/cli/commands/registry_keys.py +71 -8
- {pipecatcloud-1.2.0 → pipecatcloud-1.3.0}/src/pipecatcloud/cli/commands/spend_limit.py +40 -11
- {pipecatcloud-1.2.0 → pipecatcloud-1.3.0}/src/pipecatcloud.egg-info/PKG-INFO +1 -1
- {pipecatcloud-1.2.0 → pipecatcloud-1.3.0}/src/pipecatcloud.egg-info/SOURCES.txt +2 -0
- {pipecatcloud-1.2.0 → pipecatcloud-1.3.0}/src/pipecatcloud.egg-info/scm_file_list.json +2 -0
- pipecatcloud-1.3.0/src/pipecatcloud.egg-info/scm_version.json +8 -0
- pipecatcloud-1.3.0/tests/test_agent_args.py +329 -0
- pipecatcloud-1.3.0/tests/test_agent_sessions.py +187 -0
- {pipecatcloud-1.2.0 → pipecatcloud-1.3.0}/tests/test_json_output.py +25 -1
- {pipecatcloud-1.2.0 → pipecatcloud-1.3.0}/tests/test_regions_lifecycle.py +175 -1
- {pipecatcloud-1.2.0 → pipecatcloud-1.3.0}/tests/test_spend_limit.py +44 -3
- {pipecatcloud-1.2.0 → pipecatcloud-1.3.0}/uv.lock +360 -246
- pipecatcloud-1.2.0/.github/workflows/tests.yml +0 -38
- pipecatcloud-1.2.0/src/pipecatcloud.egg-info/scm_version.json +0 -8
- pipecatcloud-1.2.0/tests/test_agent_args.py +0 -64
- pipecatcloud-1.2.0/tests/test_agent_sessions.py +0 -70
- {pipecatcloud-1.2.0 → pipecatcloud-1.3.0}/.claude/settings.json +0 -0
- {pipecatcloud-1.2.0 → pipecatcloud-1.3.0}/.github/workflows/format.yml +0 -0
- {pipecatcloud-1.2.0 → pipecatcloud-1.3.0}/.github/workflows/publish-pypi.yml +0 -0
- {pipecatcloud-1.2.0 → pipecatcloud-1.3.0}/.github/workflows/publish-test.yml +0 -0
- {pipecatcloud-1.2.0 → pipecatcloud-1.3.0}/.github/workflows/python-compatibility.yml +0 -0
- {pipecatcloud-1.2.0 → pipecatcloud-1.3.0}/.gitignore +0 -0
- {pipecatcloud-1.2.0 → pipecatcloud-1.3.0}/.pre-commit-config.yaml +0 -0
- {pipecatcloud-1.2.0 → pipecatcloud-1.3.0}/LICENSE +0 -0
- {pipecatcloud-1.2.0 → pipecatcloud-1.3.0}/README.md +0 -0
- {pipecatcloud-1.2.0 → pipecatcloud-1.3.0}/pipecat-cloud.png +0 -0
- {pipecatcloud-1.2.0 → pipecatcloud-1.3.0}/pytest.ini +0 -0
- {pipecatcloud-1.2.0 → pipecatcloud-1.3.0}/scripts/fix-ruff.sh +0 -0
- {pipecatcloud-1.2.0 → pipecatcloud-1.3.0}/setup.cfg +0 -0
- {pipecatcloud-1.2.0 → pipecatcloud-1.3.0}/src/pipecatcloud/__version__.py +0 -0
- {pipecatcloud-1.2.0 → pipecatcloud-1.3.0}/src/pipecatcloud/_utils/__init__.py +0 -0
- {pipecatcloud-1.2.0 → pipecatcloud-1.3.0}/src/pipecatcloud/_utils/async_utils.py +0 -0
- {pipecatcloud-1.2.0 → pipecatcloud-1.3.0}/src/pipecatcloud/_utils/auth_utils.py +0 -0
- {pipecatcloud-1.2.0 → pipecatcloud-1.3.0}/src/pipecatcloud/_utils/build_utils.py +0 -0
- {pipecatcloud-1.2.0 → pipecatcloud-1.3.0}/src/pipecatcloud/_utils/console_utils.py +0 -0
- {pipecatcloud-1.2.0 → pipecatcloud-1.3.0}/src/pipecatcloud/_utils/deploy_utils.py +0 -0
- {pipecatcloud-1.2.0 → pipecatcloud-1.3.0}/src/pipecatcloud/_utils/github_utils.py +0 -0
- {pipecatcloud-1.2.0 → pipecatcloud-1.3.0}/src/pipecatcloud/_utils/regions.py +0 -0
- {pipecatcloud-1.2.0 → pipecatcloud-1.3.0}/src/pipecatcloud/cli/__init__.py +0 -0
- {pipecatcloud-1.2.0 → pipecatcloud-1.3.0}/src/pipecatcloud/cli/api.py +0 -0
- {pipecatcloud-1.2.0 → pipecatcloud-1.3.0}/src/pipecatcloud/cli/commands/__init__.py +0 -0
- {pipecatcloud-1.2.0 → pipecatcloud-1.3.0}/src/pipecatcloud/cli/commands/agent_profiles.py +0 -0
- {pipecatcloud-1.2.0 → pipecatcloud-1.3.0}/src/pipecatcloud/cli/commands/auth.py +0 -0
- {pipecatcloud-1.2.0 → pipecatcloud-1.3.0}/src/pipecatcloud/cli/commands/build.py +0 -0
- {pipecatcloud-1.2.0 → pipecatcloud-1.3.0}/src/pipecatcloud/cli/commands/deploy.py +0 -0
- {pipecatcloud-1.2.0 → pipecatcloud-1.3.0}/src/pipecatcloud/cli/commands/docker.py +0 -0
- {pipecatcloud-1.2.0 → pipecatcloud-1.3.0}/src/pipecatcloud/cli/commands/github.py +0 -0
- {pipecatcloud-1.2.0 → pipecatcloud-1.3.0}/src/pipecatcloud/cli/commands/organizations.py +0 -0
- {pipecatcloud-1.2.0 → pipecatcloud-1.3.0}/src/pipecatcloud/cli/commands/secrets.py +0 -0
- {pipecatcloud-1.2.0 → pipecatcloud-1.3.0}/src/pipecatcloud/cli/config.py +0 -0
- {pipecatcloud-1.2.0 → pipecatcloud-1.3.0}/src/pipecatcloud/cli/entry_point.py +0 -0
- {pipecatcloud-1.2.0 → pipecatcloud-1.3.0}/src/pipecatcloud/config.py +0 -0
- {pipecatcloud-1.2.0 → pipecatcloud-1.3.0}/src/pipecatcloud/constants.py +0 -0
- {pipecatcloud-1.2.0 → pipecatcloud-1.3.0}/src/pipecatcloud/exception.py +0 -0
- {pipecatcloud-1.2.0 → pipecatcloud-1.3.0}/src/pipecatcloud/py.typed +0 -0
- {pipecatcloud-1.2.0 → pipecatcloud-1.3.0}/src/pipecatcloud/session.py +0 -0
- {pipecatcloud-1.2.0 → pipecatcloud-1.3.0}/src/pipecatcloud/smallwebrtc/session_manager.py +0 -0
- {pipecatcloud-1.2.0 → pipecatcloud-1.3.0}/src/pipecatcloud.egg-info/dependency_links.txt +0 -0
- {pipecatcloud-1.2.0 → pipecatcloud-1.3.0}/src/pipecatcloud.egg-info/entry_points.txt +0 -0
- {pipecatcloud-1.2.0 → pipecatcloud-1.3.0}/src/pipecatcloud.egg-info/requires.txt +0 -0
- {pipecatcloud-1.2.0 → pipecatcloud-1.3.0}/src/pipecatcloud.egg-info/top_level.txt +0 -0
- {pipecatcloud-1.2.0 → pipecatcloud-1.3.0}/tests/__init__.py +0 -0
- {pipecatcloud-1.2.0 → pipecatcloud-1.3.0}/tests/conftest.py +0 -0
- {pipecatcloud-1.2.0 → pipecatcloud-1.3.0}/tests/test_agent_profiles_and_resources.py +0 -0
- {pipecatcloud-1.2.0 → pipecatcloud-1.3.0}/tests/test_agent_status_output.py +0 -0
- {pipecatcloud-1.2.0 → pipecatcloud-1.3.0}/tests/test_agent_stop.py +0 -0
- {pipecatcloud-1.2.0 → pipecatcloud-1.3.0}/tests/test_api_client.py +0 -0
- {pipecatcloud-1.2.0 → pipecatcloud-1.3.0}/tests/test_auth.py +0 -0
- {pipecatcloud-1.2.0 → pipecatcloud-1.3.0}/tests/test_build_id_display.py +0 -0
- {pipecatcloud-1.2.0 → pipecatcloud-1.3.0}/tests/test_build_utils.py +0 -0
- {pipecatcloud-1.2.0 → pipecatcloud-1.3.0}/tests/test_config_file.py +0 -0
- {pipecatcloud-1.2.0 → pipecatcloud-1.3.0}/tests/test_deploy_architecture.py +0 -0
- {pipecatcloud-1.2.0 → pipecatcloud-1.3.0}/tests/test_deploy_image_pull_secret.py +0 -0
- {pipecatcloud-1.2.0 → pipecatcloud-1.3.0}/tests/test_deploy_poll.py +0 -0
- {pipecatcloud-1.2.0 → pipecatcloud-1.3.0}/tests/test_deploy_referenced_secret_set.py +0 -0
- {pipecatcloud-1.2.0 → pipecatcloud-1.3.0}/tests/test_deployment_status.py +0 -0
- {pipecatcloud-1.2.0 → pipecatcloud-1.3.0}/tests/test_docker_commands.py +0 -0
- {pipecatcloud-1.2.0 → pipecatcloud-1.3.0}/tests/test_exit_codes.py +0 -0
- {pipecatcloud-1.2.0 → pipecatcloud-1.3.0}/tests/test_github_integration.py +0 -0
- {pipecatcloud-1.2.0 → pipecatcloud-1.3.0}/tests/test_krisp_viva.py +0 -0
- {pipecatcloud-1.2.0 → pipecatcloud-1.3.0}/tests/test_max_session_duration.py +0 -0
- {pipecatcloud-1.2.0 → pipecatcloud-1.3.0}/tests/test_organizations.py +0 -0
- {pipecatcloud-1.2.0 → pipecatcloud-1.3.0}/tests/test_output_modes.py +0 -0
- {pipecatcloud-1.2.0 → pipecatcloud-1.3.0}/tests/test_pat_auth.py +0 -0
- {pipecatcloud-1.2.0 → pipecatcloud-1.3.0}/tests/test_regions.py +0 -0
- {pipecatcloud-1.2.0 → pipecatcloud-1.3.0}/tests/test_secrets_reference.py +0 -0
- {pipecatcloud-1.2.0 → pipecatcloud-1.3.0}/tests/test_secrets_set_referenced.py +0 -0
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
# Source-to-Doc Mapping — pipecatcloud
|
|
2
|
+
|
|
3
|
+
The profile for the shared `update-docs` skill, which lives in
|
|
4
|
+
`pipecat-ai/pipecat` at `.claude/skills/update-docs/SKILL.md` and is published
|
|
5
|
+
through the `pipecat-dev-skills` marketplace. `PROFILE_CONTRACT.md` beside it
|
|
6
|
+
describes what this file has to provide.
|
|
7
|
+
|
|
8
|
+
Most of what this package ships is a **command-line surface**, so the mapping is
|
|
9
|
+
dominated by command-group-to-page rules rather than the class-to-page rules a
|
|
10
|
+
library profile would use.
|
|
11
|
+
|
|
12
|
+
## Scope
|
|
13
|
+
|
|
14
|
+
Every `.py` file under `src/pipecatcloud/` is in scope. The package ships two
|
|
15
|
+
public surfaces — the `pipecat cloud` CLI and the Python SDK — and both are
|
|
16
|
+
documented.
|
|
17
|
+
|
|
18
|
+
Exclude only:
|
|
19
|
+
|
|
20
|
+
- `tests/**`
|
|
21
|
+
- `__pycache__/`, `*.pyc`, `py.typed`
|
|
22
|
+
- `src/pipecatcloud/__version__.py`
|
|
23
|
+
|
|
24
|
+
Changes outside `src/pipecatcloud/` — examples, CI config, the docs directory —
|
|
25
|
+
don't trigger doc updates on their own.
|
|
26
|
+
|
|
27
|
+
Note that `src/pipecatcloud/__init__.py` is **not** excluded despite being a
|
|
28
|
+
re-export file. Its `__all__` is the definition of the SDK's public surface, so
|
|
29
|
+
a name added or removed there is a documentation change even when the
|
|
30
|
+
implementation moved not at all.
|
|
31
|
+
|
|
32
|
+
## Skip list
|
|
33
|
+
|
|
34
|
+
| File | Why |
|
|
35
|
+
| --- | --- |
|
|
36
|
+
| `_utils/async_utils.py` | `synchronizer` plumbing that turns async commands into blocking ones. No observable surface. |
|
|
37
|
+
| `api.py`, `cli/api.py` | The HTTP client. The class is `_API`, underscore-private, and the REST reference is generated from a hand-maintained `openapi.json` in the docs repo with no upstream to diff against. A change here that implies a REST contract change should be **reported as an unmapped finding** rather than edited into the REST pages blind. |
|
|
38
|
+
| `cli/__init__.py` | Holds `PIPECAT_CLI_NAME`. Reaches users only through message text already documented elsewhere. |
|
|
39
|
+
|
|
40
|
+
Nothing else is internal. In particular `_utils/` is not a skip zone — most of
|
|
41
|
+
this package's documented behavior lives there.
|
|
42
|
+
|
|
43
|
+
## Base classes
|
|
44
|
+
|
|
45
|
+
`pipecatcloud` has no service base classes. Its analogue is the shared console
|
|
46
|
+
layer, which every command's output and exit behavior passes through.
|
|
47
|
+
|
|
48
|
+
| File | Pages to check |
|
|
49
|
+
| --- | --- |
|
|
50
|
+
| `_utils/console_utils.py` | `api-reference/cli/cloud/output.mdx` first — it defines `OutputMode`, the rich/plain/json rendering, `output_json`, and `require_interactive`, which is where the exit-2-on-no-TTY contract comes from. A change to the table or listing shape also affects every command page that shows example output. |
|
|
51
|
+
| `_utils/auth_utils.py` | `api-reference/cli/cloud/output.mdx` (exit behavior when unauthenticated), `pipecat-cloud/guides/personal-access-tokens.mdx` |
|
|
52
|
+
|
|
53
|
+
## Non-standard locations
|
|
54
|
+
|
|
55
|
+
| File | Page |
|
|
56
|
+
| --- | --- |
|
|
57
|
+
| `cli/entry_point.py` | `api-reference/cli/cloud/output.mdx` — global options (`--output`, `--show-cli-config`) and their resolution order |
|
|
58
|
+
| `cli/config.py`, `config.py` | `api-reference/cli/cloud/output.mdx` — `PIPECAT_`-prefixed environment variables and config-file keys. `PIPECAT_TOKEN` also appears in `pipecat-cloud/guides/personal-access-tokens.mdx` and `guides/cloud-builds.mdx`. |
|
|
59
|
+
| `_utils/deploy_utils.py` | `api-reference/cli/cloud/deploy.mdx` — the `pcc-deploy.toml` reference. `DeployConfigParams` and its nested config classes are the source of truth for every accepted key. |
|
|
60
|
+
| `_utils/build_utils.py` | `pipecat-cloud/guides/cloud-builds.mdx` — `DEFAULT_EXCLUSIONS` is enumerated on that page |
|
|
61
|
+
| `_utils/github_utils.py` | `api-reference/cli/cloud/github.mdx`, `pipecat-cloud/guides/deploy-from-github.mdx` |
|
|
62
|
+
| `_utils/regions.py` | `api-reference/cli/cloud/regions.mdx`, `pipecat-cloud/guides/regions.mdx` |
|
|
63
|
+
| `constants.py` | Depends on the constant. Krisp values → `pipecat-cloud/guides/krisp-viva.mdx`. Grep the value itself. |
|
|
64
|
+
| `exception.py` | `api-reference/pipecat-cloud/sdk-reference/exceptions.mdx` **and** `pipecat-cloud/fundamentals/error-codes.mdx`. The first documents the classes, the second the `PCC-` codes they carry. |
|
|
65
|
+
| `session.py` | `api-reference/pipecat-cloud/sdk-reference/sessions.mdx`, and `api-reference/pipecat-cloud/sdk-reference/examples.mdx` — its first sample constructs a `Session` |
|
|
66
|
+
| `agent.py` | `api-reference/pipecat-cloud/sdk-reference/session-arguments.mdx`, and `api-reference/pipecat-cloud/sdk-reference/examples.mdx` — two of its three samples are `bot()` entry points |
|
|
67
|
+
| `smallwebrtc/session_manager.py` | `api-reference/pipecat-cloud/sdk-reference/sessions.mdx` |
|
|
68
|
+
| `__init__.py` | `api-reference/pipecat-cloud/sdk-reference/overview.mdx` — its Key Components list should name everything in `__all__` |
|
|
69
|
+
|
|
70
|
+
## Pattern matching
|
|
71
|
+
|
|
72
|
+
`src/pipecatcloud/cli/commands/<group>.py` →
|
|
73
|
+
`api-reference/cli/cloud/<group>.mdx`, with underscores becoming hyphens.
|
|
74
|
+
|
|
75
|
+
| Source | Page |
|
|
76
|
+
| --- | --- |
|
|
77
|
+
| `cli/commands/agent.py` | `api-reference/cli/cloud/agent.mdx` |
|
|
78
|
+
| `cli/commands/auth.py` | `api-reference/cli/cloud/auth.mdx` |
|
|
79
|
+
| `cli/commands/build.py` | `api-reference/cli/cloud/build.mdx` |
|
|
80
|
+
| `cli/commands/deploy.py` | `api-reference/cli/cloud/deploy.mdx` |
|
|
81
|
+
| `cli/commands/docker.py` | `api-reference/cli/cloud/docker.mdx` |
|
|
82
|
+
| `cli/commands/github.py` | `api-reference/cli/cloud/github.mdx` |
|
|
83
|
+
| `cli/commands/organizations.py` | `api-reference/cli/cloud/organizations.mdx` |
|
|
84
|
+
| `cli/commands/regions.py` | `api-reference/cli/cloud/regions.mdx` |
|
|
85
|
+
| `cli/commands/secrets.py` | `api-reference/cli/cloud/secrets.mdx` |
|
|
86
|
+
| `cli/commands/spend_limit.py` | `api-reference/cli/cloud/spend-limit.mdx` |
|
|
87
|
+
|
|
88
|
+
A command group's page is not the whole story. Flags that change how a deploy
|
|
89
|
+
behaves usually also appear in a guide — check `pipecat-cloud/fundamentals/` and
|
|
90
|
+
`pipecat-cloud/guides/` per Step 7.
|
|
91
|
+
|
|
92
|
+
### Self-hosted regions — currently being documented separately
|
|
93
|
+
|
|
94
|
+
`cli/commands/agent_profiles.py` and `cli/commands/registry_keys.py`, and the
|
|
95
|
+
self-hosted subcommands within `regions.py` and `secrets.py`
|
|
96
|
+
(`regions register|show|delete|enroll-token`, `secrets reference`), have **no
|
|
97
|
+
page yet**. They are covered by an in-flight docs PR adding
|
|
98
|
+
`pipecat-cloud/self-hosted/`.
|
|
99
|
+
|
|
100
|
+
Report changes to these as unmapped findings rather than creating pages for
|
|
101
|
+
them, until that section exists and this table names it.
|
|
102
|
+
|
|
103
|
+
## Search
|
|
104
|
+
|
|
105
|
+
When the tables come up empty, grep `DOCS_PATH` for:
|
|
106
|
+
|
|
107
|
+
- **CLI files** — the literal command name as the page heading spells it
|
|
108
|
+
(`## agent link`, `### keys revoke`), then the flag string with its dashes
|
|
109
|
+
(`--no-credentials`). Flags are the most reliable anchor: a page that
|
|
110
|
+
documents a command documents its flags.
|
|
111
|
+
- **SDK files** — the class name (`AgentStartError`, `SessionParams`).
|
|
112
|
+
- **TOML keys** — the bare key (`websocket_auth`, `min_agents`) across
|
|
113
|
+
`api-reference/cli/cloud/deploy.mdx` and the guides.
|
|
114
|
+
|
|
115
|
+
## Section vocabulary
|
|
116
|
+
|
|
117
|
+
Two page shapes, and they do not share a vocabulary.
|
|
118
|
+
|
|
119
|
+
**CLI reference pages** — one `##` heading per subcommand, then:
|
|
120
|
+
|
|
121
|
+
| Section | Built from | Form |
|
|
122
|
+
| --- | --- | --- |
|
|
123
|
+
| Usage | the command's argument and option signature | fenced `shell` block |
|
|
124
|
+
| Arguments | `typer.Argument(...)` declarations | `<ParamField>` entries |
|
|
125
|
+
| Options | `typer.Option(...)` declarations | `<ParamField>` entries, with both long and short forms in `path` (`--organization / -o`) |
|
|
126
|
+
|
|
127
|
+
A `<ParamField>` `default` must be the Typer default, not what the help text or
|
|
128
|
+
spinner displays. `agent logs --level` was documented as defaulting to `ALL`
|
|
129
|
+
because that is what the spinner prints; the real default is `None`, and `ALL`
|
|
130
|
+
is not a valid value.
|
|
131
|
+
|
|
132
|
+
**SDK reference pages** — one `##` heading per class, then Constructor
|
|
133
|
+
Parameters (`<ParamField>`), Methods (`<ResponseField>`), and Properties.
|
|
134
|
+
Exceptions a method raises belong in its `<ResponseField>`.
|
|
135
|
+
|
|
136
|
+
**`pcc-deploy.toml` keys** live in `api-reference/cli/cloud/deploy.mdx` under
|
|
137
|
+
Configuration Options, as `<ParamField>` entries carrying a short TOML example
|
|
138
|
+
each. Top-level keys go under Optional Fields; a `[section]` gets its own
|
|
139
|
+
`####` heading.
|
|
140
|
+
|
|
141
|
+
## Guide directories
|
|
142
|
+
|
|
143
|
+
- `pipecat-cloud/fundamentals/` — deploy, scaling, secrets, active sessions, agent images, error codes, health checks, logging, accounts
|
|
144
|
+
- `pipecat-cloud/guides/` — cloud builds, GitHub deploys, CI, telephony, container registries, websockets, regions, Krisp
|
|
145
|
+
- `pipecat-cloud/security/` — security and compliance, HIPAA
|
|
146
|
+
- `pipecat-cloud/introduction.mdx` — the section landing page; only changes when a whole capability arrives or leaves
|
|
147
|
+
|
|
148
|
+
These carry a lot of copy-pasteable commands, and a renamed flag breaks every
|
|
149
|
+
one of them silently. When a flag changes, grep all three directories for the
|
|
150
|
+
old spelling before finishing.
|
|
151
|
+
|
|
152
|
+
## New pages
|
|
153
|
+
|
|
154
|
+
### Location and template
|
|
155
|
+
|
|
156
|
+
A new command group goes at `DOCS_PATH/api-reference/cli/cloud/<group>.mdx`:
|
|
157
|
+
|
|
158
|
+
````
|
|
159
|
+
---
|
|
160
|
+
title: "pipecat cloud <group>"
|
|
161
|
+
sidebarTitle: "<group>"
|
|
162
|
+
description: "pipecat cloud <group> ..., 110-140 chars naming what it manages"
|
|
163
|
+
---
|
|
164
|
+
|
|
165
|
+
[One or two sentences on what the group is for, and when to reach for it.]
|
|
166
|
+
|
|
167
|
+
## <subcommand>
|
|
168
|
+
|
|
169
|
+
[What it does.]
|
|
170
|
+
|
|
171
|
+
**Usage:**
|
|
172
|
+
|
|
173
|
+
```shell
|
|
174
|
+
pipecat cloud <group> <subcommand> [ARGS] [OPTIONS]
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
**Arguments:**
|
|
178
|
+
|
|
179
|
+
<ParamField path="arg-name" type="string" required>
|
|
180
|
+
[From the typer.Argument help text, expanded.]
|
|
181
|
+
</ParamField>
|
|
182
|
+
|
|
183
|
+
**Options:**
|
|
184
|
+
|
|
185
|
+
<ParamField path="--flag / -f" type="string">
|
|
186
|
+
[From the typer.Option help text, expanded.]
|
|
187
|
+
</ParamField>
|
|
188
|
+
|
|
189
|
+
[Behavior worth stating: what prompts, what is required in CI, what the command
|
|
190
|
+
refuses to do.]
|
|
191
|
+
````
|
|
192
|
+
|
|
193
|
+
### Registration
|
|
194
|
+
|
|
195
|
+
Add the path, without `.mdx`, to `DOCS_PATH/docs.json` under the CLI tab's
|
|
196
|
+
`cloud` group. There is no support-matrix page to update — unlike pipecat, this
|
|
197
|
+
is the only registration step.
|
|
198
|
+
|
|
199
|
+
The group's pages are ordered roughly by workflow rather than alphabetically
|
|
200
|
+
(`output` first as the cross-cutting one, then auth, build, deploy, and so on).
|
|
201
|
+
Place a new page where a reader would look for it.
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
name: tests
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
workflow_dispatch:
|
|
5
|
+
push:
|
|
6
|
+
branches:
|
|
7
|
+
- main
|
|
8
|
+
pull_request:
|
|
9
|
+
branches:
|
|
10
|
+
- '**'
|
|
11
|
+
|
|
12
|
+
concurrency:
|
|
13
|
+
group: build-test-${{ github.event.pull_request.number || github.ref }}
|
|
14
|
+
cancel-in-progress: true
|
|
15
|
+
|
|
16
|
+
jobs:
|
|
17
|
+
test:
|
|
18
|
+
name: 'Unit Tests'
|
|
19
|
+
runs-on: ubuntu-latest
|
|
20
|
+
steps:
|
|
21
|
+
- name: Checkout repo
|
|
22
|
+
uses: actions/checkout@v4
|
|
23
|
+
|
|
24
|
+
- name: Install uv
|
|
25
|
+
uses: astral-sh/setup-uv@v3
|
|
26
|
+
with:
|
|
27
|
+
version: 'latest'
|
|
28
|
+
|
|
29
|
+
- name: Set up Python
|
|
30
|
+
run: uv python install 3.12
|
|
31
|
+
|
|
32
|
+
- name: Install dependencies
|
|
33
|
+
run: |
|
|
34
|
+
uv sync --group dev
|
|
35
|
+
|
|
36
|
+
- name: Run tests
|
|
37
|
+
run: |
|
|
38
|
+
uv run pytest -v
|
|
39
|
+
|
|
40
|
+
# The job above runs the agent session-argument types against the pipecat-ai
|
|
41
|
+
# in uv.lock. These legs run them against releases before MOQRunnerArguments
|
|
42
|
+
# gained relay_url, where pipecatcloud.agent must still import and refuse only
|
|
43
|
+
# MOQSessionArguments: 1.11.0 has the class without the field, 1.5.0 has no
|
|
44
|
+
# class at all.
|
|
45
|
+
agent-types:
|
|
46
|
+
name: 'Agent types on pipecat-ai ${{ matrix.pipecat-ai }}'
|
|
47
|
+
runs-on: ubuntu-latest
|
|
48
|
+
strategy:
|
|
49
|
+
fail-fast: false
|
|
50
|
+
matrix:
|
|
51
|
+
pipecat-ai: ['1.11.0', '1.5.0']
|
|
52
|
+
steps:
|
|
53
|
+
- name: Checkout repo
|
|
54
|
+
uses: actions/checkout@v4
|
|
55
|
+
|
|
56
|
+
- name: Install uv
|
|
57
|
+
uses: astral-sh/setup-uv@v3
|
|
58
|
+
with:
|
|
59
|
+
version: 'latest'
|
|
60
|
+
|
|
61
|
+
- name: Set up Python
|
|
62
|
+
run: uv python install 3.12
|
|
63
|
+
|
|
64
|
+
- name: Install dependencies
|
|
65
|
+
run: |
|
|
66
|
+
uv sync --group dev
|
|
67
|
+
|
|
68
|
+
# `python -m pytest`: a bare `pytest` can resolve to the locked
|
|
69
|
+
# environment's entry point instead of the layered one. The tests check,
|
|
70
|
+
# in their own process, that they run on the version this leg names.
|
|
71
|
+
- name: Run the agent type tests
|
|
72
|
+
env:
|
|
73
|
+
PCC_EXPECTED_PIPECAT_AI: ${{ matrix.pipecat-ai }}
|
|
74
|
+
run: |
|
|
75
|
+
uv run --with "pipecat-ai==${{ matrix.pipecat-ai }}" python -m pytest -v tests/test_agent_args.py
|
|
@@ -0,0 +1,375 @@
|
|
|
1
|
+
# Opens a documentation PR against pipecat-ai/docs when a change to this
|
|
2
|
+
# package's public API merges. The skill it follows is shared, published from
|
|
3
|
+
# pipecat-ai/pipecat through the pipecat-dev-skills marketplace; the mapping it
|
|
4
|
+
# applies is this repo's own .claude/skills/update-docs/SOURCE_DOC_MAPPING.md.
|
|
5
|
+
#
|
|
6
|
+
# Requires three repository secrets, none of which exist here yet:
|
|
7
|
+
# DOCS_BOT_APP_ID, DOCS_BOT_PRIVATE_KEY — the same GitHub App pipecat uses
|
|
8
|
+
# ANTHROPIC_API_KEY — for the agent that writes the docs
|
|
9
|
+
#
|
|
10
|
+
# This repo is in daily-co while the docs repo is in pipecat-ai, so the App
|
|
11
|
+
# token is minted for owner pipecat-ai and scoped to `docs` alone. Reading this
|
|
12
|
+
# repo's own PRs uses the default GITHUB_TOKEN, which needs no extra grant. The
|
|
13
|
+
# App therefore needs no installation on daily-co — only the credentials.
|
|
14
|
+
#
|
|
15
|
+
# Until those secrets are set, the workflow will fail at its first step rather
|
|
16
|
+
# than run and do nothing.
|
|
17
|
+
|
|
18
|
+
name: Update Documentation on PR Merge
|
|
19
|
+
|
|
20
|
+
on:
|
|
21
|
+
pull_request_target:
|
|
22
|
+
types: [closed]
|
|
23
|
+
branches: [main]
|
|
24
|
+
# Everything shipped in the package is in scope, named as exclusions so a new
|
|
25
|
+
# directory is covered the day it appears rather than when someone remembers
|
|
26
|
+
# to list it.
|
|
27
|
+
paths:
|
|
28
|
+
- "src/pipecatcloud/**"
|
|
29
|
+
- "!src/pipecatcloud/tests/**"
|
|
30
|
+
workflow_dispatch:
|
|
31
|
+
inputs:
|
|
32
|
+
pr_number:
|
|
33
|
+
description: "PR number to generate docs for"
|
|
34
|
+
required: true
|
|
35
|
+
type: string
|
|
36
|
+
|
|
37
|
+
jobs:
|
|
38
|
+
update-docs:
|
|
39
|
+
if: >-
|
|
40
|
+
github.event_name == 'workflow_dispatch' ||
|
|
41
|
+
github.event.pull_request.merged == true
|
|
42
|
+
runs-on: ubuntu-latest
|
|
43
|
+
timeout-minutes: 15
|
|
44
|
+
permissions:
|
|
45
|
+
contents: read
|
|
46
|
+
# write so a run that fails can say so on the PR that triggered it;
|
|
47
|
+
# issues: write covers the label, which goes through the issues API
|
|
48
|
+
pull-requests: write
|
|
49
|
+
issues: write
|
|
50
|
+
id-token: write
|
|
51
|
+
steps:
|
|
52
|
+
- name: Generate app token
|
|
53
|
+
id: app-token
|
|
54
|
+
uses: actions/create-github-app-token@v2
|
|
55
|
+
with:
|
|
56
|
+
app-id: ${{ secrets.DOCS_BOT_APP_ID }}
|
|
57
|
+
private-key: ${{ secrets.DOCS_BOT_PRIVATE_KEY }}
|
|
58
|
+
owner: pipecat-ai
|
|
59
|
+
repositories: |
|
|
60
|
+
docs
|
|
61
|
+
|
|
62
|
+
- name: Checkout pipecat-cloud
|
|
63
|
+
uses: actions/checkout@v4
|
|
64
|
+
with:
|
|
65
|
+
fetch-depth: 0
|
|
66
|
+
|
|
67
|
+
- name: Checkout docs
|
|
68
|
+
uses: actions/checkout@v4
|
|
69
|
+
with:
|
|
70
|
+
repository: pipecat-ai/docs
|
|
71
|
+
token: ${{ steps.app-token.outputs.token }}
|
|
72
|
+
path: _docs
|
|
73
|
+
|
|
74
|
+
# The update-docs skill is shared and lives in pipecat-ai/pipecat, published
|
|
75
|
+
# through the pipecat-dev-skills marketplace. Only the directory holding it
|
|
76
|
+
# is fetched; this repo supplies the profile beside it.
|
|
77
|
+
- name: Checkout the shared update-docs skill
|
|
78
|
+
uses: actions/checkout@v4
|
|
79
|
+
with:
|
|
80
|
+
repository: pipecat-ai/pipecat
|
|
81
|
+
sparse-checkout: .claude/skills/update-docs
|
|
82
|
+
sparse-checkout-cone-mode: false
|
|
83
|
+
path: _skill
|
|
84
|
+
fetch-depth: 1
|
|
85
|
+
|
|
86
|
+
- name: Record docs baseline
|
|
87
|
+
id: docs-base
|
|
88
|
+
working-directory: _docs
|
|
89
|
+
# The commit the docs branch builds on, used to scope formatting to the
|
|
90
|
+
# pages this run touches.
|
|
91
|
+
run: echo "sha=$(git rev-parse HEAD)" >> "$GITHUB_OUTPUT"
|
|
92
|
+
|
|
93
|
+
- name: Resolve PR number
|
|
94
|
+
id: pr
|
|
95
|
+
run: |
|
|
96
|
+
if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
|
|
97
|
+
echo "number=${{ inputs.pr_number }}" >> "$GITHUB_OUTPUT"
|
|
98
|
+
else
|
|
99
|
+
echo "number=${{ github.event.pull_request.number }}" >> "$GITHUB_OUTPUT"
|
|
100
|
+
fi
|
|
101
|
+
|
|
102
|
+
- name: Determine assignee
|
|
103
|
+
id: assignee
|
|
104
|
+
env:
|
|
105
|
+
GH_TOKEN: ${{ steps.app-token.outputs.token }}
|
|
106
|
+
run: |
|
|
107
|
+
PR_AUTHOR=$(gh pr view ${{ steps.pr.outputs.number }} \
|
|
108
|
+
--repo daily-co/pipecat-cloud --json author --jq '.author.login')
|
|
109
|
+
|
|
110
|
+
# Assign the PR author only if they're a maintainer (== member of the
|
|
111
|
+
# pipecat-ai org). Org members all have at least read access to the docs
|
|
112
|
+
# repo, so they're assignable there; the assignees probe guards against
|
|
113
|
+
# future access changes. Otherwise leave the PR unassigned for triage.
|
|
114
|
+
ASSIGNEE=""
|
|
115
|
+
if gh api "orgs/pipecat-ai/members/$PR_AUTHOR" --silent 2>/dev/null \
|
|
116
|
+
&& gh api "repos/pipecat-ai/docs/assignees/$PR_AUTHOR" --silent 2>/dev/null; then
|
|
117
|
+
ASSIGNEE="$PR_AUTHOR"
|
|
118
|
+
fi
|
|
119
|
+
|
|
120
|
+
echo "login=$ASSIGNEE" >> "$GITHUB_OUTPUT"
|
|
121
|
+
if [ -n "$ASSIGNEE" ]; then
|
|
122
|
+
echo "Docs PR will be assigned to: $ASSIGNEE"
|
|
123
|
+
else
|
|
124
|
+
echo "PR author is not an org member; docs PR will be left unassigned."
|
|
125
|
+
fi
|
|
126
|
+
|
|
127
|
+
- name: Update documentation
|
|
128
|
+
uses: anthropics/claude-code-action@v1
|
|
129
|
+
env:
|
|
130
|
+
DOCS_TOKEN: ${{ steps.app-token.outputs.token }}
|
|
131
|
+
with:
|
|
132
|
+
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
|
|
133
|
+
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
134
|
+
prompt: |
|
|
135
|
+
You are updating documentation for the pipecat-ai/docs repository based on
|
|
136
|
+
changes merged in PR #${{ steps.pr.outputs.number }} of daily-co/pipecat-cloud.
|
|
137
|
+
|
|
138
|
+
## Setup
|
|
139
|
+
|
|
140
|
+
1. Read the shared skill instructions at `_skill/.claude/skills/update-docs/SKILL.md`
|
|
141
|
+
2. Read this repo's profile at `.claude/skills/update-docs/SOURCE_DOC_MAPPING.md`
|
|
142
|
+
3. The docs repository is checked out at `./_docs/`
|
|
143
|
+
|
|
144
|
+
## Get the diff
|
|
145
|
+
|
|
146
|
+
Run `gh pr diff ${{ steps.pr.outputs.number }}` to see what changed in the PR.
|
|
147
|
+
Also run `gh pr diff ${{ steps.pr.outputs.number }} --name-only` to get the list of changed files.
|
|
148
|
+
Filter to source files matching the profile's Scope section (SKILL.md Step 3).
|
|
149
|
+
|
|
150
|
+
If no relevant source files were changed, exit with "No documentation changes needed."
|
|
151
|
+
|
|
152
|
+
## Follow the skill instructions
|
|
153
|
+
|
|
154
|
+
Apply the SKILL.md workflow (Steps 3-10) with these adaptations for automation:
|
|
155
|
+
|
|
156
|
+
### Docs path
|
|
157
|
+
Use `./_docs/` — it's already checked out. Do not ask for a path.
|
|
158
|
+
|
|
159
|
+
### Branch management
|
|
160
|
+
- Branch name: `docs/cloud-pr-${{ steps.pr.outputs.number }}`
|
|
161
|
+
- Work inside `./_docs/` for all doc edits and git operations
|
|
162
|
+
- Check if the branch already exists on the remote:
|
|
163
|
+
```bash
|
|
164
|
+
cd _docs && git fetch origin docs/cloud-pr-${{ steps.pr.outputs.number }} 2>/dev/null
|
|
165
|
+
```
|
|
166
|
+
- If it exists: check it out (supports workflow re-runs)
|
|
167
|
+
- If not: create it from main
|
|
168
|
+
|
|
169
|
+
### Git config
|
|
170
|
+
Before committing in `_docs`, set:
|
|
171
|
+
```bash
|
|
172
|
+
git config user.name "github-actions[bot]"
|
|
173
|
+
git config user.email "github-actions[bot]@users.noreply.github.com"
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
### No interactive questions
|
|
177
|
+
Do not ask questions. If you encounter gaps (unmapped files, missing sections,
|
|
178
|
+
ambiguous changes), note them in the PR body under "## Gaps identified".
|
|
179
|
+
|
|
180
|
+
### Creating the docs PR
|
|
181
|
+
After committing all changes in `_docs`, push and create a PR:
|
|
182
|
+
```bash
|
|
183
|
+
cd _docs
|
|
184
|
+
git push -u origin docs/cloud-pr-${{ steps.pr.outputs.number }}
|
|
185
|
+
GH_TOKEN=$DOCS_TOKEN gh pr create \
|
|
186
|
+
--repo pipecat-ai/docs \
|
|
187
|
+
--label auto-docs \
|
|
188
|
+
--label pipecat-cloud \
|
|
189
|
+
--title "docs: update for pipecat PR #${{ steps.pr.outputs.number }}" \
|
|
190
|
+
--body "$(cat <<'BODY'
|
|
191
|
+
Automated documentation update for [pipecat-cloud PR #${{ steps.pr.outputs.number }}](https://github.com/daily-co/pipecat-cloud/pull/${{ steps.pr.outputs.number }}).
|
|
192
|
+
|
|
193
|
+
## Changes
|
|
194
|
+
<summarize each doc page updated and what changed>
|
|
195
|
+
|
|
196
|
+
## Gaps identified
|
|
197
|
+
<any unmapped files, missing doc pages, or missing sections — or "None">
|
|
198
|
+
BODY
|
|
199
|
+
)"
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
### Re-run handling
|
|
203
|
+
If `gh pr create` fails because a PR from that branch already exists,
|
|
204
|
+
push the updated commits and use `gh pr edit` to update the body instead.
|
|
205
|
+
|
|
206
|
+
### Recording the outcome
|
|
207
|
+
Every run must leave a one-line verdict at
|
|
208
|
+
`$RUNNER_TEMP/docs-update-outcome.txt`, written before you finish:
|
|
209
|
+
|
|
210
|
+
- `PR: <url>` — a docs PR was created or updated
|
|
211
|
+
- `NOOP: <reason>` — no docs change was needed, naming the specific
|
|
212
|
+
reason (e.g. "only internal wiring in pipeline/task_manager.py changed;
|
|
213
|
+
no public API affected")
|
|
214
|
+
|
|
215
|
+
A bare "no changes needed" is not a reason. This file is how a reader
|
|
216
|
+
later tells a deliberate no-op from a run that quietly fell short, so
|
|
217
|
+
write it even when the answer seems obvious.
|
|
218
|
+
|
|
219
|
+
### No-op
|
|
220
|
+
If after analyzing the diff you determine no documentation changes are needed
|
|
221
|
+
(e.g., only skip-listed files changed, or changes don't affect public API docs),
|
|
222
|
+
write the `NOOP:` line described above and exit cleanly without creating a
|
|
223
|
+
branch or PR.
|
|
224
|
+
|
|
225
|
+
A file being a base class or a shared module is NOT by itself a reason to
|
|
226
|
+
skip it. Public constructor parameters, event handlers, and behavior belong
|
|
227
|
+
in the docs wherever they live — see the mapping file's Skip list for the
|
|
228
|
+
short set of genuinely internal files.
|
|
229
|
+
|
|
230
|
+
### Formatting and llms.txt
|
|
231
|
+
Skip SKILL.md Step 9. A later workflow step runs Prettier over the pages
|
|
232
|
+
this branch touches and regenerates `llms.txt` / `llms-full.txt`, so leave
|
|
233
|
+
both to it rather than running them yourself.
|
|
234
|
+
|
|
235
|
+
## Important rules
|
|
236
|
+
- Only modify files inside `./_docs/` — never modify pipecat source code
|
|
237
|
+
- Follow the conservative editing rules from SKILL.md Step 6
|
|
238
|
+
- Read each doc page fully before editing (SKILL.md Guidelines)
|
|
239
|
+
- Use `GH_TOKEN=$DOCS_TOKEN` for all `gh` commands targeting pipecat-ai/docs
|
|
240
|
+
claude_args: |
|
|
241
|
+
--model claude-sonnet-5-5
|
|
242
|
+
--max-turns 90
|
|
243
|
+
--allowedTools "Read,Write,Edit,Glob,Grep,Bash"
|
|
244
|
+
|
|
245
|
+
# Pinned from the docs repo's own .nvmrc rather than left to whatever the
|
|
246
|
+
# runner image ships, so formatting and generated files match what
|
|
247
|
+
# contributors produce.
|
|
248
|
+
- name: Set up Node
|
|
249
|
+
if: always()
|
|
250
|
+
uses: actions/setup-node@v4
|
|
251
|
+
with:
|
|
252
|
+
node-version-file: _docs/.nvmrc
|
|
253
|
+
|
|
254
|
+
- name: Format docs and regenerate llms.txt
|
|
255
|
+
if: always()
|
|
256
|
+
working-directory: _docs
|
|
257
|
+
run: |
|
|
258
|
+
BRANCH="docs/cloud-pr-${{ steps.pr.outputs.number }}"
|
|
259
|
+
if [ "$(git rev-parse --abbrev-ref HEAD)" != "$BRANCH" ]; then
|
|
260
|
+
echo "No docs branch checked out; nothing to do."
|
|
261
|
+
exit 0
|
|
262
|
+
fi
|
|
263
|
+
|
|
264
|
+
# Format only the pages this branch touches, so the docs PR diff stays
|
|
265
|
+
# limited to the changes under review.
|
|
266
|
+
CHANGED=$(mktemp)
|
|
267
|
+
git diff --name-only --diff-filter=d -z \
|
|
268
|
+
"${{ steps.docs-base.outputs.sha }}" HEAD > "$CHANGED"
|
|
269
|
+
if [ ! -s "$CHANGED" ]; then
|
|
270
|
+
echo "No doc changes to format."
|
|
271
|
+
exit 0
|
|
272
|
+
fi
|
|
273
|
+
|
|
274
|
+
# The docs repo pins Prettier, so this matches what its pre-commit hook
|
|
275
|
+
# produces. `--ignore-unknown` skips files Prettier has no parser for.
|
|
276
|
+
npm ci --no-audit --no-fund
|
|
277
|
+
xargs -0 npx prettier --ignore-unknown --write < "$CHANGED"
|
|
278
|
+
|
|
279
|
+
# The docs repo checks in llms.txt and llms-full.txt, and its metadata
|
|
280
|
+
# lint fails when either is stale. llms-full.txt embeds page bodies
|
|
281
|
+
# verbatim, so generation runs after Prettier has settled them.
|
|
282
|
+
node scripts/gen-llms-txt.mjs
|
|
283
|
+
|
|
284
|
+
if git diff --quiet; then
|
|
285
|
+
echo "Doc changes are already formatted and llms.txt is current."
|
|
286
|
+
exit 0
|
|
287
|
+
fi
|
|
288
|
+
|
|
289
|
+
git config user.name "github-actions[bot]"
|
|
290
|
+
git config user.email "github-actions[bot]@users.noreply.github.com"
|
|
291
|
+
git commit -am "chore: format docs and regenerate llms.txt"
|
|
292
|
+
git push origin "$BRANCH"
|
|
293
|
+
|
|
294
|
+
- name: Assign docs PR
|
|
295
|
+
if: always()
|
|
296
|
+
env:
|
|
297
|
+
GH_TOKEN: ${{ steps.app-token.outputs.token }}
|
|
298
|
+
run: |
|
|
299
|
+
ASSIGNEE="${{ steps.assignee.outputs.login }}"
|
|
300
|
+
if [ -z "$ASSIGNEE" ]; then
|
|
301
|
+
echo "No assignee resolved; leaving docs PR unassigned."
|
|
302
|
+
exit 0
|
|
303
|
+
fi
|
|
304
|
+
PR_URL=$(gh pr list --repo pipecat-ai/docs \
|
|
305
|
+
--head docs/cloud-pr-${{ steps.pr.outputs.number }} \
|
|
306
|
+
--state open --json url --jq '.[0].url')
|
|
307
|
+
if [ -z "$PR_URL" ]; then
|
|
308
|
+
echo "No open docs PR for branch docs/cloud-pr-${{ steps.pr.outputs.number }}; nothing to assign."
|
|
309
|
+
exit 0
|
|
310
|
+
fi
|
|
311
|
+
gh pr edit "$PR_URL" --add-assignee "$ASSIGNEE"
|
|
312
|
+
echo "Assigned $PR_URL to $ASSIGNEE"
|
|
313
|
+
|
|
314
|
+
# The run summary states the outcome either way, so a run that documented
|
|
315
|
+
# nothing is distinguishable from one that produced a docs PR.
|
|
316
|
+
- name: Record outcome
|
|
317
|
+
if: always()
|
|
318
|
+
env:
|
|
319
|
+
GH_TOKEN: ${{ steps.app-token.outputs.token }}
|
|
320
|
+
run: |
|
|
321
|
+
PR_NUMBER="${{ steps.pr.outputs.number }}"
|
|
322
|
+
DOCS_PR=$(gh pr list --repo pipecat-ai/docs \
|
|
323
|
+
--head "docs/cloud-pr-$PR_NUMBER" --state all \
|
|
324
|
+
--json url --jq '.[0].url' 2>/dev/null || true)
|
|
325
|
+
|
|
326
|
+
{
|
|
327
|
+
echo "## Docs automation for pipecat-cloud PR #$PR_NUMBER"
|
|
328
|
+
echo
|
|
329
|
+
if [ -n "$DOCS_PR" ]; then
|
|
330
|
+
echo "Docs PR: $DOCS_PR"
|
|
331
|
+
elif [ -f "$RUNNER_TEMP/docs-update-outcome.txt" ]; then
|
|
332
|
+
echo "No docs PR. Reported outcome:"
|
|
333
|
+
echo
|
|
334
|
+
echo '```'
|
|
335
|
+
cat "$RUNNER_TEMP/docs-update-outcome.txt"
|
|
336
|
+
echo '```'
|
|
337
|
+
else
|
|
338
|
+
echo "No docs PR and no recorded outcome — the run did not reach the"
|
|
339
|
+
echo "point of stating one. Treat this PR as undocumented."
|
|
340
|
+
fi
|
|
341
|
+
} >> "$GITHUB_STEP_SUMMARY"
|
|
342
|
+
|
|
343
|
+
# Nothing outside the Actions tab surfaces a failed run, so it is reported
|
|
344
|
+
# on the PR that triggered it.
|
|
345
|
+
- name: Report failure on the source PR
|
|
346
|
+
if: failure() && steps.pr.outputs.number != ''
|
|
347
|
+
env:
|
|
348
|
+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
349
|
+
PR_NUMBER: ${{ steps.pr.outputs.number }}
|
|
350
|
+
RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
|
|
351
|
+
run: |
|
|
352
|
+
gh label create docs-automation-failed \
|
|
353
|
+
--repo daily-co/pipecat-cloud \
|
|
354
|
+
--color B60205 \
|
|
355
|
+
--description "The update-docs workflow failed for this PR" \
|
|
356
|
+
2>/dev/null || true
|
|
357
|
+
|
|
358
|
+
gh pr edit "$PR_NUMBER" --repo daily-co/pipecat-cloud \
|
|
359
|
+
--add-label docs-automation-failed 2>/dev/null || true
|
|
360
|
+
|
|
361
|
+
gh pr comment "$PR_NUMBER" --repo daily-co/pipecat-cloud --body "$(cat <<BODY
|
|
362
|
+
**Docs automation failed for this PR — its documentation is missing.**
|
|
363
|
+
|
|
364
|
+
The \`update-docs\` workflow did not produce a docs PR: [run log]($RUN_URL)
|
|
365
|
+
|
|
366
|
+
Re-run it once the cause is addressed:
|
|
367
|
+
|
|
368
|
+
\`\`\`
|
|
369
|
+
gh workflow run update-docs.yml -f pr_number=$PR_NUMBER --repo daily-co/pipecat-cloud
|
|
370
|
+
\`\`\`
|
|
371
|
+
|
|
372
|
+
If this PR genuinely needs no documentation, remove the
|
|
373
|
+
\`docs-automation-failed\` label.
|
|
374
|
+
BODY
|
|
375
|
+
)"
|