Skip to content
This repository was archived by the owner on Aug 3, 2026. It is now read-only.

Commit 8b9625d

Browse files
authored
fix: add CI and MCP to MetaOrigin enum (#73)
Add the two `MetaOrigin` values the platform already emits but the Python enum was missing, bringing it to parity with `apify-shared-js`: - `MCP` — runs started through the Apify client triggered from the Apify MCP server. - `CI` — runs started from a CI/CD pipeline (e.g. GitHub Actions). Without `MCP`, any Actor invoked via the Apify MCP server crashes at startup: the released SDK line (`apify` 3.4.x) validates `run.meta.origin` against `apify_shared.consts.MetaOrigin`, and an unknown value raises a `pydantic.ValidationError` before user code runs. Related: apify/apify-sdk-python#1032. The API OpenAPI spec is fixed in parallel (apify/apify-docs#2752), which covers the SDK master line that reads the enum from `apify-client` v3.
1 parent 62b3392 commit 8b9625d

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

src/apify_shared/consts.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -350,6 +350,12 @@ class MetaOrigin(str, Enum):
350350
CLI = 'CLI'
351351
"""Actor run started using the Apify command-line interface."""
352352

353+
CI = 'CI'
354+
"""Actor run started from a CI/CD pipeline (e.g. GitHub Actions)."""
355+
356+
MCP = 'MCP'
357+
"""Actor run started through the Apify client triggered from the Apify MCP server."""
358+
353359

354360
class StorageGeneralAccess(str, Enum):
355361
"""Storage setting determining how others can access the storage.

0 commit comments

Comments
 (0)